Rename if_fade_complete to if_colour_fade_complete and discover real if_fade_complete

This commit is contained in:
Ryan Dwyer 2020-02-08 22:02:05 +10:00
parent 374af84a4e
commit f37344e236
6 changed files with 17 additions and 28 deletions

View File

@ -7460,7 +7460,7 @@ bool ai00e4(void)
/**
* @cmd 00e5
*/
bool aiIfFadeComplete(void)
bool aiIfColourFadeComplete(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
bool pass = false;
@ -13624,11 +13624,11 @@ bool aiFadeScreen(void)
/**
* @cmd 01cc
*/
bool ai01cc(void)
bool aiIfFadeComplete(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
if (func0f16889c() == false) {
if (fadeIsActive() == false) {
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]);
} else {
g_Vars.aioffset += 3;

View File

@ -6448,7 +6448,7 @@ bool (*g_CommandPointers[])(void) = {
/*0x00e2*/ ai00e2,
/*0x00e3*/ ai00e3,
/*0x00e4*/ ai00e4,
/*0x00e5*/ aiIfFadeComplete,
/*0x00e5*/ aiIfColourFadeComplete,
/*0x00e6*/ NULL,
/*0x00e7*/ NULL,
/*0x00e8*/ aiSetDoorOpen,
@ -6679,7 +6679,7 @@ bool (*g_CommandPointers[])(void) = {
/*0x01c9*/ ai01c9,
/*0x01ca*/ aiChrSetCutsceneWeapon,
/*0x01cb*/ aiFadeScreen,
/*0x01cc*/ ai01cc,
/*0x01cc*/ aiIfFadeComplete,
/*0x01cd*/ aiChrSetHudProjectorVisible,
/*0x01ce*/ ai01ce,
/*0x01cf*/ aiChrSetFiringInCutscene,

View File

@ -2519,21 +2519,10 @@ glabel func0f1685d8
/* f168898: 00000000 */ sll $zero,$zero,0x0
);
GLOBAL_ASM(
glabel func0f16889c
/* f16889c: 3c018008 */ lui $at,0x8008
/* f1688a0: c4244058 */ lwc1 $f4,0x4058($at)
/* f1688a4: 44803000 */ mtc1 $zero,$f6
/* f1688a8: 00001025 */ or $v0,$zero,$zero
/* f1688ac: 4604303e */ c.le.s $f6,$f4
/* f1688b0: 00000000 */ sll $zero,$zero,0x0
/* f1688b4: 45000002 */ bc1f .L0f1688c0
/* f1688b8: 00000000 */ sll $zero,$zero,0x0
/* f1688bc: 24020001 */ addiu $v0,$zero,0x1
.L0f1688c0:
/* f1688c0: 03e00008 */ jr $ra
/* f1688c4: 00000000 */ sll $zero,$zero,0x0
);
bool fadeIsActive(void)
{
return fade80084058 >= 0;
}
GLOBAL_ASM(
glabel func0f1688c8

View File

@ -1994,10 +1994,7 @@
mkshort(0x00e4), \
u1,
/**
* Checks if the screen fade is complete. Follows the label if complete.
*/
#define if_fade_complete(chr, label) \
#define if_colour_fade_complete(chr, label) \
mkshort(0x00e5), \
chr, \
label,
@ -3609,7 +3606,10 @@
mkword(rgba), \
mkshort(num_frames),
#define cmd01cc(label) \
/**
* Checks if the screen fade is complete. Follows the label if complete.
*/
#define if_fade_complete(label) \
mkshort(0x01cc), \
label,

View File

@ -231,7 +231,7 @@
/*0x00e2*/ bool ai00e2(void);
/*0x00e3*/ bool ai00e3(void);
/*0x00e4*/ bool ai00e4(void);
/*0x00e5*/ bool aiIfFadeComplete(void);
/*0x00e5*/ bool aiIfColourFadeComplete(void);
/*0x00e8*/ bool aiSetDoorOpen(void);
/*0x00e9*/ bool ai00e9(void);
/*0x00ea*/ bool aiIfNumPlayersLessThan(void);
@ -423,7 +423,7 @@
/*0x01c9*/ bool ai01c9(void);
/*0x01ca*/ bool aiChrSetCutsceneWeapon(void);
/*0x01cb*/ bool aiFadeScreen(void);
/*0x01cc*/ bool ai01cc(void);
/*0x01cc*/ bool aiIfFadeComplete(void);
/*0x01cd*/ bool aiChrSetHudProjectorVisible(void);
/*0x01ce*/ bool ai01ce(void);
/*0x01cf*/ bool aiChrSetFiringInCutscene(void);

View File

@ -45,7 +45,7 @@ u32 func0f167b84(void);
u32 func0f167c88(void);
u32 func0f167e7c(void);
u32 func0f1685d8(void);
u32 func0f16889c(void);
bool fadeIsActive(void);
u32 func0f1688c8(void);
u32 func0f1688fc(void);
u32 func0f168b4c(void);