From 292fe71e056eff52e2a216ff2c67db4d20aff2a7 Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Mon, 25 Nov 2024 04:36:41 +0000 Subject: [PATCH] api: update research --- .../api/CSD/Manager/csdmMotionPattern.h | 8 ++++++++ UnleashedRecomp/api/CSD/Manager/csdmNode.h | 6 ++++-- UnleashedRecomp/api/CSD/Manager/csdmNode.inl | 8 ++++---- UnleashedRecomp/api/CSD/Manager/csdmScene.h | 2 +- UnleashedRecomp/api/CSD/Manager/csdmScene.inl | 6 ++---- UnleashedRecomp/api/SWA.h | 2 ++ .../api/SWA/HUD/GeneralWindow/GeneralWindow.h | 18 ++++++++++++++++++ UnleashedRecomp/api/SWA/HUD/Pause/HudPause.h | 13 ++++++++++++- 8 files changed, 51 insertions(+), 12 deletions(-) create mode 100644 UnleashedRecomp/api/CSD/Manager/csdmMotionPattern.h create mode 100644 UnleashedRecomp/api/SWA/HUD/GeneralWindow/GeneralWindow.h diff --git a/UnleashedRecomp/api/CSD/Manager/csdmMotionPattern.h b/UnleashedRecomp/api/CSD/Manager/csdmMotionPattern.h new file mode 100644 index 00000000..dd5df27b --- /dev/null +++ b/UnleashedRecomp/api/CSD/Manager/csdmMotionPattern.h @@ -0,0 +1,8 @@ +#pragma once + +#include + +namespace Chao::CSD +{ + class CMotionPattern : CBase {}; +} diff --git a/UnleashedRecomp/api/CSD/Manager/csdmNode.h b/UnleashedRecomp/api/CSD/Manager/csdmNode.h index 8f7df548..08942f7a 100644 --- a/UnleashedRecomp/api/CSD/Manager/csdmNode.h +++ b/UnleashedRecomp/api/CSD/Manager/csdmNode.h @@ -13,13 +13,15 @@ namespace Chao::CSD class CNode : public CResourceBase, SubjectBase, CBase { public: - SWA_INSERT_PADDING(0x50); + SWA_INSERT_PADDING(0x34); + xpointer m_pMotionPattern; + SWA_INSERT_PADDING(0x18); ~CNode(); void SetText(const char* in_pText); void SetText(const wchar_t* in_pText); - Hedgehog::Math::CVector2 GetPosition() const; + Hedgehog::Math::CVector2* GetPosition() const; void SetPosition(float in_X, float in_Y); void SetHideFlag(uint32_t in_HideFlag); void SetRotation(float in_Rotation); diff --git a/UnleashedRecomp/api/CSD/Manager/csdmNode.inl b/UnleashedRecomp/api/CSD/Manager/csdmNode.inl index da8f8683..92e64079 100644 --- a/UnleashedRecomp/api/CSD/Manager/csdmNode.inl +++ b/UnleashedRecomp/api/CSD/Manager/csdmNode.inl @@ -17,11 +17,11 @@ namespace Chao::CSD GuestToHostFunction(0x830BF640, this, in_pText); } - inline Hedgehog::Math::CVector2 CNode::GetPosition() const + inline Hedgehog::Math::CVector2* CNode::GetPosition() const { - Hedgehog::Math::CVector2 position; - GuestToHostFunction(0x830BF008, this, &position); - return position; + guest_stack_var pos; + GuestToHostFunction(0x830BF008, pos.get(), this); + return pos.get(); } inline void CNode::SetPosition(float in_X, float in_Y) diff --git a/UnleashedRecomp/api/CSD/Manager/csdmScene.h b/UnleashedRecomp/api/CSD/Manager/csdmScene.h index cc8cdde2..e26f2b91 100644 --- a/UnleashedRecomp/api/CSD/Manager/csdmScene.h +++ b/UnleashedRecomp/api/CSD/Manager/csdmScene.h @@ -39,7 +39,7 @@ namespace Chao::CSD void Update(float in_DeltaTime = 0.0f); void Render(void* in_pUnk); - RCPtr GetNode(const char* in_pName) const; + void GetNode(RCPtr& out_rResult, const char* in_pName); bool SetMotion(const char* in_pName); void SetMotionFrame(float in_MotionFrame); diff --git a/UnleashedRecomp/api/CSD/Manager/csdmScene.inl b/UnleashedRecomp/api/CSD/Manager/csdmScene.inl index c5a77f1e..a44a6cda 100644 --- a/UnleashedRecomp/api/CSD/Manager/csdmScene.inl +++ b/UnleashedRecomp/api/CSD/Manager/csdmScene.inl @@ -15,11 +15,9 @@ namespace Chao::CSD SWA_VIRTUAL_FUNCTION(void, 3, this, in_pUnk); } - inline RCPtr CScene::GetNode(const char* in_pName) const + inline void CScene::GetNode(RCPtr& out_rResult, const char* in_pName) { - RCPtr rcNode; - GuestToHostFunction(0x830BCCA8, this, rcNode, in_pName); - return rcNode; + GuestToHostFunction(sub_830BCCA8, &out_rResult, this, in_pName); } inline bool CScene::SetMotion(const char* in_pName) diff --git a/UnleashedRecomp/api/SWA.h b/UnleashedRecomp/api/SWA.h index f63fa8d6..305f36d4 100644 --- a/UnleashedRecomp/api/SWA.h +++ b/UnleashedRecomp/api/SWA.h @@ -17,6 +17,7 @@ #include "Hedgehog/Universe/Thread/hhParallelJob.h" #include "CSD/Manager/csdmBase.h" +#include "CSD/Manager/csdmMotionPattern.h" #include "CSD/Manager/csdmNode.h" #include "CSD/Manager/csdmNodeObserver.h" #include "CSD/Manager/csdmObserverBase.h" @@ -36,6 +37,7 @@ #include "SWA/CSD/CsdProject.h" #include "SWA/CSD/CsdTexListMirage.h" #include "SWA/CSD/GameObjectCSD.h" +#include "SWA/HUD/GeneralWindow/GeneralWindow.h" #include "SWA/HUD/Loading/Loading.h" #include "SWA/HUD/Pause/HudPause.h" #include "SWA/HUD/Sonic/HudSonicStage.h" diff --git a/UnleashedRecomp/api/SWA/HUD/GeneralWindow/GeneralWindow.h b/UnleashedRecomp/api/SWA/HUD/GeneralWindow/GeneralWindow.h new file mode 100644 index 00000000..6728eba1 --- /dev/null +++ b/UnleashedRecomp/api/SWA/HUD/GeneralWindow/GeneralWindow.h @@ -0,0 +1,18 @@ +#pragma once + +#include + +namespace SWA +{ + class CGeneralWindow + { + public: + SWA_INSERT_PADDING(0xD0); + Chao::CSD::RCPtr m_rcGeneral; + Chao::CSD::RCPtr m_rcBg; + Chao::CSD::RCPtr m_rcWindow; + Chao::CSD::RCPtr m_rcWindow_2; + Chao::CSD::RCPtr m_rcWindowSelect; + Chao::CSD::RCPtr m_rcFooter; + }; +} diff --git a/UnleashedRecomp/api/SWA/HUD/Pause/HudPause.h b/UnleashedRecomp/api/SWA/HUD/Pause/HudPause.h index a6f53311..f4e67093 100644 --- a/UnleashedRecomp/api/SWA/HUD/Pause/HudPause.h +++ b/UnleashedRecomp/api/SWA/HUD/Pause/HudPause.h @@ -2,6 +2,8 @@ #include +using namespace Chao::CSD; + namespace SWA { enum EActionType : uint32_t @@ -47,7 +49,16 @@ namespace SWA { public: xpointer m_pVftable; - SWA_INSERT_PADDING(0xC8); + SWA_INSERT_PADDING(0x2C); + RCPtr m_rcPause; + RCPtr m_rcBg; + RCPtr m_rcBg1; + RCPtr m_rcBg1_2; + RCPtr m_rcBg1Select; + RCPtr m_rcBg1Select_2; + RCPtr m_rcStatusTitle; + RCPtr m_rcFooterA; + SWA_INSERT_PADDING(0x5C); be m_Action; be m_Menu; be m_Status;