From 831aeaac522b00ed27e82f8ea63793d68066b6cc Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 12:11:27 +0000 Subject: [PATCH] Decompile 3 functions in Source/UI/UIBarGraph.cpp, Source/UI/UIBarGraph.h, ... Batch #7862 by secret: 0 byte-identical, 3 confirmed by peer review. - fn_11023 UIBarGraph3::UIBarGraph3: logic confirmed by peer review - fn_11045 UIINT64BarGraph::UIINT64BarGraph: logic confirmed by peer review - fn_11066 UIPetInfoBarGraph::UIPetInfoBarGraph: logic confirmed by peer review Peer-reviewed-by: eAthena, pedrao Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Gauges/UIPetInfoBarGraph.cpp | 10 ++++++++++ Source/UI/UIBarGraph.cpp | 12 ++++++++++-- Source/UI/UIBarGraph.h | 14 ++++++++++++-- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/Source/UI/Gauges/UIPetInfoBarGraph.cpp b/Source/UI/Gauges/UIPetInfoBarGraph.cpp index 16f997cd..60e33f95 100644 --- a/Source/UI/Gauges/UIPetInfoBarGraph.cpp +++ b/Source/UI/Gauges/UIPetInfoBarGraph.cpp @@ -70,3 +70,13 @@ void UIPetInfoBarGraph::Paint() { this->DrawBitmap(barMiddle->image.width * x + barLeft->image.width, 0, &barRight->image, true); } } + +// OFFSET: 0x0086D380 +// FUNCTION: fn_11045 +UIINT64BarGraph::UIINT64BarGraph(UIWindowContext& context) : UIWindow(context, 0), m_current(0), m_maximum(0) { +} + +// OFFSET: 0x0086E1B0 +// FUNCTION: fn_11066 +UIPetInfoBarGraph::UIPetInfoBarGraph(UIWindowContext& context) : UIWindow(context, 0), unknown_007C(0) { +} diff --git a/Source/UI/UIBarGraph.cpp b/Source/UI/UIBarGraph.cpp index 9c656d7b..99f90732 100644 --- a/Source/UI/UIBarGraph.cpp +++ b/Source/UI/UIBarGraph.cpp @@ -9,11 +9,12 @@ #include #include -class UIBarGraph2 : public UIWindow { +class UIBarGraph2 : public UIBarGraph { public: + explicit UIBarGraph2(UIWindowContext& context); + void Paint() override; - /* 007C */ float m_value; /* 0080 */ int m_vertical; /* 0084 */ unsigned char m_backgroundRed; /* 0085 */ unsigned char unknown_0085[3]; @@ -28,6 +29,13 @@ public: /* 0098 */ unsigned char m_fillBlue; }; +// OFFSET: 0x0086C190 + +// OFFSET: 0x0086C240 +// FUNCTION: fn_11023 +UIBarGraph3::UIBarGraph3(UIWindowContext& context) : UIWindow(context, 0), m_current(nullptr), m_maximum(nullptr) { +} + // OFFSET: 0x0086C310 // FUNCTION: fn_11024 UIBarGraphHomun::UIBarGraphHomun(UIWindowContext& context) : UIWindow(context, 0) { diff --git a/Source/UI/UIBarGraph.h b/Source/UI/UIBarGraph.h index 8d854a34..7f402dba 100644 --- a/Source/UI/UIBarGraph.h +++ b/Source/UI/UIBarGraph.h @@ -10,6 +10,9 @@ struct UIButtonContext; class UIBarGraph : public UIWindow { public: + explicit UIBarGraph(UIWindowContext& context) : UIWindow(context, 0), m_value(0) { + } + void Paint() override; void SetValue(float value); @@ -19,7 +22,12 @@ public: class UIBarGraph3 : public UIWindow { public: + explicit UIBarGraph3(UIWindowContext& context); ~UIBarGraph3() override; + +protected: + /* 007C */ const int* m_current; + /* 0080 */ const int* m_maximum; }; class UIBarGraph4 : public UIBarGraph3 { @@ -30,14 +38,14 @@ public: void SetValues(const int* current, const int* maximum); protected: - /* 007C */ const int* m_current; - /* 0080 */ const int* m_maximum; /* 0084 */ bool m_plainColor; UIButtonContext* m_controls; }; class UIINT64BarGraph : public UIWindow { public: + explicit UIINT64BarGraph(UIWindowContext& context); + void Paint() override; void Slot28(int x, int y) override; @@ -53,6 +61,8 @@ protected: class UIPetInfoBarGraph : public UIWindow { public: + explicit UIPetInfoBarGraph(UIWindowContext& context); + void Paint() override; void SetValue(int value);