diff --git a/Source/Contents/UserData/NormalItemSlots.cpp b/Source/Contents/UserData/NormalItemSlots.cpp index 5f57c4f..68774ac 100644 --- a/Source/Contents/UserData/NormalItemSlots.cpp +++ b/Source/Contents/UserData/NormalItemSlots.cpp @@ -1,4 +1,5 @@ #include "Contents/UserData/NormalItemSlots.h" +#include "Render/Renderer.h" #include @@ -46,3 +47,434 @@ void ExportNormalItemSlots(Json::Value& data, const NormalItemSlot* slots, const data["NormalItemSlot"] = values; data["ItemSlotActive"] = active; } + +// OFFSET: 0x009A6110 + +// OFFSET: 0x009A6160 + +// OFFSET: 0x009A61A0 + +// OFFSET: 0x009A61E0 + +// OFFSET: 0x009A6220 + +// OFFSET: 0x009A6260 + +// OFFSET: 0x009A62A0 + +// OFFSET: 0x009A62F0 + +// OFFSET: 0x009A6320 + +// OFFSET: 0x009A6390 + +// OFFSET: 0x009A6430 +// FUNCTION: fn_13679 +void CashEmotionListWndInfo::Reset() { + this->x = 200; + this->y = 150; + this->width = 298; + this->height = 380; +} + +// OFFSET: 0x009A6450 +// FUNCTION: fn_13680 +void ChatRoomWndInfo::Reset() { + this->x = 500; + this->y = 180; + this->width = 280; + this->height = 120; +} + +// OFFSET: 0x009A6470 +// FUNCTION: fn_13681 +void ChooseWndInfo::Reset() { + this->x = 200; + this->y = 300; + this->width = 280; + this->height = 120; +} + +// OFFSET: 0x009A6490 +// FUNCTION: fn_13682 +void ClanWndInfo::Reset() { + this->x = 0; + this->y = 34; + this->width = 400; + this->height = 317; +} + +// OFFSET: 0x009A64B0 +// FUNCTION: fn_13683 +void CombinedCardItemCollectionWndInfo::Reset() { + this->x = 280; + this->y = 278; + this->width = 280; + this->height = 120; +} + +// OFFSET: 0x009A64D0 +// FUNCTION: fn_13684 +void UnusedWndInfoA::Reset() { + this->x = 200; + this->y = 200; + this->width = 260; + this->height = 175; +} + +// OFFSET: 0x009A64F0 +// FUNCTION: fn_13685 +void EmotionWndInfo::Reset() { + this->x = 200; + this->y = 150; + this->width = 375; + this->height = 280; +} + +// OFFSET: 0x009A6510 +// FUNCTION: fn_13686 +void EquipWndInfo::Reset() { + this->x = 185; + this->y = 300; + this->width = 280; + this->height = 167; + this->unknown_0010 = 167; + this->unknown_0014 = 0; +} + +// OFFSET: 0x009A6540 +// FUNCTION: fn_13687 +void ExchangeAcceptWndInfo::Reset() { + this->x = 200; + this->y = 200; + this->width = 280; + this->height = 120; +} + +// OFFSET: 0x009A6560 +// FUNCTION: fn_13688 +void FriendOptionWndInfo::Reset() { + this->x = 200; + this->y = 120; + this->width = 280; + this->height = 120; +} + +// OFFSET: 0x009A6580 +// FUNCTION: fn_13689 +void GuildHelperWndInfo::Reset() { + this->x = 230; + this->y = 0; + this->width = 200; + this->height = 150; +} + +// OFFSET: 0x009A65D0 +// FUNCTION: fn_13691 +void HomunInfoWndInfo::Reset() { + this->x = 150; + this->y = 100; + this->width = 280; + this->height = 180; +} + +// OFFSET: 0x009A65F0 +// FUNCTION: fn_13692 +void ItemCollectionWndInfo::Reset() { + this->x = 280; + this->y = 126; + this->width = 280; + this->height = 120; +} + +// OFFSET: 0x009A6610 + +// OFFSET: 0x009A6660 +// FUNCTION: fn_13694 +void ItemStoreFindWndInfo::Reset() { + this->x = 510; + this->y = 360; + this->width = 280; + this->height = 312; +} + +// OFFSET: 0x009A6680 + +// OFFSET: 0x009A66D0 +// FUNCTION: fn_13696 +void ItemParamChangeDisplayWndInfo::Reset() { + this->x = 280; + this->y = 246; + this->width = 280; + this->height = 34; +} + +// OFFSET: 0x009A66F0 +// FUNCTION: fn_13697 +void ItemPurchaseWndInfo::Reset() { + this->x = 280; + this->y = 280; + this->width = 280; + this->height = 152; +} + +// OFFSET: 0x009A6710 +// FUNCTION: fn_13698 +void ItemSellWndInfo::Reset() { + this->x = 280; + this->y = 280; + this->width = 280; + this->height = 152; +} + +// OFFSET: 0x009A6730 +// FUNCTION: fn_13699 +void ItemShopWndInfo::Reset() { + this->x = 0; + this->y = 120; + this->width = 280; + this->height = 312; +} + +// OFFSET: 0x009A6750 +// FUNCTION: fn_13700 +void ItemStoreFindListInfo::Reset() { + this->x = 360; + this->y = 200; + this->width = 280; + this->height = 458; + this->unknown_0010 = 0; +} + +// OFFSET: 0x009A6780 +// FUNCTION: fn_13701 +void ItemStoreFindSlotInfo::Reset(int index) { + const Position positions[] = {{210, 50}, {60, 50}, {210, 205}, {60, 205}, {210, 360}, {60, 360}, {210, 515}, {60, 515}}; + + this->width = 140; + this->height = 145; + this->x = positions[index].x; + this->y = positions[index].y; +} + +// OFFSET: 0x009A6800 +// FUNCTION: fn_13702 +void ItemWndInfo::Reset() { + this->x = 0; + this->y = 120; + this->width = 280; + this->height = 120; + this->unknown_0010 = 120; + this->unknown_0014 = 0; + this->unknown_0018 = 3; + this->unknown_001C = 3; + this->unknown_0020 = 4; + this->unknown_0024 = 0; +} + +// OFFSET: 0x009A6850 +// FUNCTION: fn_13703 +void EntryQueueWndInfo::Reset() { + this->width = 280; + this->height = 360; + this->x = 350; + this->y = 150; +} + +// OFFSET: 0x009A6870 +// FUNCTION: fn_13704 +void MiniMapWndInfo::Reset() { + const int x = g_renderer->viewport.width - 536; + + this->height = 190; + this->width = x; + this->x = x; + this->y = 190; + this->unknown_0010 = 516; + this->unknown_0014 = 559; + this->unknown_0020 = 1; + this->unknown_0018 = 1; + this->unknown_001C = 1; +} + +// OFFSET: 0x009A68C0 +// FUNCTION: fn_13705 +void MerInfoWndInfo::Reset() { + this->x = 150; + this->y = 100; + this->width = 280; + this->height = 180; +} + +// OFFSET: 0x009A68E0 +// FUNCTION: fn_13706 +void MerchantItemMyShopWndInfo::Reset() { + this->x = 200; + this->y = 120; + this->width = 280; + this->height = 120; +} + +// OFFSET: 0x009A6900 +// FUNCTION: fn_13707 +void MerchantItemPurchaseWndInfo::Reset() { + this->x = 280; + this->y = 280; + this->width = 280; + this->height = 152; +} + +// OFFSET: 0x009A6920 +// FUNCTION: fn_13708 +void MerchantItemShopWndInfo::Reset(bool wide) { + this->x = 0; + this->y = 120; + this->width = wide ? 350 : 280; + this->height = 312; +} + +// OFFSET: 0x009A6950 +// FUNCTION: fn_13709 +void MerchantItemWndInfo::Reset() { + this->x = 200; + this->y = 120; + this->width = 280; + this->height = 120; +} + +// OFFSET: 0x009A6970 +// FUNCTION: fn_13710 +void MerchantMirrorItemWndInfo::Reset() { + this->x = 0; + this->y = 120; + this->width = 280; + this->height = 120; +} + +// OFFSET: 0x009A6990 +// FUNCTION: fn_13711 +void MerchantShopMakeWndInfo::Reset() { + this->x = 0; + this->y = 240; + this->width = 280; + this->height = 220; +} + +// OFFSET: 0x009A69B0 +// FUNCTION: fn_13712 +void MessengerGroupWndInfo::Reset() { + this->width = 273; + this->height = 326; + this->unknown_0018 = 0; + this->x = 300; + this->y = 200; + this->unknown_0010 = 0; + this->unknown_0014 = 1; +} + +// OFFSET: 0x009A69F0 +// FUNCTION: fn_13713 +void NCashWndInfo::Reset() { + this->x = 0; + this->y = 30; + this->width = 640; + this->height = 508; +} + +// OFFSET: 0x009A6A70 +// FUNCTION: fn_13714 +void UnusedWndInfoB::Reset() { + this->x = 185; + this->y = 300; + this->width = 250; + this->height = 60; + this->unknown_0010 = 60; + this->unknown_0014 = 0; +} + +// OFFSET: 0x009A6AA0 +// FUNCTION: fn_13715 +void SeekPartyWndInfo::Reset() { + this->x = 510; + this->y = 360; + this->width = 152; + this->height = 199; +} + +// OFFSET: 0x009A6AC0 +// FUNCTION: fn_13716 +void SeekPartyListWndInfo::Reset() { + this->x = 510; + this->y = 360; + this->width = 550; + this->height = 350; +} + +// OFFSET: 0x009A6AE0 +// FUNCTION: fn_13717 +void SeekPartyMBWndInfo::Reset() { + this->x = 510; + this->y = 360; + this->width = 360; + this->height = 350; +} + +// OFFSET: 0x009A6B00 +// FUNCTION: fn_13718 +void JobListWndInfo::Reset() { + this->x = 510; + this->y = 360; + this->width = 152; + this->height = 199; +} + +// OFFSET: 0x009A6B20 +// FUNCTION: fn_13719 +void PartySettingWndInfo::Reset() { + this->x = 280; + this->y = 246; + this->width = 280; + this->height = 180; +} + +// OFFSET: 0x009A6B40 +// FUNCTION: fn_13720 +void PetInfoWndInfo::Reset() { + this->x = 150; + this->y = 100; + this->width = 280; + this->height = 200; +} + +// OFFSET: 0x009A6B60 +// FUNCTION: fn_13721 +void QuestDisplayInfo::Reset() { + this->unknown_0000 = 1; +} + +// OFFSET: 0x009A6BB0 +// FUNCTION: fn_13722 +void QuickSlotWndInfo::Reset() { + this->x = g_renderer->viewport.width - 124; + this->y = 0; + this->width = 77; + this->height = 34; +} + +// OFFSET: 0x009A6BE0 +// FUNCTION: fn_13723 +void ReplayRECControlWndInfo::Reset() { + this->x = 259; + this->y = 230; + this->width = 194; + this->height = 34; +} + +// OFFSET: 0x009A6C00 +// FUNCTION: fn_13724 +void SayDialogWndInfo::Reset() { + this->x = 200; + this->y = 100; + this->width = 280; + this->height = 180; +} diff --git a/Source/Contents/UserData/NormalItemSlots.h b/Source/Contents/UserData/NormalItemSlots.h index 26484c3..c880dcb 100644 --- a/Source/Contents/UserData/NormalItemSlots.h +++ b/Source/Contents/UserData/NormalItemSlots.h @@ -37,6 +37,276 @@ static_assert(offsetof(NormalItemSlotWindow, height) == 0x000C); static_assert(offsetof(NormalItemSlotWindow, show) == 0x0010); #endif +struct WindowPlacement { + /* 0000 */ int x; + /* 0004 */ int y; + /* 0008 */ int width; + /* 000C */ int height; +}; + +struct SkillListWndInfo : WindowPlacement { + int IsValid() const; +}; + +struct StatusWndInfo : WindowPlacement { + int IsValid() const; +}; + +struct SubChatHisWndInfo : WindowPlacement { + int IsValid() const; +}; + +struct AdvenPartyBoardWndInfo : WindowPlacement { + int IsValid() const; +}; + +struct ApplyForPartyWndInfo : WindowPlacement { + int IsValid() const; +}; + +struct RegisterPartyWndInfo : WindowPlacement { + int IsValid() const; +}; + +struct WhisperWndInfo : WindowPlacement { + int IsValid() const; +}; + +struct MacroReporterWndInfo : WindowPlacement { + bool IsValid() const; +}; + +struct PreviewEquipWndInfo : WindowPlacement { + bool IsValid() const; +}; + +struct AchTracingWndInfo : WindowPlacement { + void Reset(); +}; + +struct CashEmotionListWndInfo : WindowPlacement { + void Reset(); +}; + +struct ChatRoomWndInfo : WindowPlacement { + void Reset(); +}; + +struct ChooseWndInfo : WindowPlacement { + void Reset(); +}; + +struct ClanWndInfo : WindowPlacement { + void Reset(); +}; + +struct CombinedCardItemCollectionWndInfo : WindowPlacement { + void Reset(); +}; + +struct UnusedWndInfoA : WindowPlacement { + void Reset(); +}; + +struct EmotionWndInfo : WindowPlacement { + void Reset(); +}; + +struct EquipWndInfo : WindowPlacement { + /* 0010 */ int unknown_0010; + /* 0014 */ int unknown_0014; + + void Reset(); +}; + +struct ExchangeAcceptWndInfo : WindowPlacement { + void Reset(); +}; + +struct FriendOptionWndInfo : WindowPlacement { + void Reset(); +}; + +struct GuildHelperWndInfo : WindowPlacement { + void Reset(); +}; + +struct HomunInfoWndInfo : WindowPlacement { + void Reset(); +}; + +struct ItemCollectionWndInfo : WindowPlacement { + void Reset(); +}; + +struct ItemCompositionWndInfo : WindowPlacement { + void Reset(); +}; + +struct ItemStoreFindWndInfo : WindowPlacement { + void Reset(); +}; + +struct ItemIdentifyWndInfo : WindowPlacement { + void Reset(); +}; + +struct ItemParamChangeDisplayWndInfo : WindowPlacement { + void Reset(); +}; + +struct ItemPurchaseWndInfo : WindowPlacement { + void Reset(); +}; + +struct ItemSellWndInfo : WindowPlacement { + void Reset(); +}; + +struct ItemShopWndInfo : WindowPlacement { + void Reset(); +}; + +struct ItemStoreFindListInfo : WindowPlacement { + /* 0010 */ int unknown_0010; + + void Reset(); +}; + +struct ItemStoreFindSlotInfo : WindowPlacement { + struct Position { + /* 0000 */ int x; + /* 0004 */ int y; + }; + + void Reset(int index); +}; + +struct ItemWndInfo : WindowPlacement { + /* 0010 */ int unknown_0010; + /* 0014 */ int unknown_0014; + /* 0018 */ int unknown_0018; + /* 001C */ int unknown_001C; + /* 0020 */ int unknown_0020; + /* 0024 */ int unknown_0024; + + void Reset(); +}; + +struct EntryQueueWndInfo : WindowPlacement { + void Reset(); +}; + +struct MiniMapWndInfo : WindowPlacement { + /* 0010 */ int unknown_0010; + /* 0014 */ int unknown_0014; + /* 0018 */ int unknown_0018; + /* 001C */ int unknown_001C; + /* 0020 */ int unknown_0020; + + void Reset(); +}; + +struct MerInfoWndInfo : WindowPlacement { + void Reset(); +}; + +struct MerchantItemMyShopWndInfo : WindowPlacement { + void Reset(); +}; + +struct MerchantItemPurchaseWndInfo : WindowPlacement { + void Reset(); +}; + +struct MerchantItemShopWndInfo : WindowPlacement { + void Reset(bool wide); +}; + +struct MerchantItemWndInfo : WindowPlacement { + void Reset(); +}; + +struct MerchantMirrorItemWndInfo : WindowPlacement { + void Reset(); +}; + +struct MerchantShopMakeWndInfo : WindowPlacement { + void Reset(); +}; + +struct MessengerGroupWndInfo : WindowPlacement { + /* 0010 */ int unknown_0010; + /* 0014 */ int unknown_0014; + /* 0018 */ int unknown_0018; + + void Reset(); +}; + +struct NCashWndInfo : WindowPlacement { + void Reset(); +}; + +struct UnusedWndInfoB : WindowPlacement { + /* 0010 */ int unknown_0010; + /* 0014 */ int unknown_0014; + + void Reset(); +}; + +struct SeekPartyWndInfo : WindowPlacement { + void Reset(); +}; + +struct SeekPartyListWndInfo : WindowPlacement { + void Reset(); +}; + +struct SeekPartyMBWndInfo : WindowPlacement { + void Reset(); +}; + +struct JobListWndInfo : WindowPlacement { + void Reset(); +}; + +struct PartySettingWndInfo : WindowPlacement { + void Reset(); +}; + +struct PetInfoWndInfo : WindowPlacement { + void Reset(); +}; + +struct QuestDisplayInfo { + /* 0000 */ int unknown_0000; + + void Reset(); +}; + +struct QuickSlotWndInfo : WindowPlacement { + void Reset(); +}; + +struct ReplayRECControlWndInfo : WindowPlacement { + void Reset(); +}; + +struct SayDialogWndInfo : WindowPlacement { + void Reset(); +}; + +#if defined(_WIN32) && !defined(_WIN64) +static_assert(offsetof(WindowPlacement, height) == 0x000C); +static_assert(sizeof(WindowPlacement) == 0x10); +static_assert(sizeof(EquipWndInfo) == 0x18); +static_assert(sizeof(ItemStoreFindListInfo) == 0x14); +static_assert(sizeof(ItemWndInfo) == 0x28); +static_assert(sizeof(MiniMapWndInfo) == 0x24); +static_assert(sizeof(MessengerGroupWndInfo) == 0x1C); +static_assert(sizeof(UnusedWndInfoB) == 0x18); +#endif + void ExportNormalItemSlots(Json::Value& data, const NormalItemSlot* slots, const NormalItemSlotWindow& window, bool active); #endif diff --git a/Source/Render/Renderer.h b/Source/Render/Renderer.h index cec7abf..b1c710f 100644 --- a/Source/Render/Renderer.h +++ b/Source/Render/Renderer.h @@ -68,6 +68,8 @@ public: CRenderer& operator=(const CRenderer&) = delete; }; +extern CRenderer* g_renderer; + #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(CRenderer) == 0x25C); static_assert(offsetof(CRenderer, unknown_0049) == 0x0049);