diff options
| author | elijah-thomas774 <elijahthomas774@gmail.com> | 2024-03-17 17:40:00 -0400 |
|---|---|---|
| committer | elijah-thomas774 <elijahthomas774@gmail.com> | 2024-03-17 17:40:00 -0400 |
| commit | 606cc15eeda81fe26207ccab28e84a1ef40ec3fd (patch) | |
| tree | 69576d8441f2f0d1a70e8833ccc7a984784e4ebb /include/f/f_base.h | |
| parent | c2a4909bd2a9a23d73a65f6840e8c886658cef74 (diff) | |
some fManager, fBase, mHeap, f - lists and tree stuff
Diffstat (limited to 'include/f/f_base.h')
| -rw-r--r-- | include/f/f_base.h | 57 |
1 files changed, 43 insertions, 14 deletions
diff --git a/include/f/f_base.h b/include/f/f_base.h index a9ae3f82..1cada108 100644 --- a/include/f/f_base.h +++ b/include/f/f_base.h @@ -4,6 +4,7 @@ // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_base.hpp and the Skyward Sword // Ghidra database. Comments and docs can be seen above. stripped in this file for easier looking +#include "egg/core/eggExpHeap.h" #include "egg/core/eggFrmHeap.h" #include "f/f_base_id.h" #include "f/f_helper_unk.h" @@ -12,28 +13,36 @@ #include "f/f_profile.h" #include <common.h> - // Ghidra: fBase // size: 0x64 // official name class fBase_c { public: /* 0x00 */ fBaseID_e unique_ID; - /* 0x04 */ u32 params1; // params1 + /* 0x04 */ u32 params; // params1 /* 0x08 */ ProfileName profile_name; // Actor Id /* 0x0A */ u8 lifecycle_state; /* 0x0B */ bool delete_request; - /* 0x0C */ bool update_request; - /* 0x0D */ bool retry_create; + /* 0x0C */ s8 update_request; + /* 0x0D */ bool create_request; /* 0x0E */ u8 group_type; /* 0x0F */ u8 proc_control; /* 0x10 */ fManager_c manager; - /* 0x50 */ fBaHelper_c *p_unused_helper; - /* 0x54 */ fLiMgBa_c unused_list; + /* 0x50 */ fBaHelper_c *p_helper; + /* 0x54 */ fLiMgBa_c actor_list; /* 0x5C */ EGG::FrmHeap *p_heap; /* 0x60 */ // vtable public: - enum LIFECYCLE_e { WAITING_FOR_CREATE, ACTIVE, TO_BE_DELETED }; + enum UPDATE_STATUS_e { + UPDATING, + UPDATE_REQUEST, + UPDATE_FORCE, + }; + enum LIFECYCLE_e { + WAITING_FOR_CREATE, + ACTIVE, + TO_BE_DELETED, + }; enum GROUP_TYPE_e { OTHER, SCENE, @@ -59,6 +68,17 @@ public: proc_control &= ~flag; } + fManager_c *getManager() { + return &manager; + } + + void setParams() { + unique_ID = m_rootUniqueID; + params = m_tmpCtData.params; + profile_name = m_tmpCtData.prof_name; + group_type = m_tmpCtData.group_type; + } + public: /* 802e12f0 */ fBase_c(); /* 802e23b0 */ static void *operator new(size_t); @@ -78,8 +98,8 @@ public: // vtable 0x60 /* 0x30 | 802E1AA0 */ virtual int preDraw(); /* 0x34 | 802E1AD0 */ virtual void postDraw(MAIN_STATE_e state); /* 0x38 | 802E1B90 */ virtual void deleteReady(); - /* 0x3C | 802E20E0 */ virtual bool entryFrmHeap(unsigned long size, EGG::Heap *parentHeap); - /* 0x40 | 802E22E0 */ virtual bool entryFrmHeapNonAdjust(unsigned long size, EGG::Heap *parentHeap); + /* 0x3C | 802E20E0 */ virtual bool entryFrmHeap(size_t size, EGG::Heap *parentHeap); + /* 0x40 | 802E22E0 */ virtual bool entryFrmHeapNonAdjust(size_t size, EGG::Heap *parentHeap); /* 0x44 | 802E23A0 */ virtual bool createHeap(); /* 0x48 | 802E1480 */ virtual ~fBase_c(); @@ -92,9 +112,13 @@ public: /* 802e1ae0 */ int drawPack(); /* 802e1ba0 */ int connectProc(); /* 802e1e00 */ void deleteRequest(); + /* 802e1e80 */ void forceUpdate(); + /* 802e1f90 */ static fBase_c *getConnectRoot(); + /* 802e1f90 */ static fBase_c *getConnectTreeNext(fBase_c *); /* 802e1f90 */ fBase_c *getConnectParent() const; /* 802e1fb0 */ fBase_c *getConnectChild() const; /* 802e1fd0 */ fBase_c *getConnectBrNext() const; + /* 802e1ff0 */ void updateExecutePriority(u16 priority); /* 802e2090 */ bool setConnectChild(fBase_c *child); /* 802e2420 */ void runCreate(); /* 802e24a0 */ fBase_c *getChildProcessCreateState() const; @@ -110,16 +134,21 @@ public: u8 groupType); public: - /* 80575ba8 */ static fLiMgBa_c m_additional_actors; + /* 80575ba8 */ static fLiMgBa_c m_forceExecuteList; /* 80575bb0 */ static int (*sLoadAsyncCallback)(); /* 80575bb4 */ static void (*sUnloadCallback)(); private: /* 80573fb8 */ static fBaseID_e m_rootUniqueID; - /* 805b84c8 */ static ProfileName m_tmpCtProfName; - /* 805b84cc */ static fTrNdBa_c *m_tmpCtConnectParent; - /* 805b84d0 */ static u32 m_tmpCtParam; - /* 805b84d4 */ static u8 m_tmpCtGroupType; + + struct ConstructData { + /* 805b84c8 */ ProfileName prof_name; + /* 805b84cc */ fTrNdBa_c *connect_parent; + /* 805b84d0 */ u32 params; + /* 805b84d4 */ u8 group_type; + }; + + static ConstructData m_tmpCtData; friend class fManager_c; friend class fLiNdBa_c; |
