diff --git a/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp b/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp index d82e39ba..6af77f26 100644 --- a/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp +++ b/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp @@ -109,6 +109,7 @@ #include #include #include +#include #include namespace Addresses(Simulator) @@ -1171,6 +1172,10 @@ namespace Simulator namespace Addresses(cGamePlantManager) { DefineAddress(Get, SelectAddress(0xB3D310, 0xB3D4B0)); } + + namespace Addresses(cUIAssetDiscoveryManager) { + DefineAddress(Get, SelectAddress(0xB3D450, 0xB3D5F0)); + } } #ifdef SDK_TO_GHIDRA diff --git a/Spore ModAPI/SourceCode/DLL/AddressesUI.cpp b/Spore ModAPI/SourceCode/DLL/AddressesUI.cpp index f71f6154..f75b0674 100644 --- a/Spore ModAPI/SourceCode/DLL/AddressesUI.cpp +++ b/Spore ModAPI/SourceCode/DLL/AddressesUI.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -16,6 +17,11 @@ namespace UI DefineAddress(Get, SelectAddress(0x67CC20, 0x67CA90)); } + namespace Addresses(cSPAssetView) { + DefineAddress(_ctor, SelectAddress(0x657DA0, 0x657F30)); + DefineAddress(sub_6590A0, SelectAddress(0x6590A0, 0x659230)); + } + namespace Addresses(SpaceGameUI) { DefineAddress(Load, SelectAddress(0x10743F0, 0x1073730)); diff --git a/Spore ModAPI/SourceCode/Simulator/SimulatorMisc.cpp b/Spore ModAPI/SourceCode/Simulator/SimulatorMisc.cpp index 132c1a9f..9dd01ae8 100644 --- a/Spore ModAPI/SourceCode/Simulator/SimulatorMisc.cpp +++ b/Spore ModAPI/SourceCode/Simulator/SimulatorMisc.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -224,6 +225,10 @@ namespace Simulator /// GamePlantManager /// auto_STATIC_METHOD_(cGamePlantManager, cGamePlantManager*, Get); + + /// UIAssetDiscoveryManager /// + + auto_STATIC_METHOD_(cUIAssetDiscoveryManager, cUIAssetDiscoveryManager*, Get); } #endif \ No newline at end of file diff --git a/Spore ModAPI/SourceCode/UI/UI.cpp b/Spore ModAPI/SourceCode/UI/UI.cpp index fb7a082b..c3ed89df 100644 --- a/Spore ModAPI/SourceCode/UI/UI.cpp +++ b/Spore ModAPI/SourceCode/UI/UI.cpp @@ -58,8 +58,7 @@ namespace UI cSPAssetView::cSPAssetView() { - //CALL(GetAddress(cSPAssetView, _ctor), void, Args(cSPAssetView*), Args(this)); - CALL(Address(0x657DA0), void, Args(cSPAssetView*), Args(this)); + CALL(GetAddress(cSPAssetView, _ctor), void, Args(cSPAssetView*), Args(this)); } // Leave empty implementations for everything, as these methods are never called // We sue Spore's vftable by calling the original constructor @@ -89,6 +88,8 @@ namespace UI void cSPAssetView::SetVisible(bool visible) { } + auto_METHOD_(cSPAssetView, bool, sub_6590A0); + AssetDiscoveryCard::AssetDiscoveryCard() : mLayout() , mAssetData() diff --git a/Spore ModAPI/Spore/Simulator/SubSystem/UIAssetDiscoveryManager.h b/Spore ModAPI/Spore/Simulator/SubSystem/UIAssetDiscoveryManager.h index c064c9c2..295717b6 100644 --- a/Spore ModAPI/Spore/Simulator/SubSystem/UIAssetDiscoveryManager.h +++ b/Spore ModAPI/Spore/Simulator/SubSystem/UIAssetDiscoveryManager.h @@ -5,7 +5,7 @@ #include #include -//#define UIAssetDiscoveryManager (*Simulator::cUIAssetDiscoveryManager::Get()) +#define UIAssetDiscoveryManager (*Simulator::cUIAssetDiscoveryManager::Get()) namespace Simulator { @@ -14,7 +14,7 @@ namespace Simulator , public App::IMessageListener { public: - //static cUIAssetDiscoveryManager* Get(); + static cUIAssetDiscoveryManager* Get(); public: /* 20h */ int field_20; @@ -23,7 +23,7 @@ namespace Simulator }; ASSERT_SIZE(cUIAssetDiscoveryManager, 0xA8); - //namespace Addresses(cUIAssetDiscoveryManager) { - // DeclareAddress(Get); // 0xB3D450 TODO - //} + namespace Addresses(cUIAssetDiscoveryManager) { + DeclareAddress(Get); // 0xB3D450 0xB3D5F0 + } } \ No newline at end of file diff --git a/Spore ModAPI/Spore/UI/cSPAssetView.h b/Spore ModAPI/Spore/UI/cSPAssetView.h index eb152a53..68d838bf 100644 --- a/Spore ModAPI/Spore/UI/cSPAssetView.h +++ b/Spore ModAPI/Spore/UI/cSPAssetView.h @@ -27,12 +27,15 @@ namespace UI /* 24h */ virtual void func24h(int, int); /* 28h */ virtual void SetVisible(bool visible); + bool sub_6590A0(); + public: /* 0Ch */ char padding_C[0x108 - 0xC]; }; ASSERT_SIZE(cSPAssetView, 0x108); namespace Addresses(cSPAssetView) { - DeclareAddress(_ctor); // 0x657DA0 TODO + DeclareAddress(_ctor); // 0x657DA0 0x657F30 + DeclareAddress(sub_6590A0); // 0x6590A0 0x659230 } } \ No newline at end of file