diff --git a/assets/xml/objects/object_ma2.xml b/assets/xml/objects/object_ma2.xml
index 960e9485bf..b6492afd84 100644
--- a/assets/xml/objects/object_ma2.xml
+++ b/assets/xml/objects/object_ma2.xml
@@ -99,25 +99,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_md.xml b/assets/xml/objects/object_md.xml
index ea1fca3cda..db5bed45bb 100644
--- a/assets/xml/objects/object_md.xml
+++ b/assets/xml/objects/object_md.xml
@@ -1,25 +1,25 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/xml/objects/object_nb.xml b/assets/xml/objects/object_nb.xml
index cf2dba8da4..9b909a89eb 100644
--- a/assets/xml/objects/object_nb.xml
+++ b/assets/xml/objects/object_nb.xml
@@ -2,27 +2,27 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c
index ed01e29e4a..45cb07bae2 100644
--- a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c
+++ b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c
@@ -363,23 +363,23 @@ s32 EnMa2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
EnMa2* this = (EnMa2*)thisx;
Vec3s limbRot;
- if ((limbIndex == MALON_ADULT_LEFT_THIGH_LIMB) || (limbIndex == MALON_ADULT_RIGHT_THIGH_LIMB)) {
+ if ((limbIndex == MALON_ADULT_LIMB_LEFT_THIGH) || (limbIndex == MALON_ADULT_LIMB_RIGHT_THIGH)) {
*dList = NULL;
}
- if (limbIndex == MALON_ADULT_HEAD_LIMB) {
+ if (limbIndex == MALON_ADULT_LIMB_HEAD) {
Matrix_Translate(1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
limbRot = this->interactInfo.headRot;
Matrix_RotateX(BINANG_TO_RAD_ALT(limbRot.y), MTXMODE_APPLY);
Matrix_RotateZ(BINANG_TO_RAD_ALT(limbRot.x), MTXMODE_APPLY);
Matrix_Translate(-1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
}
- if (limbIndex == MALON_ADULT_CHEST_AND_NECK_LIMB) {
+ if (limbIndex == MALON_ADULT_LIMB_CHEST_AND_NECK) {
limbRot = this->interactInfo.torsoRot;
Matrix_RotateY(BINANG_TO_RAD_ALT(-limbRot.y), MTXMODE_APPLY);
Matrix_RotateX(BINANG_TO_RAD_ALT(-limbRot.x), MTXMODE_APPLY);
}
- if ((limbIndex == MALON_ADULT_CHEST_AND_NECK_LIMB) || (limbIndex == MALON_ADULT_LEFT_SHOULDER_LIMB) ||
- (limbIndex == MALON_ADULT_RIGHT_SHOULDER_LIMB)) {
+ if ((limbIndex == MALON_ADULT_LIMB_CHEST_AND_NECK) || (limbIndex == MALON_ADULT_LIMB_LEFT_SHOULDER) ||
+ (limbIndex == MALON_ADULT_LIMB_RIGHT_SHOULDER)) {
rot->y += Math_SinS(this->upperBodyRot[limbIndex].y) * 200.0f;
rot->z += Math_CosS(this->upperBodyRot[limbIndex].z) * 200.0f;
}
@@ -392,10 +392,10 @@ void EnMa2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
OPEN_DISPS(play->state.gfxCtx, "../z_en_ma2.c", 904);
- if (limbIndex == MALON_ADULT_HEAD_LIMB) {
+ if (limbIndex == MALON_ADULT_LIMB_HEAD) {
Matrix_MultVec3f(&vec, &this->actor.focus.pos);
}
- if ((limbIndex == MALON_ADULT_LEFT_HAND_LIMB) && (this->skelAnime.animation == &gMalonAdultStandStillAnim)) {
+ if ((limbIndex == MALON_ADULT_LIMB_LEFT_HAND) && (this->skelAnime.animation == &gMalonAdultStandStillAnim)) {
gSPDisplayList(POLY_OPA_DISP++, gMalonAdultBasketDL);
}
diff --git a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h
index 3e2a9b4b86..777d8c73d5 100644
--- a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h
+++ b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.h
@@ -3,34 +3,12 @@
#include "ultra64.h"
#include "actor.h"
+#include "assets/objects/object_ma2/object_ma2.h"
struct EnMa2;
typedef void (*EnMa2ActionFunc)(struct EnMa2*, struct PlayState*);
-typedef enum AdultMalonLimb {
- /* 0x00 */ MALON_ADULT_LIMB_NONE,
- /* 0x01 */ MALON_ADULT_ROOT_LIMB,
- /* 0x02 */ MALON_ADULT_LOWER_CONTROL_LIMB,
- /* 0x03 */ MALON_ADULT_LEFT_THIGH_LIMB,
- /* 0x04 */ MALON_ADULT_LEFT_LEG_LIMB,
- /* 0x05 */ MALON_ADULT_LEFT_FOOT_LIMB,
- /* 0x06 */ MALON_ADULT_RIGHT_THIGH_LIMB,
- /* 0x07 */ MALON_ADULT_RIGHT_LEG_LIMB,
- /* 0x08 */ MALON_ADULT_RIGHT_FOOT_LIMB,
- /* 0x09 */ MALON_ADULT_TORSO_LIMB,
- /* 0x0A */ MALON_ADULT_DRESS_LIMB,
- /* 0x0B */ MALON_ADULT_CHEST_AND_NECK_LIMB,
- /* 0x0C */ MALON_ADULT_LEFT_SHOULDER_LIMB,
- /* 0x0D */ MALON_ADULT_LEFT_ARM_LIMB,
- /* 0x0E */ MALON_ADULT_LEFT_HAND_LIMB,
- /* 0x0F */ MALON_ADULT_RIGHT_SHOULDER_LIMB,
- /* 0x10 */ MALON_ADULT_RIGHT_ARM_LIMB,
- /* 0x11 */ MALON_ADULT_RIGHT_HAND_LIMB,
- /* 0x12 */ MALON_ADULT_HEAD_LIMB,
- /* 0x13 */ MALON_ADULT_LIMB_MAX
-} AdultMalonLimb;
-
typedef struct EnMa2 {
/* 0x0000 */ Actor actor;
/* 0x014C */ SkelAnime skelAnime;
diff --git a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h
index a6bb2096f3..1d3ec1cdfd 100644
--- a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h
+++ b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.h
@@ -3,34 +3,12 @@
#include "ultra64.h"
#include "actor.h"
+#include "assets/objects/object_ma2/object_ma2.h"
struct EnMa3;
typedef void (*EnMa3ActionFunc)(struct EnMa3*, struct PlayState*);
-typedef enum AdultMalonLimb {
- /* 0x00 */ MALON_ADULT_LIMB_NONE,
- /* 0x01 */ MALON_ADULT_LIMB_ROOT,
- /* 0x02 */ MALON_ADULT_LIMB_LOWER_CONTROL,
- /* 0x03 */ MALON_ADULT_LIMB_LEFT_THIGH,
- /* 0x04 */ MALON_ADULT_LIMB_LEFT_LEG,
- /* 0x05 */ MALON_ADULT_LIMB_LEFT_FOOT,
- /* 0x06 */ MALON_ADULT_LIMB_RIGHT_THIGH,
- /* 0x07 */ MALON_ADULT_LIMB_RIGHT_LEG,
- /* 0x08 */ MALON_ADULT_LIMB_RIGHT_FOOT,
- /* 0x09 */ MALON_ADULT_LIMB_TORSO,
- /* 0x0A */ MALON_ADULT_LIMB_DRESS,
- /* 0x0B */ MALON_ADULT_LIMB_CHEST_AND_NECK,
- /* 0x0C */ MALON_ADULT_LIMB_LEFT_SHOULDER,
- /* 0x0D */ MALON_ADULT_LIMB_LEFT_ARM,
- /* 0x0E */ MALON_ADULT_LIMB_LEFT_HAND,
- /* 0x0F */ MALON_ADULT_LIMB_RIGHT_SHOULDER,
- /* 0x10 */ MALON_ADULT_LIMB_RIGHT_ARM,
- /* 0x11 */ MALON_ADULT_LIMB_RIGHT_HAND,
- /* 0x12 */ MALON_ADULT_LIMB_HEAD,
- /* 0x13 */ MALON_ADULT_LIMB_MAX
-} AdultMalonLimb;
-
typedef struct EnMa3 {
/* 0x0000 */ Actor actor;
/* 0x014C */ SkelAnime skelAnime;
diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.c b/src/overlays/actors/ovl_En_Md/z_en_md.c
index 3059baa7bb..d1633deb65 100644
--- a/src/overlays/actors/ovl_En_Md/z_en_md.c
+++ b/src/overlays/actors/ovl_En_Md/z_en_md.c
@@ -687,7 +687,7 @@ void EnMd_Init(Actor* thisx, PlayState* play) {
s32 pad;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
- SkelAnime_InitFlex(play, &this->skelAnime, &gMidoSkel, NULL, this->jointTable, this->morphTable, ENMD_LIMB_MAX);
+ SkelAnime_InitFlex(play, &this->skelAnime, &gMidoSkel, NULL, this->jointTable, this->morphTable, MIDO_LIMB_MAX);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
@@ -727,7 +727,7 @@ void EnMd_Destroy(Actor* thisx, PlayState* play) {
void EnMd_Idle(EnMd* this, PlayState* play) {
if (this->skelAnime.animation == &gMidoIdleAnim) {
- Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENMD_LIMB_MAX);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, MIDO_LIMB_MAX);
} else if ((this->interactInfo.talkState == NPC_TALK_STATE_IDLE) &&
(this->animSequence != ENMD_ANIM_SEQ_SURPRISE_TO_IDLE)) {
EnMd_SetAnimSequence(this, ENMD_ANIM_SEQ_SURPRISE_TO_IDLE);
@@ -738,7 +738,7 @@ void EnMd_Idle(EnMd* this, PlayState* play) {
void EnMd_Watch(EnMd* this, PlayState* play) {
if (this->skelAnime.animation == &gMidoIdleAnim) {
- Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENMD_LIMB_MAX);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, MIDO_LIMB_MAX);
}
EnMd_UpdateAnimSequence(this);
}
@@ -790,7 +790,7 @@ void EnMd_BlockPath(EnMd* this, PlayState* play) {
}
if (this->skelAnime.animation == &gMidoIdleAnim) {
- Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENMD_LIMB_MAX);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, MIDO_LIMB_MAX);
}
if ((this->interactInfo.talkState == NPC_TALK_STATE_IDLE) && (play->sceneId == SCENE_LOST_WOODS)) {
@@ -828,7 +828,7 @@ void EnMd_ListenToOcarina(EnMd* this, PlayState* play) {
}
void EnMd_Walk(EnMd* this, PlayState* play) {
- Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENMD_LIMB_MAX);
+ Actor_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, MIDO_LIMB_MAX);
EnMd_UpdateAnimSequence(this);
if (!(EnMd_FollowPath(this, play)) || (this->waypoint != 0)) {
@@ -871,21 +871,21 @@ s32 EnMd_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
EnMd* this = (EnMd*)thisx;
Vec3s limbRot;
- if (limbIndex == ENMD_LIMB_HEAD) {
+ if (limbIndex == MIDO_LIMB_HEAD) {
Matrix_Translate(1200.0f, 0.0f, 0.0f, MTXMODE_APPLY);
limbRot = this->interactInfo.headRot;
Matrix_RotateX(BINANG_TO_RAD_ALT(limbRot.y), MTXMODE_APPLY);
Matrix_RotateZ(BINANG_TO_RAD_ALT(limbRot.x), MTXMODE_APPLY);
Matrix_Translate(-1200.0f, 0.0f, 0.0f, MTXMODE_APPLY);
}
- if (limbIndex == ENMD_LIMB_TORSO) {
+ if (limbIndex == MIDO_LIMB_TORSO) {
limbRot = this->interactInfo.torsoRot;
Matrix_RotateX(BINANG_TO_RAD_ALT(limbRot.x), MTXMODE_APPLY);
Matrix_RotateY(BINANG_TO_RAD_ALT(limbRot.y), MTXMODE_APPLY);
}
- if (((limbIndex == ENMD_LIMB_TORSO) || (limbIndex == ENMD_LIMB_LEFT_UPPER_ARM)) ||
- (limbIndex == ENMD_LIMB_RIGHT_UPPER_ARM)) {
+ if (((limbIndex == MIDO_LIMB_TORSO) || (limbIndex == MIDO_LIMB_LEFT_UPPER_ARM)) ||
+ (limbIndex == MIDO_LIMB_RIGHT_UPPER_ARM)) {
rot->y += Math_SinS(this->fidgetTableY[limbIndex]) * FIDGET_AMPLITUDE;
rot->z += Math_CosS(this->fidgetTableZ[limbIndex]) * FIDGET_AMPLITUDE;
}
@@ -897,7 +897,7 @@ void EnMd_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
EnMd* this = (EnMd*)thisx;
Vec3f vec = { 400.0f, 0.0f, 0.0f };
- if (limbIndex == ENMD_LIMB_HEAD) {
+ if (limbIndex == MIDO_LIMB_HEAD) {
Matrix_MultVec3f(&vec, &this->actor.focus.pos);
}
}
diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.h b/src/overlays/actors/ovl_En_Md/z_en_md.h
index 3b5cc079bb..802e6822a8 100644
--- a/src/overlays/actors/ovl_En_Md/z_en_md.h
+++ b/src/overlays/actors/ovl_En_Md/z_en_md.h
@@ -3,30 +3,10 @@
#include "ultra64.h"
#include "actor.h"
+#include "assets/objects/object_md/object_md.h"
struct EnMd;
-typedef enum EnMdLimb {
- ENMD_LIMB_NONE,
- ENMD_LIMB_ROOT,
- ENMD_LIMB_WAIST,
- ENMD_LIMB_LEFT_THIGH,
- ENMD_LIMB_LEFT_LEG,
- ENMD_LIMB_LEFT_FOOT,
- ENMD_LIMB_RIGHT_THIGH,
- ENMD_LIMB_RIGHT_LEG,
- ENMD_LIMB_RIGHT_FOOT,
- ENMD_LIMB_TORSO,
- ENMD_LIMB_LEFT_UPPER_ARM,
- ENMD_LIMB_LEFT_FOREARM,
- ENMD_LIMB_LEFT_HAND,
- ENMD_LIMB_RIGHT_UPPER_ARM,
- ENMD_LIMB_RIGHT_FOREARM,
- ENMD_LIMB_RIGHT_HAND,
- ENMD_LIMB_HEAD,
- ENMD_LIMB_MAX
-} EnMdLimb;
-
typedef void (*EnMdActionFunc)(struct EnMd*, struct PlayState*);
#define ENMD_GET_PATH_INDEX(this) PARAMS_GET_S(this->actor.params, 8, 8)
@@ -48,10 +28,10 @@ typedef struct EnMd {
/* 0x020E */ s16 eyeTexIndex;
/* 0x0210 */ s16 alpha;
/* 0x0212 */ s16 waypoint;
- /* 0x0214 */ s16 fidgetTableY[ENMD_LIMB_MAX];
- /* 0x0236 */ s16 fidgetTableZ[ENMD_LIMB_MAX];
- /* 0x0258 */ Vec3s jointTable[ENMD_LIMB_MAX];
- /* 0x02BE */ Vec3s morphTable[ENMD_LIMB_MAX];
+ /* 0x0214 */ s16 fidgetTableY[MIDO_LIMB_MAX];
+ /* 0x0236 */ s16 fidgetTableZ[MIDO_LIMB_MAX];
+ /* 0x0258 */ Vec3s jointTable[MIDO_LIMB_MAX];
+ /* 0x02BE */ Vec3s morphTable[MIDO_LIMB_MAX];
} EnMd; // size = 0x0324
#endif
diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/src/overlays/actors/ovl_En_Nb/z_en_nb.c
index c2120b1fc9..a91373e78c 100644
--- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c
+++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c
@@ -1011,7 +1011,7 @@ void func_80AB2E70(EnNb* this, PlayState* play) {
s32 func_80AB2FC0(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
EnNb* this = (EnNb*)thisx;
- if (limbIndex == NB_LIMB_HEAD) {
+ if (limbIndex == NABOORU_LIMB_HEAD) {
*dList = gNabooruHeadMouthOpenDL;
}
@@ -1476,7 +1476,8 @@ void EnNb_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
EnNb_SetupCollider(thisx, play);
- SkelAnime_InitFlex(play, &this->skelAnime, &gNabooruSkel, NULL, this->jointTable, this->morphTable, NB_LIMB_MAX);
+ SkelAnime_InitFlex(play, &this->skelAnime, &gNabooruSkel, NULL, this->jointTable, this->morphTable,
+ NABOORU_LIMB_MAX);
switch (EnNb_GetType(this)) {
case NB_TYPE_DEMO02:
@@ -1506,13 +1507,13 @@ s32 EnNb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
s32 ret = false;
if (this->headTurnFlag != 0) {
- if (limbIndex == NB_LIMB_TORSO) {
+ if (limbIndex == NABOORU_LIMB_TORSO) {
s32 pad;
rot->x += interactInfo->torsoRot.y;
rot->y -= interactInfo->torsoRot.x;
ret = false;
- } else if (limbIndex == NB_LIMB_HEAD) {
+ } else if (limbIndex == NABOORU_LIMB_HEAD) {
rot->x += interactInfo->headRot.y;
rot->z += interactInfo->headRot.x;
ret = false;
@@ -1525,7 +1526,7 @@ s32 EnNb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
void EnNb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnNb* this = (EnNb*)thisx;
- if (limbIndex == NB_LIMB_HEAD) {
+ if (limbIndex == NABOORU_LIMB_HEAD) {
Vec3f vec1 = { 0.0f, 10.0f, 0.0f };
Vec3f vec2;
diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.h b/src/overlays/actors/ovl_En_Nb/z_en_nb.h
index 397c6b63a2..e27a3b0ebb 100644
--- a/src/overlays/actors/ovl_En_Nb/z_en_nb.h
+++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.h
@@ -3,40 +3,18 @@
#include "ultra64.h"
#include "actor.h"
+#include "assets/objects/object_nb/object_nb.h"
struct EnNb;
-typedef enum EnNbLimb {
- /* 0x00 */ NB_LIMB_NONE,
- /* 0x01 */ NB_LIMB_ROOT,
- /* 0x02 */ NB_LIMB_L_THIGH,
- /* 0x03 */ NB_LIMB_L_SHIN,
- /* 0x04 */ NB_LIMB_L_FOOT,
- /* 0x05 */ NB_LIMB_R_THIGH,
- /* 0x06 */ NB_LIMB_R_SHIN,
- /* 0x07 */ NB_LIMB_R_FOOT,
- /* 0x08 */ NB_LIMB_TORSO,
- /* 0x09 */ NB_LIMB_L_UPPER_ARM,
- /* 0x0A */ NB_LIMB_L_FOREARM,
- /* 0x0B */ NB_LIMB_L_HAND,
- /* 0x0C */ NB_LIMB_R_UPPER_ARM,
- /* 0x0D */ NB_LIMB_R_FOREARM,
- /* 0x0E */ NB_LIMB_R_HAND,
- /* 0x0F */ NB_LIMB_HEAD,
- /* 0x10 */ NB_LIMB_BLANK,
- /* 0x11 */ NB_LIMB_PONYTAIL,
- /* 0x12 */ NB_LIMB_WAIST,
- /* 0x13 */ NB_LIMB_MAX
-} EnNbLimb;
-
typedef void (*EnNbActionFunc)(struct EnNb*, struct PlayState*);
typedef void (*EnNbDrawFunc)(struct EnNb*, struct PlayState*);
typedef struct EnNb {
/* 0x0000 */ Actor actor;
/* 0x014C */ SkelAnime skelAnime;
- /* 0x0190 */ Vec3s jointTable[NB_LIMB_MAX];
- /* 0x0202 */ Vec3s morphTable[NB_LIMB_MAX];
+ /* 0x0190 */ Vec3s jointTable[NABOORU_LIMB_MAX];
+ /* 0x0202 */ Vec3s morphTable[NABOORU_LIMB_MAX];
/* 0x0274 */ s16 eyeIdx;
/* 0x0276 */ s16 blinkTimer;
/* 0x0278 */ s32 action;