summaryrefslogtreecommitdiff
path: root/src/overlays
diff options
context:
space:
mode:
Diffstat (limited to 'src/overlays')
-rw-r--r--src/overlays/actors/ovl_En_Dnh/z_en_dnh.c2
-rw-r--r--src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c2
-rw-r--r--src/overlays/actors/ovl_En_Test3/z_en_test3.c10
-rw-r--r--src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c6
-rw-r--r--src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c2
5 files changed, 13 insertions, 9 deletions
diff --git a/src/overlays/actors/ovl_En_Dnh/z_en_dnh.c b/src/overlays/actors/ovl_En_Dnh/z_en_dnh.c
index c2c08bfe6..88c049633 100644
--- a/src/overlays/actors/ovl_En_Dnh/z_en_dnh.c
+++ b/src/overlays/actors/ovl_En_Dnh/z_en_dnh.c
@@ -110,7 +110,7 @@ s32 func_80A50E40(EnDnh* this, PlayState* play) {
return 1;
}
-s32 func_80A50EC0(EnDnh* this) {
+void func_80A50EC0(EnDnh* this) {
if (DECR(this->blinkTimer) == 0) {
this->eyeTexIndex++;
if (this->eyeTexIndex >= ARRAY_COUNT(sEyeTextures)) {
diff --git a/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c b/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c
index c667753e6..3993a9c91 100644
--- a/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c
+++ b/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c
@@ -261,6 +261,8 @@ void func_80BB6BD8(EnTanron2* this, PlayState* play) {
}
break;
}
+
+ //! @bug: sp32 may be used uninitialized
Matrix_RotateYS(sp32, MTXMODE_NEW);
Matrix_MultVecZ(this->actor.speed, &this->actor.velocity);
this->actor.velocity.y = Rand_ZeroFloat(5.0f) + 12.0f;
diff --git a/src/overlays/actors/ovl_En_Test3/z_en_test3.c b/src/overlays/actors/ovl_En_Test3/z_en_test3.c
index 4fa177013..5386d415e 100644
--- a/src/overlays/actors/ovl_En_Test3/z_en_test3.c
+++ b/src/overlays/actors/ovl_En_Test3/z_en_test3.c
@@ -274,7 +274,7 @@ s32 D_80A41D5C;
s32 D_80A41D60;
s32 D_80A41D64;
s32 D_80A41D68;
-Vec3f* D_80A41D6C;
+Vec3f* sKafeiCurBodyPartPos;
s32 func_80A3E7E0(EnTest3* this, EnTest3ActionFunc actionFunc) {
if (actionFunc == this->unk_D94) {
@@ -1098,7 +1098,7 @@ s32 EnTest3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
EnTest3* this = THIS;
if (limbIndex == KAFEI_LIMB_ROOT) {
- D_80A41D6C = &this->player.bodyPartsPos[-1];
+ sKafeiCurBodyPartPos = &this->player.bodyPartsPos[0] - 1;
if (!(this->player.skelAnime.moveFlags & ANIM_FLAG_4) || (this->player.skelAnime.moveFlags & ANIM_FLAG_1)) {
pos->x *= this->player.ageProperties->unk_08;
pos->z *= this->player.ageProperties->unk_08;
@@ -1118,7 +1118,7 @@ s32 EnTest3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
}
} else {
if (*dList != NULL) {
- D_80A41D6C++;
+ sKafeiCurBodyPartPos++;
}
if (D_80A418C8) {
*dList = NULL;
@@ -1153,13 +1153,13 @@ void EnTest3_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList1, Gfx** dL
EnTest3* this = THIS;
if (*dList2 != NULL) {
- Matrix_MultZero(D_80A41D6C);
+ Matrix_MultZero(sKafeiCurBodyPartPos);
}
if (limbIndex == KAFEI_LIMB_LEFT_HAND) {
MtxF curMtxF;
Actor* leftHandActor;
- Math_Vec3f_Copy(&this->player.leftHandWorld.pos, D_80A41D6C);
+ Math_Vec3f_Copy(&this->player.leftHandWorld.pos, sKafeiCurBodyPartPos);
if (*dList1 != NULL) {
func_80128640(play, &this->player, *dList1);
if (this->player.stateFlags3 & PLAYER_STATE3_20000000) {
diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c b/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c
index 9ec0a396f..fa1edaf6b 100644
--- a/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c
+++ b/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c
@@ -2452,9 +2452,9 @@ void FileSelect_InitContext(GameState* thisx) {
this->nameBoxAlpha[2] = this->nameAlpha[0] = this->nameAlpha[1] = this->nameAlpha[2] =
this->connectorAlpha[0] = this->connectorAlpha[1] = this->connectorAlpha[2] = this->fileInfoAlpha[0] =
this->fileInfoAlpha[1] = this->fileInfoAlpha[2] = this->actionButtonAlpha[FS_BTN_ACTION_COPY] =
- this->actionButtonAlpha[FS_BTN_ACTION_ERASE] = this->actionButtonAlpha[2] =
- this->actionButtonAlpha[3] = this->optionButtonAlpha = this->nameEntryBoxAlpha =
- this->controlsAlpha = this->emptyFileTextAlpha = 0;
+ this->actionButtonAlpha[FS_BTN_ACTION_ERASE] = this->confirmButtonAlpha[FS_BTN_CONFIRM_YES] =
+ this->confirmButtonAlpha[FS_BTN_CONFIRM_QUIT] = this->optionButtonAlpha =
+ this->nameEntryBoxAlpha = this->controlsAlpha = this->emptyFileTextAlpha = 0;
this->windowPosX = 6;
this->actionTimer = 4;
diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c b/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c
index e61512695..005fc7eb9 100644
--- a/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c
+++ b/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.c
@@ -1027,6 +1027,8 @@ void FileSelect_DrawOptionsImpl(GameState* thisx) {
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
}
+ //! @bug the gOptionsMenuHeaders usage here will produce an OoB read for i == 5. It reads the first element of
+ //! `gOptionsMenuSettings`
gDPLoadTextureBlock(POLY_OPA_DISP++, gOptionsMenuSettings[i].texture, G_IM_FMT_IA, G_IM_SIZ_8b,
gOptionsMenuSettings[i].width, gOptionsMenuHeaders[i].height, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);