Small Misc fix cleanups (#1797)

* MapDisp_AllocDungeonMap

* func_80B833C4

* func_80ABD92C

* EnFirefly comment offsets
This commit is contained in:
Derek Hensley 2025-02-21 17:24:51 -08:00 committed by GitHub
parent 8d9750652e
commit a96c93d936
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 27 additions and 33 deletions

View File

@ -1174,7 +1174,7 @@ void* MapDisp_AllocDungeonMap(PlayState* play, void* heap) {
if (!foundTexture) { if (!foundTexture) {
sPauseDungeonMap.roomSprite[sceneRoomIter] = NULL; sPauseDungeonMap.roomSprite[sceneRoomIter] = NULL;
} else { } else {
void* dummy = sPauseDungeonMap.mapI_roomTextures[dungeonMapRoomIter]; //! FAKE: s32 requiredScopeTemp;
sPauseDungeonMap.roomSprite[sceneRoomIter] = sPauseDungeonMap.mapI_roomTextures[dungeonMapRoomIter]; sPauseDungeonMap.roomSprite[sceneRoomIter] = sPauseDungeonMap.mapI_roomTextures[dungeonMapRoomIter];
} }

View File

@ -566,7 +566,7 @@ void func_80B833A8(BgDblueBalance* this) {
} }
void func_80B833C4(BgDblueBalance* this, PlayState* play) { void func_80B833C4(BgDblueBalance* this, PlayState* play) {
s32 pad; Actor* thisx = &this->dyna.actor;
s32 sp28 = false; s32 sp28 = false;
s16 sp26; s16 sp26;
s16 sp24; s16 sp24;
@ -585,12 +585,9 @@ void func_80B833C4(BgDblueBalance* this, PlayState* play) {
this->unk_187 = Math_StepToS(&this->unk_178, 0x1F4, 5); this->unk_187 = Math_StepToS(&this->unk_178, 0x1F4, 5);
} }
sp26 = this->dyna.actor.shape.rot.x; sp26 = thisx->shape.rot.x;
this->dyna.actor.shape.rot.x += this->unk_178; thisx->shape.rot.x += this->unk_178;
sp24 = this->dyna.actor.shape.rot.x; sp24 = thisx->shape.rot.x;
//! FAKE:
if (sp24) {}
if (this->isSwitchFlagSet) { if (this->isSwitchFlagSet) {
if (this->unk_186 != 0) { if (this->unk_186 != 0) {
@ -611,7 +608,7 @@ void func_80B833C4(BgDblueBalance* this, PlayState* play) {
func_80B8264C(this); func_80B8264C(this);
if (sp28) { if (sp28) {
this->dyna.actor.shape.rot.x = this->unk_184; thisx->shape.rot.x = this->unk_184;
func_80B83344(this); func_80B83344(this);
} }
} }

View File

@ -56,37 +56,34 @@ void BgHakuginElvpole_Destroy(Actor* thisx, PlayState* play) {
} }
void func_80ABD92C(BgHakuginElvpole* this, PlayState* play) { void func_80ABD92C(BgHakuginElvpole* this, PlayState* play) {
s32 pad; Actor* thisx = &this->dyna.actor;
s32 sp28 = false; s32 sp28 = false;
f32 var_fv1; f32 var_fv1;
if (this->unk_15E > 0) { if (this->unk_15E > 0) {
if ((this->dyna.actor.world.pos.y - this->dyna.actor.home.pos.y) < -120.0f) { if ((thisx->world.pos.y - thisx->home.pos.y) < -120.0f) {
this->dyna.actor.world.pos.y += 4.0f; thisx->world.pos.y += 4.0f;
sp28 = true; sp28 = true;
} else if (this->unk_15E > 0) { } else if (this->unk_15E > 0) {
if (this->unk_15E == 100) { if (this->unk_15E == 100) {
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP); Actor_PlaySfx(thisx, NA_SE_EV_STONEDOOR_STOP);
} }
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 120.0f; thisx->world.pos.y = thisx->home.pos.y - 120.0f;
//! FAKE:
if (1) {}
this->unk_15E--; this->unk_15E--;
} }
} else if (this->unk_15E == 0) { } else if (this->unk_15E == 0) {
if ((this->dyna.actor.world.pos.y - this->dyna.actor.home.pos.y) > -320.0f) { if ((thisx->world.pos.y - thisx->home.pos.y) > -320.0f) {
this->dyna.actor.world.pos.y -= 4.0f; thisx->world.pos.y -= 4.0f;
sp28 = true; sp28 = true;
} else { } else {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 320.0f; thisx->world.pos.y = thisx->home.pos.y - 320.0f;
Flags_UnsetSwitch(play, BGHAKUGINELVPOLE_GET_SWITCH_FLAG(&this->dyna.actor)); Flags_UnsetSwitch(play, BGHAKUGINELVPOLE_GET_SWITCH_FLAG(thisx));
this->unk_15E = -1; this->unk_15E = -1;
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP); Actor_PlaySfx(thisx, NA_SE_EV_STONEDOOR_STOP);
} }
} else if ((BGHAKUGINELVPOLE_GET_SWITCH_FLAG(&this->dyna.actor) != 0x7F) && } else if ((BGHAKUGINELVPOLE_GET_SWITCH_FLAG(thisx) != 0x7F) &&
Flags_GetSwitch(play, BGHAKUGINELVPOLE_GET_SWITCH_FLAG(&this->dyna.actor))) { Flags_GetSwitch(play, BGHAKUGINELVPOLE_GET_SWITCH_FLAG(thisx))) {
this->unk_15E = 0x64; this->unk_15E = 0x64;
this->unk_160 = true; this->unk_160 = true;
} }
@ -98,23 +95,23 @@ void func_80ABD92C(BgHakuginElvpole* this, PlayState* play) {
var_fv1 = -1.0f; var_fv1 = -1.0f;
} }
this->unk_15C++; this->unk_15C++;
this->dyna.actor.world.pos.x = (Math_SinS(this->unk_15C * 0x2000) * var_fv1) + this->dyna.actor.home.pos.x; thisx->world.pos.x = (Math_SinS(this->unk_15C * 0x2000) * var_fv1) + thisx->home.pos.x;
this->dyna.actor.world.pos.z = (Math_CosS(this->unk_15C * 0x2000) * var_fv1) + this->dyna.actor.home.pos.z; thisx->world.pos.z = (Math_CosS(this->unk_15C * 0x2000) * var_fv1) + thisx->home.pos.z;
Actor_PlaySfx_Flagged(&this->dyna.actor, NA_SE_EV_PLATE_LIFT_LEVEL - SFX_FLAG); Actor_PlaySfx_Flagged(thisx, NA_SE_EV_PLATE_LIFT_LEVEL - SFX_FLAG);
} else { } else {
this->unk_15C = 0; this->unk_15C = 0;
} }
if (this->unk_160) { if (this->unk_160) {
if (this->dyna.actor.csId == CS_ID_NONE) { if (thisx->csId == CS_ID_NONE) {
this->unk_160 = false; this->unk_160 = false;
return; return;
} else if (CutsceneManager_IsNext(this->dyna.actor.csId)) { } else if (CutsceneManager_IsNext(thisx->csId)) {
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor); CutsceneManager_StartWithPlayerCs(thisx->csId, thisx);
this->unk_160 = false; this->unk_160 = false;
return; return;
} }
CutsceneManager_Queue(this->dyna.actor.csId); CutsceneManager_Queue(thisx->csId);
} }
} }

View File

@ -39,8 +39,8 @@ typedef struct EnFirefly {
/* 0x23C */ Vec3s morphTable[FIRE_KEESE_LIMB_MAX]; /* 0x23C */ Vec3s morphTable[FIRE_KEESE_LIMB_MAX];
/* 0x2E4 */ f32 maxAltitude; /* 0x2E4 */ f32 maxAltitude;
/* 0x2E8 */ f32 drawDmgEffAlpha; /* 0x2E8 */ f32 drawDmgEffAlpha;
/* 0x2E8 */ f32 drawDmgEffScale; /* 0x2EC */ f32 drawDmgEffScale;
/* 0x2E8 */ f32 drawDmgEffFrozenSteamScale; /* 0x2F0 */ f32 drawDmgEffFrozenSteamScale;
/* 0x2F4 */ u32 lastDrawnFrame; /* 0x2F4 */ u32 lastDrawnFrame;
/* 0x2F8 */ Vec3f bodyPartsPos[KEESE_BODYPART_MAX]; /* 0x2F8 */ Vec3f bodyPartsPos[KEESE_BODYPART_MAX];
/* 0x31C */ ColliderSphere collider; /* 0x31C */ ColliderSphere collider;