From 9393378c7ceed467eb0d51604157884ce050cd9f Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 10:31:59 +0000 Subject: [PATCH] Decompile 3 functions in Source/UI/UIBarGraph.cpp Batch #15834 by Yommy: 0 byte-identical, 3 confirmed by peer review. - fn_11339 UIBarGraph::Paint: logic confirmed by peer review - fn_11340 UIBarGraphHomun::Paint: logic confirmed by peer review - fn_11341 UIBarGraphPlayer::Paint: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, eAthena Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/UIBarGraph.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Source/UI/UIBarGraph.cpp b/Source/UI/UIBarGraph.cpp index 316cd8e2c..42ea94eb6 100644 --- a/Source/UI/UIBarGraph.cpp +++ b/Source/UI/UIBarGraph.cpp @@ -110,7 +110,12 @@ void UIBarGraph::Paint() { return; } - const std::string color = this->m_value >= 25.0f ? "blue" : "red"; + std::string color; + if (this->m_value < 25.0f) { + color = "red"; + } else { + color = "blue"; + } const int fill = (this->geometry.width - 8) * static_cast(this->m_value) / 100; auto* left = static_cast(ResourceMgr::Instance().Load(Resolve(("유저인터페이스\\basic_interface\\gze" + color + "_left.bmp").c_str()))); @@ -159,7 +164,10 @@ void UIBarGraphHomun::Paint() { return; } - const std::string color = ratio < 0.25 ? "red" : "blue"; + std::string color = "blue"; + if (ratio < 0.25) { + color = "red"; + } const int fill = static_cast(static_cast(this->geometry.width - 8) * ratio); auto* left = static_cast(ResourceMgr::Instance().Load(Resolve(("유저인터페이스\\basic_interface\\gze" + color + "_left.bmp").c_str()))); @@ -195,7 +203,10 @@ void UIBarGraphPlayer::Paint() { } const double ratio = static_cast(current) / static_cast(maximum); - const std::string color = ratio < 0.25 ? "red" : "blue"; + std::string color = "blue"; + if (ratio < 0.25) { + color = "red"; + } const int fill = static_cast(static_cast(this->geometry.width - 8) * ratio); auto* left = static_cast(ResourceMgr::Instance().Load(Resolve(("유저인터페이스\\basic_interface\\gze" + color + "_left.bmp").c_str())));