From 6f75132a6a5f0655fb38b35e61deb03d4446dfd0 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 05:47:32 +0000 Subject: [PATCH] Decompile 4 functions in Source/UI/Clan/UIClanWnd.cpp, Source/UI/Clan/UIClanWnd.h Batch #4900 by youko: 0 byte-identical, 4 confirmed by peer review. - fn_10632 UIClanInfoManageWnd::Slot25: logic confirmed by peer review - fn_10634 UIClanWnd::SendMsg: logic confirmed by peer review - fn_10635 UIClanInfoManageWnd::LoadEmblem: logic confirmed by peer review - fn_10636 UIClanWnd::Slot11: logic confirmed by peer review Peer-reviewed-by: eAthena, alisonrag, KWDev Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). Adds to the build: Source/UI/Clan/UIClanWnd.cpp --- Source/UI/Clan/UIClanWnd.cpp | 65 ++++++++++++++++++++++++++++++++++++ Source/UI/Clan/UIClanWnd.h | 33 ++++++++++++++++++ data/compile.json | 1 + 3 files changed, 99 insertions(+) create mode 100644 Source/UI/Clan/UIClanWnd.cpp create mode 100644 Source/UI/Clan/UIClanWnd.h diff --git a/Source/UI/Clan/UIClanWnd.cpp b/Source/UI/Clan/UIClanWnd.cpp new file mode 100644 index 00000000..0d977926 --- /dev/null +++ b/Source/UI/Clan/UIClanWnd.cpp @@ -0,0 +1,65 @@ +#include "UI/Clan/UIClanWnd.h" +#include "Contents/ClanInfo.h" +#include "Contents/UserData/NormalItemSlots.h" +#include "Resource/Bitmap/BitmapResource.h" +#include "Resource/ResourceMgr.h" +#include "Resource/SkinPalette.h" +#include "Resource/TextureNames.h" +#include "UI/Buttons/UIButton.h" + +#include +#include +#include + +// OFFSET: 0x0084D8F0 + +// OFFSET: 0x0084DA30 +// FUNCTION: fn_10632 +void UIClanInfoManageWnd::Slot25(int x, int y) { + UIFrameWnd::Slot25(x, y); +} + +// OFFSET: 0x0084DAE0 +// FUNCTION: fn_10634 +int UIClanWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, std::intptr_t a2, std::intptr_t a3, std::intptr_t a4) { + if (message == 34) { + this->m_saved = reinterpret_cast(a1); + if (!this->m_saved->IsValid()) { + this->m_saved->Reset(); + } + this->Move(this->m_saved->x, this->m_saved->y); + return 0; + } + + if (message == 60) { + this->InvalidateChildren(); + return 0; + } + + return UIFrameWnd::SendMsg(sender, message, a1, a2, a3, a4); +} + +// OFFSET: 0x0084DB50 +// FUNCTION: fn_10635 +void UIClanInfoManageWnd::LoadEmblem() { + if (g_clanInfo->m_hasClan == true) { + char path[256]; + std::memset(path, 0, sizeof(path)); + std::sprintf(path, "유저인터페이스\\clan_system\\clan_emblem%02d.bmp", g_clanInfo->m_clanId); + this->m_emblem = static_cast(ResourceMgr::Instance().Load(Resolve(path))); + if (!this->m_emblem) { + this->m_emblem = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\clan_system\\clan_emblem01.bmp"))); + } + } +} + +// OFFSET: 0x0084DC00 +// FUNCTION: fn_10636 +void UIClanWnd::Slot11() { + if (this->m_saved) { + this->m_saved->x = this->geometry.x; + this->m_saved->y = this->geometry.y; + this->m_saved->width = this->geometry.width; + this->m_saved->height = this->geometry.height; + } +} diff --git a/Source/UI/Clan/UIClanWnd.h b/Source/UI/Clan/UIClanWnd.h new file mode 100644 index 00000000..9838e6a9 --- /dev/null +++ b/Source/UI/Clan/UIClanWnd.h @@ -0,0 +1,33 @@ +#ifndef RAGNAROK_SOURCE_UI_CLAN_UICLANWND_H +#define RAGNAROK_SOURCE_UI_CLAN_UICLANWND_H + +#include "UI/Window/UIFrameWnd.h" + +struct UIButtonContext; +struct ClanWndInfo; +class CBitmapRes; + +class UIClanWnd : public UIFrameWnd { +public: + void Slot11() override; + void Paint() override; + int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; + +protected: + UIButtonContext* m_controls; + /* 00B4 */ ClanWndInfo* m_saved; +}; + +class UIClanInfoManageWnd : public UIClanWnd { +public: + void Slot25(int x, int y) override; + void LoadEmblem(); + +protected: + /* 00B8 */ UIWindow* unknown_00B8; + /* 00BC */ int unknown_00BC; + /* 00C0 */ int unknown_00C0; + /* 00C4 */ CBitmapRes* m_emblem; +}; + +#endif diff --git a/data/compile.json b/data/compile.json index 1c6aaacd..b6d374d7 100644 --- a/data/compile.json +++ b/data/compile.json @@ -800,6 +800,7 @@ "Source/UI/Chat/UIChatRoomTitle.cpp": 2, "Source/UI/Chat/UISubChatHisWnd.cpp": 2, "Source/UI/Chat/UIWhisperWnd.cpp": 2, + "Source/UI/Clan/UIClanWnd.cpp": 2, "Source/UI/Cooldowns/CooldownDrawing.cpp": 2, "Source/UI/Cooldowns/CooldownOwner.cpp": 2, "Source/UI/Cooldowns/CooldownState.cpp": 2,