From 3be7ffbacba2f5a6f58304aae607fca6ed412a3c Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 11 Nov 2026 13:54:36 +0000 Subject: [PATCH] Decompile 2 functions in Source/UI/Buttons/UITextButton.cpp Batch #17108 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_11359 UIINT64BarGraph::Paint: logic confirmed by peer review - fn_11396 UIZeroQuestScrollBar::Paint: logic confirmed by peer review Peer-reviewed-by: Yommy, Toshiro, br4yan Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Buttons/UITextButton.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Source/UI/Buttons/UITextButton.cpp b/Source/UI/Buttons/UITextButton.cpp index 8cd1f8468..c8d1cc0fa 100644 --- a/Source/UI/Buttons/UITextButton.cpp +++ b/Source/UI/Buttons/UITextButton.cpp @@ -1859,7 +1859,7 @@ void UIINT64BarGraph::Paint() { const double ratio = static_cast(this->m_current) / static_cast(this->m_maximum); - if (ratio == 0.0) { + if (0.0 == ratio) { return; } @@ -2166,26 +2166,29 @@ void UIZeroQuestScrollBar::Paint() { return; } - auto* up = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_arrow_up.bmp")); - this->DrawBitmap(0, 0, static_cast(up), true); + this->DrawBitmap(0, 0, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_arrow_up.bmp"))), true); - auto* down = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_arrow_down.bmp")); - this->DrawBitmap(0, this->geometry.height - this->arrowLength, static_cast(down), true); + this->DrawBitmap(0, this->geometry.height - this->arrowLength, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_arrow_down.bmp"))), true); - const int extent = this->vertical == 0 ? this->geometry.width : this->geometry.height; + int extent = this->geometry.height; + switch (this->vertical) { + case 0: + extent = this->geometry.width; + break; + case 1: + extent = this->geometry.height; + break; + } int y = this->arrowLength + (this->position * (extent - this->arrowLength * 2 - this->ThumbLength())) / this->maximum; - auto* thumbUp = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_thumb_up.bmp")); - this->DrawBitmap(0, y, static_cast(thumbUp), true); + this->DrawBitmap(0, y, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_thumb_up.bmp"))), true); const int bottom = y + this->ThumbLength() - 4; for (y += 4; y < bottom; y += 4) { - auto* thumbMiddle = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_thumb_mid.bmp")); - this->DrawBitmap(0, y, static_cast(thumbMiddle), true); + this->DrawBitmap(0, y, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_thumb_mid.bmp"))), true); } - auto* thumbDown = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_thumb_down.bmp")); - this->DrawBitmap(0, bottom, static_cast(thumbDown), true); + this->DrawBitmap(0, bottom, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\UIRenewal\\questui\\btn_scroll_thumb_down.bmp"))), true); } // OFFSET: 0x00884DD0