From be25066ca53e63ef84db76c9bcbd446eabaa030c Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sat, 3 Oct 2020 16:20:12 -0400 Subject: [PATCH] format --- include/si.h | 2 +- src/code_111f0_len_860.c | 2 +- src/code_20ec0_len_5040.c | 4 ++-- src/code_e92d0_len_5da0.c | 24 ++++++++++++------------ src/code_e940_len_290.c | 6 +++--- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/si.h b/include/si.h index 51f389b48f..6be24fcebe 100644 --- a/include/si.h +++ b/include/si.h @@ -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 diff --git a/src/code_111f0_len_860.c b/src/code_111f0_len_860.c index 6687457ede..edfea5e2c3 100644 --- a/src/code_111f0_len_860.c +++ b/src/code_111f0_len_860.c @@ -2,7 +2,7 @@ void func_80035DF0(s16 arg0) { s16* tempPtr = &D_800A0942; - + *tempPtr = arg0; } diff --git a/src/code_20ec0_len_5040.c b/src/code_20ec0_len_5040.c index be9811cfca..7735cac9e8 100644 --- a/src/code_20ec0_len_5040.c +++ b/src/code_20ec0_len_5040.c @@ -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; } diff --git a/src/code_e92d0_len_5da0.c b/src/code_e92d0_len_5da0.c index fac30d63da..2d143eaab0 100644 --- a/src/code_e92d0_len_5da0.c +++ b/src/code_e92d0_len_5da0.c @@ -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); diff --git a/src/code_e940_len_290.c b/src/code_e940_len_290.c index a32a1340d4..a0d35da10a 100644 --- a/src/code_e940_len_290.c +++ b/src/code_e940_len_290.c @@ -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); }