Decompile dhudResetPos

This commit is contained in:
Ryan Dwyer
2021-10-28 18:27:20 +10:00
parent a10bad36b6
commit 456d2985d9
4 changed files with 19 additions and 30 deletions
+2 -2
View File
@@ -528,7 +528,7 @@ bool debugProcessInput(s8 stickx, s8 sticky, u16 buttons, u16 buttonsthisframe)
if (dmenuGetSelectedOption() == 0) {
// Selected "main" from cutscene menu
g_DebugCurMenu = DEBUGMENU_MAIN;
dhudClear();
dhudReset();
debugUpdateMenu();
} else {
cutsceneStart(0xc00 + dmenuGetSelectedOption() - 1);
@@ -601,7 +601,7 @@ bool debugProcessInput(s8 stickx, s8 sticky, u16 buttons, u16 buttonsthisframe)
if (buttonsthisframe & START_BUTTON) {
if (g_DebugIsMenuOpen == true) {
dhudClear();
dhudReset();
}
g_DebugIsMenuOpen = false;
+2 -2
View File
@@ -6,8 +6,8 @@
void dhud00014154nb(s32 x, s32 y, char c);
void dhudInit(void);
void dhudTryClear(void);
void dhudClear(void);
void dhudTryReset(void);
void dhudReset(void);
void dhudSetPos(s32 x, s32 y);
void dhudPrintChar(u8 c);
void dhudPrintString(char *text);
+11 -22
View File
@@ -324,11 +324,11 @@ glabel dhudInit
);
#endif
void dhudTryClear(void)
void dhudTryReset(void)
{
#if VERSION < VERSION_NTSC_1_0
if (g_DHudInitialised) {
dhudClear();
dhudReset();
}
#endif
}
@@ -439,28 +439,17 @@ glabel dhud00014154nb
#endif
#if VERSION < VERSION_NTSC_1_0
GLOBAL_ASM(
glabel dhud0001429cnb
/* 1429c: 3c0e8006 */ lui $t6,0x8006
/* 142a0: 8dce117c */ lw $t6,0x117c($t6)
/* 142a4: 3c0f8006 */ lui $t7,0x8006
/* 142a8: 3c018006 */ lui $at,0x8006
/* 142ac: 11c00007 */ beqz $t6,.NB000142cc
/* 142b0: 00000000 */ sll $zero,$zero,0x0
/* 142b4: 8def1168 */ lw $t7,0x1168($t7)
/* 142b8: 3c188006 */ lui $t8,0x8006
/* 142bc: 8f18116c */ lw $t8,0x116c($t8)
/* 142c0: ac2f1170 */ sw $t7,0x1170($at)
/* 142c4: 3c018006 */ lui $at,0x8006
/* 142c8: ac381174 */ sw $t8,0x1174($at)
.NB000142cc:
/* 142cc: 03e00008 */ jr $ra
/* 142d0: 00000000 */ sll $zero,$zero,0x0
);
void dhudResetPos(void)
{
if (g_DHudInitialised) {
g_DHudPosX = g_DHudBaseX;
g_DHudPosY = g_DHudBaseY;
}
}
#endif
#if VERSION < VERSION_NTSC_1_0
void dhudClear(void)
void dhudReset(void)
{
s32 x;
s32 y;
@@ -473,7 +462,7 @@ void dhudClear(void)
}
var80061178nb = 1;
dhud0001429cnb();
dhudResetPos();
dhud00014000nb();
var80061214nb = 0;
}
+4 -4
View File
@@ -1939,7 +1939,7 @@ void mainLoop(void)
gfxInitMemory();
joy00013dfc();
dhudTryClear();
dhudTryReset();
func0f17608c(g_StageNum);
lvInit(g_StageNum);
viAllocateFbs(g_StageNum);
@@ -2476,7 +2476,7 @@ glabel mainLoop
/* e70c: 00000000 */ sll $zero,$zero,0x0
/* e710: 0c005310 */ jal joy00013dfc
/* e714: 00000000 */ sll $zero,$zero,0x0
/* e718: 0c005049 */ jal dhudTryClear
/* e718: 0c005049 */ jal dhudTryReset
/* e71c: 00000000 */ sll $zero,$zero,0x0
/* e720: 3c048006 */ lui $a0,0x8006
/* e724: 0fc5c34b */ jal func0f17608c
@@ -2990,7 +2990,7 @@ glabel mainTick
.NB0000ed94:
/* ed94: 0c0051a1 */ jal dhudRender
/* ed98: 8fa40094 */ lw $a0,0x94($sp)
/* ed9c: 0c0050b5 */ jal dhudClear
/* ed9c: 0c0050b5 */ jal dhudReset
/* eda0: afa20094 */ sw $v0,0x94($sp)
/* eda4: 0fc4663a */ jal debug0f11ed70
/* eda8: 00000000 */ sll $zero,$zero,0x0
@@ -3140,7 +3140,7 @@ u32 var8005f690nb[] = {
// }
//
// gdl = dhudRender(gdl);
// dhudClear();
// dhudReset();
//
// if (debug0f11ed70() >= 2) {
// gdl = profileRender(gdl);