mirror of
https://github.com/zeldaret/ss
synced 2026-09-03 09:59:55 -04:00
change everything to use a common types file
This commit is contained in:
+54
-38
@@ -1,57 +1,69 @@
|
||||
#pragma once
|
||||
|
||||
// This file is adapted from 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
|
||||
// This file is adapted from
|
||||
// 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 "types.h"
|
||||
#include "egg/core/eggFrmHeap.h"
|
||||
#include "f/f_profile.h"
|
||||
#include "f/f_base_id.h"
|
||||
#include "f/f_helper_unk.h"
|
||||
#include "f/f_manager.h"
|
||||
#include "f/f_list_mg.h"
|
||||
#include "f/f_manager.h"
|
||||
#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
|
||||
/* 0x08 */ ProfileName profile_name; // Actor Id
|
||||
/* 0x0A */ u8 lifecycle_state;
|
||||
/* 0x0B */ bool delete_request;
|
||||
/* 0x0C */ bool update_request;
|
||||
/* 0x0D */ bool retry_create;
|
||||
/* 0x0E */ u8 group_type;
|
||||
/* 0x0F */ u8 proc_control;
|
||||
/* 0x10 */ fManager_c manager;
|
||||
/* 0x50 */ fBaHelper_c* p_unused_helper;
|
||||
/* 0x54 */ fLiMgBa_c unused_list;
|
||||
/* 0x5C */ EGG::FrmHeap* p_heap;
|
||||
/* 0x00 */ fBaseID_e unique_ID;
|
||||
/* 0x04 */ u32 params1; // params1
|
||||
/* 0x08 */ ProfileName profile_name; // Actor Id
|
||||
/* 0x0A */ u8 lifecycle_state;
|
||||
/* 0x0B */ bool delete_request;
|
||||
/* 0x0C */ bool update_request;
|
||||
/* 0x0D */ bool retry_create;
|
||||
/* 0x0E */ u8 group_type;
|
||||
/* 0x0F */ u8 proc_control;
|
||||
/* 0x10 */ fManager_c manager;
|
||||
/* 0x50 */ fBaHelper_c *p_unused_helper;
|
||||
/* 0x54 */ fLiMgBa_c unused_list;
|
||||
/* 0x5C */ EGG::FrmHeap *p_heap;
|
||||
/* 0x60 */ // vtable
|
||||
public:
|
||||
enum LIFECYCLE_e { WAITING_FOR_CREATE, ACTIVE, TO_BE_DELETED };
|
||||
enum GROUP_TYPE_e { OTHER, SCENE, ACTOR, STAGE, };
|
||||
enum MAIN_STATE_e { CANCELED, ERROR, SUCCESS, WAITING };
|
||||
enum PACK_RESULT_e { NOT_READY, SUCCEEDED, FAILED, };
|
||||
enum PROC_DISABLE_e {
|
||||
ROOT_DISABLE_EXECUTE = 1,
|
||||
DISABLE_EXECUTE = 2,
|
||||
ROOT_DISABLE_DRAW = 4,
|
||||
DISABLE_DRAW = 8
|
||||
enum GROUP_TYPE_e {
|
||||
OTHER,
|
||||
SCENE,
|
||||
ACTOR,
|
||||
STAGE,
|
||||
};
|
||||
enum MAIN_STATE_e { CANCELED, ERROR, SUCCESS, WAITING };
|
||||
enum PACK_RESULT_e {
|
||||
NOT_READY,
|
||||
SUCCEEDED,
|
||||
FAILED,
|
||||
};
|
||||
enum PROC_DISABLE_e { ROOT_DISABLE_EXECUTE = 1, DISABLE_EXECUTE = 2, ROOT_DISABLE_DRAW = 4, DISABLE_DRAW = 8 };
|
||||
|
||||
// Inlines
|
||||
bool isProcControlFlag(u8 flag) const { return (proc_control & flag) != 0; }
|
||||
void setProcControlFlag(u8 flag) { proc_control |= flag; }
|
||||
void clearProcControlFlag(u8 flag) { proc_control &= ~flag; }
|
||||
// Inlines
|
||||
bool isProcControlFlag(u8 flag) const {
|
||||
return (proc_control & flag) != 0;
|
||||
}
|
||||
void setProcControlFlag(u8 flag) {
|
||||
proc_control |= flag;
|
||||
}
|
||||
void clearProcControlFlag(u8 flag) {
|
||||
proc_control &= ~flag;
|
||||
}
|
||||
|
||||
public:
|
||||
/* 802e12f0 */ fBase_c();
|
||||
/* 802e23b0 */ static void *operator new(size_t);
|
||||
/* 802e2410 */ static void operator delete(void *);
|
||||
|
||||
|
||||
public: // vtable 0x60
|
||||
/* 0x08 | 802E15C0 */ virtual int create();
|
||||
/* 0x0C | 802E15D0 */ virtual int preCreate();
|
||||
@@ -68,11 +80,12 @@ public: // vtable 0x60
|
||||
/* 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);
|
||||
/* 0x44 | 802E23A0 */ virtual bool createHeap();
|
||||
/* 0x44 | 802E23A0 */ virtual bool createHeap();
|
||||
/* 0x48 | 802E1480 */ virtual ~fBase_c();
|
||||
|
||||
public:
|
||||
/* 802e1500 */ int commonPack(int (fBase_c::*doFunc)(), int (fBase_c::*preFunc)(), void (fBase_c::*postFunc)(MAIN_STATE_e));
|
||||
/* 802e1500 */ int commonPack(int (fBase_c::*doFunc)(), int (fBase_c::*preFunc)(),
|
||||
void (fBase_c::*postFunc)(MAIN_STATE_e));
|
||||
/* 802e1680 */ int createPack();
|
||||
/* 802e1860 */ int deletePack();
|
||||
/* 802e1960 */ int executePack();
|
||||
@@ -82,16 +95,19 @@ public:
|
||||
/* 802e1f90 */ fBase_c *getConnectParent() const;
|
||||
/* 802e1fb0 */ fBase_c *getConnectChild() const;
|
||||
/* 802e1fd0 */ fBase_c *getConnectBrNext() const;
|
||||
/* 802e2090 */ bool setConnectChild(fBase_c* child);
|
||||
/* 802e2090 */ bool setConnectChild(fBase_c *child);
|
||||
/* 802e2420 */ void runCreate();
|
||||
/* 802e24a0 */ fBase_c *getChildProcessCreateState() const;
|
||||
/* 802e2510 */ bool checkChildProcessCreateState() const;
|
||||
|
||||
public:
|
||||
/* 802e2540 */ static void setTmpCtData(ProfileName profName, fTrNdBa_c *connectParent, unsigned long param, u8 groupType);
|
||||
/* 802e2560 */ static fBase_c *fBase_make(ProfileName profName, fTrNdBa_c *connectParent, unsigned long param, u8 groupType);
|
||||
/* 802e2540 */ static void setTmpCtData(ProfileName profName, fTrNdBa_c *connectParent, unsigned long param,
|
||||
u8 groupType);
|
||||
/* 802e2560 */ static fBase_c *fBase_make(ProfileName profName, fTrNdBa_c *connectParent, unsigned long param,
|
||||
u8 groupType);
|
||||
/* 802e2640 */ static fBase_c *createRoot(ProfileName profName, unsigned long param, u8 groupType);
|
||||
/* 802e2600 */ static fBase_c *createChild(ProfileName profName, fBase_c *parent, unsigned long param, u8 groupType);
|
||||
/* 802e2600 */ static fBase_c *createChild(ProfileName profName, fBase_c *parent, unsigned long param,
|
||||
u8 groupType);
|
||||
|
||||
public:
|
||||
/* 80575ba8 */ static fLiMgBa_c m_additional_actors;
|
||||
@@ -108,4 +124,4 @@ private:
|
||||
friend class fManager_c;
|
||||
friend class fLiNdBa_c;
|
||||
friend class fTrMgBa_c;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
// This file was ported from https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_helper_unk.hpp
|
||||
// This file was ported from
|
||||
// https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_helper_unk.hpp
|
||||
|
||||
#include "types.h"
|
||||
#include <common.h>
|
||||
|
||||
/// @brief [A helper class for fBase_c with unknown purpose].
|
||||
/// @note Unofficial name.
|
||||
@@ -14,12 +15,12 @@ class fBaHelper_c {
|
||||
s16 filler2;
|
||||
s16 mUnknown;
|
||||
|
||||
virtual void vf_0x8(); ///< [Stripped out of binary].
|
||||
virtual int vf_0xc(void *); ///< [Stripped out of binary].
|
||||
virtual void vf_0x8(); ///< [Stripped out of binary].
|
||||
virtual int vf_0xc(void *); ///< [Stripped out of binary].
|
||||
virtual void vf_0x10(void *); ///< [Stripped out of binary].
|
||||
|
||||
public:
|
||||
void Delete(); ///< @todo Document this method.
|
||||
int Load(int); ///< @todo Document this method.
|
||||
void Delete(); ///< @todo Document this method.
|
||||
int Load(int); ///< @todo Document this method.
|
||||
bool LoadOnlyOne(); ///< @todo Document this method.
|
||||
};
|
||||
};
|
||||
|
||||
+11
-9
@@ -1,12 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
// This file was ported from https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_mg.hpp
|
||||
// This file was ported from
|
||||
// https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_mg.hpp
|
||||
|
||||
#include "types.h"
|
||||
#include "f/f_profile.h"
|
||||
#include "c/c_list.h"
|
||||
#include "f/f_base_id.h"
|
||||
#include "f/f_list_nd.h"
|
||||
#include "f/f_profile.h"
|
||||
#include <common.h>
|
||||
|
||||
|
||||
class fBase_c;
|
||||
|
||||
@@ -22,15 +24,15 @@ public:
|
||||
int countNodeByProfName(ProfileName profName) const;
|
||||
|
||||
/* 802e2760 */ const fLiNdBa_c *searchNodeByID(fBaseID_e id) const;
|
||||
/* 802e2790 */ const fLiNdBa_c *searchNodeByID(fBaseID_e id, fLiMgBa_c* start) const;
|
||||
/* 802e27d0 */ void link(fLiNdBa_c&, fBase_c*);
|
||||
/* 802e2830 */ void unlink(fLiNdBa_c&);
|
||||
/* 802e2790 */ const fLiNdBa_c *searchNodeByID(fBaseID_e id, fLiMgBa_c *start) const;
|
||||
/* 802e27d0 */ void link(fLiNdBa_c &, fBase_c *);
|
||||
/* 802e2830 */ void unlink(fLiNdBa_c &);
|
||||
|
||||
inline fLiNdBa_c *getFirst() const {
|
||||
return (fLiNdBa_c *) cListMg_c::getFirst();
|
||||
return (fLiNdBa_c *)cListMg_c::getFirst();
|
||||
}
|
||||
|
||||
inline fLiNdBa_c *getLast() const {
|
||||
return (fLiNdBa_c *) cListMg_c::getLast();
|
||||
return (fLiNdBa_c *)cListMg_c::getLast();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
// This file was ported from https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_mg_ptmf.hpp
|
||||
// This file was ported from
|
||||
// https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_mg_ptmf.hpp
|
||||
|
||||
#include "types.h"
|
||||
#include <common.h>
|
||||
|
||||
#include "f/f_list_mg.h"
|
||||
#include "f/f_list_nd_prio.h"
|
||||
@@ -18,13 +19,13 @@ public:
|
||||
/* 802e26e0 */ bool walkPack();
|
||||
|
||||
fLiNdPrio_c *getFirst() const {
|
||||
return (fLiNdPrio_c *) fLiMgBa_c::getFirst();
|
||||
return (fLiNdPrio_c *)fLiMgBa_c::getFirst();
|
||||
}
|
||||
|
||||
fLiNdPrio_c *getLast() const {
|
||||
return (fLiNdPrio_c *) fLiMgBa_c::getLast();
|
||||
return (fLiNdPrio_c *)fLiMgBa_c::getLast();
|
||||
}
|
||||
|
||||
private:
|
||||
int (fBase_c::*mpProcFunc)(); ///< The process function for the list.
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
// This file was ported from https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_nd.hpp
|
||||
// This file was ported from
|
||||
// https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_nd.hpp
|
||||
|
||||
#include "types.h"
|
||||
#include "c/c_list.h"
|
||||
#include <common.h>
|
||||
|
||||
|
||||
class fBase_c;
|
||||
|
||||
class fLiNdBa_c : public cListNd_c {
|
||||
public:
|
||||
|
||||
fLiNdBa_c() : p_owner(nullptr) {}
|
||||
fLiNdBa_c(fBase_c *owner) : p_owner(owner) {}
|
||||
|
||||
inline fLiNdBa_c *getPrev() const {
|
||||
return (fLiNdBa_c *) cListNd_c::getPrev();
|
||||
return (fLiNdBa_c *)cListNd_c::getPrev();
|
||||
}
|
||||
|
||||
inline fLiNdBa_c *getNext() const {
|
||||
return (fLiNdBa_c *) cListNd_c::getNext();
|
||||
return (fLiNdBa_c *)cListNd_c::getNext();
|
||||
}
|
||||
|
||||
fBase_c *p_owner;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
// This file was ported from https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_nd_prio.hpp
|
||||
// This file was ported from
|
||||
// https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_nd_prio.hpp
|
||||
|
||||
#include "types.h"
|
||||
#include "f/f_profile.h"
|
||||
#include "f/f_list_nd.h"
|
||||
#include "f/f_profile.h"
|
||||
#include <common.h>
|
||||
|
||||
|
||||
/// @brief A list node with priority fields for an order in a list.
|
||||
/// @note Unofficial name.
|
||||
@@ -15,11 +17,11 @@ public:
|
||||
fLiNdPrio_c(fBase_c *owner) : fLiNdBa_c(owner), mOrder(0), mNewOrder(0) {}
|
||||
|
||||
fLiNdPrio_c *getPrev() const {
|
||||
return (fLiNdPrio_c *) fLiNdBa_c::getPrev();
|
||||
return (fLiNdPrio_c *)fLiNdBa_c::getPrev();
|
||||
}
|
||||
|
||||
fLiNdPrio_c *getNext() const {
|
||||
return (fLiNdPrio_c *) fLiNdBa_c::getNext();
|
||||
return (fLiNdPrio_c *)fLiNdBa_c::getNext();
|
||||
}
|
||||
|
||||
u16 getOrder() const {
|
||||
@@ -30,6 +32,6 @@ public:
|
||||
return mNewOrder;
|
||||
}
|
||||
|
||||
u16 mOrder; ///< The priority of this node.
|
||||
u16 mOrder; ///< The priority of this node.
|
||||
u16 mNewOrder; ///< The priority the node should change to if it differs from ::mOrder.
|
||||
};
|
||||
};
|
||||
|
||||
+710
-710
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
// This file was ported from https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_tree_mg.hpp
|
||||
// This file was ported from
|
||||
// https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_tree_mg.hpp
|
||||
|
||||
#include "types.h"
|
||||
#include "c/c_tree.h"
|
||||
#include "f/f_profile.h"
|
||||
#include <common.h>
|
||||
|
||||
|
||||
class fTrNdBa_c;
|
||||
|
||||
@@ -27,4 +29,4 @@ public:
|
||||
* @return The found node, or @p nullptr if none was found.
|
||||
*/
|
||||
const fTrNdBa_c *searchNodeByGroupType(u8 groupType, const fTrNdBa_c *parent) const;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
// This file was ported from https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_tree_mg_ptmf.hpp
|
||||
// This file was ported from
|
||||
// https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_tree_mg_ptmf.hpp
|
||||
|
||||
#include "types.h"
|
||||
#include "c/c_tree.h"
|
||||
#include "f/f_tree_mg.h"
|
||||
#include <common.h>
|
||||
|
||||
|
||||
class fBase_c;
|
||||
|
||||
@@ -22,4 +24,4 @@ public:
|
||||
|
||||
private:
|
||||
int (fBase_c::*mpProcFunc)(); ///< The process function for the tree.
|
||||
};
|
||||
};
|
||||
|
||||
+11
-9
@@ -1,10 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
// This file was ported from https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_tree_nd.hpp
|
||||
// This file was ported from
|
||||
// https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_tree_nd.hpp
|
||||
|
||||
#include "types.h"
|
||||
#include "c/c_tree.h"
|
||||
#include "f/f_profile.h"
|
||||
#include <common.h>
|
||||
|
||||
|
||||
class fBase_c;
|
||||
|
||||
@@ -13,28 +15,28 @@ public:
|
||||
fTrNdBa_c(fBase_c *owner) : p_owner(owner) {}
|
||||
|
||||
fTrNdBa_c *getTreeNext() const {
|
||||
return (fTrNdBa_c *) cTreeNd_c::getTreeNext();
|
||||
return (fTrNdBa_c *)cTreeNd_c::getTreeNext();
|
||||
}
|
||||
|
||||
fTrNdBa_c *getTreeNextNotChild() const {
|
||||
return (fTrNdBa_c *) cTreeNd_c::getTreeNextNotChild();
|
||||
return (fTrNdBa_c *)cTreeNd_c::getTreeNextNotChild();
|
||||
}
|
||||
|
||||
fTrNdBa_c *getParent() const {
|
||||
return (fTrNdBa_c *) cTreeNd_c::getParent();
|
||||
return (fTrNdBa_c *)cTreeNd_c::getParent();
|
||||
}
|
||||
|
||||
fTrNdBa_c *getChild() const {
|
||||
return (fTrNdBa_c *) cTreeNd_c::getChild();
|
||||
return (fTrNdBa_c *)cTreeNd_c::getChild();
|
||||
}
|
||||
|
||||
fTrNdBa_c *getBrPrev() const {
|
||||
return (fTrNdBa_c *) cTreeNd_c::getBrPrev();
|
||||
return (fTrNdBa_c *)cTreeNd_c::getBrPrev();
|
||||
}
|
||||
|
||||
fTrNdBa_c *getBrNext() const {
|
||||
return (fTrNdBa_c *) cTreeNd_c::getBrNext();
|
||||
return (fTrNdBa_c *)cTreeNd_c::getBrNext();
|
||||
}
|
||||
|
||||
fBase_c *p_owner;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user