Decompile func0f090520 and rename if_alarm_inactive back to cmd003b because the name was wrong

This commit is contained in:
Ryan Dwyer 2020-05-29 20:17:29 +10:00
parent 1fbd8ec44e
commit 1ba94cabc2
8 changed files with 11 additions and 25 deletions

View File

@ -77,7 +77,7 @@ bool (*g_CommandPointers[])(void) = {
/*0x0038*/ aiIfRandomGreaterThan,
/*0x0039*/ aiIfCanHearAlarm,
/*0x003a*/ aiIfAlarmActive,
/*0x003b*/ aiIfAlarmInactive,
/*0x003b*/ ai003b,
/*0x003c*/ ai003c,
/*0x003d*/ aiIfSawInjury,
/*0x003e*/ aiIfSawDeath,

View File

@ -1280,7 +1280,7 @@ bool aiIfAlarmActive(void)
/**
* @cmd 003b
*/
bool aiIfAlarmInactive(void)
bool ai003b(void)
{
if (func0f090520()) {
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;

View File

@ -18,7 +18,7 @@ s32 g_AlarmTimer = 0;
s32 g_AlarmAudioHandle = 0;
f32 g_AlarmSpeakerWeight = 64;
f32 g_AlarmSpeakerDirection = 1;
u32 var800698e4 = 0x00000000;
f32 var800698e4 = 0;
u32 var800698e8 = 0x00000000;
u32 var800698ec = 0x00000000;
u32 var800698f0 = 0x00000000;

View File

@ -47558,21 +47558,10 @@ glabel func0f0904e0
/* f09051c: 00000000 */ sll $zero,$zero,0x0
);
GLOBAL_ASM(
glabel func0f090520
/* f090520: 3c018007 */ lui $at,0x8007
/* f090524: c42698e4 */ lwc1 $f6,-0x671c($at)
/* f090528: 44802000 */ mtc1 $zero,$f4
/* f09052c: 00001025 */ or $v0,$zero,$zero
/* f090530: 4606203c */ c.lt.s $f4,$f6
/* f090534: 00000000 */ sll $zero,$zero,0x0
/* f090538: 45000002 */ bc1f .L0f090544
/* f09053c: 00000000 */ sll $zero,$zero,0x0
/* f090540: 24020001 */ addiu $v0,$zero,0x1
.L0f090544:
/* f090544: 03e00008 */ jr $ra
/* f090548: 00000000 */ sll $zero,$zero,0x0
);
bool func0f090520(void)
{
return var800698e4 > 0;
}
GLOBAL_ASM(
glabel func0f09054c

View File

@ -537,10 +537,7 @@
mkshort(0x003a), \
label,
/**
* Checks if the alarm is currently quiet.
*/
#define if_alarm_inactive(label) \
#define cmd003b(label) \
mkshort(0x003b), \
label,

View File

@ -62,7 +62,7 @@
/*0x0038*/ bool aiIfRandomGreaterThan(void);
/*0x0039*/ bool aiIfCanHearAlarm(void);
/*0x003a*/ bool aiIfAlarmActive(void);
/*0x003b*/ bool aiIfAlarmInactive(void);
/*0x003b*/ bool ai003b(void);
/*0x003c*/ bool ai003c(void);
/*0x003d*/ bool aiIfSawInjury(void);
/*0x003e*/ bool aiIfSawDeath(void);

View File

@ -29,7 +29,7 @@ extern u32 var800698c0;
extern s32 g_AlarmAudioHandle;
extern f32 g_AlarmSpeakerWeight;
extern f32 g_AlarmSpeakerDirection;
extern u32 var800698e4;
extern f32 var800698e4;
extern u32 var800698e8;
extern u32 var800698ec;
extern u32 var800698f8;

View File

@ -329,7 +329,7 @@ bool func0f09018c(struct prop *doorprop);
u32 func0f0903d4(void);
u32 func0f09044c(void);
u32 func0f0904e0(void);
u32 func0f090520(void);
bool func0f090520(void);
void func0f09054c(void);
u32 func0f0908b8(void);
u32 func0f090d34(void);