From fa7f37ee2605125855dfe65402f0f42d5cdcc7f2 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 7 Nov 2026 08:25:52 +0000 Subject: [PATCH] Decompile 2 functions in Source/UI/Window/FuncDrawWNDChar.cpp Batch #14399 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_09731 FuncDrawWNDChar::BodyAnchorOffset: logic confirmed by peer review - fn_09732 FuncDrawWNDChar::LayerAnchorOffset: logic confirmed by peer review Peer-reviewed-by: Yommy, secret, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Window/FuncDrawWNDChar.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/UI/Window/FuncDrawWNDChar.cpp b/Source/UI/Window/FuncDrawWNDChar.cpp index 5a480b36a..8ea2e54f4 100644 --- a/Source/UI/Window/FuncDrawWNDChar.cpp +++ b/Source/UI/Window/FuncDrawWNDChar.cpp @@ -292,7 +292,8 @@ int FuncDrawWNDChar::IsSpecialLayer(int layer) { FuncDrawOffset FuncDrawWNDChar::BodyAnchorOffset(const ActionFrame* frame, bool keepScale) { FuncDrawOffset offset; - CActRes* act = this->m_resources.find(1) != this->m_resources.end() ? this->m_resources[1].second : nullptr; + int layer = 1; + CActRes* act = this->m_resources.find(layer) != this->m_resources.end() ? this->m_resources[layer].second : nullptr; const ActionFrame& base = act->Frame(this->m_action, this->m_motion); if (frame->anchorCount > 0 && base.anchorCount > 0) { const ActionAnchor* frameAnchor = frame->anchors.data(); @@ -327,7 +328,9 @@ FuncDrawOffset FuncDrawWNDChar::LayerAnchorOffset(int layer, const ActionFrame** const ActionFrame* current = *frame; FuncDrawOffset offset; - CActRes* bodyAct = this->m_resources.find(2) != this->m_resources.end() ? this->m_resources[2].second : nullptr; + const auto resourcesEnd = this->m_resources.end(); + int bodyLayer = 2; + CActRes* bodyAct = this->m_resources.find(bodyLayer) != resourcesEnd ? this->m_resources[bodyLayer].second : nullptr; const ActionFrame& base = bodyAct->Frame(this->m_action, this->m_motion); int syncedMotion = 0; const ActionFrame* synced = g_session.GetSyncedFrame(bodyAct, act, this->m_action, this->m_motion, this->m_time, &syncedMotion);