summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Javier Asenjo Nitti <alejandro.asenjo88@gmail.com>2023-11-06 15:33:24 -0300
committerAlejandro Javier Asenjo Nitti <alejandro.asenjo88@gmail.com>2023-11-06 15:33:24 -0300
commitbcc9e17a4a6aa99b8d1a7f7c2bb8b5d3033662d2 (patch)
tree56790160bf95790dd49ad8a6a922b57db52930b2
parenta296c79b47009a70c556bff3dbb77f31aa792ee3 (diff)
FileSelect_SetWindowContentVtx matching
-rw-r--r--spec6
-rw-r--r--src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.c40
2 files changed, 16 insertions, 30 deletions
diff --git a/spec b/spec
index 3e9500362..d8b75426c 100644
--- a/spec
+++ b/spec
@@ -646,11 +646,7 @@ beginseg
include "build/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.o"
include "build/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.o"
include "build/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.o"
- #ifdef NON_MATCHING
- include "build/src/overlays/gamestates/ovl_file_choose/ovl_file_choose_reloc.o"
- #else
- include "build/data/ovl_file_choose/ovl_file_choose.reloc.o"
- #endif
+ include "build/src/overlays/gamestates/ovl_file_choose/ovl_file_choose_reloc.o"
endseg
beginseg
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 3957466b1..113cd19c1 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
@@ -659,22 +659,19 @@ s16 D_80814650[] = { 940, 944 };
* fileSelect->windowContentVtx[956] -> Warning labels
*/
-#ifdef NON_MATCHING
-// regalloc at the beginning is fixed by removing FAKE: labelled code
void FileSelect_SetWindowContentVtx(GameState* thisx) {
FileSelectState* this = (FileSelectState*)thisx;
u16 vtxId;
s16 j;
- s16 index;
+ s16 i;
s16 spAC;
- s16 i; // a3
u16 spA4[3];
u16* ptr;
- s32 posY; // sp9C
- s32 relPosY; // sp98
+ s32 posY;
+ s32 relPosY;
s32 tempPosY;
- s32 posX; // s1
- s32 temp_t5;
+ s32 posX;
+ s32 index;
this->windowContentVtx = GRAPH_ALLOC(this->state.gfxCtx, 960 * sizeof(Vtx));
@@ -696,9 +693,6 @@ void FileSelect_SetWindowContentVtx(GameState* thisx) {
this->windowContentVtx[vtxId + 0].v.ob[2] = this->windowContentVtx[vtxId + 1].v.ob[2] =
this->windowContentVtx[vtxId + 2].v.ob[2] = this->windowContentVtx[vtxId + 3].v.ob[2] = 0;
- //! FAKE:
- if (index && index && index) {}
-
// flag
this->windowContentVtx[vtxId + 0].v.flag = this->windowContentVtx[vtxId + 1].v.flag =
this->windowContentVtx[vtxId + 2].v.flag = this->windowContentVtx[vtxId + 3].v.flag = 0;
@@ -1193,7 +1187,7 @@ void FileSelect_SetWindowContentVtx(GameState* thisx) {
/* Time Digits */
posX += 6;
- temp_t5 = vtxId;
+ index = vtxId;
for (i = 0; i < 5; i++, vtxId += 4, posX += 8) {
@@ -1220,17 +1214,17 @@ void FileSelect_SetWindowContentVtx(GameState* thisx) {
}
// Adjust the colon to the right
- this->windowContentVtx[temp_t5 + 8].v.ob[0] = this->windowContentVtx[temp_t5 + 10].v.ob[0] =
- this->windowContentVtx[temp_t5 + 8].v.ob[0] + 3;
+ this->windowContentVtx[index + 8].v.ob[0] = this->windowContentVtx[index + 10].v.ob[0] =
+ this->windowContentVtx[index + 8].v.ob[0] + 3;
- this->windowContentVtx[temp_t5 + 9].v.ob[0] = this->windowContentVtx[temp_t5 + 11].v.ob[0] =
- this->windowContentVtx[temp_t5 + 8].v.ob[0] + 0xC;
+ this->windowContentVtx[index + 9].v.ob[0] = this->windowContentVtx[index + 11].v.ob[0] =
+ this->windowContentVtx[index + 8].v.ob[0] + 0xC;
- this->windowContentVtx[temp_t5 + 0x1C].v.ob[0] = this->windowContentVtx[temp_t5 + 0x1E].v.ob[0] =
- this->windowContentVtx[temp_t5 + 8].v.ob[0] + 1;
+ this->windowContentVtx[index + 0x1C].v.ob[0] = this->windowContentVtx[index + 0x1E].v.ob[0] =
+ this->windowContentVtx[index + 8].v.ob[0] + 1;
- this->windowContentVtx[temp_t5 + 0x1D].v.ob[0] = this->windowContentVtx[temp_t5 + 0x1F].v.ob[0] =
- this->windowContentVtx[temp_t5 + 0x1C].v.ob[0] + 0xC;
+ this->windowContentVtx[index + 0x1D].v.ob[0] = this->windowContentVtx[index + 0x1F].v.ob[0] =
+ this->windowContentVtx[index + 0x1C].v.ob[0] + 0xC;
vtxId += 20;
}
@@ -1312,10 +1306,6 @@ void FileSelect_SetWindowContentVtx(GameState* thisx) {
this->windowContentVtx[vtxId + 5].v.tc[0] = this->windowContentVtx[vtxId + 7].v.tc[0] = 0x1000;
}
-#else
-void FileSelect_SetWindowContentVtx(GameState* thisx);
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/FileSelect_SetWindowContentVtx.s")
-#endif
u16 D_80814654[] = {
0x88,
@@ -2051,7 +2041,7 @@ void FileSelect_ConfirmFile(GameState* thisx) {
Audio_PlaySfx(NA_SE_SY_FSEL_DECIDE_L);
this->selectMode = SM_FADE_OUT;
Audio_MuteAllSeqExceptSystemAndOcarina(15);
- } else { // FS_BTN_CONFIRM_QUIT
+ } else { // FS_BTN_CONFIRM_QUIT
Audio_PlaySfx(NA_SE_SY_FSEL_CLOSE);
this->selectMode++; // SM_FADE_OUT_FILE_INFO
}