Decompile mpInitSimulants

This commit is contained in:
Ryan Dwyer
2020-02-20 17:24:42 +10:00
parent 1d190dc336
commit 6fa10d2754
40 changed files with 50 additions and 81 deletions
+1 -1
View File
@@ -134,7 +134,7 @@ u8 func1001_start_lift[] = {
};
u8 func1000_1b30[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -126,7 +126,7 @@ u8 func1001_start_lift[] = {
};
u8 func1000_14e0[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -123,7 +123,7 @@ u8 func1001_13d4[] = {
};
u8 func1000_13e0[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -122,7 +122,7 @@ u8 unregistered_func1[] = {
};
u8 func1000_1898[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -151,7 +151,7 @@ u8 func1001_start_lifts[] = {
};
u8 func1000_21d4[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -125,7 +125,7 @@ u8 func1001_start_lifts[] = {
};
u8 func1000_1680[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -135,7 +135,7 @@ struct path paths[] = {
};
u8 func1000_26fc[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -194,7 +194,7 @@ u8 func1001_start_lifts[] = {
};
u8 func1000_3cc8[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -108,7 +108,7 @@ struct path paths[] = {
};
u8 func1000_1368[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -34,7 +34,7 @@ struct path paths[] = {
};
u8 unregistered_func1[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -146,7 +146,7 @@ u8 func1001_start_lift[] = {
};
u8 func1000_2400[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -33,7 +33,7 @@ struct path paths[] = {
};
u8 unregistered_func1[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -40,7 +40,7 @@ u8 func1001_0038[] = {
};
u8 func1000_0044[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -34,7 +34,7 @@ struct path paths[] = {
};
u8 func1000_0038[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -34,7 +34,7 @@ struct path paths[] = {
};
u8 func1000_0038[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -41,7 +41,7 @@ u8 unregistered_func1[] = {
};
u8 unregistered_func2[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -34,7 +34,7 @@ struct path paths[] = {
};
u8 func1000_0038[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -143,7 +143,7 @@ u8 func1001_27e0[] = {
};
u8 func1000_27ec[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -117,7 +117,7 @@ u8 func1001_1590[] = {
};
u8 func1000_159c[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -127,7 +127,7 @@ u8 func1001_1dc0[] = {
};
u8 func1000_1dcc[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -33,7 +33,7 @@ struct path paths[] = {
};
u8 unregistered_func1[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -34,7 +34,7 @@ struct path paths[] = {
};
u8 func1000_0038[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -34,7 +34,7 @@ struct path paths[] = {
};
u8 func1000_0038[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -122,7 +122,7 @@ struct path paths[] = {
};
u8 func1000_1cf8[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -131,7 +131,7 @@ u8 unregistered_func1[] = {
};
u8 func1000_1c08[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -129,7 +129,7 @@ u8 unregistered_func1[] = {
};
u8 func1000_1598[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -39,7 +39,7 @@ u8 unregistered_func1[] = {
};
u8 unregistered_func2[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -4739,7 +4739,7 @@ u8 func102d_check_farsight_ammo_wasted[] = {
};
u8 unregistered_function4[] = {
cmd0185_mponly
mp_init_simulants
rebuild_teams
rebuild_squadrons
set_ailist(CHR_SELF, GAILIST_IDLE)
+1 -1
View File
@@ -16590,7 +16590,7 @@ glabel func0f03cd24
/* f03cd60: a080000c */ sb $zero,0xc($a0)
/* f03cd64: 24050001 */ addiu $a1,$zero,0x1
/* f03cd68: afa40020 */ sw $a0,0x20($sp)
/* f03cd6c: 0fc6417c */ jal func0f1905f0
/* f03cd6c: 0fc6417c */ jal mpInitSimulant
/* f03cd70: afa6001c */ sw $a2,0x1c($sp)
/* f03cd74: 8fa40020 */ lw $a0,0x20($sp)
/* f03cd78: 1000003d */ beqz $zero,.L0f03ce70
+1 -1
View File
@@ -6606,7 +6606,7 @@ bool (*g_CommandPointers[])(void) = {
/*0x0182*/ aiPunchOrKick,
/*0x0183*/ aiIfTargetIsPlayer,
/*0x0184*/ ai0184,
/*0x0185*/ ai0185,
/*0x0185*/ aiMpInitSimulants,
/*0x0186*/ aiIfSoundTimer,
/*0x0187*/ aiSetTargetToEyespyIfInSight,
/*0x0188*/ aiIfLiftStationary,
+1 -1
View File
@@ -12313,7 +12313,7 @@ u16 var80087ce4[] = {
0x0000, 0x0000,
};
u32 var80087d10 = 0;
u8 var80087d10 = 0;
u32 var80087d14[] = {
0x5a000000, 0x3e86051b, 0x3f06051b, 0x02580000, 0x41200000, 0x3f32b179, 0x3eb2b179, 0x000003e8,
+9 -33
View File
@@ -419,7 +419,7 @@ glabel mpChrReset
//}
GLOBAL_ASM(
glabel func0f1905f0
glabel mpInitSimulant
/* f1905f0: 27bdffa8 */ addiu $sp,$sp,-88
/* f1905f4: afbf0024 */ sw $ra,0x24($sp)
/* f1905f8: afb00020 */ sw $s0,0x20($sp)
@@ -496,38 +496,14 @@ glabel func0f1905f0
/* f190704: 00000000 */ sll $zero,$zero,0x0
);
GLOBAL_ASM(
glabel func0f190708
/* f190708: 27bdffd8 */ addiu $sp,$sp,-40
/* f19070c: afb20020 */ sw $s2,0x20($sp)
/* f190710: 3c128008 */ lui $s2,%hi(var80087d10)
/* f190714: 26527d10 */ addiu $s2,$s2,%lo(var80087d10)
/* f190718: 924e0000 */ lbu $t6,0x0($s2)
/* f19071c: afb00018 */ sw $s0,0x18($sp)
/* f190720: afbf0024 */ sw $ra,0x24($sp)
/* f190724: afb1001c */ sw $s1,0x1c($sp)
/* f190728: 19c0000c */ blez $t6,.L0f19075c
/* f19072c: 00008025 */ or $s0,$zero,$zero
/* f190730: 3c11800b */ lui $s1,%hi(var800acc80)
/* f190734: 2631cc80 */ addiu $s1,$s1,%lo(var800acc80)
/* f190738: 8e240000 */ lw $a0,0x0($s1)
.L0f19073c:
/* f19073c: 0fc6417c */ jal func0f1905f0
/* f190740: 00002825 */ or $a1,$zero,$zero
/* f190744: 924f0000 */ lbu $t7,0x0($s2)
/* f190748: 26100001 */ addiu $s0,$s0,0x1
/* f19074c: 26310004 */ addiu $s1,$s1,0x4
/* f190750: 020f082a */ slt $at,$s0,$t7
/* f190754: 5420fff9 */ bnezl $at,.L0f19073c
/* f190758: 8e240000 */ lw $a0,0x0($s1)
.L0f19075c:
/* f19075c: 8fbf0024 */ lw $ra,0x24($sp)
/* f190760: 8fb00018 */ lw $s0,0x18($sp)
/* f190764: 8fb1001c */ lw $s1,0x1c($sp)
/* f190768: 8fb20020 */ lw $s2,0x20($sp)
/* f19076c: 03e00008 */ jr $ra
/* f190770: 27bd0028 */ addiu $sp,$sp,0x28
);
void mpInitSimulants(void)
{
s32 i;
for (i = 0; i < var80087d10; i++) {
mpInitSimulant(var800acc80[i], 0);
}
}
GLOBAL_ASM(
glabel func0f190774
+2 -2
View File
@@ -24,9 +24,9 @@
/**
* @cmd 0185
*/
bool ai0185(void)
bool aiMpInitSimulants(void)
{
func0f190708();
mpInitSimulants();
g_Vars.aioffset += 2;
return false;
}
+1 -8
View File
@@ -29747,14 +29747,7 @@ u32 var800acc70 = 0;
u32 var800acc74 = 0;
u32 var800acc78 = 0;
u32 var800acc7c = 0;
u32 var800acc80 = 0;
u32 var800acc84 = 0;
u32 var800acc88 = 0;
u32 var800acc8c = 0;
u32 var800acc90 = 0;
u32 var800acc94 = 0;
u32 var800acc98 = 0;
u32 var800acc9c = 0;
u32 *var800acc80[MAX_SIMULANTS] = {NULL};
u8 var800acca0[40] = {0};
u8 g_MpChallengesCompleted[4] = {0}; // This is one *byte* per option, and length is unknown
u32 var800acccc = 0;
+1 -1
View File
@@ -3268,7 +3268,7 @@
u1, \
u2,
#define cmd0185_mponly \
#define mp_init_simulants \
mkshort(0x0185),
#define if_chr_soundtimer(value, operator, label) \
+1 -1
View File
@@ -366,7 +366,7 @@
/*0x0182*/ bool aiPunchOrKick(void);
/*0x0183*/ bool aiIfTargetIsPlayer(void);
/*0x0184*/ bool ai0184(void);
/*0x0185*/ bool ai0185(void);
/*0x0185*/ bool aiMpInitSimulants(void);
/*0x0186*/ bool aiIfSoundTimer(void);
/*0x0187*/ bool aiSetTargetToEyespyIfInSight(void);
/*0x0188*/ bool aiIfLiftStationary(void);
+1 -1
View File
@@ -307,7 +307,7 @@ extern struct mpbody g_MpBodies[NUM_MPBODIES];
extern struct mptrack g_MpTracks[NUM_MPTRACKS];
extern struct mppreset g_MpPresets[NUM_MPPRESETS];
extern u32 g_TeamColours[MAX_TEAMS];
extern u32 var80087d10;
extern u8 var80087d10;
extern u32 var80087d14[];
extern u32 g_MpBotCommands[NUM_MPBOTCOMMANDS];
extern u32 var80087e2c;
+2 -2
View File
@@ -5,8 +5,8 @@
u32 func0f190260(void);
void mpChrReset(struct chrdata *chr, u8 full);
u32 func0f1905f0(void);
u32 func0f190708(void);
void mpInitSimulant(u32 *arg0, s32 arg1);
void mpInitSimulants(void);
u32 func0f190774(void);
u32 func0f190784(void);
u32 func0f190be4(void);
+1 -1
View File
@@ -18,7 +18,7 @@ u32 func0f19c1cc(void);
u32 func0f19c288(void);
u32 func0f19c2b0(void);
bool func0f19c53c(void);
bool ai0185(void);
bool aiMpInitSimulants(void);
void func0f19ab40(void);
bool func0f19af3c(s32 chrnum, s32 challengeindex);
bool mpIsChallengeAvailable(s32 challengeindex);
+1 -1
View File
@@ -868,7 +868,7 @@ extern s8 g_MpLockPlayerNum;
extern u32 var800acc28;
extern u32 var800acc70;
extern u32 var800acc74;
extern u32 var800acc80;
extern u32 *var800acc80[MAX_SIMULANTS];
extern u8 var800acca0[40];
extern u8 g_MpChallengesCompleted[];
extern u32 var800acd20;