diff options
| author | Aetias <aetias@outlook.com> | 2024-04-13 18:50:33 +0200 |
|---|---|---|
| committer | Aetias <aetias@outlook.com> | 2024-04-13 18:50:33 +0200 |
| commit | 5a40c5a0e43c69bd84de1ef8dcf7c3f88e3ccbfa (patch) | |
| tree | 6de0079ce3c5d95768da3351f03a9f6f33ead4d2 /include | |
| parent | 298024544f24ce7141cdd958fed78563a84d2c00 (diff) | |
Delink `ActorManager`
Diffstat (limited to 'include')
| -rw-r--r-- | include/Actor/ActorManager.hpp | 104 | ||||
| -rw-r--r-- | include/Physics/AABB.hpp | 11 | ||||
| -rw-r--r-- | include/Physics/Sphere.hpp | 11 |
3 files changed, 124 insertions, 2 deletions
diff --git a/include/Actor/ActorManager.hpp b/include/Actor/ActorManager.hpp index 139c0079..037e9808 100644 --- a/include/Actor/ActorManager.hpp +++ b/include/Actor/ActorManager.hpp @@ -3,7 +3,107 @@ #include "global.h" #include "types.h" +#include "Actor/Actor.hpp" +#include "Physics/AABB.hpp" +#include "Physics/Sphere.hpp" + struct ActorRef { - s32 id; - s32 index; + /* 0 */ s32 id; + /* 4 */ s32 index; + /* 8 */ +}; + +class ActorFilterBase { +public: + /* 0 (vtable) */ + /* 4 */ + + /* 0 */ virtual bool Filter(Actor *actor) = 0; + /* 4 */ +}; + +struct ActorManager_UnkStruct_68 { + /* 0 */ u32 unk_0; + /* 4 */ u32 unk_4; + /* 8 */ u32 unk_8; + /* c */ +}; + +class ActorFilter : public ActorFilterBase { + /* 00 (base) */ + /* 04 */ u32 mType; + /* 08 */ s32 mUnk_08; + /* 0c */ s32 mUnk_0c; + /* 10 */ s32 *mExcludeIds; // list of excluded actor ids, terminated by -1 + /* 14 */ bool mExcludeNotInAABB; + /* 15 */ unk8 mUnk_15[3]; + /* 18 */ AABB mAABB; + /* 30 */ bool mExcludeNotInSphere; + /* 31 */ unk8 mUnk_1a[3]; + /* 34 */ Sphere sphere; + /* 44 */ + + /* 0 */ virtual bool Filter(Actor *actor) override; + /* 4 */ +}; + +struct ActorList { + /* 0 */ ActorRef *actors; + /* 4 */ s32 capacity; + /* 8 */ s32 length; + /* c */ +}; + +class ActorManager { +public: + /* 00 */ u16 mMaxActors; + /* 02 */ unk16 mNumActors; + /* 04 */ unk32 mMaxActorIndex; + /* 08 */ s32 mCacheEmptyActorIndex; + /* 0c */ unk32 mNextActorId; + /* 10 */ Actor **mActorTable; + /* 14 */ void *mUnk_14; + /* 18 */ unk8 mUnk_18[4]; + /* 1c */ unk32 mUnk_1c; + /* 20 */ unk32 mUnk_20; + /* 24 */ unk32 mUnk_24; + /* 28 */ unk8 mUnk_28; + /* 29 */ bool mUnk_29; + /* 2a */ unk8 mUnk_2a; + /* 2b */ unk8 mUnk_2b; + /* 2c */ unk32 mUnk_2c; + /* 30 */ unk32 mUnk_30; + /* 34 */ unk32 mUnk_34; + /* 38 */ unk8 mUnk_38[4]; + /* 3c */ u32 mUnk_3c; + /* 40 */ unk32 mUnk_40; + /* 44 */ unk32 mUnk_44; + /* 48 */ u32 mUnk_48; + /* 4c */ unk32 mUnk_4c; + /* 50 */ unk32 mUnk_50; + /* 54 */ unk8 mUnk_54[4]; + /* 58 */ u32 mUnk_58; + /* 5c */ unk32 mUnk_5c; + /* 60 */ unk32 mUnk_60; + /* 64 */ unk8 mUnk_64[4]; + /* 68 */ ActorManager_UnkStruct_68 mUnk_68[5]; + /* a4 */ unk8 mUnk_a4[0x20]; + /* c4 */ + + void DeleteActor(u32 index, bool param2); + static void func_ov00_020c3484(ActorRef *ref, Actor *actor, unk32 param3); + void Actor_vfunc_10(u32 param1); + Actor* FindActorById(u32 id); + Actor* GetActor(ActorRef *ref); + s32 FilterActors(ActorFilterBase *filter, ActorList *filteredActors); + static void FindActorByType(ActorRef *ref, ActorManager *manager, u32 type); + static void FindNearestActorOfType(ActorRef *ref, ActorManager *manager, u32 type, Vec3p *pos); + void func_ov00_020c398c(); + void func_ov00_020c399c(); + void func_ov00_020c39ac(u32 index, u32 *actorTypes, bool param3); + s32 func_ov00_020c3b2c(s32 *param1); + s32 func_ov00_020c3bb0(unk32 param1, s32 *param2); + void func_ov00_020c3ce8(unk32 param1, unk32 param2); + void Actor_vfunc_28(); + static bool ActorTypeIsOneOf(u32 type, u32 *types); }; diff --git a/include/Physics/AABB.hpp b/include/Physics/AABB.hpp new file mode 100644 index 00000000..358aed1c --- /dev/null +++ b/include/Physics/AABB.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "global.h" +#include "types.h" + +#include "lib/math.h" + +struct AABB { + Vec3p min; + Vec3p max; +}; diff --git a/include/Physics/Sphere.hpp b/include/Physics/Sphere.hpp new file mode 100644 index 00000000..eaed104d --- /dev/null +++ b/include/Physics/Sphere.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include "global.h" +#include "types.h" + +#include "lib/math.h" + +struct Sphere { + Vec3p pos; + int radius; +}; |
