From 83d0bb9b6ff58bdf3f96c4d0825d7ba73f6859ce Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 14:20:10 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/Effects/Level150Effect.cpp Batch #16067 by Yommy: 0 byte-identical, 2 confirmed by peer review. - fn_18921 CLevel150SubEffect::Init: logic confirmed by peer review - fn_18925 CLevel150SubEffect::OnProcess: logic confirmed by peer review Peer-reviewed-by: alisonrag, youko Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Effects/Level150Effect.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Contents/Effects/Level150Effect.cpp b/Source/Contents/Effects/Level150Effect.cpp index e23fff634..724948b64 100644 --- a/Source/Contents/Effects/Level150Effect.cpp +++ b/Source/Contents/Effects/Level150Effect.cpp @@ -337,9 +337,9 @@ void CLevel150SubEffect::SetColor(int red, int green, int blue) { // OFFSET: 0x00B47850 // FUNCTION: fn_18921 void CLevel150SubEffect::Init() { - const int blue[4][3] = {{105, 105, 255}, {5, 5, 255}, {55, 55, 255}, {155, 155, 255}}; - const int yellow[4][3] = {{255, 255, 105}, {255, 255, 5}, {255, 255, 55}, {255, 255, 155}}; const int red[4][3] = {{255, 105, 105}, {255, 5, 5}, {255, 55, 55}, {255, 155, 155}}; + const int yellow[4][3] = {{255, 255, 105}, {255, 255, 5}, {255, 255, 55}, {255, 255, 155}}; + const int blue[4][3] = {{105, 105, 255}, {5, 5, 255}, {55, 55, 255}, {155, 155, 255}}; const int effectId = this->id; for (int ring = 0; ring < 4; ++ring) { for (int index = 0; index < 2; ++index) { @@ -349,7 +349,7 @@ void CLevel150SubEffect::Init() { } particle->SetTexture("effect\\emp shock.tga"); - *reinterpret_cast(&particle->angleBits) = static_cast(std::max(rand() % 360, 0)); + *reinterpret_cast(&particle->angleBits) = static_cast(std::ranges::max(rand() % 360, 0)); particle->alpha = 200; particle->animationParameter = 10.0f; *reinterpret_cast(particle->animationParameters) = 10.0f; @@ -410,7 +410,7 @@ void CLevel150SubEffect::OnProcess() { int alpha = particle->alpha - 3; if (alpha <= 0) { size = 10.0f; - *reinterpret_cast(&particle->angleBits) = static_cast(std::max(rand() % 360, 0)); + *reinterpret_cast(&particle->angleBits) = static_cast(std::ranges::max(rand() % 360, 0)); alpha = 200; } particle->alpha = alpha;