From 28d84cda2387ed74b01ef2b83f29ba839e6e7231 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 11:17:39 +0000 Subject: [PATCH] Decompile fn_19987 (CEffectPrim::RenderPolygonFrames) Batch #12117 by SapitoSucio: 0 byte-identical, 1 confirmed by peer review. - fn_19987 CEffectPrim::RenderPolygonFrames: logic confirmed by peer review Peer-reviewed-by: Yommy, Tanke Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- .../Contents/Effects/EffectPrimitiveArcs.cpp | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/Source/Contents/Effects/EffectPrimitiveArcs.cpp b/Source/Contents/Effects/EffectPrimitiveArcs.cpp index 5b853ec82..84b2bfcb7 100644 --- a/Source/Contents/Effects/EffectPrimitiveArcs.cpp +++ b/Source/Contents/Effects/EffectPrimitiveArcs.cpp @@ -1400,20 +1400,21 @@ void CEffectPrim::RenderPolygonFrames(matrix& wtm) { radius = slot.distance; angle = slot.fullDisplayAngle; + const float shape = slot.height[10]; p0.x = radius * g_cosTable[angle]; p0.y = 0.0f; p0.z = radius * g_sinTable[angle]; - if (slot.height[10] == 0.0f) { + if (shape == 0.0f) { angle -= 90; if (angle < 0) { angle += 360; } - } else if (slot.height[10] == 1.0f) { + } else if (shape == 1.0f) { angle -= 60; if (angle < 0) { angle += 360; } - } else if (slot.height[10] == 2.0f) { + } else if (shape == 2.0f) { angle -= 130; if (angle < 0) { angle += 360; @@ -1422,17 +1423,17 @@ void CEffectPrim::RenderPolygonFrames(matrix& wtm) { p1.x = radius * g_cosTable[angle]; p1.y = 0.0f; p1.z = radius * g_sinTable[angle]; - if (slot.height[10] == 0.0f) { + if (shape == 0.0f) { angle -= 90; if (angle < 0) { angle += 360; } - } else if (slot.height[10] == 1.0f) { + } else if (shape == 1.0f) { angle -= 120; if (angle < 0) { angle += 360; } - } else if (slot.height[10] == 2.0f) { + } else if (shape == 2.0f) { angle -= 50; if (angle < 0) { angle += 360; @@ -1441,17 +1442,17 @@ void CEffectPrim::RenderPolygonFrames(matrix& wtm) { p2.x = radius * g_cosTable[angle]; p2.y = 0.0f; p2.z = radius * g_sinTable[angle]; - if (slot.height[10] == 0.0f) { + if (shape == 0.0f) { angle -= 90; if (angle < 0) { angle += 360; } - } else if (slot.height[10] == 1.0f) { + } else if (shape == 1.0f) { angle -= 60; if (angle < 0) { angle += 360; } - } else if (slot.height[10] == 2.0f) { + } else if (shape == 2.0f) { angle -= 130; if (angle < 0) { angle += 360; @@ -1505,17 +1506,17 @@ void CEffectPrim::RenderPolygonFrames(matrix& wtm) { p0.x = radius * g_cosTable[angle]; p0.y = 0.0f; p0.z = radius * g_sinTable[angle]; - if (slot.height[10] == 0.0f) { + if (shape == 0.0f) { angle -= 90; if (angle < 0) { angle += 360; } - } else if (slot.height[10] == 1.0f) { + } else if (shape == 1.0f) { angle -= 60; if (angle < 0) { angle += 360; } - } else if (slot.height[10] == 2.0f) { + } else if (shape == 2.0f) { angle -= 130; if (angle < 0) { angle += 360; @@ -1524,17 +1525,17 @@ void CEffectPrim::RenderPolygonFrames(matrix& wtm) { p1.x = radius * g_cosTable[angle]; p1.y = 0.0f; p1.z = radius * g_sinTable[angle]; - if (slot.height[10] == 0.0f) { + if (shape == 0.0f) { angle -= 90; if (angle < 0) { angle += 360; } - } else if (slot.height[10] == 1.0f) { + } else if (shape == 1.0f) { angle -= 120; if (angle < 0) { angle += 360; } - } else if (slot.height[10] == 2.0f) { + } else if (shape == 2.0f) { angle -= 50; if (angle < 0) { angle += 360; @@ -1543,17 +1544,17 @@ void CEffectPrim::RenderPolygonFrames(matrix& wtm) { p2.x = radius * g_cosTable[angle]; p2.y = 0.0f; p2.z = radius * g_sinTable[angle]; - if (slot.height[10] == 0.0f) { + if (shape == 0.0f) { angle -= 90; if (angle < 0) { angle += 360; } - } else if (slot.height[10] == 1.0f) { + } else if (shape == 1.0f) { angle -= 60; if (angle < 0) { angle += 360; } - } else if (slot.height[10] == 2.0f) { + } else if (shape == 2.0f) { angle -= 130; if (angle < 0) { angle += 360;