This commit is contained in:
Ethan Roseman 2020-10-03 16:20:12 -04:00
parent ffa57b5a35
commit be25066ca5
5 changed files with 19 additions and 19 deletions

View File

@ -23,6 +23,6 @@ typedef s32 ApiStatus;
struct ScriptInstance;
typedef ApiStatus (*ApiFunc)(struct ScriptInstance* script, s32 isInitialCall);
typedef ApiStatus(*ApiFunc)(struct ScriptInstance* script, s32 isInitialCall);
#endif

View File

@ -2,7 +2,7 @@
void func_80035DF0(s16 arg0) {
s16* tempPtr = &D_800A0942;
*tempPtr = arg0;
}

View File

@ -140,7 +140,7 @@ s32 get_coin_drop_amount(Enemy* enemy) {
amt *= 3;
}
if (is_ability_active(Ability_MONEY_MONEY) ) {
if (is_ability_active(Ability_MONEY_MONEY)) {
amt *= 2;
}
@ -149,7 +149,7 @@ s32 get_coin_drop_amount(Enemy* enemy) {
if (enemy->flags & 0x840000) {
amt = 0;
}
if (amt > 20) {
amt = 20;
}

View File

@ -238,10 +238,10 @@ ApiStatus si_handle_case_default(ScriptInstance* script) {
#ifdef NON_MATCHING
ApiStatus si_handle_case_AND(ScriptInstance* script) {
Bytecode *args = script->ptrReadPos;
Bytecode* args = script->ptrReadPos;
s32 a0;
s32 switchBlockValue;
ASSERT(script->switchDepth >= 0);
switchBlockValue = script->switchBlockValue[script->switchDepth];
@ -249,10 +249,10 @@ ApiStatus si_handle_case_AND(ScriptInstance* script) {
if (script->switchBlockState[script->switchDepth] <= 0) {
script->ptrNextLine = si_goto_end_case(script);
} else if ((a0 & switchBlockValue) != 0) {
script->switchBlockState[script->switchDepth] = 0;
} else {
script->ptrNextLine = si_goto_next_case(script);
} else if ((a0 & switchBlockValue) != 0) {
script->switchBlockState[script->switchDepth] = 0;
} else {
script->ptrNextLine = si_goto_next_case(script);
}
return ApiStatus_DONE2;
@ -278,7 +278,7 @@ ApiStatus si_handle_end_case_group(ScriptInstance* script) {
script->switchBlockState[script->switchDepth] = 0;
script->ptrNextLine = si_goto_end_case(script);
}
return ApiStatus_DONE2;
do {} while (0); // Necessary to match
}
@ -654,23 +654,23 @@ ApiStatus si_handle_call(ScriptInstance* script) {
Bytecode* args = script->ptrReadPos;
s32 isInitialCall;
ApiFunc func;
ScriptInstance* newScript; // todo fake match
ScriptInstance* newScript; // todo fake match
if (script->blocked) {
isInitialCall = FALSE;
func = script->callFunction;
newScript = script; // todo fake match
newScript = script; // todo fake match
} else {
script->callFunction = get_variable(script, *args++);
newScript = script; // todo fake match
newScript = script; // todo fake match
script->ptrReadPos = args;
script->flags.bytes.currentArgc--;
script->blocked = TRUE;
isInitialCall = TRUE;
func = script->callFunction;
}
return func(newScript, isInitialCall); // todo fake match
return func(newScript, isInitialCall); // todo fake match
}
INCLUDE_ASM(s32, "code_e92d0_len_5da0", si_handle_exec1);

View File

@ -9,7 +9,7 @@ void begin_state_init(void) {
void step_init_state(void) {
GameStatus* gameStatus = GAME_STATUS;
s32 i;
if (gameStatus->loadMenuState != 0) {
gameStatus->loadMenuState--;
return;
@ -69,7 +69,7 @@ void step_init_state(void) {
}
fio_has_valid_backup();
if (D_800D9620 == 0) {
GAME_STATUS->unk_AB = 1;
func_8005615C();
@ -77,7 +77,7 @@ void step_init_state(void) {
GAME_STATUS->unk_AB = 0;
func_80056180();
}
D_8009A650[0] &= ~0x8;
set_game_mode(1);
}