diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index 09940c1b..01d5e532 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -17298,7 +17298,7 @@ __ct__9cTreeNd_cFv = .text:0x802E0E70; // type:function size:0x30 fn_802E0EA0 = .text:0x802E0EA0; // type:function size:0x18 addTreeNode__9cTreeMg_cFP9cTreeNd_cP9cTreeNd_c = .text:0x802E0EC0; // type:function size:0x94 removeTreeNode__9cTreeMg_cFP9cTreeNd_c = .text:0x802E0F60; // type:function size:0x98 -addTreeNode__9cTreeMg_cFP9cTreeNd_cP9cTreeNd_c = .text:0x802E1000; // type:function size:0xBC +insertTreeNode__9cTreeMg_cFP9cTreeNd_cP9cTreeNd_c = .text:0x802E1000; // type:function size:0xBC getTreeNext__9cTreeNd_cCFv = .text:0x802E10C0; // type:function size:0x38 getTreeNextNotChild__9cTreeNd_cCFv = .text:0x802E1100; // type:function size:0x40 Delete__11fBaHelper_cFv = .text:0x802E1140; // type:function size:0x8C diff --git a/configure.py b/configure.py index 76cb1f0f..95335230 100644 --- a/configure.py +++ b/configure.py @@ -122,7 +122,7 @@ if not is_windows(): config.compilers_tag = "20231018" config.dtk_tag = "v0.7.5" config.sjiswrap_tag = "v1.1.1" -config.wibo_tag = "0.6.9" +config.wibo_tag = "0.6.11" # Project config.config_path = Path("config") / config.version / "config.yml" diff --git a/include/UnknownTypeBelongings.h b/include/UnknownTypeBelongings.h index 4d89820d..58fcd52a 100644 --- a/include/UnknownTypeBelongings.h +++ b/include/UnknownTypeBelongings.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef DECOMP_UNKNOWN_TYPES_H +#define DECOMP_UNKNOWN_TYPES_H #include @@ -32,3 +33,5 @@ struct ObjInfo { // }; class UnkCollider {}; + +#endif diff --git a/include/c/c_list.h b/include/c/c_list.h index e693213e..3f958bd2 100644 --- a/include/c/c_list.h +++ b/include/c/c_list.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef C_LIST_H +#define C_LIST_H // This file was ported from https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/cLib/c_list.hpp @@ -67,3 +68,5 @@ protected: cListNd_c *mpFirst; ///< The first node in the list. cListNd_c *mpLast; ///< The last node in the list. }; + +#endif diff --git a/include/c/c_owner_set.h b/include/c/c_owner_set.h index 7bba2369..ceb72b5d 100644 --- a/include/c/c_owner_set.h +++ b/include/c/c_owner_set.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef C_OWNER_SET_H +#define C_OWNER_SET_H // This file was ported from // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/cLib/c_owner_set.hpp @@ -59,3 +60,5 @@ private: cOwnerSetNd_c *mpRoot; ///< The first element of the set. }; + +#endif diff --git a/include/c/c_tree.h b/include/c/c_tree.h index 22e104c6..58daa267 100644 --- a/include/c/c_tree.h +++ b/include/c/c_tree.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef C_TREE_H +#define C_TREE_H // This file was ported from https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/cLib/c_tree.hpp @@ -56,6 +57,7 @@ public: * @return If the operation was successful. */ bool addTreeNode(cTreeNd_c *node, cTreeNd_c *parent); + bool insertTreeNode(cTreeNd_c *node, cTreeNd_c *parent); /** * @brief Removes a node from the tree. @@ -72,3 +74,5 @@ public: protected: cTreeNd_c *mpRootNode; ///< The root node of the tree. }; + +#endif diff --git a/include/common.h b/include/common.h index dbfd7e05..14f7051b 100644 --- a/include/common.h +++ b/include/common.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef DECOMP_COMMON_TYPES_H +#define DECOMP_COMMON_TYPES_H #define MAX(x, y) ((x) > (y) ? (x) : (y)) #define MIN(x, y) ((x) < (y) ? (x) : (y)) @@ -113,3 +114,5 @@ private: inline NonCopyable(const NonCopyable &) {} }; #endif + +#endif diff --git a/include/d/a/d_a_base.h b/include/d/a/d_a_base.h index 94ed6bee..5ae0efe0 100644 --- a/include/d/a/d_a_base.h +++ b/include/d/a/d_a_base.h @@ -1,22 +1,23 @@ -#pragma once +#ifndef D_A_BASE_H +#define D_A_BASE_H +#include "UnknownTypeBelongings.h" #include "d/d_base.h" #include "d/d_heap.h" #include "m/m_allocator.h" -#include "UnknownTypeBelongings.h" + // #include "m/types_m.h" #include "m/m_angle.h" #include "m/m_vec.h" #include "toBeSorted/room_manager.h" - class dAcBase_c; struct SoundInfo { - dAcBase_c* actor; - void* obj_sound; - mVec3_c* obj_pos; - SoundInfo* next; - SoundInfo* prev; + dAcBase_c *actor; + void *obj_sound; + mVec3_c *obj_pos; + SoundInfo *next; + SoundInfo *prev; }; // Ghidra: ActorBase // size: 0xFC @@ -24,64 +25,65 @@ struct SoundInfo { class dAcBase_c : public dBase_c { public: /* 0x68 */ mHeapAllocator_c heap_allocator; - /* 0x84 */ ObjInfo* obj_info; - /* 0x88 */ void* sound_info_tail; - /* 0x8c */ void* sound_info_next; - /* 0x90 */ int count; - /* 0x94 */ void* obj_sound; - /* 0x9C */ mVec3_c* obj_pos; - /* 0x9c */ mVec3_c pos_copy; - /* 0xa8 */ u32 params2; - /* 0xAC */ mAng3_c rot_copy; - /* 0xB2 */ u16 obj_id; // enemydefeat flag / id on obj-map - /* 0xB4 */ u8 room_id_copy; - /* 0xB5 */ u8 viewclip_index; - /* 0xB6 */ u8 subtype; - /* 0xB8 */ mAng3_c rotation; - /* 0xC0 */ mVec3_c position; - /* 0xCC */ mVec3_c scale; - /* 0xD8 */ u32 actor_properties; - /* 0xDC */ fLiNdBa_c actor_node; - /* 0xE8 */ u32 field_0xe8; - /* 0xEC */ u8 roomid; - /* 0xED */ u8 actor_subtype; - /* 0xF0 */ u32 JStudio_actor; - /* 0xF4 */ char someStr[4]; - /* 0xF8 */ char field_0xf8[0xfc - 0xf8]; + /* 0x84 */ ObjInfo *obj_info; + /* 0x88 */ void *sound_info_tail; + /* 0x8c */ void *sound_info_next; + /* 0x90 */ int count; + /* 0x94 */ void *obj_sound; + /* 0x9C */ mVec3_c *obj_pos; + /* 0x9c */ mVec3_c pos_copy; + /* 0xa8 */ u32 params2; + /* 0xAC */ mAng3_c rot_copy; + /* 0xB2 */ u16 obj_id; // enemydefeat flag / id on obj-map + /* 0xB4 */ u8 room_id_copy; + /* 0xB5 */ u8 viewclip_index; + /* 0xB6 */ u8 subtype; + /* 0xB8 */ mAng3_c rotation; + /* 0xC0 */ mVec3_c position; + /* 0xCC */ mVec3_c scale; + /* 0xD8 */ u32 actor_properties; + /* 0xDC */ fLiNdBa_c actor_node; + /* 0xE8 */ u32 field_0xe8; + /* 0xEC */ u8 roomid; + /* 0xED */ u8 actor_subtype; + /* 0xF0 */ u32 JStudio_actor; + /* 0xF4 */ char someStr[4]; + /* 0xF8 */ char field_0xf8[0xfc - 0xf8]; + protected: /* 80501544 */ // vtable /* 0x08 | 8002c880 */ virtual int create(); /* 0x10 | 8002c8f0 */ virtual void postCreate(MAIN_STATE_e state); /* 0x18 | 8002c940 */ virtual int preDelete(); - /* 0x20 | 8002cc10 */ virtual int execute(); // calls either actorExecute/executeInEvent - /* 0x24 | 8002cb10 */ virtual int preExecute(); // looks at some actor properties + /* 0x20 | 8002cc10 */ virtual int execute(); // calls either actorExecute/executeInEvent + /* 0x24 | 8002cb10 */ virtual int preExecute(); // looks at some actor properties /* 0x28 | 8002ccc0 */ virtual void postExecute(MAIN_STATE_e state); // not fully understood - /* 0x44 | 8002c3a0 */ virtual bool createHeap(); + /* 0x44 | 8002c3a0 */ virtual bool createHeap(); /* 0x48 | 8002c590 */ virtual ~dAcBase_c(); - /* 0x4C | 8002c860 */ virtual int actorCreate(); // name is assumed - /* 0x50 | 8002c870 */ virtual int actorPostCreate(); // name is assumed - /* 0x54 | 8002cca0 */ virtual int actorExecute(); // name is assumed + /* 0x4C | 8002c860 */ virtual int actorCreate(); // name is assumed + /* 0x50 | 8002c870 */ virtual int actorPostCreate(); // name is assumed + /* 0x54 | 8002cca0 */ virtual int actorExecute(); // name is assumed /* 0x58 | 8002ccb0 */ virtual int actorExecuteInEvent(); // name is assumed /* 0x5C | 8002ce90 */ virtual void unkVirtFunc_0x5C(); /* 0x60 | 8002cea0 */ virtual void unkVirtFunc_0x60(); /* 0x64 | 8002ceb0 */ virtual bool restorePosRotFromCopy(); - /* 0x68 | 8002db80 */ virtual void* getCurrentEventActor(); + /* 0x68 | 8002db80 */ virtual void *getCurrentEventActor(); /* 0x6C | 8002db90 */ virtual void unkVirtFunc_0x6C(); /* 0x70 | 8002dba0 */ virtual void doInteraction(s32); public: /* 8002c3b0 */ dAcBase_c(); - void setPostion(mVec3_c* r) { + void setPostion(mVec3_c *r) { position.set(r->x, r->y, r->z); } void setScale(f32 x, f32 y, f32 z) { scale.set(x, y, z); } - void setScale(mVec3_c* r) { + void setScale(mVec3_c *r) { scale.set(r->x, r->y, r->z); } - void setRotation(mAng3_c* r) { + void setRotation(mAng3_c *r) { rotation = *r; } @@ -93,20 +95,18 @@ public: void copyRotation() { rot_copy = rotation; } + public: - // funcs found in TU - /* 8002c650 */ static void setTempCreateParams( \ - mVec3_c* pos, mAng3_c* rot, mVec3_c* scale, \ - s32 roomId, u32 params2, dAcBase_c* parent, \ - u8 subtype, s16 unkFlag, u8 viewClipIdx,\ - ObjInfo* objInfo ); - - /* 8002c690 */ void* FUN_8002c690(); - /* 8002c710 */ int initAllocatorWork1Heap(int size, char* name, int align); - /* 8002c720 */ int initAllocator(int size, char* name, EGG::Heap* heap, int align); + // funcs found in TU + /* 8002c650 */ static void setTempCreateParams(mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, s32 roomId, u32 params2, + dAcBase_c *parent, u8 subtype, s16 unkFlag, u8 viewClipIdx, ObjInfo *objInfo); + + /* 8002c690 */ void *FUN_8002c690(); + /* 8002c710 */ int initAllocatorWork1Heap(int size, char *name, int align); + /* 8002c720 */ int initAllocator(int size, char *name, EGG::Heap *heap, int align); /* 8002c7b0 */ bool addActorToRoom(s32 roomId); /* 8002c840 */ void setBit_field_0xE8(s32); - /* 8002cf10 */ u32 itemDroppingAndGivingRelated(Vec3f* spawnPos, int subtype); + /* 8002cf10 */ u32 itemDroppingAndGivingRelated(Vec3f *spawnPos, int subtype); /* 8002cf90 */ void fillUpperParams2Byte(); /* 8002cfa0 */ u32 getParams2_ignoreLower(); /* 8002cfb0 */ void setParams2Upper_ignoreLower(u32 val); @@ -114,23 +114,25 @@ public: /* 8002cfd0 */ void setParams2UpperByte(u32 val); /* 8002cff0 */ static u32 buildParams2(u32 lower, u8 upper); /* 8002d010 */ u32 getParams2Lower(); - /* 8002d020 */ static dAcBase_c* findActor(char* objName, dAcBase_c* parent); - /* 8002d0a0 */ static dAcBase_c* searchActor(dAcBase_c& optionalParent); - // Kinda performs the code of the first param on every actor (second param is optional parent) - /* 8002d130 */static void forEachActor(void*, dAcBase_c&); - // Not really static, but we currently dont have a type for the return (not just simply a s16) + /* 8002d020 */ static dAcBase_c *findActor(char *objName, dAcBase_c *parent); + /* 8002d0a0 */ static dAcBase_c *searchActor(dAcBase_c &optionalParent); + // Kinda performs the code of the first param on every actor (second param is optional parent) + /* 8002d130 */ static void forEachActor(void *, dAcBase_c &); + // Not really static, but we currently dont have a type for the return (not just simply a s16) /* 8002d190 */ mAng getXZAngleToPlayer(); - // returns true if under the distThresh, False if not. the actual distance is returned in outDist - /* 8002d1d0 */ bool getDistanceToActor(dAcBase_c& actor, f32 distThresh, f32* outDist); - // same concept as above - /* 8002d290 */ bool getDistanceAndAngleToActor(dAcBase_c& actor, f32 distThresh, s16 yAngle, s16 xAngle, f32* outDist, s16* outDiffAngleY, s16* outDiffAngleX); + // returns true if under the distThresh, False if not. the actual distance is returned in outDist + /* 8002d1d0 */ bool getDistanceToActor(dAcBase_c &actor, f32 distThresh, f32 *outDist); + // same concept as above + /* 8002d290 */ bool getDistanceAndAngleToActor(dAcBase_c &actor, f32 distThresh, s16 yAngle, s16 xAngle, + f32 *outDist, s16 *outDiffAngleY, s16 *outDiffAngleX); /* 8002d3e0 */ bool isWithinPlayerRadius(f32 radius); - /* 8002d440 */ bool getDistanceAndAngleToPlayer(f32 distThresh, s16 yAngle, s16 xAngle, f32* outDist, s16* outDiffAngleY, s16* outDiffAngleX); + /* 8002d440 */ bool getDistanceAndAngleToPlayer(f32 distThresh, s16 yAngle, s16 xAngle, f32 *outDist, + s16 *outDiffAngleY, s16 *outDiffAngleX); /* 8002d470 */ f32 getDistToPlayer(); /* 8002d4a0 */ f32 getSquareDistToPlayer(); /* 8002d4b0 */ void updateRoomId(f32 yOffs); /* 8002d540 */ bool isRoomFlags_0x6_Set(); - // Begin Sound Effect Related + // Begin Sound Effect Related /* 8002d590 */ void FUN_8002d590(); /* 8002d5b0 */ void FUN_8002d5b0(); /* 8002d5d0 */ void playSound(); @@ -149,19 +151,19 @@ public: /* 8002d880 */ void FUN_8002d880(); // End Sound Effect Related /* 8002d890 */ void FUN_8002d890(); - /* 8002d920 */ void setActorRef(dBase_c*); + /* 8002d920 */ void setActorRef(dBase_c *); // next three funcs are related /* 8002d930 */ void setUnkFlag(); /* 8002d940 */ void FUN_8002d940(); /* 8002d960 */ void FUN_8002d960(); - /* 8002d980 */ static dAcBase_c createActor(ProfileName actorId, u32 params1, Vec3f* pos, Vec3s* rot, \ - Vec3f* scale, u32 params2, s32 roomId, dBase_c* ref); + /* 8002d980 */ static dAcBase_c createActor(ProfileName actorId, u32 params1, Vec3f *pos, Vec3s *rot, Vec3f *scale, + u32 params2, s32 roomId, dBase_c *ref); - /* 8002da80 */ static dAcBase_c createActorUnkGroup3(ProfileName actorId, u32 params1, Vec3f* pos, Vec3s* rot, \ - Vec3f* scale, u32 params2, s32 roomId, dBase_c* ref); + /* 8002da80 */ static dAcBase_c createActorUnkGroup3(ProfileName actorId, u32 params1, Vec3f *pos, Vec3s *rot, + Vec3f *scale, u32 params2, s32 roomId, dBase_c *ref); - /* 8002dc20 */ void FUN_8002dc20(s16*, s16*); + /* 8002dc20 */ void FUN_8002dc20(s16 *, s16 *); /* 8002dc50 */ void incrementKillCounter(); /* 8002dcd0 */ void FUN_8002dcd0(); /* 8002dd10 */ void FUN_8002dd10(); @@ -174,11 +176,13 @@ public: /* 80571920 */ static u32 s_Create_RoomId; /* 80571924 */ static u32 s_Create_Params2; /* 80571928 */ static u16 s_Create_UnkFlags; - /* 8057192A */ static u8 s_Create_ViewClipIdx; - /* 80575080 */ static mVec3_c* s_Create_Position; - /* 80575084 */ static mAng3_c* s_Create_Rotation; - /* 80575088 */ static mVec3_c* s_Create_Scale; - /* 8057508C */ static dAcBase_c* s_Create_Parent; - /* 80575090 */ static ObjInfo* s_Create_ObjInfo; + /* 8057192A */ static u8 s_Create_ViewClipIdx; + /* 80575080 */ static mVec3_c *s_Create_Position; + /* 80575084 */ static mAng3_c *s_Create_Rotation; + /* 80575088 */ static mVec3_c *s_Create_Scale; + /* 8057508C */ static dAcBase_c *s_Create_Parent; + /* 80575090 */ static ObjInfo *s_Create_ObjInfo; /* 80575094 */ static u8 s_Create_Subtype; -}; \ No newline at end of file +}; + +#endif diff --git a/include/d/a/en/d_a_en_base.h b/include/d/a/en/d_a_en_base.h index 8b2b2666..a24957ba 100644 --- a/include/d/a/en/d_a_en_base.h +++ b/include/d/a/en/d_a_en_base.h @@ -1,10 +1,10 @@ -#pragma once +#ifndef D_A_EN_BASE_H +#define D_A_EN_BASE_H #include "d/a/obj/d_a_obj_base.h" // Ghidra: ActorEnemyBase -// size: +// size: // non-official name -class dAcEnBase_c : public dAcObjBase_c { - -}; \ No newline at end of file +class dAcEnBase_c : public dAcObjBase_c {}; +#endif diff --git a/include/d/a/npc/d_a_npc.h b/include/d/a/npc/d_a_npc.h index e451b534..0e360ad5 100644 --- a/include/d/a/npc/d_a_npc.h +++ b/include/d/a/npc/d_a_npc.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef D_A_NPC_H +#define D_A_NPC_H #include "d/a/obj/d_a_obj_base.h" @@ -7,6 +8,6 @@ // Ghidra: ActorNpcBase // size: 0x6e4 // official name -class dAcNpc_c : public dAcObjBase_c { - -}; \ No newline at end of file +class dAcNpc_c : public dAcObjBase_c {}; + +#endif diff --git a/include/d/a/npc/d_a_npc_ordinary.h b/include/d/a/npc/d_a_npc_ordinary.h index fa33db09..0cfe3e86 100644 --- a/include/d/a/npc/d_a_npc_ordinary.h +++ b/include/d/a/npc/d_a_npc_ordinary.h @@ -1,11 +1,10 @@ -#pragma once - +#ifndef D_A_ORDINARY_NPC_H +#define D_A_ORDINARY_NPC_H #include "d/a/npc/d_a_npc.h" // Ghidra: AcOrdinaryNpc // size: // official name -class dAcOrdinaryNpc_c : public dAcNpc_c { - -}; \ No newline at end of file +class dAcOrdinaryNpc_c : public dAcNpc_c {}; +#endif diff --git a/include/d/a/obj/d_a_obj_base.h b/include/d/a/obj/d_a_obj_base.h index 087f3db2..c4467825 100644 --- a/include/d/a/obj/d_a_obj_base.h +++ b/include/d/a/obj/d_a_obj_base.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef D_A_OBJ_BASE_H +#define D_A_OBJ_BASE_H #include "d/a/d_a_base.h" #include "m/types_m.h" @@ -13,13 +14,13 @@ public: public: // could be their own thing? - /* 8002de40 */ static void* getOarcFile(char* oarcName, char* fileName); - /* 8002de60 */ static void* getOarcSubEntry(char* oarcName, char* fileName); - /* 8002de80 */ static void* getOarcResFile(char* oarcName); - /* 8002de90 */ static void* getOarcModelFile(char* oarcName); - /* 8002dea0 */ static void* getOarcZev(char* oarcName); - /* 8002deb0 */ static void* getOarcDZB(char* dzbName); - /* 8002ded0 */ static void* getOarcPLC(char* plcName); + /* 8002de40 */ static void *getOarcFile(char *oarcName, char *fileName); + /* 8002de60 */ static void *getOarcSubEntry(char *oarcName, char *fileName); + /* 8002de80 */ static void *getOarcResFile(char *oarcName); + /* 8002de90 */ static void *getOarcModelFile(char *oarcName); + /* 8002dea0 */ static void *getOarcZev(char *oarcName); + /* 8002deb0 */ static void *getOarcDZB(char *dzbName); + /* 8002ded0 */ static void *getOarcPLC(char *plcName); public: /* 8002def0 */ dAcObjBase_c(); @@ -28,59 +29,47 @@ public: /* 8002e150 */ virtual int preExecute(); /* 8002e2a0 */ virtual void postExecute(); /* 8002e330 */ virtual int preDraw(); - /* 8002e5b0 */ virtual void* getObjectListEntry(); + /* 8002e5b0 */ virtual void *getObjectListEntry(); /* 8002e5c0 */ virtual bool restorePosRotFromCopy(); /* 8002ea10 */ virtual bool canBeLinkedToWoodTag(); /* 8002ea20 */ virtual bool drop(); public: - /* 8002e630 */ static dAcObjBase_c create( \ - fProfile::PROFILE_NAME_e actorId, u32 roomId, u32 params1, \ - mVec3_c* pos, mAng3_c* rot, mVec3_c* scale, u32 params2 ); - /* 8002e6d0 */ static dAcObjBase_c create( \ - char* name, u32 roomId, u32 params1, \ - mVec3_c* pos, mAng3_c* rot, mVec3_c* scale, \ - u32 params2, u16 id, u8 viewclipId); - /* 8002e770 */ static dAcObjBase_c* findObject(fProfile::PROFILE_NAME_e actorId,\ - fLiNdBa_c* refList, dAcObjBase_c* parent); - /* 8002e7f0 */ static dAcObjBase_c* getNextObject(fLiNdBa_c* ref, dAcObjBase_c* parent); + /* 8002e630 */ static dAcObjBase_c create(fProfile::PROFILE_NAME_e actorId, u32 roomId, u32 params1, mVec3_c *pos, + mAng3_c *rot, mVec3_c *scale, u32 params2); + /* 8002e6d0 */ static dAcObjBase_c create(char *name, u32 roomId, u32 params1, mVec3_c *pos, mAng3_c *rot, + mVec3_c *scale, u32 params2, u16 id, u8 viewclipId); + /* 8002e770 */ static dAcObjBase_c *findObject(fProfile::PROFILE_NAME_e actorId, fLiNdBa_c *refList, + dAcObjBase_c *parent); + /* 8002e7f0 */ static dAcObjBase_c *getNextObject(fLiNdBa_c *ref, dAcObjBase_c *parent); /* 8002e850 */ bool isPlayer(); - /* 8002e870 */ void calcVelocity(mVec3_c& pos, f32 speed); + /* 8002e870 */ void calcVelocity(mVec3_c &pos, f32 speed); /* 8002e8e0 */ void calcVelocity(); /* 8002e9a0 */ void updateMatrix(); /* 8002ea00 */ void setDefaultCullDistance(); - /* 8002ea30 */ void fn_8002EA30(f32,f32,f32,f32,f32, void*); - /* 8002ea60 */ void fn_8002EA60(void*); - /* 8002eb30 */ void fn_8002EB30(void*); - /* 8002eb90 */ void putInODesert(f32 depth, mVec3_c* position); - // Disabling makes Items and Link Disappear + /* 8002ea30 */ void fn_8002EA30(f32, f32, f32, f32, f32, void *); + /* 8002ea60 */ void fn_8002EA60(void *); + /* 8002eb30 */ void fn_8002EB30(void *); + /* 8002eb90 */ void putInODesert(f32 depth, mVec3_c *position); + // Disabling makes Items and Link Disappear /* 8002ec70 */ void drawModelType1(); - // Disabling make Lava and other objects Disappear + // Disabling make Lava and other objects Disappear /* 8002ecd0 */ void drawModel2(); /* 8002ed20 */ void fn_8002ed20(); /* 8002edb0 */ void fn_8002edb0(); /* 8002ee40 */ void drawShadow(); - /* 8002ef40 */ void createChildAttached( \ - fProfile::PROFILE_NAME_e actorId, u32 params1, \ - mVec3_c* pos, mAng3_c* rot, mVec3_c* scale, u32 params2, \ - u32 roomId ); - /* 8002ef40 */ void createChildNonAttached( \ - fProfile::PROFILE_NAME_e actorId, u32 params1, \ - mVec3_c* pos, mAng3_c* rot, mVec3_c* scale, u32 params2, \ - u32 roomId ); + /* 8002ef40 */ void createChildAttached(fProfile::PROFILE_NAME_e actorId, u32 params1, mVec3_c *pos, mAng3_c *rot, + mVec3_c *scale, u32 params2, u32 roomId); + /* 8002ef40 */ void createChildNonAttached(fProfile::PROFILE_NAME_e actorId, u32 params1, mVec3_c *pos, + mAng3_c *rot, mVec3_c *scale, u32 params2, u32 roomId); /* 8002efa0 */ void fn_8002efa0(); - /* 8002eff0 */ bool fn_8002eff0(f32*, s16*, UnkCollider*, f32*, f32*); - /* 8002f190 */ void createChildAttached2( \ - fProfile::PROFILE_NAME_e actorId, u32 params1, \ - mVec3_c* pos, mAng3_c* rot, mVec3_c* scale, u32 params2, \ - u32 roomId ); - // These may not belong here - /* 8002f1c0 */ static dAcBase_c createActorUnkGroup3( \ - fProfile::PROFILE_NAME_e actorId, u32 roomId, \ - u32 params1, mVec3_c* pos, mAng3_c* rot, mVec3_c* scale, \ - u32 params2); - /* 8002f260 */ static dAcBase_c createActorUnkGroup3( \ - char* name, u32 roomId, u32 params1, \ - mVec3_c* pos, mAng3_c* rot, mVec3_c* scale, \ - u32 params2, u16 id, u8 viewclipId); -}; \ No newline at end of file + /* 8002eff0 */ bool fn_8002eff0(f32 *, s16 *, UnkCollider *, f32 *, f32 *); + /* 8002f190 */ void createChildAttached2(fProfile::PROFILE_NAME_e actorId, u32 params1, mVec3_c *pos, mAng3_c *rot, + mVec3_c *scale, u32 params2, u32 roomId); + // These may not belong here + /* 8002f1c0 */ static dAcBase_c createActorUnkGroup3(fProfile::PROFILE_NAME_e actorId, u32 roomId, u32 params1, + mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2); + /* 8002f260 */ static dAcBase_c createActorUnkGroup3(char *name, u32 roomId, u32 params1, mVec3_c *pos, + mAng3_c *rot, mVec3_c *scale, u32 params2, u16 id, u8 viewclipId); +}; +#endif diff --git a/include/d/a/obj/d_a_obj_item.h b/include/d/a/obj/d_a_obj_item.h index 41ff5625..a07fad3b 100644 --- a/include/d/a/obj/d_a_obj_item.h +++ b/include/d/a/obj/d_a_obj_item.h @@ -1,10 +1,11 @@ -#pragma once +#ifndef D_A_ITEM_BASE_H +#define D_A_ITEM_BASE_H #include "d/a/obj/d_a_obj_base.h" // Ghidra: AcItem // Size: 0xd68 // official name -class dAcItem_c : public dAcObjBase_c { +class dAcItem_c : public dAcObjBase_c {}; -}; \ No newline at end of file +#endif diff --git a/include/d/d_base.h b/include/d/d_base.h index 405cff38..2b8384cb 100644 --- a/include/d/d_base.h +++ b/include/d/d_base.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef D_BASE_H +#define D_BASE_H #include "f/f_base.h" // #include "c/c_owner_set.h" @@ -17,19 +18,20 @@ public: /* 80050860 */ virtual void postDraw(MAIN_STATE_e state); /* 8002c530 */ virtual ~dBase_c(); - public: /* 80050980 */ static void resetFlags(); - /* 800509a0 */ static bool isActorPlayer(dBase_c&); + /* 800509a0 */ static bool isActorPlayer(dBase_c &); /* 800509e0 */ static void initLoader(); - /* 80050a00 */ static dBase_c* createBase(ProfileName, dBase_c*, unsigned long, u8); - /* 80050a10 */ static dBase_c* createRoot(ProfileName, unsigned long, u8); + /* 80050a00 */ static dBase_c *createBase(ProfileName, dBase_c *, unsigned long, u8); + /* 80050a10 */ static dBase_c *createRoot(ProfileName, unsigned long, u8); private: /* 800509c0 */ static int loadAsyncCallback(); /* 800509d0 */ static void unloadCallback(); -inline bool isProcControlFlag(u32 flag) const { return (baseProperties & flag) != 0; } + inline bool isProcControlFlag(u32 flag) const { + return (baseProperties & flag) != 0; + } public: /* 805750c0 */ static u32 s_ExecuteControlFlags; @@ -38,4 +40,6 @@ public: // /* 80575bc0 */ static fProfile::fBaseProfile_c** DAT_ACTOR_ALLOCATION_FUNCTIONS; friend class fBase_c; -}; \ No newline at end of file +}; + +#endif diff --git a/include/d/d_heap.h b/include/d/d_heap.h index 1192e784..8809144b 100644 --- a/include/d/d_heap.h +++ b/include/d/d_heap.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef D_HEAP_H +#define D_HEAP_H #include "egg/core/eggExpHeap.h" @@ -29,3 +30,5 @@ public: static void createFontHeap(size_t size, EGG::Heap *parent); static void createHBMHeap(size_t size, EGG::Heap *parent); }; + +#endif diff --git a/include/d/d_sys.h b/include/d/d_sys.h index 6f70f09b..12ff7e2f 100644 --- a/include/d/d_sys.h +++ b/include/d/d_sys.h @@ -1 +1,4 @@ -#pragma once +#ifndef D_SYS_H +#define D_SYS_H + +#endif diff --git a/include/d/d_system.h b/include/d/d_system.h index 6f70f09b..5b5aae26 100644 --- a/include/d/d_system.h +++ b/include/d/d_system.h @@ -1 +1,4 @@ -#pragma once +#ifndef D_SYSTEM_H +#define D_SYSTEM_H + +#endif diff --git a/include/egg/audio/eggAudioMgr.h b/include/egg/audio/eggAudioMgr.h index 78977a97..13aa37a6 100644 --- a/include/egg/audio/eggAudioMgr.h +++ b/include/egg/audio/eggAudioMgr.h @@ -1,25 +1,26 @@ -#pragma once +#ifndef EGG_IAUDIO_MANAGER_H +#define EGG_IAUDIO_MANAGER_H -#include "egg/egg_types.h" #include "egg/core/eggHeap.h" +#include "egg/egg_types.h" + namespace EGG { - class IAudioMgr { - public: - struct Arg { - /* 0x00 */ EGG::Heap* heap; - /* 0x04 */ char* soundFileName; - /* 0x08 */ int sndThreadPriority; - /* 0x0c */ int sndThreadStackSize; - /* 0x10 */ int dvdThreadPriority; - /* 0x14 */ int dvdThreadStackSize; - /* 0x18 */ u32 blocks; - /* 0x1c */ u8 field_0x1C; - }; - +class IAudioMgr { +public: + struct Arg { + /* 0x00 */ EGG::Heap *heap; + /* 0x04 */ char *soundFileName; + /* 0x08 */ int sndThreadPriority; + /* 0x0c */ int sndThreadStackSize; + /* 0x10 */ int dvdThreadPriority; + /* 0x14 */ int dvdThreadStackSize; + /* 0x18 */ u32 blocks; + /* 0x1c */ u8 field_0x1C; }; +}; - class SimpleAudioMgr : public IAudioMgr, public SoundHeapMgr, public ArcPlayer { +class SimpleAudioMgr : public IAudioMgr, public SoundHeapMgr, public ArcPlayer {}; +} // namespace EGG - }; -} \ No newline at end of file +#endif diff --git a/include/egg/core/eggAllocator.h b/include/egg/core/eggAllocator.h index ddcf449b..454539fe 100644 --- a/include/egg/core/eggAllocator.h +++ b/include/egg/core/eggAllocator.h @@ -1,10 +1,8 @@ -#pragma once - -#include "egg/core/eggHeap.h" +#ifndef EGG_ALLOCATOR_H +#define EGG_ALLOCATOR_H #include "rvl/MEM.h" #include - // /* 80495310 */ MEMInitAllocatorFor_Heap(MEMAllocator* alloc, s32 align, void* heap); // /* 804952f0 */ MEM_AllocFor_Heap(MEMAllocator* alloc, void* block); // /* 804952d0 */ MEM_AllocFor_Heap(MEMAllocator* alloc, u32 size, s32 align); @@ -26,3 +24,5 @@ public: /* 0x18 */ s32 align; }; }; // namespace EGG + +#endif diff --git a/include/egg/core/eggArchive.h b/include/egg/core/eggArchive.h index 23dc4b27..6c119fa5 100644 --- a/include/egg/core/eggArchive.h +++ b/include/egg/core/eggArchive.h @@ -1,11 +1,11 @@ -#pragma once +#ifndef EGG_ARCHIVE_H +#define EGG_ARCHIVE_H #include "egg/core/eggDisposer.h" #include "rvl/ARC.h" #include "rvl/NAND.h" #include - typedef void (*FileCallbackFunc)(void *, void *, const ARCDirEntry *, const char *); namespace EGG { @@ -60,3 +60,5 @@ public: /* 80493f10 */ void countFileCallbackFunc(void *, void *, const ARCDirEntry *, const char *); /* 80493f70 */ void searchInsideWithPath(Archive *arc, ARCHandle *handle, FileCallbackFunc, void *, char *outPath, u32); } // namespace EGG + +#endif diff --git a/include/egg/core/eggAssertHeap.h b/include/egg/core/eggAssertHeap.h index 22a642f6..69956cd7 100644 --- a/include/egg/core/eggAssertHeap.h +++ b/include/egg/core/eggAssertHeap.h @@ -1,9 +1,9 @@ -#pragma once +#ifndef EGG_ASSERT_HEAP_H +#define EGG_ASSERT_HEAP_H #include "egg/core/eggHeap.h" #include - namespace EGG { class AssertHeap : public Heap { @@ -27,3 +27,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggAsyncDisplay.h b/include/egg/core/eggAsyncDisplay.h index 5349ad27..b8d94789 100644 --- a/include/egg/core/eggAsyncDisplay.h +++ b/include/egg/core/eggAsyncDisplay.h @@ -1,9 +1,9 @@ -#pragma once +#ifndef EGG_ASYNC_DISPLAY_H +#define EGG_ASYNC_DISPLAY_H #include "egg/core/eggDisplay.h" #include - namespace EGG { class AsyncDisplay : public Display { @@ -48,3 +48,5 @@ extern "C" { #ifdef __cplusplus } #endif + +#endif diff --git a/include/egg/core/eggColorFader.h b/include/egg/core/eggColorFader.h index 4432fd17..ab2b1b6a 100644 --- a/include/egg/core/eggColorFader.h +++ b/include/egg/core/eggColorFader.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef EGG_COLOR_FADER_H +#define EGG_COLOR_FADER_H #include "egg/core/eggFader.h" #include "egg/prim/eggBitFlag.h" @@ -37,3 +38,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggController.h b/include/egg/core/eggController.h index d3a2a2e9..ce4e48ae 100644 --- a/include/egg/core/eggController.h +++ b/include/egg/core/eggController.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef EGG_CONTROLLER_H +#define EGG_CONTROLLER_H #include @@ -9,7 +10,6 @@ #include "egg/prim/eggBuffer.h" #include "rvl/PAD.h" - namespace EGG { class ControllerRumbleMgr; @@ -174,3 +174,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggDecomp.h b/include/egg/core/eggDecomp.h index aa98dadc..46b8f11f 100644 --- a/include/egg/core/eggDecomp.h +++ b/include/egg/core/eggDecomp.h @@ -1,9 +1,9 @@ -#pragma once +#ifndef EGG_STREAM_DECOMP_H +#define EGG_STREAM_DECOMP_H #include "rvl/CX/cx.h" #include - // NOTE: I put StreamDecomp stuff here. im unsure of the correct place namespace EGG { @@ -81,3 +81,5 @@ public: /* 0x0C */ SZSCompContext context; }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggDisplay.h b/include/egg/core/eggDisplay.h index ce216883..04125c66 100644 --- a/include/egg/core/eggDisplay.h +++ b/include/egg/core/eggDisplay.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef EGG_DISPLAY_H +#define EGG_DISPLAY_H #include "egg/core/eggSystem.h" // for BaseSystem config #include "egg/core/eggVideo.h" @@ -49,3 +50,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggDisposer.h b/include/egg/core/eggDisposer.h index 3600816a..2bdbff38 100644 --- a/include/egg/core/eggDisposer.h +++ b/include/egg/core/eggDisposer.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef EGG_DISPOSER_H +#define EGG_DISPOSER_H // This file was adapted from https://github.com/riidefi/mkw/blob/master/source/egg/core/eggDisposer.hpp @@ -31,3 +32,5 @@ private: // for reference }; // namespace EGG + +#endif diff --git a/include/egg/core/eggDvdFile.h b/include/egg/core/eggDvdFile.h index 598b9647..8d7c13da 100644 --- a/include/egg/core/eggDvdFile.h +++ b/include/egg/core/eggDvdFile.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef EGG_DVD_FILE_H +#define EGG_DVD_FILE_H #include "egg/core/eggFile.h" #include "nw4r/ut.h" @@ -48,3 +49,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggDvdRipper.h b/include/egg/core/eggDvdRipper.h index fdcae89f..873508d6 100644 --- a/include/egg/core/eggDvdRipper.h +++ b/include/egg/core/eggDvdRipper.h @@ -1,11 +1,11 @@ -#pragma once +#ifndef EGG_DVD_RIPPER_H +#define EGG_DVD_RIPPER_H #include "egg/core/eggDecomp.h" #include "egg/core/eggDvdFile.h" #include "egg/core/eggHeap.h" #include - namespace EGG { class DvdRipper { @@ -28,3 +28,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggExpHeap.h b/include/egg/core/eggExpHeap.h index cec4bacb..41d4f250 100644 --- a/include/egg/core/eggExpHeap.h +++ b/include/egg/core/eggExpHeap.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef EGG_EXP_HEAP_H +#define EGG_EXP_HEAP_H #include "egg/core/eggHeap.h" #include @@ -27,3 +28,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggFader.h b/include/egg/core/eggFader.h index 844c5bf3..88249afb 100644 --- a/include/egg/core/eggFader.h +++ b/include/egg/core/eggFader.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef EGG_FADER_H +#define EGG_FADER_H #include @@ -24,3 +25,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggFile.h b/include/egg/core/eggFile.h index c8b97648..dbf7ccbb 100644 --- a/include/egg/core/eggFile.h +++ b/include/egg/core/eggFile.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef EGG_FILE_H +#define EGG_FILE_H #include @@ -23,3 +24,5 @@ private: }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggFrmHeap.h b/include/egg/core/eggFrmHeap.h index ff5a3b58..57b2f0de 100644 --- a/include/egg/core/eggFrmHeap.h +++ b/include/egg/core/eggFrmHeap.h @@ -1,9 +1,9 @@ -#pragma once +#ifndef EGG_FRM_HEAP_H +#define EGG_FRM_HEAP_H #include "egg/core/eggHeap.h" #include - namespace EGG { class FrmHeap : public Heap { @@ -28,3 +28,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggGraphicsFifo.h b/include/egg/core/eggGraphicsFifo.h index 335b5edc..0e060401 100644 --- a/include/egg/core/eggGraphicsFifo.h +++ b/include/egg/core/eggGraphicsFifo.h @@ -1,9 +1,9 @@ -#pragma once +#ifndef EGG_GRAPHICS_FIFO_H +#define EGG_GRAPHICS_FIFO_H #include "egg/core/eggHeap.h" #include - namespace EGG { class GraphicsFifo { @@ -26,3 +26,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggHeap.h b/include/egg/core/eggHeap.h index 23e8760f..10b114e9 100644 --- a/include/egg/core/eggHeap.h +++ b/include/egg/core/eggHeap.h @@ -1,8 +1,8 @@ -#pragma once +#ifndef EGG_HEAP_H +#define EGG_HEAP_H // This file is ported from https://github.com/riidefi/mkw/blob/master/source/egg/core/eggHeap.hpp -#include "egg/core/eggAllocator.h" #include "egg/core/eggDisposer.h" #include "egg/core/eggThread.h" #include "egg/prim/eggBitFlag.h" @@ -160,3 +160,5 @@ public: /* 80495a80 */ void *operator new(size_t size, EGG::Allocator *alloc); /* 80495a90 */ void *operator new[](size_t size, u32 align); /* 80495aa0 */ void *operator new[](size_t size, EGG::Heap *heap, int align); + +#endif diff --git a/include/egg/core/eggSystem.h b/include/egg/core/eggSystem.h index c8c4765e..e124b306 100644 --- a/include/egg/core/eggSystem.h +++ b/include/egg/core/eggSystem.h @@ -1,9 +1,9 @@ -#pragma once +#ifndef EGG_SYSTEM_H +#define EGG_SYSTEM_H #include "egg/core/eggHeap.h" #include - namespace EGG { class Display; @@ -58,3 +58,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggThread.h b/include/egg/core/eggThread.h index e2dfcf97..8895b95d 100644 --- a/include/egg/core/eggThread.h +++ b/include/egg/core/eggThread.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef EGG_THREAD_H +#define EGG_THREAD_H #include "egg/core/eggHeap.h" #include "nw4r/ut.h" @@ -42,3 +43,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggUnk.h b/include/egg/core/eggUnk.h index f1122cee..4470800a 100644 --- a/include/egg/core/eggUnk.h +++ b/include/egg/core/eggUnk.h @@ -1,9 +1,9 @@ -#pragma once +#ifndef EGG_UNK_H +#define EGG_UNK_H #include "rvl/OS.h" #include - // This is seen in Animal Crossing: City Folk also. Idk where it belongs // Seen between EGG::Thread and EGG::ConfigurationData (eggThread and eggSystem) @@ -20,3 +20,5 @@ public: /* 804970e0 */ void fn_804970e0(OSThread *, u8 *); }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggVideo.h b/include/egg/core/eggVideo.h index 2713ce4f..fb56d66f 100644 --- a/include/egg/core/eggVideo.h +++ b/include/egg/core/eggVideo.h @@ -1,11 +1,11 @@ -#pragma once +#ifndef EGG_VIDEO_H +#define EGG_VIDEO_H #include "egg/prim/eggBitFlag.h" #include "rvl/GX.h" #include "rvl/VI.h" #include - namespace EGG { class Video { @@ -35,3 +35,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggXfb.h b/include/egg/core/eggXfb.h index be037f4f..b7c1d5b2 100644 --- a/include/egg/core/eggXfb.h +++ b/include/egg/core/eggXfb.h @@ -1,9 +1,9 @@ -#pragma once +#ifndef EGG_XFB_H +#define EGG_XFB_H #include "egg/core/eggHeap.h" #include - namespace EGG { class Xfb { @@ -29,3 +29,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/core/eggXfbManager.h b/include/egg/core/eggXfbManager.h index 262c6c7c..a0895d85 100644 --- a/include/egg/core/eggXfbManager.h +++ b/include/egg/core/eggXfbManager.h @@ -1,9 +1,9 @@ -#pragma once +#ifndef EGG_XFB_MANAGER_H +#define EGG_XFB_MANAGER_H #include "egg/core/eggXfb.h" #include - namespace EGG { class XfbManager { @@ -21,3 +21,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/egg_types.h b/include/egg/egg_types.h index 1209967d..6295ffcb 100644 --- a/include/egg/egg_types.h +++ b/include/egg/egg_types.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef EGG_TYPES_H +#define EGG_TYPES_H #include @@ -93,3 +94,5 @@ class SoundHeapMgr; class Exception; class MsgRes; } // namespace EGG + +#endif diff --git a/include/egg/math/eggMath.h b/include/egg/math/eggMath.h index ebef6d9c..243e3575 100644 --- a/include/egg/math/eggMath.h +++ b/include/egg/math/eggMath.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef EGG_MATH_H +#define EGG_MATH_H #include @@ -60,3 +61,5 @@ public: // /* 8049ac40 */ Math::atan2(f32, f32); } // namespace EGG + +#endif diff --git a/include/egg/math/eggMatrix.h b/include/egg/math/eggMatrix.h index 9e4112c4..dd944f56 100644 --- a/include/egg/math/eggMatrix.h +++ b/include/egg/math/eggMatrix.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef EGG_MATRIX_H +#define EGG_MATRIX_H #include "egg/math/eggQuat.h" #include "egg/math/eggVector.h" @@ -93,3 +94,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/math/eggQuat.h b/include/egg/math/eggQuat.h index d99f925c..8cfc10af 100644 --- a/include/egg/math/eggQuat.h +++ b/include/egg/math/eggQuat.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef EGG_QUAT_H +#define EGG_QUAT_H #include "egg/math/eggVector.h" #include @@ -70,3 +71,5 @@ struct Quatf : Vector3f { }; } // namespace EGG + +#endif diff --git a/include/egg/math/eggVector.h b/include/egg/math/eggVector.h index cbd1196b..bbad7315 100644 --- a/include/egg/math/eggVector.h +++ b/include/egg/math/eggVector.h @@ -1,11 +1,11 @@ -#pragma once +#ifndef EGG_VECTOR_H +#define EGG_VECTOR_H #include "MSL_C/float.h" #include "egg/math/eggMath.h" #include #include - namespace EGG { struct Vector3f : public nw4r::math::VEC3 { @@ -133,3 +133,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/prim/eggAssert.h b/include/egg/prim/eggAssert.h index 78745a00..0910f203 100644 --- a/include/egg/prim/eggAssert.h +++ b/include/egg/prim/eggAssert.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef EGG_ASSERT_H +#define EGG_ASSERT_H #include @@ -19,3 +20,5 @@ namespace Assert { } // namespace Assert } // namespace EGG + +#endif diff --git a/include/egg/prim/eggBitFlag.h b/include/egg/prim/eggBitFlag.h index c52dca96..13e6c5f9 100644 --- a/include/egg/prim/eggBitFlag.h +++ b/include/egg/prim/eggBitFlag.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef EGG_BIT_FLAG_H +#define EGG_BIT_FLAG_H // Pulled from ogws @@ -63,3 +64,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/egg/prim/eggBuffer.h b/include/egg/prim/eggBuffer.h index 0c9d1d91..a5312bf5 100644 --- a/include/egg/prim/eggBuffer.h +++ b/include/egg/prim/eggBuffer.h @@ -1,9 +1,9 @@ -#pragma once +#ifndef EGG_BUFFER_H +#define EGG_BUFFER_H #include "egg/core/eggHeap.h" #include - namespace EGG { template @@ -59,3 +59,5 @@ public: }; } // namespace EGG + +#endif diff --git a/include/f/f_base.h b/include/f/f_base.h index 1cada108..2db49895 100644 --- a/include/f/f_base.h +++ b/include/f/f_base.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef F_BASE_H +#define F_BASE_H // This file is adapted from // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_base.hpp and the Skyward Sword @@ -154,3 +155,5 @@ private: friend class fLiNdBa_c; friend class fTrMgBa_c; }; + +#endif diff --git a/include/f/f_base_id.h b/include/f/f_base_id.h index 9aed9781..fb0f362e 100644 --- a/include/f/f_base_id.h +++ b/include/f/f_base_id.h @@ -1,6 +1,9 @@ -#pragma once +#ifndef F_BASE_ID_H +#define F_BASE_ID_H enum fBaseID_e { FIRST_ID = 1, INVALID = -1, -}; \ No newline at end of file +}; + +#endif diff --git a/include/f/f_helper_unk.h b/include/f/f_helper_unk.h index af9f5b6e..6d755313 100644 --- a/include/f/f_helper_unk.h +++ b/include/f/f_helper_unk.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef F_HELPER_UNK_H +#define F_HELPER_UNK_H // This file was ported from // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_helper_unk.hpp @@ -24,3 +25,5 @@ public: int Load(int); ///< @todo Document this method. bool LoadOnlyOne(); ///< @todo Document this method. }; + +#endif diff --git a/include/f/f_list_mg.h b/include/f/f_list_mg.h index 92a13356..eb4d86d7 100644 --- a/include/f/f_list_mg.h +++ b/include/f/f_list_mg.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef F_LIST_MANAGER_H +#define F_LIST_MANAGER_H // This file was ported from // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_mg.hpp @@ -33,3 +34,5 @@ public: return (fLiNdBa_c *)cListMg_c::getLast(); } }; + +#endif diff --git a/include/f/f_list_mg_ptmf.h b/include/f/f_list_mg_ptmf.h index 765be6d6..30b3f491 100644 --- a/include/f/f_list_mg_ptmf.h +++ b/include/f/f_list_mg_ptmf.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef F_LIST_MANAGER_FUNC_H +#define F_LIST_MANAGER_FUNC_H // This file was ported from // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_mg_ptmf.hpp @@ -29,3 +30,5 @@ public: private: int (fBase_c::*mpProcFunc)(); ///< The process function for the list. }; + +#endif diff --git a/include/f/f_list_nd.h b/include/f/f_list_nd.h index c583da5a..6e5cc8eb 100644 --- a/include/f/f_list_nd.h +++ b/include/f/f_list_nd.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef F_LIST_NODE_H +#define F_LIST_NODE_H // This file was ported from // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_nd.hpp @@ -25,3 +26,5 @@ public: fBase_c *p_owner; }; + +#endif diff --git a/include/f/f_list_nd_prio.h b/include/f/f_list_nd_prio.h index 98b60f34..16785e39 100644 --- a/include/f/f_list_nd_prio.h +++ b/include/f/f_list_nd_prio.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef F_LIST_NODE_PRIORITY_H +#define F_LIST_NODE_PRIORITY_H // This file was ported from // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_nd_prio.hpp @@ -47,3 +48,5 @@ public: u16 m_order; ///< The priority of this node. u16 m_new_order; ///< The priority the node should change to if it differs from ::mOrder. }; + +#endif diff --git a/include/f/f_manager.h b/include/f/f_manager.h index fdb7f662..d9dca6e7 100644 --- a/include/f/f_manager.h +++ b/include/f/f_manager.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef F_MANAGER_H +#define F_MANAGER_H // this file was ported from // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_manager.hpp @@ -53,3 +54,5 @@ private: friend class fBase_c; }; + +#endif diff --git a/include/f/f_profile.h b/include/f/f_profile.h index 4a6d3492..fa85c7b6 100644 --- a/include/f/f_profile.h +++ b/include/f/f_profile.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef F_PROFILE_H +#define F_PROFILE_H // Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_profile.hpp @@ -75,3 +76,5 @@ struct fActorProfile_c : fBaseProfile_c { extern fBaseProfile_c *(*sProfileList)[NUMBER_OF_ACTORS]; ///< A list of all profiles. } // namespace fProfile + +#endif diff --git a/include/f/f_profile_name.h b/include/f/f_profile_name.h index 4287b6a3..a2cf3427 100644 --- a/include/f/f_profile_name.h +++ b/include/f/f_profile_name.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef F_PROFILE_NAME +#define F_PROFILE_NAME #include @@ -712,3 +713,5 @@ enum PROFILE_NAME_e { INVALID, }; }; + +#endif diff --git a/include/f/f_tree_mg.h b/include/f/f_tree_mg.h index c8bfa8e4..d53e4a64 100644 --- a/include/f/f_tree_mg.h +++ b/include/f/f_tree_mg.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef F_TREE_MANAGER_H +#define F_TREE_MANAGER_H // This file was ported from // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_tree_mg.hpp @@ -33,3 +34,5 @@ public: return (fTrNdBa_c *)cTreeMg_c::getRoot(); } }; + +#endif diff --git a/include/f/f_tree_mg_ptmf.h b/include/f/f_tree_mg_ptmf.h index 311c3ef4..07ea3221 100644 --- a/include/f/f_tree_mg_ptmf.h +++ b/include/f/f_tree_mg_ptmf.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef F_TREE_MANAGER_FUNC_H +#define F_TREE_MANAGER_FUNC_H // This file was ported from // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_tree_mg_ptmf.hpp @@ -24,3 +25,5 @@ public: private: int (fBase_c::*mpProcFunc)(); ///< The process function for the tree. }; + +#endif diff --git a/include/f/f_tree_nd.h b/include/f/f_tree_nd.h index 006d4007..7f0bbec7 100644 --- a/include/f/f_tree_nd.h +++ b/include/f/f_tree_nd.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef C_TREE_NODE_H +#define C_TREE_NODE_H // This file was ported from // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_tree_nd.hpp @@ -39,3 +40,5 @@ public: fBase_c *p_owner; }; + +#endif diff --git a/include/libc.h b/include/libc.h index 593affe0..e2d00635 100644 --- a/include/libc.h +++ b/include/libc.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef DECOMP_LIB_C +#define DECOMP_LIB_C #include @@ -8,3 +9,5 @@ void *memset(void *dest, s32 value, u32 count); void *memcpy(void *dest, const void *src, u32 count); void *checkedMemcpy(void *dest, u16 destLen, const void *src, u16 count); } + +#endif diff --git a/include/m/m_allocator.h b/include/m/m_allocator.h index f8349b17..d2d69cb3 100644 --- a/include/m/m_allocator.h +++ b/include/m/m_allocator.h @@ -1,16 +1,16 @@ -#pragma once +#ifndef M_ALLOCATOR_H +#define M_ALLOCATOR_H #include "egg/core/eggAllocator.h" class mAllocator_c : public EGG::Allocator { public: - mAllocator_c(); - // vtable at 0x10 - /* 0x08 */ virtual ~mAllocator_c(); - /* 0x0C */ virtual void* alloc(u32 size); - /* 0x10 */ virtual void free(void* block); - bool attach(EGG::Heap* heap, s32 align); - + mAllocator_c(); + // vtable at 0x10 + /* 0x08 */ virtual ~mAllocator_c(); + /* 0x0C */ virtual void *alloc(u32 size); + /* 0x10 */ virtual void free(void *block); + bool attach(EGG::Heap *heap, s32 align); }; class mHeapAllocator_c : public mAllocator_c { public: @@ -19,12 +19,13 @@ public: /* 0x08 */ virtual ~mHeapAllocator_c(); /* 0x0C */ // virtual void* alloc(u32 size); // see mAlloctor::alloc /* 0x10 */ // virtual void free(void* block); // see mAlloctor::free - int replaceWithNewFrmHeap(s32 size, EGG::Heap* newHeap, char* heapName, s32 align, u32 unk); - int replaceWithNewExpHeap(s32 size, EGG::Heap* newHeap, char* heapName, s32 align, u32 unk); + int replaceWithNewFrmHeap(s32 size, EGG::Heap *newHeap, char *heapName, s32 align, u32 unk); + int replaceWithNewExpHeap(s32 size, EGG::Heap *newHeap, char *heapName, s32 align, u32 unk); void destroyHeap(); s32 adjustFrmHeap(); s32 adjustExpHeap(); - s32 createNewTempFrmHeap(s32 size, EGG::Heap* newHeap, char* heapName, s32 align, u32 unk); + s32 createNewTempFrmHeap(s32 size, EGG::Heap *newHeap, char *heapName, s32 align, u32 unk); void adjustFrmHeapRestoreCurrent(); - static void* allocOnHeap(s32 size, mHeapAllocator_c* allocator); -}; \ No newline at end of file + static void *allocOnHeap(s32 size, mHeapAllocator_c *allocator); +}; +#endif diff --git a/include/m/m_angle.h b/include/m/m_angle.h index 2579ca87..29a20d18 100644 --- a/include/m/m_angle.h +++ b/include/m/m_angle.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef M_ANGLE_H +#define M_ANGLE_H #include @@ -17,3 +18,5 @@ public: z = fz; } }; + +#endif diff --git a/include/m/m_frustum.h b/include/m/m_frustum.h index 99d3aaa0..0b629468 100644 --- a/include/m/m_frustum.h +++ b/include/m/m_frustum.h @@ -1,5 +1,8 @@ -#pragma once +#ifndef M_FRUSTUM_H +#define M_FRUSTUM_H #include class mFrustum_c {}; + +#endif diff --git a/include/m/m_heap.h b/include/m/m_heap.h index 8f9e5033..38c737e7 100644 --- a/include/m/m_heap.h +++ b/include/m/m_heap.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef M_HEAP_H +#define M_HEAP_H #include "egg/core/eggFrmHeap.h" #include "egg/core/eggHeap.h" @@ -6,6 +7,8 @@ // #include "egg/core/eggExpHeap.h" // #include "egg/core/eggAssertHeap.h" +// TODO: REWRITE THIS + namespace EGG { class ExpHeap; class AssertHeap; @@ -43,3 +46,5 @@ extern EGG::ExpHeap *g_commandHeap; extern EGG::ExpHeap *g_dylinkHeap; extern EGG::AssertHeap *g_assertHeap; }; // namespace mHeap + +#endif diff --git a/include/m/m_mtx.h b/include/m/m_mtx.h index ca81b9f5..512ede2d 100644 --- a/include/m/m_mtx.h +++ b/include/m/m_mtx.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef M_MTX_H +#define M_MTX_H // NOTE:: Comments about functions pulled from NSMBW @@ -7,7 +8,6 @@ #include "nw4r/nw4r_types.h" #include - class mMtx_c { mMtx_c(){}; /* 802f1660 */ mMtx_c(f32 xx, f32 xy, f32 xz, f32 xw, f32 yx, f32 yy, f32 yz, f32 yw, f32 zx, f32 zy, f32 zz, @@ -51,3 +51,5 @@ public: public: static mMtx_c Identity; }; + +#endif diff --git a/include/m/m_thread.h b/include/m/m_thread.h index 8bd58044..104c7b69 100644 --- a/include/m/m_thread.h +++ b/include/m/m_thread.h @@ -1,3 +1,6 @@ -#pragma once +#ifndef M_THREAD_H +#define M_THREAD_H -// This file is a complete guess \ No newline at end of file +// This file is a complete guess + +#endif diff --git a/include/m/m_vec.h b/include/m/m_vec.h index 96e3128a..02817ec0 100644 --- a/include/m/m_vec.h +++ b/include/m/m_vec.h @@ -1,10 +1,10 @@ -#pragma once +#ifndef M_VEC_H +#define M_VEC_H #include "egg/math/eggVector.h" #include "rvl/MTX.h" #include - class mVec3_c : public EGG::Vector3f { public: /// @brief Constructs an empty vector. @@ -155,3 +155,5 @@ public: return x != v.x || y != v.y || z != v.z; } }; + +#endif diff --git a/include/m/types_m.h b/include/m/types_m.h index d642784d..5ad33e20 100644 --- a/include/m/types_m.h +++ b/include/m/types_m.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef M_TYPES_H +#define M_TYPES_H #include @@ -65,3 +66,5 @@ template // types are from EGG::StreamDecomp[LH/LRC/RL/LZ] class TUncompressedInfo_c; } // namespace mDvd + +#endif diff --git a/include/nw4r/db/db_directPrint.h b/include/nw4r/db/db_directPrint.h index cc574723..c3e682ec 100644 --- a/include/nw4r/db/db_directPrint.h +++ b/include/nw4r/db/db_directPrint.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef DB_DIRECT_PRINT_H +#define DB_DIRECT_PRINT_H #include #include @@ -58,3 +59,4 @@ namespace detail { } // namespace db } // namespace nw4r +#endif diff --git a/include/nw4r/nw4r_types.h b/include/nw4r/nw4r_types.h index 1eb11924..5d666e6f 100644 --- a/include/nw4r/nw4r_types.h +++ b/include/nw4r/nw4r_types.h @@ -1,4 +1,6 @@ -#pragma once +#ifndef NW4R_TYPES_H +#define NW4R_TYPES_H + namespace nw4r { namespace ut { template @@ -183,3 +185,5 @@ struct ResBlockSet; struct TexMap; } // namespace lyt } // namespace nw4r + +#endif diff --git a/include/rvl/ARC/arc.h b/include/rvl/ARC/arc.h index 6506800a..33096322 100644 --- a/include/rvl/ARC/arc.h +++ b/include/rvl/ARC/arc.h @@ -1,4 +1,3 @@ -#pragma once #ifndef RVL_SDK_ARC_H #define RVL_SDK_ARC_H #include diff --git a/include/rvl/CX/cx.h b/include/rvl/CX/cx.h index 66b75bd3..4d5b87d2 100644 --- a/include/rvl/CX/cx.h +++ b/include/rvl/CX/cx.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef RVL_CX_H +#define RVL_CX_H #include @@ -58,3 +59,5 @@ typedef struct CXUncompContextLRC { #ifdef __cplusplus } #endif + +#endif diff --git a/include/sound_mgrs/sound_audio_manager.h b/include/sound_mgrs/sound_audio_manager.h index aed22129..b247d767 100644 --- a/include/sound_mgrs/sound_audio_manager.h +++ b/include/sound_mgrs/sound_audio_manager.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef SOUND_AUDIO_MANAGER_H +#define SOUND_AUDIO_MANAGER_H #include "egg/audio/eggAudioMgr.h" #include @@ -7,3 +8,5 @@ class SndAudioMgr : public EGG::SimpleAudioMgr { public: }; + +#endif diff --git a/include/toBeSorted/arc_manager.h b/include/toBeSorted/arc_manager.h index 6302979f..1c7615a3 100644 --- a/include/toBeSorted/arc_manager.h +++ b/include/toBeSorted/arc_manager.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef ARC_MANAGER_H +#define ARC_MANAGER_H #include @@ -32,3 +33,5 @@ public: }; OarcManager g_OarcManager; + +#endif; diff --git a/include/toBeSorted/bitwise_flag_helper.h b/include/toBeSorted/bitwise_flag_helper.h index 74329985..67be717f 100644 --- a/include/toBeSorted/bitwise_flag_helper.h +++ b/include/toBeSorted/bitwise_flag_helper.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef BITWISE_FLAG_HELPERS_H +#define BITWISE_FLAG_HELPERS_H #include @@ -11,3 +12,5 @@ public: void setFlag(u16 slot, u16 shift, u16 *pData, u16 flagCount); void unsetFlag(u16 slot, u16 shift, u16 *pData, u16 flagCount); }; + +#endif diff --git a/include/toBeSorted/flag_space.h b/include/toBeSorted/flag_space.h index d5467839..068c813e 100644 --- a/include/toBeSorted/flag_space.h +++ b/include/toBeSorted/flag_space.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef FLAG_SPACE_H +#define FLAG_SPACE_H #include @@ -23,3 +24,5 @@ public: void copyFromSaveFile(u16 *pSaved, u16 offset, u16 flagCount); virtual void filemanagerCheck(); }; + +#endif diff --git a/include/toBeSorted/room_manager.h b/include/toBeSorted/room_manager.h index c99b0380..a010d185 100644 --- a/include/toBeSorted/room_manager.h +++ b/include/toBeSorted/room_manager.h @@ -1,9 +1,9 @@ -#pragma once +#ifndef ROOM_MANAGER_H +#define ROOM_MANAGER_H #include "d/d_base.h" #include - #define MAX_ROOM_NUMBER 64 class dRoom; @@ -32,3 +32,5 @@ public: public: /* 801b42b0 */ static dBase_c *getRoom(int roomid); }; + +#endif diff --git a/include/toBeSorted/save_file.h b/include/toBeSorted/save_file.h index 7bd9fb2a..ea8d0b45 100644 --- a/include/toBeSorted/save_file.h +++ b/include/toBeSorted/save_file.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef SAVE_FILE_H +#define SAVE_FILE_H #include "UnknownTypeBelongings.h" #include @@ -107,3 +108,5 @@ public: /* 80009D10 */ s8 *getAreaT2(); /* 80009D20 */ s8 *getAreaT3(); }; + +#endif diff --git a/include/toBeSorted/unk_flag_stuff.h b/include/toBeSorted/unk_flag_stuff.h index 87a5783f..50a4d5ee 100644 --- a/include/toBeSorted/unk_flag_stuff.h +++ b/include/toBeSorted/unk_flag_stuff.h @@ -1,4 +1,5 @@ -#pragma once +#ifndef UNK_FLAG_STUFF_H +#define UNK_FLAG_STUFF_H #include @@ -21,3 +22,5 @@ public: void setCounterOrFlag(u16 counterIdx, u16 *pData, u32 flagCount, u32 value); u32 checkFlagValid(u16 counterIdx, u32 flagCount); }; + +#endif diff --git a/src/f/f_base.cpp b/src/f/f_base.cpp index 5fdadc7e..e7e6e1ab 100644 --- a/src/f/f_base.cpp +++ b/src/f/f_base.cpp @@ -427,7 +427,7 @@ bool fBase_c::setConnectChild(fBase_c *child) { return false; } - return fManager_c::m_connectManage.addTreeNode(&manager.connect_node, &child->manager.connect_node); + return fManager_c::m_connectManage.insertTreeNode(&manager.connect_node, &child->manager.connect_node); } /* 802e20e0 */ diff --git a/src/toBeSorted/unk_flag_stuff.cpp b/src/toBeSorted/unk_flag_stuff.cpp index f5a3f1af..17cbaa87 100644 --- a/src/toBeSorted/unk_flag_stuff.cpp +++ b/src/toBeSorted/unk_flag_stuff.cpp @@ -1,5 +1,3 @@ -#pragma once - #include "toBeSorted/unk_flag_stuff.h" u16 UnkFlagStuff::calculateMask(s32 shift) { @@ -8,12 +6,12 @@ u16 UnkFlagStuff::calculateMask(s32 shift) { void UnkFlagStuff::doNothing(u32 unused) {} -UnkFlagStuff::UnkFlagStuff(u16 count, UnkFlagDefinition* definitions) { +UnkFlagStuff::UnkFlagStuff(u16 count, UnkFlagDefinition *definitions) { this->mDefinitionsCount = count; this->mpDefinitions = definitions; } -void UnkFlagStuff::prepareIndexShiftMask(u16 counterIdx, u32 unused, u16* indexPtr, u8* shiftPtr, u16* maskPtr) { +void UnkFlagStuff::prepareIndexShiftMask(u16 counterIdx, u32 unused, u16 *indexPtr, u8 *shiftPtr, u16 *maskPtr) { doNothing(counterIdx); *indexPtr = mpDefinitions[counterIdx].mIndex; *shiftPtr = mpDefinitions[counterIdx].mShiftMask >> 4; @@ -26,7 +24,7 @@ u16 UnkFlagStuff::maskForIdx(u16 index) { return calculateMask(mpDefinitions[index].mShiftMask); } -u32 UnkFlagStuff::getCounterOrFlag(u16 counterIdx, u16* dataPtr, u32 param4) { +u32 UnkFlagStuff::getCounterOrFlag(u16 counterIdx, u16 *dataPtr, u32 param4) { u16 index = 0; u8 shift = 0; u16 mask = 0; @@ -34,7 +32,7 @@ u32 UnkFlagStuff::getCounterOrFlag(u16 counterIdx, u16* dataPtr, u32 param4) { return mask & (dataPtr[index] >> shift); } -void UnkFlagStuff::setCounterOrFlag(u16 counterIdx, u16* dataPtr, u32 flagCount, u32 value) { +void UnkFlagStuff::setCounterOrFlag(u16 counterIdx, u16 *dataPtr, u32 flagCount, u32 value) { u16 index = 0; u8 shift = 0; u16 mask = 0;