Actor::mType field (#7)

* `Actor::mType` field

* Fix struct sizes

* Update symbols
This commit is contained in:
Aetias
2025-08-24 18:41:23 +02:00
committed by GitHub
parent 758f36f10c
commit c925fce03c
10 changed files with 118 additions and 86 deletions
+9 -20
View File
@@ -1,7 +1,9 @@
#pragma once
#include "Actor/ActorId.hpp"
#include "Actor/ActorRef.hpp"
#include "Actor/ActorType.hpp"
#include "Physics/Cylinder.hpp"
#include "System/SysNew.hpp"
#include "global.h"
#include "nitro/math.h"
@@ -18,23 +20,10 @@ public:
void func_ov000_020975f8();
};
class UnkStruct_ov000_020b539c_30 {
public:
/* 00 */ unk32 mUnk_00;
/* 04 */ unk32 mUnk_04;
/* 08 */ unk8 mUnk_08[0x18 - 0x08];
/* 1c */ unk8 mUnk_18;
/* 1c */ unk8 mUnk_19;
/* 1c */ unk16 mUnk_1a;
/* 1c */ unk16 mUnk_1c;
/* 1e */ u16 mUnk_1e;
/* 20 */
};
class UnkStruct_ov000_020b539c {
public:
/* 00 */ unk8 mUnk_00[0x30];
/* 30 */ UnkStruct_ov000_020b539c_30 *mUnk_30;
/* 30 */ ActorType *mUnk_30;
/* 34 */
void func_02028cdc(Actor_5c *param1, unk32 param2);
@@ -50,7 +39,7 @@ enum ActorFlag_ {
ActorFlag_5,
ActorFlag_6,
ActorFlag_7,
ActorFlag_8,
ActorFlag_Grabbed,
ActorFlag_9,
ActorFlag_Interacting, // set when player interacts with actor
ActorFlag_11,
@@ -85,8 +74,8 @@ public:
/* 28 */ u16 mAngle;
/* 2a */ unk16 mUnk_2a;
/* 2c */ unk32 mUnk_2c; // gravity?
/* 30 */ unk32 *mUnk_30;
/* 34 */ ActorTypeData *mUnk_34;
/* 30 */ Cylinder *mUnk_30;
/* 34 */ Cylinder *mUnk_34;
/* 38 */ unk32 *mUnk_38;
/* 3c */ unk32 mUnk_3c;
/* 40 */ void *mUnk_40; // pointer to `Actor_c4`
@@ -116,8 +105,8 @@ public:
/* 80 */ unk16 mUnk_82;
/* 84 */ unk32 mUnk_84;
/* 88 */ unk32 mUnk_88;
/* 8c */ unk32 mUnk_8c;
/* 90 */ UnkStruct_ov000_020b539c_30 *mUnk_90;
/* 8c */ ActorRef mRef;
/* 90 */ ActorType *mType;
/* 94 */
/* 00 */ virtual void vfunc_00(Vec3p *param1);
@@ -145,7 +134,7 @@ public:
unk32 func_01fff5d0(unk32 param1, unk32 param2);
Actor();
void func_ov000_0209848c(UnkStruct_ov000_020b539c_30 *param1);
void func_ov000_0209848c(ActorType *param1);
void func_ov000_020984b0();
void func_ov000_020984b4();
void func_ov000_020984b8();
+23
View File
@@ -0,0 +1,23 @@
#pragma once
#include "types.h"
#define ACTOR_INDEX_MASK 0x3fff
struct ActorRef {
/* 0 */ s16 index;
/* 2 */ s16 id;
/* 4 */
inline void Reset() {
*(u32 *) this = 0;
}
inline bool operator==(const ActorRef &other) const {
return this->index == other.index && this->id == other.id;
}
inline bool operator!=(const ActorRef &other) const {
return !(*this == other);
}
};
+16 -20
View File
@@ -1,34 +1,30 @@
#pragma once
#include "Actor/ActorId.hpp"
#include "Physics/Cylinder.hpp"
#include "System/SysNew.hpp"
#include "types.h"
struct ActorTypeData {
/* 00 */ unk32 mUnk_00;
/* 04 */ unk32 mUnk_04;
/* 08 */ unk32 mUnk_08;
/* 0c */ unk32 mUnk_0c;
/* 10 */ unk8 mUnk_10[0x16 - 0x10];
/* 16 */ unk16 mUnk_16;
/* 18 */ unk16 mUnk_18;
/* 1a */ unk16 mUnk_1a;
/* 1c */ ActorId mActorId;
/* 20 */ unk32 mUnk_20;
/* 24 */ unk32 mUnk_24;
/* 28 */ unk32 mUnk_28;
/* 2c */ unk32 mUnk_2c;
/* 30 */ unk32 mUnk_30;
/* 34 */ unk8 mUnk_34;
/* 35 */ unk8 mUnk_35;
};
class Actor;
class ActorType : public SysObject {
public:
/* 00 (vtable) */
/* 04 */ ActorTypeData mData;
/* 04 */ Cylinder mUnk_04;
/* 14 */ unk8 mUnk_14[0x18 - 0x14];
/* 18 */ unk8 mUnk_18;
/* 19 */ unk8 mUnk_19;
/* 1a */ unk16 mUnk_1a;
/* 1c */ unk16 mUnk_1c;
/* 1e */ u16 mUnk_1e;
/* 20 */ ActorId mActorId;
/* 24 */ unk32 mUnk_24;
/* 28 */ unk32 mUnk_28;
/* 2c */ unk32 mUnk_2c;
/* 30 */ unk32 mUnk_30;
/* 34 */ unk32 mUnk_34;
/* 38 */ unk8 mUnk_38;
/* 39 */ unk8 mUnk_39;
/* 3a */
ActorType(ActorId actorId);
+2 -2
View File
@@ -79,7 +79,7 @@ public:
/* 0b0 */ u16 mUnk_0b0;
/* 0b4 */ unk32 mUnk_0b4;
/* 0b8 */ unk32 mUnk_0b8;
/* 0bc */ unk32 mUnk_0bc;
/* 0bc */ ActorRef mUnk_0bc;
/* 0c0 */ Vec3p mUnk_0c0;
/* 0cc */ unk16 mUnk_0cc;
/* 0cc */ unk16 mUnk_0ce;
@@ -152,7 +152,7 @@ public:
ActorUnk_ov000_020a8bb0(ActorUnk_ov000_020a8bb0_a4_00 *param1, unk32 param2);
unk32 func_ov000_020a8db0();
unk32 func_ov000_020a8dd0();
void func_ov000_020a8df0(unk32 param1, unk32 param2);
void func_ov000_020a8df0(ActorRef param1, unk32 param2);
void func_ov000_020a8e9c(Vec3p *param1);
void func_ov000_020a8ff4();
void func_ov000_020a91b8(Vec3p *param1, unk32 param2);
+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include "types.h"
#include "nitro/math.h"
struct Cylinder {
Vec3p pos;
q20 size; // height and radius
inline Cylinder() {}
inline Cylinder(q20 size) {
pos.x = 0;
pos.y = size;
pos.z = 0;
this->size = size;
}
inline void MakeEmpty() {
pos = gVec3p_ZERO;
size = -1;
}
};