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
This commit is contained in:
parent
6be31d81c8
commit
6f75132a6a
3 changed files with 99 additions and 0 deletions
65
Source/UI/Clan/UIClanWnd.cpp
Normal file
65
Source/UI/Clan/UIClanWnd.cpp
Normal file
|
|
@ -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 <cstdio>
|
||||
#include <cstring>
|
||||
#include <windows.h>
|
||||
|
||||
// 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<ClanWndInfo*>(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<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(path)));
|
||||
if (!this->m_emblem) {
|
||||
this->m_emblem = static_cast<CBitmapRes*>(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;
|
||||
}
|
||||
}
|
||||
33
Source/UI/Clan/UIClanWnd.h
Normal file
33
Source/UI/Clan/UIClanWnd.h
Normal file
|
|
@ -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
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue