Decompile mpGetCurrentChallengeDescription

This commit is contained in:
Ryan Dwyer
2020-04-30 21:13:51 +10:00
parent 045d97c6fa
commit 6f4c59f67a
3 changed files with 11 additions and 19 deletions
+1 -1
View File
@@ -12036,7 +12036,7 @@ glabel var7f1b1e8c
/* f0ecd4c: 0fc67091 */ jal mpLoadAndStoreCurrentChallenge
/* f0ecd50: 8c450848 */ lw $a1,0x848($v0)
.L0f0ecd54:
/* f0ecd54: 0fc670a2 */ jal func0f19c288
/* f0ecd54: 0fc670a2 */ jal mpGetCurrentChallengeDescription
/* f0ecd58: 00000000 */ sll $zero,$zero,0x0
/* f0ecd5c: 1000002d */ beqz $zero,.L0f0ece14
/* f0ecd60: 8fbf0014 */ lw $ra,0x14($sp)
+8 -16
View File
@@ -25,7 +25,7 @@
#include "types.h"
u32 g_MpChallengeIndex = 0;
void *g_MpCurrentChallengeConfig = NULL;
struct mpconfigfull *g_MpCurrentChallengeConfig = NULL;
// 2e4d8
struct challenge g_MpChallenges[NUM_CHALLENGES] = {
@@ -1736,22 +1736,14 @@ bool mpIsChallengeLoaded(void)
return g_MpCurrentChallengeConfig != NULL;
}
const char var7f1b9174[] = "";
char *mpGetCurrentChallengeDescription(void)
{
if (g_MpCurrentChallengeConfig) {
return g_MpCurrentChallengeConfig->strings.description;
}
GLOBAL_ASM(
glabel func0f19c288
/* f19c288: 3c038009 */ lui $v1,%hi(g_MpCurrentChallengeConfig)
/* f19c28c: 8c6384b4 */ lw $v1,%lo(g_MpCurrentChallengeConfig)($v1)
/* f19c290: 3c027f1c */ lui $v0,%hi(var7f1b9174)
/* f19c294: 24429174 */ addiu $v0,$v0,%lo(var7f1b9174)
/* f19c298: 10600003 */ beqz $v1,.L0f19c2a8
/* f19c29c: 00000000 */ sll $zero,$zero,0x0
/* f19c2a0: 03e00008 */ jr $ra
/* f19c2a4: 24620068 */ addiu $v0,$v1,0x68
.L0f19c2a8:
/* f19c2a8: 03e00008 */ jr $ra
/* f19c2ac: 00000000 */ sll $zero,$zero,0x0
);
return "";
}
char *mpconfigGetDescription(struct mpconfigfull *mpconfig)
{
+2 -2
View File
@@ -4,7 +4,7 @@
#include "types.h"
extern u32 g_MpChallengeIndex;
extern void *g_MpCurrentChallengeConfig;
extern struct mpconfigfull *g_MpCurrentChallengeConfig;
extern struct challenge g_MpChallenges[NUM_CHALLENGES];
bool ai0176(void);
@@ -19,7 +19,7 @@ u32 func0f19bb98(void);
u32 func0f19bd4c(void);
u32 func0f19bfa0(void);
void func0f19c1cc(void);
u32 func0f19c288(void);
char *mpGetCurrentChallengeDescription(void);
char *mpconfigGetDescription(struct mpconfigfull *mpconfig);
bool mpIsChallengeCompleteForEndscreen(void);
bool aiMpInitSimulants(void);