summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/UnknownTypeBelongings.h37
-rw-r--r--include/d/a/d_a_base.h8
-rw-r--r--include/d/a/obj/d_a_obj_base.h2
-rw-r--r--include/toBeSorted/actor_info.h44
4 files changed, 49 insertions, 42 deletions
diff --git a/include/UnknownTypeBelongings.h b/include/UnknownTypeBelongings.h
deleted file mode 100644
index b34592e5..00000000
--- a/include/UnknownTypeBelongings.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef DECOMP_UNKNOWN_TYPES_H
-#define DECOMP_UNKNOWN_TYPES_H
-
-#include "common.h"
-
-// MOST LIKELY mVEC
-struct Vec3f {
- f32 x, y, z;
-};
-
-struct Vec2f {
- f32 x, y;
-};
-
-struct Vec3s {
- s16 x, y, z;
-};
-
-struct ObjInfo {
- /* 0x00 */ char *name;
- /* 0x04 */ u16 obj_id;
- /* 0x06 */ u16 obj_id2;
- /* 0x08 */ u16 fiTextEntryId;
- /* 0x0A */ s8 unk_0xA;
- /* 0x0B */ u8 subtype;
-};
-
-// is now fLiNdBa_c
-// struct ActorReference {
-// ActorReference* prev;
-// ActorReference* next;
-// fBase_c* link;
-// };
-
-class UnkCollider {};
-
-#endif
diff --git a/include/d/a/d_a_base.h b/include/d/a/d_a_base.h
index e293b927..06868d39 100644
--- a/include/d/a/d_a_base.h
+++ b/include/d/a/d_a_base.h
@@ -1,12 +1,12 @@
#ifndef D_A_BASE_H
#define D_A_BASE_H
-#include "UnknownTypeBelongings.h"
#include "common.h"
#include "d/d_base.h"
#include "m/m_allocator.h"
#include "m/m_angle.h"
#include "m/m_vec.h"
+#include "toBeSorted/actor_info.h"
#include "toBeSorted/raii_ptr.h"
#include "toBeSorted/tlist.h"
@@ -141,7 +141,7 @@ public:
class dAcBase_c : public dBase_c {
public:
/* 0x68 */ mHeapAllocator_c heap_allocator;
- /* 0x84 */ ObjInfo *obj_info;
+ /* 0x84 */ const ActorInfo *mpActorInfo;
/* 0x88 */ TList<SoundInfo, 12> sound_list;
/* 0x94 */ RaiiPtr<SoundSource> sound_source;
/* 0x98 */ mVec3_c *obj_pos;
@@ -249,7 +249,7 @@ 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, u16 unkFlag,
- s8 viewClipIdx, ObjInfo *objInfo
+ s8 viewClipIdx, const ActorInfo *actorInfo
);
/* 8002c690 */ SoundSource *FUN_8002c690();
@@ -339,7 +339,7 @@ public:
/* 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;
+ /* 80575090 */ static const ActorInfo *s_Create_ActorInfo;
/* 80575094 */ static u8 s_Create_Subtype;
};
diff --git a/include/d/a/obj/d_a_obj_base.h b/include/d/a/obj/d_a_obj_base.h
index c8e1cd80..d22cb8fd 100644
--- a/include/d/a/obj/d_a_obj_base.h
+++ b/include/d/a/obj/d_a_obj_base.h
@@ -195,7 +195,7 @@ public:
u32 roomId
);
/* 8002efa0 */ void fn_8002efa0();
- /* 8002eff0 */ bool fn_8002eff0(f32 *, s16 *, UnkCollider *, f32 *, f32 *);
+ /* 8002eff0 */ bool fn_8002eff0(f32 *, s16 *, f32 *, 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
diff --git a/include/toBeSorted/actor_info.h b/include/toBeSorted/actor_info.h
new file mode 100644
index 00000000..e48fcd2c
--- /dev/null
+++ b/include/toBeSorted/actor_info.h
@@ -0,0 +1,44 @@
+#ifndef D_ACTOR_INFO_H
+#define D_ACTOR_INFO_H
+
+#include "common.h"
+
+// TODO: Expand when we figure out what the other entries have in common
+enum SoundSourceCategory_e {
+ SND_SOURCE_PLAYER = 0,
+ SND_SOURCE_ARROW = 7,
+ SND_SOURCE_BULLET = 29,
+ SND_SOURCE_OBJECT = 32,
+ SND_SOURCE_ITEM = 35,
+ SND_SOURCE_TERRY_SHOP = 36,
+ SND_SOURCE_TIME_STONE = 37,
+ SND_SOURCE_CLEF = 38,
+ SND_SOURCE_SHUTTER = 39,
+ SND_SOURCE_KENSEI = 44,
+ SND_SOURCE_PLAYER_BIRD = 45,
+ SND_SOURCE_INSECT = 49,
+ SND_SOURCE_NPC_NRM = 51,
+ SND_SOURCE_SW_HARP = 56,
+};
+
+/**
+ * profileId and profileId2 are always the same.
+ */
+struct ActorInfo {
+ /* 0x00 */ const char *name;
+ /* 0x04 */ u16 profileId;
+ /* 0x06 */ u16 profileId2;
+ /* 0x08 */ u16 fiTextEntryId; // also used for kill counters
+ /* 0x0A */ s8 soundSourceCategory;
+ /* 0x0B */ u8 subtype;
+};
+
+const ActorInfo *getActorInfoByName(const char *name);
+u16 getProfileIdForName(const char *name);
+u16 getProfileId2ForName(const char *name);
+const char *getNameForProfileId(u32 profileId);
+const char *getActorName(const ActorInfo *actorInfo);
+const ActorInfo *getActorInfoByProfileAndSubtype(u32 profileId, u32 subtype);
+s32 getSoundSourceCategoryForName(const char *name);
+
+#endif