Fix array size in bom_bowl_man (#1541)

* make array larger

* Better fix

* Update z_en_bom_bowl_man.c

* format
This commit is contained in:
louist103 2024-01-29 00:03:19 -05:00 committed by GitHub
parent db8f5f5ccc
commit 0729b150a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 8 deletions

View File

@ -237,16 +237,16 @@ void func_809C4BC4(EnBomBowlMan* this, PlayState* play) {
code = gSaveContext.save.saveInfo.bomberCode[i]; code = gSaveContext.save.saveInfo.bomberCode[i];
if (code == 1) { if (code == 1) {
Math_Vec3f_Copy(&this->actor.world.pos, &D_809C61A0[i]); Math_Vec3f_Copy(&this->actor.world.pos, &D_809C61A0[i]);
this->unk_2D8[code] = this; this->unk_2DC[code - 1] = this;
} else { } else {
Math_Vec3f_Copy(&sp7C, &D_809C61A0[i]); Math_Vec3f_Copy(&sp7C, &D_809C61A0[i]);
bomBowlMan = (EnBomBowlMan*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_BOM_BOWL_MAN, bomBowlMan = (EnBomBowlMan*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_BOM_BOWL_MAN,
sp7C.x, sp7C.y, sp7C.z, 0, this->actor.world.rot.y, 0, code); sp7C.x, sp7C.y, sp7C.z, 0, this->actor.world.rot.y, 0, code);
if (bomBowlMan != NULL) { if (bomBowlMan != NULL) {
if (i == 2) { if (i == 2) {
this->unk_2D8[0] = bomBowlMan; this->unk_2D8 = bomBowlMan;
} }
this->unk_2D8[code] = bomBowlMan; this->unk_2DC[code - 1] = bomBowlMan;
} }
} }
} }
@ -308,7 +308,7 @@ void func_809C4DA4(EnBomBowlMan* this, PlayState* play) {
this->unk_2C0 = 1; this->unk_2C0 = 1;
D_809C6104 = 1; D_809C6104 = 1;
Camera_SetTargetActor(Play_GetCamera(play, CutsceneManager_GetCurrentSubCamId(this->csId1)), Camera_SetTargetActor(Play_GetCamera(play, CutsceneManager_GetCurrentSubCamId(this->csId1)),
&this->unk_2D8[0]->actor); &this->unk_2D8->actor);
this->unk_2D4 = 0; this->unk_2D4 = 0;
this->unk_2BC = 10; this->unk_2BC = 10;
EnBomBowlMan_ChangeAnim(this, ENBOMBOWLMAN_ANIM_17, 1.0f); EnBomBowlMan_ChangeAnim(this, ENBOMBOWLMAN_ANIM_17, 1.0f);
@ -642,7 +642,7 @@ void func_809C5BF4(EnBomBowlMan* this, PlayState* play) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
Message_CloseTextbox(play); Message_CloseTextbox(play);
Camera_SetTargetActor(subCam, &this->unk_2D8[0]->actor); Camera_SetTargetActor(subCam, &this->unk_2D8->actor);
EnBomBowlMan_ChangeAnim(this, ENBOMBOWLMAN_ANIM_13, 1.0f); EnBomBowlMan_ChangeAnim(this, ENBOMBOWLMAN_ANIM_13, 1.0f);
D_809C6100 = 0; D_809C6100 = 0;
if (player->transformation == PLAYER_FORM_HUMAN) { if (player->transformation == PLAYER_FORM_HUMAN) {
@ -657,7 +657,7 @@ void func_809C5BF4(EnBomBowlMan* this, PlayState* play) {
} else { } else {
s32 idx = D_809C6100 - 1; s32 idx = D_809C6100 - 1;
Camera_SetTargetActor(subCam, &this->unk_2D8[1 + idx]->actor); Camera_SetTargetActor(subCam, &this->unk_2DC[idx]->actor);
} }
} }
} }

View File

@ -49,8 +49,8 @@ typedef struct EnBomBowlMan {
/* 0x2D2 */ s16 csId2; /* 0x2D2 */ s16 csId2;
/* 0x2D4 */ s16 unk_2D4; /* 0x2D4 */ s16 unk_2D4;
/* 0x2D6 */ s16 csId3; /* 0x2D6 */ s16 csId3;
/* 0x2D8 */ struct EnBomBowlMan* unk_2D8[5]; /* 0x2D8 */ struct EnBomBowlMan* unk_2D8;
/* 0x2EC */ UNK_TYPE1 unk2EC[0x4]; /* 0x2DC */ struct EnBomBowlMan* unk_2DC[5];
/* 0x2F0 */ s16 unk_2F0; /* 0x2F0 */ s16 unk_2F0;
/* 0x2F2 */ s16 unk_2F2; /* 0x2F2 */ s16 unk_2F2;
/* 0x2F4 */ s16 unk_2F4; /* 0x2F4 */ s16 unk_2F4;