summaryrefslogtreecommitdiff
path: root/include/Actor/ActorManager.hpp
blob: 08ef7fd2d9d161557cf8b10e0ba72958510e4c78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#pragma once

#include "global.h"
#include "types.h"

#include "Actor/Actor.hpp"
#include "Actor/ActorRef.hpp"
#include "Actor/FilterActorBase.hpp"
#include "Physics/AABB.hpp"
#include "Physics/Sphere.hpp"

struct ActorManager_UnkStruct_68 {
    /* 0 */ u32 unk_0;
    /* 4 */ u32 unk_4;
    /* 8 */ u32 unk_8;
    /* c */
};

class FilterActor : public FilterActorBase {
    /* 00 (base) */
    /* 04 */ u32 mType;
    /* 08 */ s32 mUnk_08;
    /* 0c */ s32 mUnk_0c;
    /* 10 */ ActorRef *mExcludeRefs; // 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 mSphere;
    /* 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 */ u16 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);
    ActorRef func_ov00_020c3484(unk32 param3);
    void Actor_vfunc_10(u32 param1);
    Actor *FindActorById(s32 id);
    Actor *GetActor(ActorRef *ref);
    s32 FilterActors(FilterActorBase *filter, ActorList *filteredActors);
    ActorRef FindActorByType(ActorTypeId type);
    ActorRef FindNearestActorOfType(ActorTypeId type, Vec3p *pos);
    bool func_ov00_020c398c(u32 index);
    void func_ov00_020c399c(u32 index, Cylinder *cylinder);
    Actor *func_ov00_020c39ac(s32 index, const ActorTypeId *actorTypes, bool param3);
    s32 func_ov00_020c3b2c(s32 *param1);
    s32 func_ov00_020c3bb0(unk32 param1, s32 *param2);
    void func_ov00_020c3ce8(unk32 param1, bool param2);
    void Actor_vfunc_28();
    static bool ActorTypeIsOneOf(ActorTypeId type, const ActorTypeId *types);

    static void Create();
    static void Destroy();
    ActorManager();
    ~ActorManager();
    void func_ov004_0210532c();
    void func_ov004_021053dc();
    void func_ov004_021054a4(s32 *param1, s32 param2, unk32 param3);
    void func_ov004_0210554c();
    bool func_ov004_02105578(unk32 param1);
    bool func_ov004_02105608(unk32 param1, unk32 param2, unk32 param3);
    void func_ov004_021056b8();
};

extern ActorManager *gActorManager;