1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-01-14 12:17:08 +00:00

Fix misc 8 (#1150)

* Use `s32` as type instead of `StackStatus` enum type

* `bossLimbDl` -> `bossLimbDL`

* Fixup comment refering to `Actor.velocity` by struct offset

* Fixup `feetFloorFlags` doc and -> `feetFloorFlag`

* Fixup `xyzDistToPlayerSq` comment

* Make `SkelAnime.mode` comment refer to `AnimationMode` (<- `AnimationModes`)

* Use enum names to refer to anim modes and break long lines in z64animation.h

* `EnDha_OverridePostDraw` -> `EnDha_PostLimbDraw`

* ichains cleanup

* Scene command ids usage cleanup

* Properly name unkXXX members as unk_XXX

* change `gSceneCmdHandlers` length in variables.h too

* Revert Unknown flags to unk0 & unk1

* Remove "current scene" mention from `Flags_*Unknown` as they aren't saved or loaded so not scene-specific

* `Struct_8011FAF0`: unk_00, unk_04

* Run formatter

* Do not break long lines in headers

* Revert "Fixup `feetFloorFlags` doc and -> `feetFloorFlag`"

This reverts commit c45b3611e7.
This commit is contained in:
Dragorn421 2022-03-16 22:14:56 +01:00 committed by GitHub
parent 93096a45b6
commit b2a3fb2f7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 328 additions and 327 deletions

View file

@ -59,7 +59,7 @@ void Mio0_Decompress(Yaz0Header* hdr, u8* dst);
void StackCheck_Init(StackEntry* entry, void* stackTop, void* stackBottom, u32 initValue, s32 minSpace, void StackCheck_Init(StackEntry* entry, void* stackTop, void* stackBottom, u32 initValue, s32 minSpace,
const char* name); const char* name);
void StackCheck_Cleanup(StackEntry* entry); void StackCheck_Cleanup(StackEntry* entry);
StackStatus StackCheck_GetState(StackEntry* entry); s32 StackCheck_GetState(StackEntry* entry);
u32 StackCheck_CheckAll(void); u32 StackCheck_CheckAll(void);
u32 StackCheck_Check(StackEntry* entry); u32 StackCheck_Check(StackEntry* entry);
f32 LogUtils_CheckFloatRange(const char* exp, s32 line, const char* valueName, f32 value, const char* minName, f32 min, f32 LogUtils_CheckFloatRange(const char* exp, s32 line, const char* valueName, f32 value, const char* minName, f32 min,

View file

@ -96,7 +96,7 @@ extern u32 gGsFlagsMasks[4];
extern u32 gGsFlagsShifts[4]; extern u32 gGsFlagsShifts[4];
extern void* gItemIcons[0x82]; extern void* gItemIcons[0x82];
extern u8 gItemSlots[56]; extern u8 gItemSlots[56];
extern void (*gSceneCmdHandlers[26])(GlobalContext*, SceneCmd*); extern void (*gSceneCmdHandlers[SCENE_CMD_ID_MAX])(GlobalContext*, SceneCmd*);
extern s16 gLinkObjectIds[2]; extern s16 gLinkObjectIds[2];
extern u32 gObjectTableSize; extern u32 gObjectTableSize;
extern RomFile gObjectTable[OBJECT_ID_MAX]; extern RomFile gObjectTable[OBJECT_ID_MAX];

View file

@ -77,7 +77,7 @@ typedef struct {
typedef struct { typedef struct {
/* 0x00 */ DamageTable* damageTable; /* 0x00 */ DamageTable* damageTable;
/* 0x04 */ Vec3f displacement; // Amount to correct velocity (0x5C) by when colliding into a body /* 0x04 */ Vec3f displacement; // Amount to correct actor velocity by when colliding into a body
/* 0x10 */ s16 cylRadius; // Used for various purposes /* 0x10 */ s16 cylRadius; // Used for various purposes
/* 0x12 */ s16 cylHeight; // Used for various purposes /* 0x12 */ s16 cylHeight; // Used for various purposes
/* 0x14 */ s16 cylYShift; // Unused. Purpose inferred from Cylinder16 and CollisionCheck_CylSideVsLineSeg /* 0x14 */ s16 cylYShift; // Unused. Purpose inferred from Cylinder16 and CollisionCheck_CylSideVsLineSeg
@ -167,7 +167,7 @@ typedef struct Actor {
/* 0x084 */ f32 yDistToWater; // Distance to the surface of active waterbox. Negative value means above water /* 0x084 */ f32 yDistToWater; // Distance to the surface of active waterbox. Negative value means above water
/* 0x088 */ u16 bgCheckFlags; // Flags indicating how the actor is interacting with collision /* 0x088 */ u16 bgCheckFlags; // Flags indicating how the actor is interacting with collision
/* 0x08A */ s16 yawTowardsPlayer; // Y rotation difference between the actor and the player /* 0x08A */ s16 yawTowardsPlayer; // Y rotation difference between the actor and the player
/* 0x08C */ f32 xyzDistToPlayerSq; // Squared distance between the actor and the player in the x,y,z axis /* 0x08C */ f32 xyzDistToPlayerSq; // Squared distance between the actor and the player
/* 0x090 */ f32 xzDistToPlayer; // Distance between the actor and the player in the XZ plane /* 0x090 */ f32 xzDistToPlayer; // Distance between the actor and the player in the XZ plane
/* 0x094 */ f32 yDistToPlayer; // Dist is negative if the actor is above the player /* 0x094 */ f32 yDistToPlayer; // Dist is negative if the actor is above the player
/* 0x098 */ CollisionCheckInfo colChkInfo; // Variables related to the Collision Check system /* 0x098 */ CollisionCheckInfo colChkInfo; // Variables related to the Collision Check system

View file

@ -23,7 +23,7 @@ typedef enum {
/* 3 */ ANIMMODE_ONCE_INTERP, /* 3 */ ANIMMODE_ONCE_INTERP,
/* 4 */ ANIMMODE_LOOP_PARTIAL, /* 4 */ ANIMMODE_LOOP_PARTIAL,
/* 5 */ ANIMMODE_LOOP_PARTIAL_INTERP /* 5 */ ANIMMODE_LOOP_PARTIAL_INTERP
} AnimationModes; } AnimationMode;
typedef enum { typedef enum {
/* -1 */ ANIMTAPER_DECEL = -1, /* -1 */ ANIMTAPER_DECEL = -1,
@ -241,21 +241,21 @@ typedef s32 (*AnimUpdateFunc)();
typedef struct SkelAnime { typedef struct SkelAnime {
/* 0x00 */ u8 limbCount; // Number of limbs in the skeleton /* 0x00 */ u8 limbCount; // Number of limbs in the skeleton
/* 0x01 */ u8 mode; // 0: loop, 2: play once, 4: partial loop. +1 to interpolate between frames. /* 0x01 */ u8 mode; // See `AnimationMode`
/* 0x02 */ u8 dListCount; // Number of display lists in a flexible skeleton /* 0x02 */ u8 dListCount; // Number of display lists in a flexible skeleton
/* 0x03 */ s8 taper; // Tapering to use when morphing between animations. Only used by Door_Warp1. /* 0x03 */ s8 taper; // Tapering to use when morphing between animations. Only used by Door_Warp1.
/* 0x04 */ void** skeleton; // An array of pointers to limbs. Can be StandardLimb, LodLimb, or SkinLimb. /* 0x04 */ void** skeleton; // An array of pointers to limbs. Can be StandardLimb, LodLimb, or SkinLimb.
/* 0x08 */ void* animation; // Can be an AnimationHeader or LinkAnimationHeader. /* 0x08 */ void* animation; // Can be an AnimationHeader or LinkAnimationHeader.
/* 0x0C */ f32 startFrame; // In mode 4, start of partial loop. /* 0x0C */ f32 startFrame; // In mode ANIMMODE_LOOP_PARTIAL*, start of partial loop.
/* 0x10 */ f32 endFrame; // In mode 2, Update returns true when curFrame is equal to this. In mode 4, end of partial loop. /* 0x10 */ f32 endFrame; // In mode ANIMMODE_ONCE*, Update returns true when curFrame is equal to this. In mode ANIMMODE_LOOP_PARTIAL*, end of partial loop.
/* 0x14 */ f32 animLength; // Total number of frames in the current animation's file. /* 0x14 */ f32 animLength; // Total number of frames in the current animation.
/* 0x18 */ f32 curFrame; // Current frame in the animation /* 0x18 */ f32 curFrame; // Current frame in the animation
/* 0x1C */ f32 playSpeed; // Multiplied by R_UPDATE_RATE / 3 to get the animation's frame rate. /* 0x1C */ f32 playSpeed; // Multiplied by R_UPDATE_RATE / 3 to get the animation's frame rate.
/* 0x20 */ Vec3s* jointTable; // Current translation of model and rotations of all limbs /* 0x20 */ Vec3s* jointTable; // Current translation of model and rotations of all limbs
/* 0x24 */ Vec3s* morphTable; // Table of values used to morph between animations /* 0x24 */ Vec3s* morphTable; // Table of values used to morph between animations
/* 0x28 */ f32 morphWeight; // Weight of the current animation morph as a fraction in [0,1] /* 0x28 */ f32 morphWeight; // Weight of the current animation morph as a fraction in [0,1]
/* 0x2C */ f32 morphRate; // Reciprocal of the number of frames in the morph /* 0x2C */ f32 morphRate; // Reciprocal of the number of frames in the morph
/* 0x30 */ s32 (*update)(); // Can be Loop, Partial loop, Play once, Morph, or Tapered morph. Link only has Loop, Play once, and Morph /* 0x30 */ s32 (*update)(); // Can be Loop, Partial loop, Play once, Morph, or Tapered morph. Link only has Loop, Play once, and Morph.
/* 0x34 */ s8 initFlags; // Flags used when initializing Link's skeleton /* 0x34 */ s8 initFlags; // Flags used when initializing Link's skeleton
/* 0x35 */ u8 moveFlags; // Flags used for animations that move the actor in worldspace. /* 0x35 */ u8 moveFlags; // Flags used for animations that move the actor in worldspace.
/* 0x36 */ s16 prevRot; // Previous rotation in worldspace. /* 0x36 */ s16 prevRot; // Previous rotation in worldspace.

View file

@ -339,7 +339,8 @@ typedef enum {
/* 0x16 */ SCENE_CMD_ID_ECHO_SETTINGS, /* 0x16 */ SCENE_CMD_ID_ECHO_SETTINGS,
/* 0x17 */ SCENE_CMD_ID_CUTSCENE_DATA, /* 0x17 */ SCENE_CMD_ID_CUTSCENE_DATA,
/* 0x18 */ SCENE_CMD_ID_ALTERNATE_HEADER_LIST, /* 0x18 */ SCENE_CMD_ID_ALTERNATE_HEADER_LIST,
/* 0x19 */ SCENE_CMD_ID_MISC_SETTINGS /* 0x19 */ SCENE_CMD_ID_MISC_SETTINGS,
/* 0x20 */ SCENE_CMD_ID_MAX
} SceneCommandTypeID; } SceneCommandTypeID;
#define SCENE_CMD_SPAWN_LIST(numSpawns, spawnList) \ #define SCENE_CMD_SPAWN_LIST(numSpawns, spawnList) \

View file

@ -72,7 +72,7 @@ void StackCheck_Cleanup(StackEntry* entry) {
} }
} }
StackStatus StackCheck_GetState(StackEntry* entry) { s32 StackCheck_GetState(StackEntry* entry) {
u32* last; u32* last;
u32 used; u32 used;
u32 free; u32 free;

View file

@ -544,7 +544,7 @@ void Flags_UnsetSwitch(GlobalContext* globalCtx, s32 flag) {
} }
/** /**
* Tests if current scene unknown flag is set. * Tests if unknown flag is set.
*/ */
s32 Flags_GetUnknown(GlobalContext* globalCtx, s32 flag) { s32 Flags_GetUnknown(GlobalContext* globalCtx, s32 flag) {
if (flag < 0x20) { if (flag < 0x20) {
@ -555,7 +555,7 @@ s32 Flags_GetUnknown(GlobalContext* globalCtx, s32 flag) {
} }
/** /**
* Sets current scene unknown flag. * Sets unknown flag.
*/ */
void Flags_SetUnknown(GlobalContext* globalCtx, s32 flag) { void Flags_SetUnknown(GlobalContext* globalCtx, s32 flag) {
if (flag < 0x20) { if (flag < 0x20) {
@ -566,7 +566,7 @@ void Flags_SetUnknown(GlobalContext* globalCtx, s32 flag) {
} }
/** /**
* Unsets current scene unknown flag. * Unsets unknown flag.
*/ */
void Flags_UnsetUnknown(GlobalContext* globalCtx, s32 flag) { void Flags_UnsetUnknown(GlobalContext* globalCtx, s32 flag) {
if (flag < 0x20) { if (flag < 0x20) {

View file

@ -35,8 +35,8 @@ typedef struct {
} LightningBolt; // size = 0x20 } LightningBolt; // size = 0x20
typedef struct { typedef struct {
/* 0x00 */ s32 unk0; /* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk1; /* 0x04 */ s32 unk_04;
} Struct_8011FAF0; // size = 0x8 } Struct_8011FAF0; // size = 0x8
Struct_8011FAF0 D_8011FAF0[] = { Struct_8011FAF0 D_8011FAF0[] = {
@ -213,7 +213,7 @@ u8 sGameOverLightsIntensity;
u16 D_8015FDB0; u16 D_8015FDB0;
s32 func_8006F0A0(s32 a0) { s32 func_8006F0A0(s32 a0) {
s32 ret = ((a0 >> 4 & 0x7FF) << D_8011FAF0[a0 >> 15 & 7].unk0) + D_8011FAF0[a0 >> 15 & 7].unk1; s32 ret = ((a0 >> 4 & 0x7FF) << D_8011FAF0[a0 >> 15 & 7].unk_00) + D_8011FAF0[a0 >> 15 & 7].unk_04;
return ret; return ret;
} }

View file

@ -166,11 +166,11 @@ s32 Scene_ExecuteCommands(GlobalContext* globalCtx, SceneCmd* sceneCmd) {
osSyncPrintf("*** Scene_Word = { code=%d, data1=%02x, data2=%04x } ***\n", cmdCode, sceneCmd->base.data1, osSyncPrintf("*** Scene_Word = { code=%d, data1=%02x, data2=%04x } ***\n", cmdCode, sceneCmd->base.data1,
sceneCmd->base.data2); sceneCmd->base.data2);
if (cmdCode == 0x14) { if (cmdCode == SCENE_CMD_ID_END) {
break; break;
} }
if (cmdCode <= 0x19) { if (cmdCode < ARRAY_COUNT(gSceneCmdHandlers)) {
gSceneCmdHandlers[cmdCode](globalCtx, sceneCmd); gSceneCmdHandlers[cmdCode](globalCtx, sceneCmd);
} else { } else {
osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf(VT_FGCOL(RED));
@ -443,7 +443,7 @@ void func_800991A0(GlobalContext* globalCtx, SceneCmd* cmd) {
if (altHeader != NULL) { if (altHeader != NULL) {
Scene_ExecuteCommands(globalCtx, SEGMENTED_TO_VIRTUAL(altHeader)); Scene_ExecuteCommands(globalCtx, SEGMENTED_TO_VIRTUAL(altHeader));
(cmd + 1)->base.code = 0x14; (cmd + 1)->base.code = SCENE_CMD_ID_END;
} else { } else {
// "Coughh! There is no specified dataaaaa!" // "Coughh! There is no specified dataaaaa!"
osSyncPrintf("\nげぼはっ! 指定されたデータがないでええっす!"); osSyncPrintf("\nげぼはっ! 指定されたデータがないでええっす!");
@ -457,7 +457,7 @@ void func_800991A0(GlobalContext* globalCtx, SceneCmd* cmd) {
if (altHeader != NULL) { if (altHeader != NULL) {
Scene_ExecuteCommands(globalCtx, SEGMENTED_TO_VIRTUAL(altHeader)); Scene_ExecuteCommands(globalCtx, SEGMENTED_TO_VIRTUAL(altHeader));
(cmd + 1)->base.code = 0x14; (cmd + 1)->base.code = SCENE_CMD_ID_END;
} }
} }
} }
@ -491,7 +491,7 @@ void func_800993C0(GlobalContext* globalCtx, SceneCmd* cmd) {
} }
} }
void (*gSceneCmdHandlers[])(GlobalContext*, SceneCmd*) = { void (*gSceneCmdHandlers[SCENE_CMD_ID_MAX])(GlobalContext*, SceneCmd*) = {
func_80098508, func_800985DC, func_80098630, func_80098674, func_800987A4, func_80099090, func_800987F8, func_80098508, func_800985DC, func_80098630, func_80098674, func_800987A4, func_80099090, func_800987F8,
func_8009883C, func_80098904, func_80099134, func_80098958, func_8009899C, func_80098B74, func_80098C24, func_8009883C, func_80098904, func_80099134, func_80098958, func_8009899C, func_80098B74, func_80098C24,
func_80098C68, func_80098CC8, func_80098D80, func_80098D1C, func_80098D5C, func_800990F0, NULL, func_80098C68, func_80098CC8, func_80098D80, func_80098D1C, func_80098D5C, func_800990F0, NULL,

View file

@ -156,7 +156,7 @@ static CollisionHeader* sColHeaders[] = {
&gObjectMizuObjectsBwallCol_001DE8, &gObjectMizuObjectsBwallCol_001DE8, &gObjectMizuObjectsBwallCol_001DE8, &gObjectMizuObjectsBwallCol_001DE8,
}; };
static InitChainEntry D_8089D854[] = { static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneScale, 1500, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 1500, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 1100, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneDownward, 1100, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
@ -174,7 +174,7 @@ void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx) {
BgMizuBwall* this = (BgMizuBwall*)thisx; BgMizuBwall* this = (BgMizuBwall*)thisx;
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
Actor_ProcessInitChain(&this->dyna.actor, D_8089D854); Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
this->yRot = this->dyna.actor.world.pos.y; this->yRot = this->dyna.actor.world.pos.y;
this->dList = sDLists[(u16)this->dyna.actor.params & 0xF]; this->dList = sDLists[(u16)this->dyna.actor.params & 0xF];
DynaPolyActor_Init(&this->dyna, DPM_PLAYER); DynaPolyActor_Init(&this->dyna, DPM_PLAYER);

View file

@ -51,7 +51,7 @@ static CollisionHeader* D_8089EB70[] = {
&gObjectMizuObjectsMovebgCol_003590, &gObjectMizuObjectsMovebgCol_0015F8, &gObjectMizuObjectsMovebgCol_003590, &gObjectMizuObjectsMovebgCol_0015F8,
}; };
static InitChainEntry D_8089EB90[] = { static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneScale, 1500, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 1500, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 1100, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneDownward, 1100, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
@ -86,7 +86,7 @@ void BgMizuMovebg_Init(Actor* thisx, GlobalContext* globalCtx) {
CollisionHeader* colHeader = NULL; CollisionHeader* colHeader = NULL;
Vec3f sp48; Vec3f sp48;
Actor_ProcessInitChain(thisx, D_8089EB90); Actor_ProcessInitChain(thisx, sInitChain);
((BgMizuMovebg*)thisx)->homeY = thisx->world.pos.y; ((BgMizuMovebg*)thisx)->homeY = thisx->world.pos.y;
((BgMizuMovebg*)thisx)->dlist = D_8089EB50[MOVEBG_TYPE(thisx->params)]; ((BgMizuMovebg*)thisx)->dlist = D_8089EB50[MOVEBG_TYPE(thisx->params)];
DynaPolyActor_Init(&((BgMizuMovebg*)thisx)->dyna, DPM_PLAYER); DynaPolyActor_Init(&((BgMizuMovebg*)thisx)->dyna, DPM_PLAYER);

View file

@ -111,7 +111,7 @@ void BgYdanSp_Init(Actor* thisx, GlobalContext* globalCtx) {
tri[1].x = tri[0].x; tri[1].x = tri[0].x;
tri[1].z = tri[2].z; tri[1].z = tri[2].z;
Collider_SetTrisVertices(&this->trisCollider, 1, &tri[0], &tri[2], &tri[1]); Collider_SetTrisVertices(&this->trisCollider, 1, &tri[0], &tri[2], &tri[1]);
this->unk16C = 0.0f; this->unk_16C = 0.0f;
} else { } else {
CollisionHeader_GetVirtual(&gDTWebWallCol, &colHeader); CollisionHeader_GetVirtual(&gDTWebWallCol, &colHeader);
this->actionFunc = BgYdanSp_WallWebIdle; this->actionFunc = BgYdanSp_WallWebIdle;
@ -248,7 +248,7 @@ void BgYdanSp_FloorWebBreaking(BgYdanSp* this, GlobalContext* globalCtx) {
this->timer--; this->timer--;
} }
this->dyna.actor.world.pos.y = (sinf((f32)this->timer * (M_PI / 20)) * this->unk16C) + this->dyna.actor.home.pos.y; this->dyna.actor.world.pos.y = (sinf((f32)this->timer * (M_PI / 20)) * this->unk_16C) + this->dyna.actor.home.pos.y;
if (this->dyna.actor.home.pos.y - this->dyna.actor.world.pos.y > 190.0f) { if (this->dyna.actor.home.pos.y - this->dyna.actor.world.pos.y > 190.0f) {
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
this->timer = 40; this->timer = 40;
@ -292,7 +292,7 @@ void BgYdanSp_FloorWebIdle(BgYdanSp* this, GlobalContext* globalCtx) {
sqrtFallDistance = sqrtf(CLAMP_MIN(player->fallDistance, 0.0f)); sqrtFallDistance = sqrtf(CLAMP_MIN(player->fallDistance, 0.0f));
if (player->fallDistance > 750.0f) { if (player->fallDistance > 750.0f) {
if (this->dyna.actor.xzDistToPlayer < 80.0f) { if (this->dyna.actor.xzDistToPlayer < 80.0f) {
this->unk16C = 200.0f; this->unk_16C = 200.0f;
this->dyna.actor.room = -1; this->dyna.actor.room = -1;
this->dyna.actor.flags |= ACTOR_FLAG_4; this->dyna.actor.flags |= ACTOR_FLAG_4;
this->timer = 40; this->timer = 40;
@ -302,20 +302,20 @@ void BgYdanSp_FloorWebIdle(BgYdanSp* this, GlobalContext* globalCtx) {
} }
} }
unk = sqrtFallDistance + sqrtFallDistance; unk = sqrtFallDistance + sqrtFallDistance;
if (this->unk16C < unk) { if (this->unk_16C < unk) {
if (unk > 2.0f) { if (unk > 2.0f) {
this->unk16C = unk; this->unk_16C = unk;
this->timer = 14; this->timer = 14;
} }
} }
if (player->actor.speedXZ != 0.0f) { if (player->actor.speedXZ != 0.0f) {
if (this->unk16C < 0.1f) { if (this->unk_16C < 0.1f) {
this->timer = 14; this->timer = 14;
} }
if (this->unk16C < 2.0f) { if (this->unk_16C < 2.0f) {
this->unk16C = 2.0f; this->unk_16C = 2.0f;
} else { } else {
this->unk16C = this->unk16C; this->unk_16C = this->unk_16C;
} }
} }
} }
@ -325,10 +325,10 @@ void BgYdanSp_FloorWebIdle(BgYdanSp* this, GlobalContext* globalCtx) {
if (this->timer == 0) { if (this->timer == 0) {
this->timer = 14; this->timer = 14;
} }
this->dyna.actor.world.pos.y = sinf((f32)this->timer * (M_PI / 7)) * this->unk16C + this->dyna.actor.home.pos.y; this->dyna.actor.world.pos.y = sinf((f32)this->timer * (M_PI / 7)) * this->unk_16C + this->dyna.actor.home.pos.y;
Math_ApproachZeroF(&this->unk16C, 1.0f, 0.8f); Math_ApproachZeroF(&this->unk_16C, 1.0f, 0.8f);
if (this->timer == 13) { if (this->timer == 13) {
if (this->unk16C > 3.0f) { if (this->unk_16C > 3.0f) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WEB_VIBRATION); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WEB_VIBRATION);
} else { } else {
Audio_StopSfxById(NA_SE_EV_WEB_VIBRATION); Audio_StopSfxById(NA_SE_EV_WEB_VIBRATION);

View file

@ -14,7 +14,7 @@ typedef struct BgYdanSp {
/* 0x0168 */ u8 isDestroyedSwitchFlag; /* 0x0168 */ u8 isDestroyedSwitchFlag;
/* 0x0169 */ u8 burnSwitchFlag; /* 0x0169 */ u8 burnSwitchFlag;
/* 0x016A */ s16 timer; /* 0x016A */ s16 timer;
/* 0x016C */ f32 unk16C; /* 0x016C */ f32 unk_16C;
/* 0x0170 */ ColliderTris trisCollider; /* 0x0170 */ ColliderTris trisCollider;
/* 0x0190 */ ColliderTrisElement trisColliderItems[2]; /* 0x0190 */ ColliderTrisElement trisColliderItems[2];
} BgYdanSp; // size = 0x0248 } BgYdanSp; // size = 0x0248

View file

@ -2085,7 +2085,7 @@ void BossGoma_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
childPos.x, childPos.y, childPos.z, childRot.x, childRot.y, childRot.z, childPos.x, childPos.y, childPos.z, childRot.x, childRot.y, childRot.z,
sDeadLimbLifetime[limbIndex] + 100); sDeadLimbLifetime[limbIndex] + 100);
if (babyGohma != NULL) { if (babyGohma != NULL) {
babyGohma->bossLimbDl = *dList; babyGohma->bossLimbDL = *dList;
babyGohma->actor.objBankIndex = this->actor.objBankIndex; babyGohma->actor.objBankIndex = this->actor.objBankIndex;
} }
} }

View file

@ -36,9 +36,9 @@ void EfcErupc_Init(Actor* thisx, GlobalContext* globalCtx) {
EfcErupc_SetupAction(this, EfcErupc_UpdateAction); EfcErupc_SetupAction(this, EfcErupc_UpdateAction);
Actor_SetScale(&this->actor, 1.0f); Actor_SetScale(&this->actor, 1.0f);
EfcErupc_InitParticles(this->particles); EfcErupc_InitParticles(this->particles);
this->unk14C = this->unk14E = this->unk150 = 0; this->unk_14C = this->unk_14E = this->unk_150 = 0;
this->unk152 = 5; this->unk_152 = 5;
this->unk154 = -100; this->unk_154 = -100;
} }
void EfcErupc_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EfcErupc_Destroy(Actor* thisx, GlobalContext* globalCtx) {
@ -53,22 +53,22 @@ void EfcErupc_UpdateAction(EfcErupc* this, GlobalContext* globalCtx) {
if (globalCtx->csCtx.state != 0) { if (globalCtx->csCtx.state != 0) {
if (globalCtx->csCtx.npcActions[1] != NULL) { if (globalCtx->csCtx.npcActions[1] != NULL) {
if (globalCtx->csCtx.npcActions[1]->action == 2) { if (globalCtx->csCtx.npcActions[1]->action == 2) {
if (this->unk150 == 30) { if (this->unk_150 == 30) {
func_800788CC(NA_SE_IT_EARTHQUAKE); func_800788CC(NA_SE_IT_EARTHQUAKE);
} }
if (this->unk150 <= 64) { if (this->unk_150 <= 64) {
if (this->unk154 < 200) { if (this->unk_154 < 200) {
this->unk154 += 10; this->unk_154 += 10;
} }
} else { } else {
if (this->unk154 > -100) { if (this->unk_154 > -100) {
this->unk154 -= 10; this->unk_154 -= 10;
} }
} }
this->unk150++; this->unk_150++;
} else { } else {
if (this->unk154 > -100) { if (this->unk_154 > -100) {
this->unk154 -= 10; this->unk_154 -= 10;
} }
} }
} }
@ -77,28 +77,28 @@ void EfcErupc_UpdateAction(EfcErupc* this, GlobalContext* globalCtx) {
if (globalCtx->csCtx.npcActions[2] != NULL) { if (globalCtx->csCtx.npcActions[2] != NULL) {
switch (globalCtx->csCtx.npcActions[2]->action) { switch (globalCtx->csCtx.npcActions[2]->action) {
case 2: case 2:
if (this->unk14E == 0) { if (this->unk_14E == 0) {
func_800F3F3C(6); func_800F3F3C(6);
gSaveContext.eventChkInf[2] |= 0x8000; gSaveContext.eventChkInf[2] |= 0x8000;
} }
this->unk14E++; this->unk_14E++;
break; break;
case 3: case 3:
this->unk14E = 30; this->unk_14E = 30;
} }
this->unk14C++; this->unk_14C++;
} }
} }
accel.z = 0.0f; accel.z = 0.0f;
accel.x = 0.0f; accel.x = 0.0f;
pos.y = this->actor.world.pos.y + 300.0f; pos.y = this->actor.world.pos.y + 300.0f;
for (i = 0; i < this->unk152; i++) { for (i = 0; i < this->unk_152; i++) {
pos.x = Rand_CenteredFloat(100.0f) + this->actor.world.pos.x; pos.x = Rand_CenteredFloat(100.0f) + this->actor.world.pos.x;
pos.z = Rand_CenteredFloat(100.0f) + this->actor.world.pos.z; pos.z = Rand_CenteredFloat(100.0f) + this->actor.world.pos.z;
vel.x = Rand_CenteredFloat(100.0f); vel.x = Rand_CenteredFloat(100.0f);
vel.y = Rand_ZeroFloat(100.0f); vel.y = Rand_ZeroFloat(100.0f);
vel.z = Rand_CenteredFloat(100.0f); vel.z = Rand_CenteredFloat(100.0f);
accel.y = this->unk154 * 0.1f; accel.y = this->unk_154 * 0.1f;
EfcErupc_AddParticle(this->particles, &pos, &vel, &accel, 80.0f); EfcErupc_AddParticle(this->particles, &pos, &vel, &accel, 80.0f);
} }
} }
@ -119,16 +119,16 @@ void EfcErupc_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80093D84(globalCtx->state.gfxCtx); func_80093D84(globalCtx->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08, gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, this->unk14C * 1, this->unk14E * -4, 32, 64, 1, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, this->unk_14C * 1, this->unk_14E * -4, 32, 64, 1,
this->unk14C * 4, this->unk14E * -20, 64, 64)); this->unk_14C * 4, this->unk_14E * -20, 64, 64));
gSPSegment( gSPSegment(
POLY_XLU_DISP++, 0x09, POLY_XLU_DISP++, 0x09,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, this->unk150 * -4, 16, 128, 1, 0, this->unk150 * 12, 32, 32)); Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, this->unk_150 * -4, 16, 128, 1, 0, this->unk_150 * 12, 32, 32));
gSPSegment( gSPSegment(
POLY_XLU_DISP++, 0x0A, POLY_XLU_DISP++, 0x0A,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, this->unk150 * -4, 16, 128, 1, 0, this->unk150 * 12, 32, 32)); Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, this->unk_150 * -4, 16, 128, 1, 0, this->unk_150 * 12, 32, 32));
Matrix_Push(); Matrix_Push();
Matrix_Scale(0.8f, 0.8f, 0.8f, MTXMODE_APPLY); Matrix_Scale(0.8f, 0.8f, 0.8f, MTXMODE_APPLY);

View file

@ -25,11 +25,11 @@ typedef struct {
typedef struct EfcErupc { typedef struct EfcErupc {
/* 0x0000 */ Actor actor; /* 0x0000 */ Actor actor;
/* 0x014C */ s16 unk14C; /* 0x014C */ s16 unk_14C;
/* 0x014E */ s16 unk14E; /* 0x014E */ s16 unk_14E;
/* 0x0150 */ s16 unk150; /* 0x0150 */ s16 unk_150;
/* 0x0152 */ s16 unk152; /* 0x0152 */ s16 unk_152;
/* 0x0154 */ s16 unk154; /* 0x0154 */ s16 unk_154;
/* 0x0158 */ EfcErupcParticles particles[EFC_ERUPC_NUM_PARTICLES]; /* 0x0158 */ EfcErupcParticles particles[EFC_ERUPC_NUM_PARTICLES];
/* 0x18C8 */ EfcErupcActionFunc actionFunc; /* 0x18C8 */ EfcErupcActionFunc actionFunc;
} EfcErupc; // size = 0x18CC } EfcErupc; // size = 0x18CC

View file

@ -97,10 +97,10 @@ void EnBa_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->actor, sInitChain); Actor_ProcessInitChain(&this->actor, sInitChain);
this->actor.world.pos.y = this->actor.home.pos.y + 100.0f; this->actor.world.pos.y = this->actor.home.pos.y + 100.0f;
for (i = 13; i >= 0; i--) { for (i = 13; i >= 0; i--) {
this->unk200[i] = sp38; this->unk_200[i] = sp38;
this->unk2A8[i].x = -0x4000; this->unk_2A8[i].x = -0x4000;
this->unk158[i] = this->actor.world.pos; this->unk_158[i] = this->actor.world.pos;
this->unk158[i].y = this->actor.world.pos.y - (i + 1) * 32.0f; this->unk_158[i].y = this->actor.world.pos.y - (i + 1) * 32.0f;
} }
this->actor.targetMode = 4; this->actor.targetMode = 4;
@ -131,8 +131,8 @@ void EnBa_Destroy(Actor* thisx, GlobalContext* globalCtx) {
} }
void EnBa_SetupIdle(EnBa* this) { void EnBa_SetupIdle(EnBa* this) {
this->unk14C = 2; this->unk_14C = 2;
this->unk31C = 1500; this->unk_31C = 1500;
this->actor.speedXZ = 10.0f; this->actor.speedXZ = 10.0f;
EnBa_SetupAction(this, EnBa_Idle); EnBa_SetupAction(this, EnBa_Idle);
} }
@ -149,41 +149,41 @@ void EnBa_Idle(EnBa* this, GlobalContext* globalCtx) {
this->actor.flags |= ACTOR_FLAG_0; this->actor.flags |= ACTOR_FLAG_0;
Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 100.0f, 1.0f, 10.0f, 0.0f); Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 100.0f, 1.0f, 10.0f, 0.0f);
} }
this->unk2FC = this->actor.world.pos; this->unk_2FC = this->actor.world.pos;
if (globalCtx->gameplayFrames % 16 == 0) { if (globalCtx->gameplayFrames % 16 == 0) {
this->unk308.z += Rand_CenteredFloat(180.0f); this->unk_308.z += Rand_CenteredFloat(180.0f);
this->unk314 += Rand_CenteredFloat(180.0f); this->unk_314 += Rand_CenteredFloat(180.0f);
this->unk308.x = Math_SinF(this->unk308.z) * 80.0f; this->unk_308.x = Math_SinF(this->unk_308.z) * 80.0f;
this->unk308.y = Math_CosF(this->unk314) * 80.0f; this->unk_308.y = Math_CosF(this->unk_314) * 80.0f;
} }
this->unk2FC.y -= 448.0f; this->unk_2FC.y -= 448.0f;
this->unk2FC.x += this->unk308.x; this->unk_2FC.x += this->unk_308.x;
this->unk2FC.z += this->unk308.y; this->unk_2FC.z += this->unk_308.y;
func_80033AEC(&this->unk2FC, &this->unk158[13], 1.0f, this->actor.speedXZ, 0.0f, 0.0f); func_80033AEC(&this->unk_2FC, &this->unk_158[13], 1.0f, this->actor.speedXZ, 0.0f, 0.0f);
for (i = 12; i >= 0; i--) { for (i = 12; i >= 0; i--) {
func_80035844(&this->unk158[i + 1], &this->unk158[i], &sp5C, 0); func_80035844(&this->unk_158[i + 1], &this->unk_158[i], &sp5C, 0);
Matrix_Translate(this->unk158[i + 1].x, this->unk158[i + 1].y, this->unk158[i + 1].z, MTXMODE_NEW); Matrix_Translate(this->unk_158[i + 1].x, this->unk_158[i + 1].y, this->unk_158[i + 1].z, MTXMODE_NEW);
Matrix_RotateZYX(sp5C.x, sp5C.y, 0, MTXMODE_APPLY); Matrix_RotateZYX(sp5C.x, sp5C.y, 0, MTXMODE_APPLY);
Matrix_MultVec3f(&D_809B8080, &this->unk158[i]); Matrix_MultVec3f(&D_809B8080, &this->unk_158[i]);
} }
func_80035844(&this->unk158[0], &this->unk2FC, &sp5C, 0); func_80035844(&this->unk_158[0], &this->unk_2FC, &sp5C, 0);
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW); Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
Math_SmoothStepToS(&this->actor.shape.rot.y, this->unk2A8[0].y, 3, this->unk31C, 182); Math_SmoothStepToS(&this->actor.shape.rot.y, this->unk_2A8[0].y, 3, this->unk_31C, 182);
Math_SmoothStepToS(&this->actor.shape.rot.x, this->unk2A8[0].x, 3, this->unk31C, 182); Math_SmoothStepToS(&this->actor.shape.rot.x, this->unk_2A8[0].x, 3, this->unk_31C, 182);
Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY); Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
Matrix_MultVec3f(&D_809B8080, &this->unk158[0]); Matrix_MultVec3f(&D_809B8080, &this->unk_158[0]);
this->unk2A8[13].y = sp5C.y; this->unk_2A8[13].y = sp5C.y;
this->unk2A8[13].x = sp5C.x + 0x8000; this->unk_2A8[13].x = sp5C.x + 0x8000;
for (i = 0; i < 13; i++) { for (i = 0; i < 13; i++) {
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW); Matrix_Translate(this->unk_158[i].x, this->unk_158[i].y, this->unk_158[i].z, MTXMODE_NEW);
Math_SmoothStepToS(&this->unk2A8[i].y, this->unk2A8[i + 1].y, 3, this->unk31C, 182); Math_SmoothStepToS(&this->unk_2A8[i].y, this->unk_2A8[i + 1].y, 3, this->unk_31C, 182);
Math_SmoothStepToS(&this->unk2A8[i].x, this->unk2A8[i + 1].x, 3, this->unk31C, 182); Math_SmoothStepToS(&this->unk_2A8[i].x, this->unk_2A8[i + 1].x, 3, this->unk_31C, 182);
Matrix_RotateZYX(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY); Matrix_RotateZYX(this->unk_2A8[i].x - 0x8000, this->unk_2A8[i].y, 0, MTXMODE_APPLY);
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]); Matrix_MultVec3f(&D_809B8080, &this->unk_158[i + 1]);
} }
this->unk2A8[13].x = this->unk2A8[12].x; this->unk_2A8[13].x = this->unk_2A8[12].x;
this->unk2A8[13].y = this->unk2A8[12].y; this->unk_2A8[13].y = this->unk_2A8[12].y;
if (!(player->stateFlags1 & PLAYER_STATE1_26) && (this->actor.xzDistToPlayer <= 175.0f) && if (!(player->stateFlags1 & PLAYER_STATE1_26) && (this->actor.xzDistToPlayer <= 175.0f) &&
(this->actor.world.pos.y == this->actor.home.pos.y + 100.0f)) { (this->actor.world.pos.y == this->actor.home.pos.y + 100.0f)) {
EnBa_SetupSwingAtPlayer(this); EnBa_SetupSwingAtPlayer(this);
@ -191,10 +191,10 @@ void EnBa_Idle(EnBa* this, GlobalContext* globalCtx) {
} }
void EnBa_SetupFallAsBlob(EnBa* this) { void EnBa_SetupFallAsBlob(EnBa* this) {
this->unk14C = 0; this->unk_14C = 0;
this->actor.speedXZ = Rand_CenteredFloat(8.0f); this->actor.speedXZ = Rand_CenteredFloat(8.0f);
this->actor.world.rot.y = Rand_CenteredFloat(65535.0f); this->actor.world.rot.y = Rand_CenteredFloat(65535.0f);
this->unk318 = 20; this->unk_318 = 20;
this->actor.gravity = -2.0f; this->actor.gravity = -2.0f;
EnBa_SetupAction(this, EnBa_FallAsBlob); EnBa_SetupAction(this, EnBa_FallAsBlob);
} }
@ -207,8 +207,8 @@ void EnBa_FallAsBlob(EnBa* this, GlobalContext* globalCtx) {
this->actor.scale.y -= 0.001f; this->actor.scale.y -= 0.001f;
this->actor.scale.x += 0.0005f; this->actor.scale.x += 0.0005f;
this->actor.scale.z += 0.0005f; this->actor.scale.z += 0.0005f;
this->unk318--; this->unk_318--;
if (this->unk318 == 0) { if (this->unk_318 == 0) {
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
} }
} else { } else {
@ -219,10 +219,10 @@ void EnBa_FallAsBlob(EnBa* this, GlobalContext* globalCtx) {
} }
void EnBa_SetupSwingAtPlayer(EnBa* this) { void EnBa_SetupSwingAtPlayer(EnBa* this) {
this->unk14C = 3; this->unk_14C = 3;
this->unk318 = 20; this->unk_318 = 20;
this->unk31A = 0; this->unk_31A = 0;
this->unk31C = 1500; this->unk_31C = 1500;
this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.speedXZ = 20.0f; this->actor.speedXZ = 20.0f;
EnBa_SetupAction(this, EnBa_SwingAtPlayer); EnBa_SetupAction(this, EnBa_SwingAtPlayer);
@ -236,71 +236,71 @@ void EnBa_SwingAtPlayer(EnBa* this, GlobalContext* globalCtx) {
s16 phi_fp; s16 phi_fp;
Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 60.0f, 1.0f, 10.0f, 0.0f); Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 60.0f, 1.0f, 10.0f, 0.0f);
if ((this->actor.xzDistToPlayer <= 175.0f) || (this->unk31A != 0)) { if ((this->actor.xzDistToPlayer <= 175.0f) || (this->unk_31A != 0)) {
if (this->unk318 == 20) { if (this->unk_318 == 20) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BALINADE_HAND_UP); Audio_PlayActorSound2(&this->actor, NA_SE_EN_BALINADE_HAND_UP);
this->unk31C = 1500; this->unk_31C = 1500;
} }
if (this->unk318 != 0) { if (this->unk_318 != 0) {
this->unk31A = 10; this->unk_31A = 10;
this->unk318--; this->unk_318--;
if (this->unk318 >= 11) { if (this->unk_318 >= 11) {
this->unk2FC = player->actor.world.pos; this->unk_2FC = player->actor.world.pos;
this->unk2FC.y += 30.0f; this->unk_2FC.y += 30.0f;
phi_fp = this->actor.yawTowardsPlayer; phi_fp = this->actor.yawTowardsPlayer;
} else { } else {
phi_fp = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk2FC); phi_fp = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_2FC);
} }
Math_SmoothStepToS(&this->unk31C, 1500, 1, 30, 0); Math_SmoothStepToS(&this->unk_31C, 1500, 1, 30, 0);
func_80035844(&this->actor.world.pos, &this->unk158[0], &sp58, 0); func_80035844(&this->actor.world.pos, &this->unk_158[0], &sp58, 0);
Math_SmoothStepToS(&this->actor.shape.rot.y, sp58.y, 1, this->unk31C, 0); Math_SmoothStepToS(&this->actor.shape.rot.y, sp58.y, 1, this->unk_31C, 0);
Math_SmoothStepToS(&this->actor.shape.rot.x, (sp58.x + 0x8000), 1, this->unk31C, 0); Math_SmoothStepToS(&this->actor.shape.rot.x, (sp58.x + 0x8000), 1, this->unk_31C, 0);
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW); Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
Matrix_RotateZYX((this->actor.shape.rot.x - 0x8000), this->actor.shape.rot.y, 0, MTXMODE_APPLY); Matrix_RotateZYX((this->actor.shape.rot.x - 0x8000), this->actor.shape.rot.y, 0, MTXMODE_APPLY);
Matrix_MultVec3f(&D_809B8080, &this->unk158[0]); Matrix_MultVec3f(&D_809B8080, &this->unk_158[0]);
for (i = 0; i < 13; i++) { for (i = 0; i < 13; i++) {
Math_SmoothStepToS(&this->unk2A8[i].x, (i * 1200) - 0x4000, 1, this->unk31C, 0); Math_SmoothStepToS(&this->unk_2A8[i].x, (i * 1200) - 0x4000, 1, this->unk_31C, 0);
Math_SmoothStepToS(&this->unk2A8[i].y, phi_fp, 1, this->unk31C, 0); Math_SmoothStepToS(&this->unk_2A8[i].y, phi_fp, 1, this->unk_31C, 0);
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW); Matrix_Translate(this->unk_158[i].x, this->unk_158[i].y, this->unk_158[i].z, MTXMODE_NEW);
Matrix_RotateZYX((this->unk2A8[i].x - 0x8000), this->unk2A8[i].y, 0, MTXMODE_APPLY); Matrix_RotateZYX((this->unk_2A8[i].x - 0x8000), this->unk_2A8[i].y, 0, MTXMODE_APPLY);
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]); Matrix_MultVec3f(&D_809B8080, &this->unk_158[i + 1]);
} }
} else { } else {
if (this->unk31A == 10) { if (this->unk_31A == 10) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BALINADE_HAND_DOWN); Audio_PlayActorSound2(&this->actor, NA_SE_EN_BALINADE_HAND_DOWN);
} }
if (this->unk31A != 0) { if (this->unk_31A != 0) {
this->unk31C = 8000; this->unk_31C = 8000;
this->actor.speedXZ = 30.0f; this->actor.speedXZ = 30.0f;
phi_fp = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk2FC); phi_fp = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_2FC);
temp = Math_Vec3f_Pitch(&this->actor.world.pos, &this->unk158[0]) + 0x8000; temp = Math_Vec3f_Pitch(&this->actor.world.pos, &this->unk_158[0]) + 0x8000;
Math_SmoothStepToS(&this->actor.shape.rot.y, phi_fp, 1, this->unk31C, 0); Math_SmoothStepToS(&this->actor.shape.rot.y, phi_fp, 1, this->unk_31C, 0);
Math_SmoothStepToS(&this->actor.shape.rot.x, temp, 1, this->unk31C, 0); Math_SmoothStepToS(&this->actor.shape.rot.x, temp, 1, this->unk_31C, 0);
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
MTXMODE_NEW); MTXMODE_NEW);
Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY); Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
Matrix_MultVec3f(&D_809B8080, this->unk158); Matrix_MultVec3f(&D_809B8080, this->unk_158);
for (i = 0; i < 13; i++) { for (i = 0; i < 13; i++) {
temp = -Math_CosS(this->unk31A * 0xCCC) * (i * 1200); temp = -Math_CosS(this->unk_31A * 0xCCC) * (i * 1200);
Math_SmoothStepToS(&this->unk2A8[i].x, temp - 0x4000, 1, this->unk31C, 0); Math_SmoothStepToS(&this->unk_2A8[i].x, temp - 0x4000, 1, this->unk_31C, 0);
Math_SmoothStepToS(&this->unk2A8[i].y, phi_fp, 1, this->unk31C, 0); Math_SmoothStepToS(&this->unk_2A8[i].y, phi_fp, 1, this->unk_31C, 0);
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW); Matrix_Translate(this->unk_158[i].x, this->unk_158[i].y, this->unk_158[i].z, MTXMODE_NEW);
Matrix_RotateZYX(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY); Matrix_RotateZYX(this->unk_2A8[i].x - 0x8000, this->unk_2A8[i].y, 0, MTXMODE_APPLY);
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]); Matrix_MultVec3f(&D_809B8080, &this->unk_158[i + 1]);
} }
this->unk31A--; this->unk_31A--;
} else if ((this->actor.xzDistToPlayer > 175.0f) || (player->stateFlags1 & PLAYER_STATE1_26)) { } else if ((this->actor.xzDistToPlayer > 175.0f) || (player->stateFlags1 & PLAYER_STATE1_26)) {
EnBa_SetupIdle(this); EnBa_SetupIdle(this);
} else { } else {
EnBa_SetupSwingAtPlayer(this); EnBa_SetupSwingAtPlayer(this);
this->unk318 = 27; this->unk_318 = 27;
this->unk31C = 750; this->unk_31C = 750;
} }
} }
this->unk2A8[13].x = this->unk2A8[12].x; this->unk_2A8[13].x = this->unk_2A8[12].x;
this->unk2A8[13].y = this->unk2A8[12].y; this->unk_2A8[13].y = this->unk_2A8[12].y;
if (this->collider.base.atFlags & 2) { if (this->collider.base.atFlags & 2) {
this->collider.base.atFlags &= ~2; this->collider.base.atFlags &= ~2;
if (this->collider.base.at == &player->actor) { if (this->collider.base.at == &player->actor) {
@ -314,15 +314,15 @@ void EnBa_SwingAtPlayer(EnBa* this, GlobalContext* globalCtx) {
EnBa_SetupIdle(this); EnBa_SetupIdle(this);
} else { } else {
EnBa_SetupSwingAtPlayer(this); EnBa_SetupSwingAtPlayer(this);
this->unk318 = 27; this->unk_318 = 27;
this->unk31C = 750; this->unk_31C = 750;
} }
} }
void func_809B7174(EnBa* this) { void func_809B7174(EnBa* this) {
this->unk14C = 1; this->unk_14C = 1;
this->unk31C = 1500; this->unk_31C = 1500;
this->unk318 = 20; this->unk_318 = 20;
this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.speedXZ = 10.0f; this->actor.speedXZ = 10.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BALINADE_HAND_DAMAGE); Audio_PlayActorSound2(&this->actor, NA_SE_EN_BALINADE_HAND_DAMAGE);
@ -335,43 +335,43 @@ void EnBa_RecoilFromDamage(EnBa* this, GlobalContext* globalCtx) {
Vec3s sp6C; Vec3s sp6C;
Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 330.0f, 1.0f, 30.0f, 0.0f); Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 330.0f, 1.0f, 30.0f, 0.0f);
this->unk2FC = this->actor.world.pos; this->unk_2FC = this->actor.world.pos;
if (globalCtx->gameplayFrames % 16 == 0) { if (globalCtx->gameplayFrames % 16 == 0) {
this->unk308.z += Rand_CenteredFloat(180.0f); this->unk_308.z += Rand_CenteredFloat(180.0f);
this->unk314 += Rand_CenteredFloat(180.0f); this->unk_314 += Rand_CenteredFloat(180.0f);
this->unk308.x = Math_SinF(this->unk308.z) * 80.0f; this->unk_308.x = Math_SinF(this->unk_308.z) * 80.0f;
this->unk308.y = Math_CosF(this->unk314) * 80.0f; this->unk_308.y = Math_CosF(this->unk_314) * 80.0f;
} }
this->unk2FC.y -= 448.0f; this->unk_2FC.y -= 448.0f;
this->unk2FC.x += this->unk308.x; this->unk_2FC.x += this->unk_308.x;
this->unk2FC.z += this->unk308.y; this->unk_2FC.z += this->unk_308.y;
func_80033AEC(&this->unk2FC, &this->unk158[13], 1.0f, this->actor.speedXZ, 0.0f, 0.0f); func_80033AEC(&this->unk_2FC, &this->unk_158[13], 1.0f, this->actor.speedXZ, 0.0f, 0.0f);
for (i = 12; i >= 0; i--) { for (i = 12; i >= 0; i--) {
func_80035844(&this->unk158[i + 1], &this->unk158[i], &sp6C, 0); func_80035844(&this->unk_158[i + 1], &this->unk_158[i], &sp6C, 0);
Matrix_Translate(this->unk158[i + 1].x, this->unk158[i + 1].y, this->unk158[i + 1].z, MTXMODE_NEW); Matrix_Translate(this->unk_158[i + 1].x, this->unk_158[i + 1].y, this->unk_158[i + 1].z, MTXMODE_NEW);
Matrix_RotateZYX(sp6C.x, sp6C.y, 0, MTXMODE_APPLY); Matrix_RotateZYX(sp6C.x, sp6C.y, 0, MTXMODE_APPLY);
Matrix_MultVec3f(&D_809B8080, &this->unk158[i]); Matrix_MultVec3f(&D_809B8080, &this->unk_158[i]);
} }
func_80035844(&this->actor.world.pos, &this->unk158[0], &sp6C, 0); func_80035844(&this->actor.world.pos, &this->unk_158[0], &sp6C, 0);
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW); Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
Math_SmoothStepToS(&this->actor.shape.rot.y, sp6C.y, 3, this->unk31C, 182); Math_SmoothStepToS(&this->actor.shape.rot.y, sp6C.y, 3, this->unk_31C, 182);
Math_SmoothStepToS(&this->actor.shape.rot.x, sp6C.x + 0x8000, 3, this->unk31C, 182); Math_SmoothStepToS(&this->actor.shape.rot.x, sp6C.x + 0x8000, 3, this->unk_31C, 182);
Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY); Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
Matrix_MultVec3f(&D_809B8080, &this->unk158[0]); Matrix_MultVec3f(&D_809B8080, &this->unk_158[0]);
for (i = 0; i < 13; i++) { for (i = 0; i < 13; i++) {
func_80035844(&this->unk158[i], &this->unk158[i + 1], &sp6C, 0); func_80035844(&this->unk_158[i], &this->unk_158[i + 1], &sp6C, 0);
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW); Matrix_Translate(this->unk_158[i].x, this->unk_158[i].y, this->unk_158[i].z, MTXMODE_NEW);
Math_SmoothStepToS(&this->unk2A8[i].y, sp6C.y, 3, this->unk31C, 182); Math_SmoothStepToS(&this->unk_2A8[i].y, sp6C.y, 3, this->unk_31C, 182);
Math_SmoothStepToS(&this->unk2A8[i].x, sp6C.x + 0x8000, 3, this->unk31C, 182); Math_SmoothStepToS(&this->unk_2A8[i].x, sp6C.x + 0x8000, 3, this->unk_31C, 182);
Matrix_RotateZYX(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY); Matrix_RotateZYX(this->unk_2A8[i].x - 0x8000, this->unk_2A8[i].y, 0, MTXMODE_APPLY);
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]); Matrix_MultVec3f(&D_809B8080, &this->unk_158[i + 1]);
} }
this->unk2A8[13].x = this->unk2A8[12].x; this->unk_2A8[13].x = this->unk_2A8[12].x;
this->unk2A8[13].y = this->unk2A8[12].y; this->unk_2A8[13].y = this->unk_2A8[12].y;
this->unk318--; this->unk_318--;
if (this->unk318 == 0) { if (this->unk_318 == 0) {
EnBa_SetupIdle(this); EnBa_SetupIdle(this);
} }
} }
@ -382,29 +382,29 @@ void func_809B75A0(EnBa* this, GlobalContext* globalCtx2) {
Vec3f sp74 = { 0.0f, 0.0f, 0.0f }; Vec3f sp74 = { 0.0f, 0.0f, 0.0f };
GlobalContext* globalCtx = globalCtx2; GlobalContext* globalCtx = globalCtx2;
this->unk31C = 2500; this->unk_31C = 2500;
EffectSsDeadSound_SpawnStationary(globalCtx, &this->actor.projectedPos, NA_SE_EN_BALINADE_HAND_DEAD, 1, 1, 40); EffectSsDeadSound_SpawnStationary(globalCtx, &this->actor.projectedPos, NA_SE_EN_BALINADE_HAND_DEAD, 1, 1, 40);
this->unk14C = 0; this->unk_14C = 0;
for (i = 7; i < 14; i++) { for (i = 7; i < 14; i++) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_BA, this->unk158[i].x, this->unk158[i].y, Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_BA, this->unk_158[i].x, this->unk_158[i].y,
this->unk158[i].z, 0, 0, 0, EN_BA_DEAD_BLOB); this->unk_158[i].z, 0, 0, 0, EN_BA_DEAD_BLOB);
} }
unk_temp = Math_Vec3f_Pitch(&this->actor.world.pos, &this->unk158[0]) + 0x8000; unk_temp = Math_Vec3f_Pitch(&this->actor.world.pos, &this->unk_158[0]) + 0x8000;
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, this->unk31C, 0); Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, this->unk_31C, 0);
Math_SmoothStepToS(&this->actor.shape.rot.x, unk_temp, 1, this->unk31C, 0); Math_SmoothStepToS(&this->actor.shape.rot.x, unk_temp, 1, this->unk_31C, 0);
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW); Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY); Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
Matrix_MultVec3f(&D_809B8080, &this->unk158[0]); Matrix_MultVec3f(&D_809B8080, &this->unk_158[0]);
this->actor.flags &= ~ACTOR_FLAG_0; this->actor.flags &= ~ACTOR_FLAG_0;
for (i = 5; i < 13; i++) { for (i = 5; i < 13; i++) {
Math_SmoothStepToS(&this->unk2A8[i].x, this->unk2A8[5].x, 1, this->unk31C, 0); Math_SmoothStepToS(&this->unk_2A8[i].x, this->unk_2A8[5].x, 1, this->unk_31C, 0);
Math_SmoothStepToS(&this->unk2A8[i].y, this->unk2A8[5].y, 1, this->unk31C, 0); Math_SmoothStepToS(&this->unk_2A8[i].y, this->unk_2A8[5].y, 1, this->unk_31C, 0);
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW); Matrix_Translate(this->unk_158[i].x, this->unk_158[i].y, this->unk_158[i].z, MTXMODE_NEW);
Matrix_RotateZYX(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY); Matrix_RotateZYX(this->unk_2A8[i].x - 0x8000, this->unk_2A8[i].y, 0, MTXMODE_APPLY);
Matrix_MultVec3f(&sp74, &this->unk158[i + 1]); Matrix_MultVec3f(&sp74, &this->unk_158[i + 1]);
} }
this->unk31A = 15; this->unk_31A = 15;
EnBa_SetupAction(this, EnBa_Die); EnBa_SetupAction(this, EnBa_Die);
} }
@ -413,32 +413,32 @@ void EnBa_Die(EnBa* this, GlobalContext* globalCtx) {
s16 temp; s16 temp;
s32 i; s32 i;
if (this->unk31A != 0) { if (this->unk_31A != 0) {
this->actor.speedXZ = 30.0f; this->actor.speedXZ = 30.0f;
this->unk31C = 8000; this->unk_31C = 8000;
this->actor.world.pos.y += 8.0f; this->actor.world.pos.y += 8.0f;
temp = Math_Vec3f_Pitch(&this->actor.world.pos, &this->unk158[0]) + 0x8000; temp = Math_Vec3f_Pitch(&this->actor.world.pos, &this->unk_158[0]) + 0x8000;
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, this->unk31C, 0); Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, this->unk_31C, 0);
Math_SmoothStepToS(&this->actor.shape.rot.x, temp, 1, this->unk31C, 0); Math_SmoothStepToS(&this->actor.shape.rot.x, temp, 1, this->unk_31C, 0);
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW); Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY); Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY);
Matrix_MultVec3f(&D_809B8080, &this->unk158[0]); Matrix_MultVec3f(&D_809B8080, &this->unk_158[0]);
for (i = 0; i < 5; i++) { for (i = 0; i < 5; i++) {
temp = -Math_CosS(this->unk31A * 0x444) * (i * 400); temp = -Math_CosS(this->unk_31A * 0x444) * (i * 400);
Math_SmoothStepToS(&this->unk2A8[i].x, temp - 0x4000, 1, this->unk31C, 0); Math_SmoothStepToS(&this->unk_2A8[i].x, temp - 0x4000, 1, this->unk_31C, 0);
Math_SmoothStepToS(&this->unk2A8[i].y, this->actor.yawTowardsPlayer, 1, this->unk31C, 0); Math_SmoothStepToS(&this->unk_2A8[i].y, this->actor.yawTowardsPlayer, 1, this->unk_31C, 0);
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW); Matrix_Translate(this->unk_158[i].x, this->unk_158[i].y, this->unk_158[i].z, MTXMODE_NEW);
Matrix_RotateZYX(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY); Matrix_RotateZYX(this->unk_2A8[i].x - 0x8000, this->unk_2A8[i].y, 0, MTXMODE_APPLY);
Matrix_MultVec3f(&D_809B8080, &this->unk158[i + 1]); Matrix_MultVec3f(&D_809B8080, &this->unk_158[i + 1]);
} }
for (i = 5; i < 13; i++) { for (i = 5; i < 13; i++) {
Math_SmoothStepToS(&this->unk2A8[i].x, this->unk2A8[5].x, 1, this->unk31C, 0); Math_SmoothStepToS(&this->unk_2A8[i].x, this->unk_2A8[5].x, 1, this->unk_31C, 0);
Math_SmoothStepToS(&this->unk2A8[i].y, this->unk2A8[5].y, 1, this->unk31C, 0); Math_SmoothStepToS(&this->unk_2A8[i].y, this->unk_2A8[5].y, 1, this->unk_31C, 0);
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW); Matrix_Translate(this->unk_158[i].x, this->unk_158[i].y, this->unk_158[i].z, MTXMODE_NEW);
Matrix_RotateZYX(this->unk2A8[i].x - 0x8000, this->unk2A8[i].y, 0, MTXMODE_APPLY); Matrix_RotateZYX(this->unk_2A8[i].x - 0x8000, this->unk_2A8[i].y, 0, MTXMODE_APPLY);
Matrix_MultVec3f(&sp6C, &this->unk158[i + 1]); Matrix_MultVec3f(&sp6C, &this->unk_158[i + 1]);
} }
this->unk31A--; this->unk_31A--;
} else { } else {
Flags_SetSwitch(globalCtx, this->upperParams); Flags_SetSwitch(globalCtx, this->upperParams);
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
@ -459,9 +459,9 @@ void EnBa_Update(Actor* thisx, GlobalContext* globalCtx) {
} }
this->actionFunc(this, globalCtx); this->actionFunc(this, globalCtx);
if (this->actor.params < EN_BA_DEAD_BLOB) { if (this->actor.params < EN_BA_DEAD_BLOB) {
this->actor.focus.pos = this->unk158[6]; this->actor.focus.pos = this->unk_158[6];
} }
if (this->unk14C >= 2) { if (this->unk_14C >= 2) {
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
} }
} }
@ -489,9 +489,9 @@ void EnBa_Draw(Actor* thisx, GlobalContext* globalCtx) {
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 16, 16, 1, 0, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 16, 16, 1, 0,
(globalCtx->gameplayFrames * -10) % 128, 32, 32)); (globalCtx->gameplayFrames * -10) % 128, 32, 32));
for (i = 0; i < 14; i++, mtx++) { for (i = 0; i < 14; i++, mtx++) {
Matrix_Translate(this->unk158[i].x, this->unk158[i].y, this->unk158[i].z, MTXMODE_NEW); Matrix_Translate(this->unk_158[i].x, this->unk_158[i].y, this->unk_158[i].z, MTXMODE_NEW);
Matrix_RotateZYX(this->unk2A8[i].x, this->unk2A8[i].y, this->unk2A8[i].z, MTXMODE_APPLY); Matrix_RotateZYX(this->unk_2A8[i].x, this->unk_2A8[i].y, this->unk_2A8[i].z, MTXMODE_APPLY);
Matrix_Scale(this->unk200[i].x, this->unk200[i].y, this->unk200[i].z, MTXMODE_APPLY); Matrix_Scale(this->unk_200[i].x, this->unk_200[i].y, this->unk_200[i].z, MTXMODE_APPLY);
if ((i == 6) || (i == 13)) { if ((i == 6) || (i == 13)) {
switch (i) { switch (i) {
case 13: case 13:

View file

@ -17,19 +17,19 @@ typedef enum {
typedef struct EnBa { typedef struct EnBa {
/* 0x0000 */ Actor actor; /* 0x0000 */ Actor actor;
/* 0x014C */ s32 unk14C; /* 0x014C */ s32 unk_14C;
/* 0x0150 */ EnBaActionFunc actionFunc; /* 0x0150 */ EnBaActionFunc actionFunc;
/* 0x0154 */ s16 upperParams; /* 0x0154 */ s16 upperParams;
/* 0x0156 */ s16 unk156; /* 0x0156 */ s16 unk_156;
/* 0x0158 */ Vec3f unk158[14]; /* 0x0158 */ Vec3f unk_158[14];
/* 0x0200 */ Vec3f unk200[14]; /* 0x0200 */ Vec3f unk_200[14];
/* 0x02A8 */ Vec3s unk2A8[14]; /* 0x02A8 */ Vec3s unk_2A8[14];
/* 0x02FC */ Vec3f unk2FC; /* 0x02FC */ Vec3f unk_2FC;
/* 0x0308 */ Vec3f unk308; /* 0x0308 */ Vec3f unk_308;
/* 0x0314 */ f32 unk314; /* 0x0314 */ f32 unk_314;
/* 0x0318 */ s16 unk318; /* 0x0318 */ s16 unk_318;
/* 0x031A */ s16 unk31A; /* 0x031A */ s16 unk_31A;
/* 0x031C */ s16 unk31C; /* 0x031C */ s16 unk_31C;
/* 0x0320 */ ColliderJntSph collider; /* 0x0320 */ ColliderJntSph collider;
/* 0x0340 */ ColliderJntSphElement colliderItems[2]; /* 0x0340 */ ColliderJntSphElement colliderItems[2];
} EnBa; // size = 0x03C0 } EnBa; // size = 0x03C0

View file

@ -432,7 +432,7 @@ s32 EnDha_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
return false; return false;
} }
void EnDha_OverridePostDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { void EnDha_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
Vec3f handVec = { 1100.0f, 0.0f, 0.0f }; Vec3f handVec = { 1100.0f, 0.0f, 0.0f };
Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
EnDha* this = (EnDha*)thisx; EnDha* this = (EnDha*)thisx;
@ -461,5 +461,5 @@ void EnDha_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80093D18(globalCtx->state.gfxCtx); func_80093D18(globalCtx->state.gfxCtx);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnDha_OverrideLimbDraw, EnDha_OverridePostDraw, this); EnDha_OverrideLimbDraw, EnDha_PostLimbDraw, this);
} }

View file

@ -266,18 +266,18 @@ void EnEncount2_Update(Actor* thisx, GlobalContext* globalCtx2) {
EnEncount2_ParticleUpdate(this, globalCtx); EnEncount2_ParticleUpdate(this, globalCtx);
if (!this->isNotDeathMountain) { if (!this->isNotDeathMountain) {
this->unk17C = this->envEffectsTimer / 60.0f; this->unk_17C = this->envEffectsTimer / 60.0f;
this->unk160 = this->unk17C * -50.0f; this->unk_160 = this->unk_17C * -50.0f;
globalCtx->envCtx.adjAmbientColor[0] = (s16)this->unk160 * -1.5f; globalCtx->envCtx.adjAmbientColor[0] = (s16)this->unk_160 * -1.5f;
globalCtx->envCtx.adjAmbientColor[1] = globalCtx->envCtx.adjAmbientColor[2] = this->unk160; globalCtx->envCtx.adjAmbientColor[1] = globalCtx->envCtx.adjAmbientColor[2] = this->unk_160;
this->unk168 = this->unk17C * -20.0f; this->unk_168 = this->unk_17C * -20.0f;
globalCtx->envCtx.adjLight1Color[0] = (s16)this->unk168 * -1.5f; globalCtx->envCtx.adjLight1Color[0] = (s16)this->unk_168 * -1.5f;
globalCtx->envCtx.adjLight1Color[1] = globalCtx->envCtx.adjLight1Color[2] = this->unk168; globalCtx->envCtx.adjLight1Color[1] = globalCtx->envCtx.adjLight1Color[2] = this->unk_168;
this->unk170 = this->unk17C * -50.0f; this->unk_170 = this->unk_17C * -50.0f;
globalCtx->envCtx.adjFogNear = this->unk170; globalCtx->envCtx.adjFogNear = this->unk_170;
globalCtx->envCtx.adjFogColor[0] = (u8)((160.0f - globalCtx->envCtx.lightSettings.fogColor[0]) * this->unk17C); globalCtx->envCtx.adjFogColor[0] = (u8)((160.0f - globalCtx->envCtx.lightSettings.fogColor[0]) * this->unk_17C);
globalCtx->envCtx.adjFogColor[1] = (u8)((160.0f - globalCtx->envCtx.lightSettings.fogColor[1]) * this->unk17C); globalCtx->envCtx.adjFogColor[1] = (u8)((160.0f - globalCtx->envCtx.lightSettings.fogColor[1]) * this->unk_17C);
globalCtx->envCtx.adjFogColor[2] = (u8)((150.0f - globalCtx->envCtx.lightSettings.fogColor[2]) * this->unk17C); globalCtx->envCtx.adjFogColor[2] = (u8)((150.0f - globalCtx->envCtx.lightSettings.fogColor[2]) * this->unk_17C);
} }
} }

View file

@ -26,14 +26,14 @@ typedef struct EnEncount2 {
/* 0x015A */ s16 isNotDeathMountain; /* 0x015A */ s16 isNotDeathMountain;
/* 0x015C */ s16 collapseSpawnerInactive; /* 0x015C */ s16 collapseSpawnerInactive;
/* 0x015E */ s16 particleSpawnTimer; /* 0x015E */ s16 particleSpawnTimer;
/* 0x0160 */ f32 unk160; /* 0x0160 */ f32 unk_160;
/* 0x0164 */ char unk164[0x4]; /* 0x0164 */ char unk164[0x4];
/* 0x0168 */ f32 unk168; /* 0x0168 */ f32 unk_168;
/* 0x016C */ char unk16C[0x4]; /* 0x016C */ char unk16C[0x4];
/* 0x0178 */ f32 unk170; /* 0x0178 */ f32 unk_170;
/* 0x0174 */ char unk174[0x4]; /* 0x0174 */ char unk174[0x4];
/* 0x0178 */ s16 envEffectsTimer; /* 0x0178 */ s16 envEffectsTimer;
/* 0x017C */ f32 unk17C; /* 0x017C */ f32 unk_17C;
/* 0x0180 */ u64 isQuaking; /* 0x0180 */ u64 isQuaking;
/* 0x0188 */ EnEncount2Particle particles[50]; /* 0x0188 */ EnEncount2Particle particles[50];
} EnEncount2; // size = 0x0A20 } EnEncount2; // size = 0x0A20

View file

@ -104,8 +104,8 @@ void EnFireRock_Init(Actor* thisx, GlobalContext* globalCtx) {
break; break;
case FIRE_ROCK_SPAWNED_FALLING1: // spawned by encount2 case FIRE_ROCK_SPAWNED_FALLING1: // spawned by encount2
// sets unused vars? // sets unused vars?
this->unk17C.x = (f32)(Rand_CenteredFloat(50.0f) + player->actor.world.pos.x); this->unk_17C.x = (f32)(Rand_CenteredFloat(50.0f) + player->actor.world.pos.x);
this->unk17C.z = (f32)(Rand_CenteredFloat(50.0f) + player->actor.world.pos.z); this->unk_17C.z = (f32)(Rand_CenteredFloat(50.0f) + player->actor.world.pos.z);
case FIRE_ROCK_SPAWNED_FALLING2: // spawned by encount2 and by the ceilling spawner case FIRE_ROCK_SPAWNED_FALLING2: // spawned by encount2 and by the ceilling spawner
this->scale = (Rand_ZeroFloat(2.0f) / 100.0f) + 0.02f; this->scale = (Rand_ZeroFloat(2.0f) / 100.0f) + 0.02f;
Actor_SetScale(&this->actor, this->scale); Actor_SetScale(&this->actor, this->scale);

View file

@ -27,7 +27,7 @@ typedef struct EnFireRock {
/* 0x0168 */ EnFireRockActionFunc actionFunc; /* 0x0168 */ EnFireRockActionFunc actionFunc;
/* 0x016C */ f32 scale; /* 0x016C */ f32 scale;
/* 0x0170 */ Vec3f relativePos; /* 0x0170 */ Vec3f relativePos;
/* 0x017C */ Vec3f unk17C; // set but unused? /* 0x017C */ Vec3f unk_17C; // set but unused?
/* 0x0188 */ s16 timer; /* 0x0188 */ s16 timer;
/* 0x018A */ s16 timer2; /* 0x018A */ s16 timer2;
/* 0x018C */ s16 type; /* 0x018C */ s16 type;

View file

@ -830,11 +830,11 @@ void EnGoma_Draw(Actor* thisx, GlobalContext* globalCtx) {
break; break;
case ENGOMA_BOSSLIMB: case ENGOMA_BOSSLIMB:
if (this->bossLimbDl != NULL) { if (this->bossLimbDL != NULL) {
gSPSegment(POLY_OPA_DISP++, 0x08, EnGoma_NoBackfaceCullingDlist(globalCtx->state.gfxCtx)); gSPSegment(POLY_OPA_DISP++, 0x08, EnGoma_NoBackfaceCullingDlist(globalCtx->state.gfxCtx));
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_goma.c", 2114), gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_goma.c", 2114),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, this->bossLimbDl); gSPDisplayList(POLY_OPA_DISP++, this->bossLimbDL);
} }
break; break;
} }

View file

@ -72,7 +72,7 @@ typedef struct EnGoma {
/* 0x2F4 */ s32 unk_2F4; /* 0x2F4 */ s32 unk_2F4;
/* 0x2F8 */ s16 stunTimer; /* 0x2F8 */ s16 stunTimer;
/* 0x2FC */ Vec3f shieldKnockbackVel; /* 0x2FC */ Vec3f shieldKnockbackVel;
/* 0x308 */ Gfx* bossLimbDl; // set by z_boss_goma /* 0x308 */ Gfx* bossLimbDL; // set by z_boss_goma
/* 0x30C */ ColliderCylinder colCyl1; /* 0x30C */ ColliderCylinder colCyl1;
/* 0x358 */ ColliderCylinder colCyl2; /* 0x358 */ ColliderCylinder colCyl2;
} EnGoma; // size = 0x03A4 } EnGoma; // size = 0x03A4

View file

@ -196,7 +196,7 @@ void EnPeehat_Init(Actor* thisx, GlobalContext* globalCtx) {
24); 24);
ActorShape_Init(&this->actor.shape, 100.0f, ActorShadow_DrawCircle, 27.0f); ActorShape_Init(&this->actor.shape, 100.0f, ActorShadow_DrawCircle, 27.0f);
this->actor.focus.pos = this->actor.world.pos; this->actor.focus.pos = this->actor.world.pos;
this->unk2D4 = 0; this->unk_2D4 = 0;
this->actor.world.rot.y = 0; this->actor.world.rot.y = 0;
this->actor.colChkInfo.mass = MASS_HEAVY; this->actor.colChkInfo.mass = MASS_HEAVY;
this->actor.colChkInfo.health = 6; this->actor.colChkInfo.health = 6;
@ -252,7 +252,7 @@ void EnPeehat_Destroy(Actor* thisx, GlobalContext* globalCtx) {
if (this->actor.params > 0) { if (this->actor.params > 0) {
parent = (EnPeehat*)this->actor.parent; parent = (EnPeehat*)this->actor.parent;
if (parent != NULL && parent->actor.update != NULL) { if (parent != NULL && parent->actor.update != NULL) {
parent->unk2FA--; parent->unk_2FA--;
} }
} }
} }
@ -287,12 +287,12 @@ void EnPeehat_HitWhenGrounded(EnPeehat* this, GlobalContext* globalCtx) {
Item_DropCollectibleRandom(globalCtx, &this->actor, &itemDropPos, 0x40); Item_DropCollectibleRandom(globalCtx, &this->actor, &itemDropPos, 0x40);
Item_DropCollectibleRandom(globalCtx, &this->actor, &itemDropPos, 0x40); Item_DropCollectibleRandom(globalCtx, &this->actor, &itemDropPos, 0x40);
Item_DropCollectibleRandom(globalCtx, &this->actor, &itemDropPos, 0x40); Item_DropCollectibleRandom(globalCtx, &this->actor, &itemDropPos, 0x40);
this->unk2D4 = 240; this->unk_2D4 = 240;
} else { } else {
s32 i; s32 i;
this->colCylinder.base.acFlags &= ~AC_HIT; this->colCylinder.base.acFlags &= ~AC_HIT;
for (i = MAX_LARVA - this->unk2FA; i > 0; i--) { for (i = MAX_LARVA - this->unk_2FA; i > 0; i--) {
Actor* larva = Actor* larva =
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_PEEHAT, Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_PEEHAT,
Rand_CenteredFloat(25.0f) + this->actor.world.pos.x, Rand_CenteredFloat(25.0f) + this->actor.world.pos.x,
@ -302,10 +302,10 @@ void EnPeehat_HitWhenGrounded(EnPeehat* this, GlobalContext* globalCtx) {
if (larva != NULL) { if (larva != NULL) {
larva->velocity.y = 6.0f; larva->velocity.y = 6.0f;
larva->shape.rot.y = larva->world.rot.y = Rand_CenteredFloat(0xFFFF); larva->shape.rot.y = larva->world.rot.y = Rand_CenteredFloat(0xFFFF);
this->unk2FA++; this->unk_2FA++;
} }
} }
this->unk2D4 = 8; this->unk_2D4 = 8;
} }
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PIHAT_DAMAGE); Audio_PlayActorSound2(&this->actor, NA_SE_EN_PIHAT_DAMAGE);
} }
@ -314,8 +314,8 @@ void EnPeehat_Ground_SetStateGround(EnPeehat* this) {
Animation_Change(&this->skelAnime, &gPeehatRisingAnim, 0.0f, 3.0f, Animation_GetLastFrame(&gPeehatRisingAnim), Animation_Change(&this->skelAnime, &gPeehatRisingAnim, 0.0f, 3.0f, Animation_GetLastFrame(&gPeehatRisingAnim),
ANIMMODE_ONCE, 0.0f); ANIMMODE_ONCE, 0.0f);
this->seekPlayerTimer = 600; this->seekPlayerTimer = 600;
this->unk2D4 = 0; this->unk_2D4 = 0;
this->unk2FA = 0; this->unk_2FA = 0;
this->state = PEAHAT_STATE_3; this->state = PEAHAT_STATE_3;
this->colCylinder.base.acFlags &= ~AC_HIT; this->colCylinder.base.acFlags &= ~AC_HIT;
EnPeehat_SetupAction(this, EnPeehat_Ground_StateGround); EnPeehat_SetupAction(this, EnPeehat_Ground_StateGround);
@ -335,9 +335,9 @@ void EnPeehat_Ground_StateGround(EnPeehat* this, GlobalContext* globalCtx) {
} else { } else {
this->actor.flags &= ~ACTOR_FLAG_0; this->actor.flags &= ~ACTOR_FLAG_0;
Math_SmoothStepToF(&this->actor.shape.yOffset, -1000.0f, 1.0f, 50.0f, 0.0f); Math_SmoothStepToF(&this->actor.shape.yOffset, -1000.0f, 1.0f, 50.0f, 0.0f);
if (this->unk2D4 != 0) { if (this->unk_2D4 != 0) {
this->unk2D4--; this->unk_2D4--;
if (this->unk2D4 & 4) { if (this->unk_2D4 & 4) {
Math_SmoothStepToF(&this->scaleShift, 0.205f, 1.0f, 0.235f, 0.0f); Math_SmoothStepToF(&this->scaleShift, 0.205f, 1.0f, 0.235f, 0.0f);
} else { } else {
Math_SmoothStepToF(&this->scaleShift, 0.0f, 1.0f, 0.005f, 0.0f); Math_SmoothStepToF(&this->scaleShift, 0.0f, 1.0f, 0.005f, 0.0f);
@ -352,8 +352,8 @@ void EnPeehat_Flying_SetStateGround(EnPeehat* this) {
Animation_Change(&this->skelAnime, &gPeehatRisingAnim, 0.0f, 3.0f, Animation_GetLastFrame(&gPeehatRisingAnim), Animation_Change(&this->skelAnime, &gPeehatRisingAnim, 0.0f, 3.0f, Animation_GetLastFrame(&gPeehatRisingAnim),
ANIMMODE_ONCE, 0.0f); ANIMMODE_ONCE, 0.0f);
this->seekPlayerTimer = 400; this->seekPlayerTimer = 400;
this->unk2D4 = 0; this->unk_2D4 = 0;
this->unk2FA = 0; //! @bug: overwrites number of child larva spawned, allowing for more than MAX_LARVA spawns this->unk_2FA = 0; //! @bug: overwrites number of child larva spawned, allowing for more than MAX_LARVA spawns
this->state = PEAHAT_STATE_4; this->state = PEAHAT_STATE_4;
EnPeehat_SetupAction(this, EnPeehat_Flying_StateGrounded); EnPeehat_SetupAction(this, EnPeehat_Flying_StateGrounded);
} }
@ -365,9 +365,9 @@ void EnPeehat_Flying_StateGrounded(EnPeehat* this, GlobalContext* globalCtx) {
} }
} else { } else {
Math_SmoothStepToF(&this->actor.shape.yOffset, -1000.0f, 1.0f, 50.0f, 0.0f); Math_SmoothStepToF(&this->actor.shape.yOffset, -1000.0f, 1.0f, 50.0f, 0.0f);
if (this->unk2D4 != 0) { if (this->unk_2D4 != 0) {
this->unk2D4--; this->unk_2D4--;
if (this->unk2D4 & 4) { if (this->unk_2D4 & 4) {
Math_SmoothStepToF(&this->scaleShift, 0.205f, 1.0f, 0.235f, 0.0f); Math_SmoothStepToF(&this->scaleShift, 0.205f, 1.0f, 0.235f, 0.0f);
} else { } else {
Math_SmoothStepToF(&this->scaleShift, 0.0f, 1.0f, 0.005f, 0.0f); Math_SmoothStepToF(&this->scaleShift, 0.0f, 1.0f, 0.005f, 0.0f);
@ -390,14 +390,14 @@ void EnPeehat_Flying_StateFly(EnPeehat* this, GlobalContext* globalCtx) {
if (!IS_DAY || this->xzDistToRise < this->actor.xzDistToPlayer) { if (!IS_DAY || this->xzDistToRise < this->actor.xzDistToPlayer) {
EnPeehat_Flying_SetStateLanding(this); EnPeehat_Flying_SetStateLanding(this);
} else if (this->actor.xzDistToPlayer < this->xzDistMax) { } else if (this->actor.xzDistToPlayer < this->xzDistMax) {
if (this->unk2FA < MAX_LARVA && (globalCtx->gameplayFrames & 7) == 0) { if (this->unk_2FA < MAX_LARVA && (globalCtx->gameplayFrames & 7) == 0) {
Actor* larva = Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_PEEHAT, Actor* larva = Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_PEEHAT,
Rand_CenteredFloat(25.0f) + this->actor.world.pos.x, Rand_CenteredFloat(25.0f) + this->actor.world.pos.x,
Rand_CenteredFloat(5.0f) + this->actor.world.pos.y, Rand_CenteredFloat(5.0f) + this->actor.world.pos.y,
Rand_CenteredFloat(25.0f) + this->actor.world.pos.z, 0, 0, 0, 1); Rand_CenteredFloat(25.0f) + this->actor.world.pos.z, 0, 0, 0, 1);
if (larva != NULL) { if (larva != NULL) {
larva->shape.rot.y = larva->world.rot.y = Rand_CenteredFloat(0xFFFF); larva->shape.rot.y = larva->world.rot.y = Rand_CenteredFloat(0xFFFF);
this->unk2FA++; this->unk_2FA++;
} }
} }
} }
@ -471,7 +471,7 @@ void EnPeehat_Flying_StateRise(EnPeehat* this, GlobalContext* globalCtx) {
} }
if (SkelAnime_Update(&this->skelAnime) || this->animTimer == 0) { if (SkelAnime_Update(&this->skelAnime) || this->animTimer == 0) {
//! @bug: overwrites number of child larva spawned, allowing for more than MAX_LARVA spawns //! @bug: overwrites number of child larva spawned, allowing for more than MAX_LARVA spawns
this->unk2FA = 0; this->unk_2FA = 0;
EnPeehat_Flying_SetStateFly(this); EnPeehat_Flying_SetStateFly(this);
} else { } else {
this->actor.world.pos.y += 18.0f; this->actor.world.pos.y += 18.0f;
@ -490,7 +490,7 @@ void EnPeehat_Flying_StateRise(EnPeehat* this, GlobalContext* globalCtx) {
void EnPeehat_Ground_SetStateSeekPlayer(EnPeehat* this) { void EnPeehat_Ground_SetStateSeekPlayer(EnPeehat* this) {
Animation_PlayLoop(&this->skelAnime, &gPeehatFlyingAnim); Animation_PlayLoop(&this->skelAnime, &gPeehatFlyingAnim);
this->state = PEAHAT_STATE_SEEK_PLAYER; this->state = PEAHAT_STATE_SEEK_PLAYER;
this->unk2E0 = 0.0f; this->unk_2E0 = 0.0f;
EnPeehat_SetupAction(this, EnPeehat_Ground_StateSeekPlayer); EnPeehat_SetupAction(this, EnPeehat_Ground_StateSeekPlayer);
} }
@ -507,7 +507,7 @@ void EnPeehat_Ground_StateSeekPlayer(EnPeehat* this, GlobalContext* globalCtx) {
} }
if (IS_DAY && (Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < this->xzDistMax)) { if (IS_DAY && (Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < this->xzDistMax)) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 1000, 0); Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 1000, 0);
if (this->unk2FA != 0) { if (this->unk_2FA != 0) {
this->actor.shape.rot.y += 0x1C2; this->actor.shape.rot.y += 0x1C2;
} else { } else {
this->actor.shape.rot.y -= 0x1C2; this->actor.shape.rot.y -= 0x1C2;
@ -525,7 +525,7 @@ void EnPeehat_Ground_StateSeekPlayer(EnPeehat* this, GlobalContext* globalCtx) {
void EnPeehat_Larva_SetStateSeekPlayer(EnPeehat* this) { void EnPeehat_Larva_SetStateSeekPlayer(EnPeehat* this) {
Animation_PlayLoop(&this->skelAnime, &gPeehatFlyingAnim); Animation_PlayLoop(&this->skelAnime, &gPeehatFlyingAnim);
this->state = PEAHAT_STATE_SEEK_PLAYER; this->state = PEAHAT_STATE_SEEK_PLAYER;
this->unk2D4 = 0; this->unk_2D4 = 0;
EnPeehat_SetupAction(this, EnPeehat_Larva_StateSeekPlayer); EnPeehat_SetupAction(this, EnPeehat_Larva_StateSeekPlayer);
} }
@ -544,10 +544,10 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* this, GlobalContext* globalCtx) {
} else { } else {
Math_SmoothStepToF(&this->actor.velocity.y, -0.135f, 1.0f, 0.05f, 0.0f); Math_SmoothStepToF(&this->actor.velocity.y, -0.135f, 1.0f, 0.05f, 0.0f);
} }
if (this->unk2D4 == 0) { if (this->unk_2D4 == 0) {
Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 830, 0); Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 830, 0);
} else { } else {
this->unk2D4--; this->unk_2D4--;
} }
this->actor.shape.rot.y += 0x15E; this->actor.shape.rot.y += 0x15E;
SkelAnime_Update(&this->skelAnime); SkelAnime_Update(&this->skelAnime);
@ -569,7 +569,7 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* this, GlobalContext* globalCtx) {
} else { } else {
this->actor.world.rot.y -= 0x2000; this->actor.world.rot.y -= 0x2000;
} }
this->unk2D4 = 40; this->unk_2D4 = 40;
} else if (this->colCylinder.base.acFlags & AC_HIT || this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { } else if (this->colCylinder.base.acFlags & AC_HIT || this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
Vec3f zeroVec = { 0, 0, 0 }; Vec3f zeroVec = { 0, 0, 0 };
s32 i; s32 i;
@ -650,7 +650,7 @@ void EnPeehat_Flying_StateLanding(EnPeehat* this, GlobalContext* globalCtx) {
void EnPeehat_Ground_SetStateHover(EnPeehat* this) { void EnPeehat_Ground_SetStateHover(EnPeehat* this) {
Animation_PlayLoop(&this->skelAnime, &gPeehatFlyingAnim); Animation_PlayLoop(&this->skelAnime, &gPeehatFlyingAnim);
this->actor.speedXZ = Rand_ZeroOne() * 0.5f + 2.5f; this->actor.speedXZ = Rand_ZeroOne() * 0.5f + 2.5f;
this->unk2D4 = Rand_ZeroOne() * 10 + 10; this->unk_2D4 = Rand_ZeroOne() * 10 + 10;
this->state = PEAHAT_STATE_15; this->state = PEAHAT_STATE_15;
EnPeehat_SetupAction(this, EnPeehat_Ground_StateHover); EnPeehat_SetupAction(this, EnPeehat_Ground_StateHover);
} }
@ -663,17 +663,17 @@ void EnPeehat_Ground_StateHover(EnPeehat* this, GlobalContext* globalCtx) {
if (this->actor.world.pos.y - this->actor.floorHeight > 75.0f) { if (this->actor.world.pos.y - this->actor.floorHeight > 75.0f) {
this->actor.world.pos.y -= 1.0f; this->actor.world.pos.y -= 1.0f;
} }
this->actor.world.pos.y += Math_CosF(this->unk2E0) * 1.4f; this->actor.world.pos.y += Math_CosF(this->unk_2E0) * 1.4f;
cos = Math_CosF(this->unk2E0) * 0.18f; cos = Math_CosF(this->unk_2E0) * 0.18f;
this->unk2E0 += ((0.0f <= cos) ? cos : -cos) + 0.07f; this->unk_2E0 += ((0.0f <= cos) ? cos : -cos) + 0.07f;
this->unk2D4--; this->unk_2D4--;
if (this->unk2D4 <= 0) { if (this->unk_2D4 <= 0) {
this->actor.speedXZ = Rand_ZeroOne() * 0.5f + 2.5f; this->actor.speedXZ = Rand_ZeroOne() * 0.5f + 2.5f;
this->unk2D4 = Rand_ZeroOne() * 10.0f + 10.0f; this->unk_2D4 = Rand_ZeroOne() * 10.0f + 10.0f;
this->unk2F4 = (Rand_ZeroOne() - 0.5f) * 1000.0f; this->unk_2F4 = (Rand_ZeroOne() - 0.5f) * 1000.0f;
} }
SkelAnime_Update(&this->skelAnime); SkelAnime_Update(&this->skelAnime);
this->actor.world.rot.y += this->unk2F4; this->actor.world.rot.y += this->unk_2F4;
if (this->seekPlayerTimer <= 0) { if (this->seekPlayerTimer <= 0) {
EnPeehat_Ground_SetStateLanding(this); EnPeehat_Ground_SetStateLanding(this);
this->riseDelayTimer = 40; this->riseDelayTimer = 40;
@ -685,7 +685,7 @@ void EnPeehat_Ground_StateHover(EnPeehat* this, GlobalContext* globalCtx) {
if (IS_DAY && Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < this->xzDistMax) { if (IS_DAY && Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < this->xzDistMax) {
this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actor.world.rot.y = this->actor.yawTowardsPlayer;
EnPeehat_Ground_SetStateSeekPlayer(this); EnPeehat_Ground_SetStateSeekPlayer(this);
this->unk2FA = globalCtx->gameplayFrames & 1; this->unk_2FA = globalCtx->gameplayFrames & 1;
} else { } else {
EnPeehat_Ground_SetStateReturnHome(this); EnPeehat_Ground_SetStateReturnHome(this);
} }
@ -712,9 +712,9 @@ void EnPeehat_Ground_StateReturnHome(EnPeehat* this, GlobalContext* globalCtx) {
} else { } else {
this->actor.world.pos.y += 1.0f; this->actor.world.pos.y += 1.0f;
} }
this->actor.world.pos.y += Math_CosF(this->unk2E0) * 1.4f; this->actor.world.pos.y += Math_CosF(this->unk_2E0) * 1.4f;
cos = Math_CosF(this->unk2E0) * 0.18f; cos = Math_CosF(this->unk_2E0) * 0.18f;
this->unk2E0 += ((0.0f <= cos) ? cos : -cos) + 0.07f; this->unk_2E0 += ((0.0f <= cos) ? cos : -cos) + 0.07f;
yRot = Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos); yRot = Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos);
Math_SmoothStepToS(&this->actor.world.rot.y, yRot, 1, 600, 0); Math_SmoothStepToS(&this->actor.world.rot.y, yRot, 1, 600, 0);
Math_SmoothStepToS(&this->actor.shape.rot.x, 4500, 1, 600, 0); Math_SmoothStepToS(&this->actor.shape.rot.x, 4500, 1, 600, 0);
@ -727,7 +727,7 @@ void EnPeehat_Ground_StateReturnHome(EnPeehat* this, GlobalContext* globalCtx) {
if (IS_DAY && Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < this->xzDistMax) { if (IS_DAY && Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < this->xzDistMax) {
this->seekPlayerTimer = 400; this->seekPlayerTimer = 400;
EnPeehat_Ground_SetStateSeekPlayer(this); EnPeehat_Ground_SetStateSeekPlayer(this);
this->unk2FA = (globalCtx->gameplayFrames & 1); this->unk_2FA = (globalCtx->gameplayFrames & 1);
} }
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PIHAT_FLY - SFX_FLAG); Audio_PlayActorSound2(&this->actor, NA_SE_EN_PIHAT_FLY - SFX_FLAG);
} }
@ -762,7 +762,7 @@ void EnPeehat_StateAttackRecoil(EnPeehat* this, GlobalContext* globalCtx) {
EnPeehat_Ground_SetStateSeekPlayer(this); EnPeehat_Ground_SetStateSeekPlayer(this);
// Is PEAHAT_TYPE_GROUNDED // Is PEAHAT_TYPE_GROUNDED
if (this->actor.params < 0) { if (this->actor.params < 0) {
this->unk2FA = (this->unk2FA != 0) ? 0 : 1; this->unk_2FA = (this->unk_2FA != 0) ? 0 : 1;
} }
} }
} }
@ -802,11 +802,11 @@ void EnPeehat_Adult_SetStateDie(EnPeehat* this) {
void EnPeehat_Adult_StateDie(EnPeehat* this, GlobalContext* globalCtx) { void EnPeehat_Adult_StateDie(EnPeehat* this, GlobalContext* globalCtx) {
if (this->isStateDieFirstUpdate) { if (this->isStateDieFirstUpdate) {
this->unk2D4--; this->unk_2D4--;
if (this->unk2D4 <= 0 || this->actor.colChkInfo.health == 0) { if (this->unk_2D4 <= 0 || this->actor.colChkInfo.health == 0) {
Animation_MorphToPlayOnce(&this->skelAnime, &gPeehatRecoilAnim, -4.0f); Animation_MorphToPlayOnce(&this->skelAnime, &gPeehatRecoilAnim, -4.0f);
this->bladeRotVel = 4000; this->bladeRotVel = 4000;
this->unk2D4 = 14; this->unk_2D4 = 14;
this->actor.speedXZ = 0; this->actor.speedXZ = 0;
this->actor.velocity.y = 6; this->actor.velocity.y = 6;
this->isStateDieFirstUpdate = 0; this->isStateDieFirstUpdate = 0;
@ -834,8 +834,8 @@ void EnPeehat_Adult_StateDie(EnPeehat* this, GlobalContext* globalCtx) {
if (this->actor.speedXZ < 0) { if (this->actor.speedXZ < 0) {
this->actor.speedXZ += 0.25f; this->actor.speedXZ += 0.25f;
} }
this->unk2D4--; this->unk_2D4--;
if (this->unk2D4 <= 0) { if (this->unk_2D4 <= 0) {
if (this->actor.colChkInfo.health == 0) { if (this->actor.colChkInfo.health == 0) {
EnPeehat_SetStateExplode(this); EnPeehat_SetStateExplode(this);
// if PEAHAT_TYPE_GROUNDED // if PEAHAT_TYPE_GROUNDED
@ -853,7 +853,7 @@ void EnPeehat_SetStateExplode(EnPeehat* this) {
Animation_PlayLoop(&this->skelAnime, &gPeehatFlyingAnim); Animation_PlayLoop(&this->skelAnime, &gPeehatFlyingAnim);
this->state = PEAHAT_STATE_EXPLODE; this->state = PEAHAT_STATE_EXPLODE;
this->animTimer = 5; this->animTimer = 5;
this->unk2E0 = 0.0f; this->unk_2E0 = 0.0f;
EnPeehat_SetupAction(this, EnPeehat_StateExplode); EnPeehat_SetupAction(this, EnPeehat_StateExplode);
} }

View file

@ -23,19 +23,19 @@ typedef struct EnPeehat {
/* 0x02B4 */ s32 isStateDieFirstUpdate; /* 0x02B4 */ s32 isStateDieFirstUpdate;
/* 0x02B8 */ EnPeehatActionFunc actionFunc; /* 0x02B8 */ EnPeehatActionFunc actionFunc;
/* 0x02BC */ Vec3f bladeTip[2]; // used to simulate the peahat's blades "digging up" earth /* 0x02BC */ Vec3f bladeTip[2]; // used to simulate the peahat's blades "digging up" earth
/* 0x02D4 */ s32 unk2D4; /* 0x02D4 */ s32 unk_2D4;
/* 0x02D8 */ f32 xzDistMax; // max xz dist to follow Link (PEAHAT_TYPE_GROUNDED) or spawn larva (PEAHAT_TYPE_FLYING) /* 0x02D8 */ f32 xzDistMax; // max xz dist to follow Link (PEAHAT_TYPE_GROUNDED) or spawn larva (PEAHAT_TYPE_FLYING)
/* 0x02DC */ f32 xzDistToRise; // xz dist needed to rise from the ground /* 0x02DC */ f32 xzDistToRise; // xz dist needed to rise from the ground
/* 0x02E0 */ f32 unk2E0; // rot? /* 0x02E0 */ f32 unk_2E0; // rot?
/* 0x02E4 */ f32 jiggleRot; /* 0x02E4 */ f32 jiggleRot;
/* 0x02E8 */ f32 jiggleRotInc; /* 0x02E8 */ f32 jiggleRotInc;
/* 0x02EC */ f32 scaleShift; // 0.0f for no distortion. used for "jiggle" effect when stabbed on ground /* 0x02EC */ f32 scaleShift; // 0.0f for no distortion. used for "jiggle" effect when stabbed on ground
/* 0x02F0 */ s16 bladeRotVel; // spinning blades rotational velocity /* 0x02F0 */ s16 bladeRotVel; // spinning blades rotational velocity
/* 0x02F2 */ s16 bladeRot; // spinning blades rotation component /* 0x02F2 */ s16 bladeRot; // spinning blades rotation component
/* 0x02F4 */ s16 unk2F4; /* 0x02F4 */ s16 unk_2F4;
/* 0x02F6 */ s16 riseDelayTimer; // countdown timer until peahat is allowed to rise up from the ground /* 0x02F6 */ s16 riseDelayTimer; // countdown timer until peahat is allowed to rise up from the ground
/* 0x02F8 */ s16 seekPlayerTimer; // number of frames the peahat should seek the player before landing to rest /* 0x02F8 */ s16 seekPlayerTimer; // number of frames the peahat should seek the player before landing to rest
/* 0x02FA */ s16 unk2FA; // larva count (PEAHAT_TYPE_FLYING, PEAHAT_TYPE_GROUNDED), /* 0x02FA */ s16 unk_2FA; // larva count (PEAHAT_TYPE_FLYING, PEAHAT_TYPE_GROUNDED),
// shape rotation direction (PEAHAT_TYPE_GROUNDED) // shape rotation direction (PEAHAT_TYPE_GROUNDED)
/* 0x02FC */ s16 animTimer; /* 0x02FC */ s16 animTimer;
/* 0x0300 */ ColliderCylinder colCylinder; /* 0x0300 */ ColliderCylinder colCylinder;

View file

@ -153,7 +153,7 @@ typedef enum {
} SkullKidAction; } SkullKidAction;
typedef struct { typedef struct {
u8 unk0; u8 unk_0;
EnSkj* skullkid; EnSkj* skullkid;
} EnSkjUnkStruct; } EnSkjUnkStruct;
@ -370,7 +370,7 @@ void EnSkj_Init(Actor* thisx, GlobalContext* globalCtx2) {
Actor_ProcessInitChain(thisx, sInitChain); Actor_ProcessInitChain(thisx, sInitChain);
switch (type) { switch (type) {
case 5: // Invisible on the small stump (sarias song)) case 5: // Invisible on the small stump (sarias song))
sSmallStumpSkullKid.unk0 = 1; sSmallStumpSkullKid.unk_0 = 1;
sSmallStumpSkullKid.skullkid = (EnSkj*)thisx; sSmallStumpSkullKid.skullkid = (EnSkj*)thisx;
this->actor.destroy = NULL; this->actor.destroy = NULL;
this->actor.draw = NULL; this->actor.draw = NULL;
@ -381,7 +381,7 @@ void EnSkj_Init(Actor* thisx, GlobalContext* globalCtx2) {
break; break;
case 6: // Invisible on the short stump (ocarina game) case 6: // Invisible on the short stump (ocarina game)
sSmallStumpSkullKid.unk0 = 1; sSmallStumpSkullKid.unk_0 = 1;
sSmallStumpSkullKid.skullkid = (EnSkj*)thisx; sSmallStumpSkullKid.skullkid = (EnSkj*)thisx;
this->actor.destroy = NULL; this->actor.destroy = NULL;
this->actor.draw = NULL; this->actor.draw = NULL;
@ -420,7 +420,7 @@ void EnSkj_Init(Actor* thisx, GlobalContext* globalCtx2) {
if ((type > 0) && (type < 3)) { if ((type > 0) && (type < 3)) {
this->actor.targetMode = 7; this->actor.targetMode = 7;
this->posCopy = this->actor.world.pos; this->posCopy = this->actor.world.pos;
sOcarinaMinigameSkullKids[type - 1].unk0 = 1; sOcarinaMinigameSkullKids[type - 1].unk_0 = 1;
sOcarinaMinigameSkullKids[type - 1].skullkid = this; sOcarinaMinigameSkullKids[type - 1].skullkid = this;
this->minigameState = 0; this->minigameState = 0;
this->alpha = 0; this->alpha = 0;
@ -714,7 +714,7 @@ void EnSkj_SariasSongKidIdle(EnSkj* this, GlobalContext* globalCtx) {
if (!(gSaveContext.itemGetInf[1] & 0x40) && (this->actor.xzDistToPlayer < 200.0f)) { if (!(gSaveContext.itemGetInf[1] & 0x40) && (this->actor.xzDistToPlayer < 200.0f)) {
this->backflipFlag = 1; this->backflipFlag = 1;
EnSkj_Backflip(this); EnSkj_Backflip(this);
} else if (sSmallStumpSkullKid.unk0 != 0) { } else if (sSmallStumpSkullKid.unk_0 != 0) {
Player* player = GET_PLAYER(globalCtx); Player* player = GET_PLAYER(globalCtx);
if (EnSkj_RangeCheck(player, sSmallStumpSkullKid.skullkid)) { if (EnSkj_RangeCheck(player, sSmallStumpSkullKid.skullkid)) {
EnSkj_SetupWaitInRange(this); EnSkj_SetupWaitInRange(this);
@ -1222,7 +1222,7 @@ void EnSkj_OcarinaGameWaitForPlayer(EnSkj* this, GlobalContext* globalCtx) {
s32 EnSkj_IsLeavingGame(EnSkj* this) { s32 EnSkj_IsLeavingGame(EnSkj* this) {
s32 paramDecr = this->actor.params - 1; s32 paramDecr = this->actor.params - 1;
if (sOcarinaMinigameSkullKids[paramDecr].unk0 == 2) { if (sOcarinaMinigameSkullKids[paramDecr].unk_0 == 2) {
EnSkj_SetupLeaveOcarinaGame(this); EnSkj_SetupLeaveOcarinaGame(this);
return true; return true;
} }
@ -1275,7 +1275,7 @@ void EnSkj_SetupLeaveOcarinaGame(EnSkj* this) {
void EnSkj_LeaveOcarinaGame(EnSkj* this, GlobalContext* globalCtx) { void EnSkj_LeaveOcarinaGame(EnSkj* this, GlobalContext* globalCtx) {
s32 paramsDecr = this->actor.params - 1; s32 paramsDecr = this->actor.params - 1;
sOcarinaMinigameSkullKids[paramsDecr].unk0 = 0; sOcarinaMinigameSkullKids[paramsDecr].unk_0 = 0;
sOcarinaMinigameSkullKids[paramsDecr].skullkid = NULL; sOcarinaMinigameSkullKids[paramsDecr].skullkid = NULL;
this->backflipFlag = 1; this->backflipFlag = 1;
EnSkj_Backflip(this); EnSkj_Backflip(this);
@ -1561,15 +1561,15 @@ void EnSkj_FinishOcarinaGameRound(EnSkj* this, GlobalContext* globalCtx) {
void EnSkj_CleanupOcarinaGame(EnSkj* this, GlobalContext* globalCtx) { void EnSkj_CleanupOcarinaGame(EnSkj* this, GlobalContext* globalCtx) {
if (sOcarinaMinigameSkullKids[SKULL_KID_LEFT].skullkid != NULL) { if (sOcarinaMinigameSkullKids[SKULL_KID_LEFT].skullkid != NULL) {
sOcarinaMinigameSkullKids[SKULL_KID_LEFT].unk0 = 2; sOcarinaMinigameSkullKids[SKULL_KID_LEFT].unk_0 = 2;
} }
if (sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].skullkid != NULL) { if (sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].skullkid != NULL) {
sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].unk0 = 2; sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].unk_0 = 2;
} }
if ((sOcarinaMinigameSkullKids[SKULL_KID_LEFT].unk0 == 2) && if ((sOcarinaMinigameSkullKids[SKULL_KID_LEFT].unk_0 == 2) &&
(sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].unk0 == 2)) { (sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].unk_0 == 2)) {
func_800F5C2C(); func_800F5C2C();
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
} }

View file

@ -110,9 +110,9 @@ static DamageTable sDamageTable = {
}; };
static InitChainEntry sInitChain[] = { static InitChainEntry sInitChain[] = {
ICHAIN_S8(naviEnemyId, 0x30, 1), ICHAIN_S8(naviEnemyId, 0x30, ICHAIN_CONTINUE),
ICHAIN_F32(targetArrowOffset, 5500, 1), ICHAIN_F32(targetArrowOffset, 5500, ICHAIN_CONTINUE),
ICHAIN_F32_DIV1000(gravity, -1500, 0), ICHAIN_F32_DIV1000(gravity, -1500, ICHAIN_STOP),
}; };
void EnWallmas_Init(Actor* thisx, GlobalContext* globalCtx) { void EnWallmas_Init(Actor* thisx, GlobalContext* globalCtx) {

View file

@ -115,9 +115,9 @@ void ObjLift_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_SetScale(&this->dyna.actor, sScales[(this->dyna.actor.params >> 1) & 1]); Actor_SetScale(&this->dyna.actor, sScales[(this->dyna.actor.params >> 1) & 1]);
Actor_ProcessInitChain(&this->dyna.actor, sInitChain); Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
this->unk168.x = Rand_ZeroOne() * 65535.5f; this->unk_168.x = Rand_ZeroOne() * 65535.5f;
this->unk168.y = Rand_ZeroOne() * 65535.5f; this->unk_168.y = Rand_ZeroOne() * 65535.5f;
this->unk168.z = Rand_ZeroOne() * 65535.5f; this->unk_168.z = Rand_ZeroOne() * 65535.5f;
func_80B9651C(this); func_80B9651C(this);
osSyncPrintf("(Dungeon Lift)(arg_data 0x%04x)\n", this->dyna.actor.params); osSyncPrintf("(Dungeon Lift)(arg_data 0x%04x)\n", this->dyna.actor.params);
} }
@ -163,16 +163,16 @@ void func_80B96678(ObjLift* this, GlobalContext* globalCtx) {
if (this->timer <= 0) { if (this->timer <= 0) {
func_80B967C0(this); func_80B967C0(this);
} else { } else {
this->unk168.x += 10000; this->unk_168.x += 10000;
this->dyna.actor.world.rot.x = (s16)(Math_SinS(this->unk168.x) * 300.0f) + this->dyna.actor.home.rot.x; this->dyna.actor.world.rot.x = (s16)(Math_SinS(this->unk_168.x) * 300.0f) + this->dyna.actor.home.rot.x;
this->dyna.actor.world.rot.z = (s16)(Math_CosS(this->unk168.x) * 300.0f) + this->dyna.actor.home.rot.z; this->dyna.actor.world.rot.z = (s16)(Math_CosS(this->unk_168.x) * 300.0f) + this->dyna.actor.home.rot.z;
this->dyna.actor.shape.rot.x = this->dyna.actor.world.rot.x; this->dyna.actor.shape.rot.x = this->dyna.actor.world.rot.x;
this->dyna.actor.shape.rot.z = this->dyna.actor.world.rot.z; this->dyna.actor.shape.rot.z = this->dyna.actor.world.rot.z;
this->unk168.y += 18000; this->unk_168.y += 18000;
this->dyna.actor.world.pos.y = Math_SinS(this->unk168.y) + this->dyna.actor.home.pos.y; this->dyna.actor.world.pos.y = Math_SinS(this->unk_168.y) + this->dyna.actor.home.pos.y;
this->unk168.z += 18000; this->unk_168.z += 18000;
this->dyna.actor.world.pos.x = Math_SinS(this->unk168.z) * 3.0f + this->dyna.actor.home.pos.x; this->dyna.actor.world.pos.x = Math_SinS(this->unk_168.z) * 3.0f + this->dyna.actor.home.pos.x;
this->dyna.actor.world.pos.z = Math_CosS(this->unk168.z) * 3.0f + this->dyna.actor.home.pos.z; this->dyna.actor.world.pos.z = Math_CosS(this->unk_168.z) * 3.0f + this->dyna.actor.home.pos.z;
} }
if ((this->timer & 3) == 3) { if ((this->timer & 3) == 3) {

View file

@ -11,7 +11,7 @@ typedef void (*ObjLiftActionFunc)(struct ObjLift*, GlobalContext*);
typedef struct ObjLift { typedef struct ObjLift {
/* 0x0000 */ DynaPolyActor dyna; /* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ ObjLiftActionFunc actionFunc; /* 0x0164 */ ObjLiftActionFunc actionFunc;
/* 0x0168 */ Vec3s unk168; /* 0x0168 */ Vec3s unk_168;
/* 0x016E */ s16 timer; /* 0x016E */ s16 timer;
} ObjLift; // size = 0x0170 } ObjLift; // size = 0x0170

View file

@ -9066,7 +9066,7 @@ void func_80846A68(GlobalContext* globalCtx, Player* this) {
this->stateFlags1 |= PLAYER_STATE1_29; this->stateFlags1 |= PLAYER_STATE1_29;
} }
static InitChainEntry D_80854708[] = { static InitChainEntry sInitChain[] = {
ICHAIN_F32(targetArrowOffset, 500, ICHAIN_STOP), ICHAIN_F32(targetArrowOffset, 500, ICHAIN_STOP),
}; };
@ -9079,7 +9079,7 @@ static Vec3s D_80854730 = { -57, 3377, 0 };
void Player_InitCommon(Player* this, GlobalContext* globalCtx, FlexSkeletonHeader* skelHeader) { void Player_InitCommon(Player* this, GlobalContext* globalCtx, FlexSkeletonHeader* skelHeader) {
this->ageProperties = &sAgeProperties[gSaveContext.linkAge]; this->ageProperties = &sAgeProperties[gSaveContext.linkAge];
Actor_ProcessInitChain(&this->actor, D_80854708); Actor_ProcessInitChain(&this->actor, sInitChain);
this->meleeWeaponEffectIndex = TOTAL_EFFECT_COUNT; this->meleeWeaponEffectIndex = TOTAL_EFFECT_COUNT;
this->currentYaw = this->actor.world.rot.y; this->currentYaw = this->actor.world.rot.y;
func_80834644(globalCtx, this); func_80834644(globalCtx, this);