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).
This commit is contained in:
ragnarok-clanker 2026-11-10 10:31:59 +00:00
commit 9393378c7c

View file

@ -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<int>(this->m_value) / 100;
auto* left = static_cast<CBitmapRes*>(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<int>(static_cast<double>(this->geometry.width - 8) * ratio);
auto* left = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(("유저인터페이스\\basic_interface\\gze" + color + "_left.bmp").c_str())));
@ -195,7 +203,10 @@ void UIBarGraphPlayer::Paint() {
}
const double ratio = static_cast<double>(current) / static_cast<double>(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<int>(static_cast<double>(this->geometry.width - 8) * ratio);
auto* left = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(("유저인터페이스\\basic_interface\\gze" + color + "_left.bmp").c_str())));