From 0c0c15018f684357795ffa7032c77f9a18190229 Mon Sep 17 00:00:00 2001 From: Random <28494085+Random06457@users.noreply.github.com> Date: Wed, 8 Apr 2020 18:45:50 +0200 Subject: [PATCH] Run format.sh --- src/code/graph.c | 2 +- src/code/printutils.c | 6 ++-- src/code/sleep.c | 15 ++++------ src/code/z_demo.c | 9 +++--- .../z_bg_hidan_firewall.c | 28 ++++++------------- .../actors/ovl_En_Wallmas/z_en_wallmas.c | 2 +- 6 files changed, 21 insertions(+), 41 deletions(-) diff --git a/src/code/graph.c b/src/code/graph.c index fb3d80e069..cd7f5fe2b8 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -263,7 +263,7 @@ u32 sGraphCfbInfoIdx = 0; // Very close to matching, stack usage #ifdef NON_MATCHING void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { - u32 problem; // 0xC4 -> 0xD4 + u32 problem; // 0xC4 -> 0xD4 Gfx* dispRefs[5]; // 0xB0 -> 0xC0 Gfx* dispRefs2[9]; // 0x8C -> 0x9C Gfx* dispRefs3[9]; // 0x68 -> 0x78 diff --git a/src/code/printutils.c b/src/code/printutils.c index e1e70f076f..7cd00f71c4 100644 --- a/src/code/printutils.c +++ b/src/code/printutils.c @@ -1,12 +1,10 @@ #include -void PrintUtils_VPrintf(char** arg0, const char* fmt, va_list args) -{ +void PrintUtils_VPrintf(char** arg0, const char* fmt, va_list args) { _Printf(*arg0, arg0, fmt, args); } -void PrintUtils_Printf(void* arg0, const char* fmt, ...) -{ +void PrintUtils_Printf(void* arg0, const char* fmt, ...) { va_list args; va_start(args, fmt); diff --git a/src/code/sleep.c b/src/code/sleep.c index f83ccc0703..901fd35203 100644 --- a/src/code/sleep.c +++ b/src/code/sleep.c @@ -1,7 +1,6 @@ #include -void Sleep_Cycles(OSTime cycles) -{ +void Sleep_Cycles(OSTime cycles) { OSMesgQueue mq; OSMesg msg; OSTimer timer; @@ -11,23 +10,19 @@ void Sleep_Cycles(OSTime cycles) osRecvMesg(&mq, NULL, OS_MESG_BLOCK); } -void Sleep_Nsec(u32 nsec) -{ +void Sleep_Nsec(u32 nsec) { Sleep_Cycles(OS_NSEC_TO_CYCLES(nsec)); } -void Sleep_Usec(u32 usec) -{ +void Sleep_Usec(u32 usec) { Sleep_Cycles(OS_USEC_TO_CYCLES(usec)); } // originally "msleep" -void Sleep_Msec(u32 ms) -{ +void Sleep_Msec(u32 ms) { Sleep_Cycles((ms * OS_CPU_COUNTER) / 1000ull); } -void Sleep_Sec(u32 sec) -{ +void Sleep_Sec(u32 sec) { Sleep_Cycles((sec * OS_CPU_COUNTER)); } diff --git a/src/code/z_demo.c b/src/code/z_demo.c index f43eb59f07..be6505dcd8 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -99,15 +99,14 @@ void func_80064558(GlobalContext* globalCtx, CutsceneContext* csCtx) { void func_800645A0(GlobalContext* globalCtx, CutsceneContext* csCtx) { Input* pad1 = &globalCtx->state.input[0]; - if (!~(pad1->padPressed | ~L_JPAD) && (csCtx->state == CS_STATE_IDLE) && - (gSaveContext.scene_setup_index >= 4)) { + if (!~(pad1->padPressed | ~L_JPAD) && (csCtx->state == CS_STATE_IDLE) && (gSaveContext.scene_setup_index >= 4)) { D_8015FCC8 = 0; gSaveContext.cutscene_index = 0xFFFD; gSaveContext.cutscene_trigger = 1; } - if (!~(pad1->padPressed | ~U_JPAD) && (csCtx->state == CS_STATE_IDLE) && - (gSaveContext.scene_setup_index >= 4) && (D_8011D394 == 0)) { + if (!~(pad1->padPressed | ~U_JPAD) && (csCtx->state == CS_STATE_IDLE) && (gSaveContext.scene_setup_index >= 4) && + (D_8011D394 == 0)) { D_8015FCC8 = 1; gSaveContext.cutscene_index = 0xFFFD; gSaveContext.cutscene_trigger = 1; @@ -431,7 +430,7 @@ void func_80065134(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdDayTim if (csCtx->frames == cmd->startFrame) { temp1 = (cmd->hour * 60.0f) / 0.021972656f; temp2 = (cmd->minute + 1) / 0.021972656f; - + gSaveContext.day_time = temp1 + temp2; gSaveContext.environment_time = temp1 + temp2; } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c index e7238be66f..be173c006c 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c @@ -36,31 +36,19 @@ const ActorInit Bg_Hidan_Firewall_InitVars = { }; static ColliderCylinderInit cylinderInitData = { - 0x0A, 0x11, 0x00, 0x09, - 0x20, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x20000000, - 0x01, 0x04, 0x00, 0x00, - 0xFFCFFFFF, - 0x00, 0x00, 0x00, 0x00, - 0x19, 0x00, 0x01, 0x00, - 0x001E, 0x0053, - 0x0000, + 0x0A, 0x11, 0x00, 0x09, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20000000, 0x01, 0x04, + 0x00, 0x00, 0xFFCFFFFF, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x01, 0x00, 0x001E, 0x0053, 0x0000, }; static Sub98Init4 actor98InitData = { - 0x01, 0x0050, 0x0064, 0xFF, + 0x01, + 0x0050, + 0x0064, + 0xFF, }; UNK_PTR D_80886D04[] = { - 0x06015D20, - 0x06016120, - 0x06016520, - 0x06016920, - 0x06016D20, - 0x06017120, - 0x06017520, - 0x06017920, + 0x06015D20, 0x06016120, 0x06016520, 0x06016920, 0x06016D20, 0x06017120, 0x06017520, 0x06017920, }; void BgHidanFirewall_Init(BgHidanFirewall* this, GlobalContext* globalCtx) { @@ -124,7 +112,7 @@ void BgHidanFirewall_Countdown(BgHidanFirewall* this, GlobalContext* globalCtx) void BgHidanFirewall_Erupt(BgHidanFirewall* this, GlobalContext* globalCtx) { if (BgHidanFirewall_CheckProximity(this, globalCtx) != 0) { - Math_ApproxF(&this->actor.scale.y, 0.1f, 0.01f/0.4f); + Math_ApproxF(&this->actor.scale.y, 0.1f, 0.01f / 0.4f); } else { if (Math_ApproxF(&this->actor.scale.y, 0.01f, 0.01f) != 0) { this->actor.draw = NULL; diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index 27a77c388a..93233a3cc9 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -9,7 +9,7 @@ #define ROOM 0x00 #define FLAGS 0x00000015 -#define TIMER_SCALE ((f32)OS_CLOCK_RATE/10000000000) +#define TIMER_SCALE ((f32)OS_CLOCK_RATE / 10000000000) #define DEGREE_60_RAD 1.0471975803375244140625f #define DEGREE_15_RAD 0.261799395084381103515625f