From ed0daabf98a92ab0232dcfb9ea071bd3411b762e Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Sun, 13 Feb 2022 00:29:48 +0100 Subject: [PATCH] Run formatter (#1139) --- src/boot/boot_main.c | 3 +-- src/code/fault.c | 3 +-- src/code/z_actor.c | 23 ++++++++++--------- src/code/z_lifemeter.c | 11 +++++---- src/code/z_map_mark.c | 8 +++---- .../actors/ovl_En_Heishi2/z_en_heishi2.c | 3 ++- src/overlays/actors/ovl_En_Sth/z_en_sth.c | 8 ++----- .../ovl_En_Wonder_Talk2/z_en_wonder_talk2.c | 3 ++- .../actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c | 4 ++-- 9 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/boot/boot_main.c b/src/boot/boot_main.c index 7a3350efe8..89e09a184a 100644 --- a/src/boot/boot_main.c +++ b/src/boot/boot_main.c @@ -24,7 +24,6 @@ void bootproc(void) { Locale_Init(); StackCheck_Init(&sIdleThreadInfo, sIdleThreadStack, STACK_TOP(sIdleThreadStack), 0, 256, "idle"); - osCreateThread(&sIdleThread, 1, Idle_ThreadEntry, NULL, STACK_TOP(sIdleThreadStack), - Z_PRIORITY_MAIN); + osCreateThread(&sIdleThread, 1, Idle_ThreadEntry, NULL, STACK_TOP(sIdleThreadStack), Z_PRIORITY_MAIN); osStartThread(&sIdleThread); } diff --git a/src/code/fault.c b/src/code/fault.c index 4e1087524e..d1cd9627ae 100644 --- a/src/code/fault.c +++ b/src/code/fault.c @@ -1265,8 +1265,7 @@ void Fault_Init(void) { gFaultMgr.faultHandlerEnabled = true; osCreateMesgQueue(&sFaultInstance->queue, &sFaultInstance->msg, 1); StackCheck_Init(&sFaultThreadInfo, &sFaultStack, STACK_TOP(sFaultStack), 0, 0x100, "fault"); - osCreateThread(&sFaultInstance->thread, 2, Fault_ThreadEntry, 0, STACK_TOP(sFaultStack), - OS_PRIORITY_APPMAX); + osCreateThread(&sFaultInstance->thread, 2, Fault_ThreadEntry, 0, STACK_TOP(sFaultStack), OS_PRIORITY_APPMAX); osStartThread(&sFaultInstance->thread); } diff --git a/src/code/z_actor.c b/src/code/z_actor.c index e3df1542cb..112ff7db85 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -470,7 +470,8 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Gl if ((actorArg != NULL) && (targetCtx->unk_4B == 0)) { Actor_ProjectPos(globalCtx, &actorArg->focus.pos, &projectedFocusPos, &cappedInvWDest); - if (((projectedFocusPos.z <= 0.0f) || (1.0f <= fabsf(projectedFocusPos.x * cappedInvWDest))) || (1.0f <= fabsf(projectedFocusPos.y * cappedInvWDest))) { + if (((projectedFocusPos.z <= 0.0f) || (1.0f <= fabsf(projectedFocusPos.x * cappedInvWDest))) || + (1.0f <= fabsf(projectedFocusPos.y * cappedInvWDest))) { actorArg = NULL; } } @@ -728,23 +729,23 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->alpha); - gDPLoadTextureBlock(OVERLAY_DISP++, (s32)titleCtx->texture + textureLanguageOffset, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, - G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, - G_TX_NOLOD); + gDPLoadTextureBlock(OVERLAY_DISP++, (s32)titleCtx->texture + textureLanguageOffset, G_IM_FMT_IA, G_IM_SIZ_8b, + width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, + G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1, G_TX_RENDERTILE, - 0, 0, 1 << 10, 1 << 10); + gSPTextureRectangle(OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1, + G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); height = titleCtx->height - height; // If texture is bigger than 0x1000, display the rest if (height > 0) { - gDPLoadTextureBlock(OVERLAY_DISP++, (s32)titleCtx->texture + textureLanguageOffset + 0x1000, G_IM_FMT_IA, G_IM_SIZ_8b, width, - height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, - G_TX_NOLOD, G_TX_NOLOD); + gDPLoadTextureBlock(OVERLAY_DISP++, (s32)titleCtx->texture + textureLanguageOffset + 0x1000, G_IM_FMT_IA, + G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, + G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4, titleSecondY + (height * 4) - 1, - G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); + gSPTextureRectangle(OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4, + titleSecondY + (height * 4) - 1, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); } CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2880); diff --git a/src/code/z_lifemeter.c b/src/code/z_lifemeter.c index fed721d81e..115baadcee 100644 --- a/src/code/z_lifemeter.c +++ b/src/code/z_lifemeter.c @@ -452,8 +452,10 @@ void HealthMeter_Draw(GlobalContext* globalCtx) { heartTexCoordPerPixel *= 1 << 10; halfHeartLength = 8.0f; halfHeartLength *= 0.68f; - gSPTextureRectangle(OVERLAY_DISP++, (s32)((heartCenterX - halfHeartLength) * 4), (s32)((heartCenterY - halfHeartLength) * 4), - (s32)((heartCenterX + halfHeartLength) * 4), (s32)((heartCenterY + halfHeartLength) * 4), G_TX_RENDERTILE, 0, 0, + gSPTextureRectangle(OVERLAY_DISP++, (s32)((heartCenterX - halfHeartLength) * 4), + (s32)((heartCenterY - halfHeartLength) * 4), + (s32)((heartCenterX + halfHeartLength) * 4), + (s32)((heartCenterY + halfHeartLength) * 4), G_TX_RENDERTILE, 0, 0, (s32)heartTexCoordPerPixel, (s32)heartTexCoordPerPixel); } else { if ((ddHeartCountMinusOne < 0) || (heartIndex > ddHeartCountMinusOne)) { @@ -474,8 +476,9 @@ void HealthMeter_Draw(GlobalContext* globalCtx) { { Mtx* matrix = Graph_Alloc(gfxCtx, sizeof(Mtx)); - Matrix_SetTranslateScaleMtx2(matrix, 1.0f - (0.32f * beatingHeartPulsingSize), 1.0f - (0.32f * beatingHeartPulsingSize), 1.0f - (0.32f * beatingHeartPulsingSize), - -130.0f + offsetX, 94.5f - offsetY, 0.0f); + Matrix_SetTranslateScaleMtx2( + matrix, 1.0f - (0.32f * beatingHeartPulsingSize), 1.0f - (0.32f * beatingHeartPulsingSize), + 1.0f - (0.32f * beatingHeartPulsingSize), -130.0f + offsetX, 94.5f - offsetY, 0.0f); gSPMatrix(OVERLAY_DISP++, matrix, G_MTX_MODELVIEW | G_MTX_LOAD); gSPVertex(OVERLAY_DISP++, beatingHeartVtx, 4, 0); gSP1Quadrangle(OVERLAY_DISP++, 0, 2, 3, 1, 0); diff --git a/src/code/z_map_mark.c b/src/code/z_map_mark.c index a096a9b566..8718b8de4b 100644 --- a/src/code/z_map_mark.c +++ b/src/code/z_map_mark.c @@ -63,10 +63,10 @@ void MapMark_Init(GlobalContext* globalCtx) { Overlay_Load(overlay->vromStart, overlay->vromEnd, overlay->vramStart, overlay->vramEnd, overlay->loadedRamAddr); sLoadedMarkDataTable = gMapMarkDataTable; - sLoadedMarkDataTable = (void*)(u32)((overlay->vramTable != NULL) - ? (void*)((u32)overlay->vramTable - - (s32)((u32)overlay->vramStart - (u32)overlay->loadedRamAddr)) - : NULL); + sLoadedMarkDataTable = (void*)(u32)( + (overlay->vramTable != NULL) + ? (void*)((u32)overlay->vramTable - (s32)((u32)overlay->vramStart - (u32)overlay->loadedRamAddr)) + : NULL); } void MapMark_ClearPointers(GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index aa0514d5d5..a4fd4db5c3 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -155,7 +155,8 @@ void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) { // "Identification Completed!" osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 識別完了! ☆☆☆☆☆ %d\n" VT_RST, this->type); // "Message completed!" - osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ メッセージ完了! ☆☆☆☆☆ %x\n\n" VT_RST, (this->actor.params >> 8) & 0xF); + osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ メッセージ完了! ☆☆☆☆☆ %x\n\n" VT_RST, + (this->actor.params >> 8) & 0xF); } } diff --git a/src/overlays/actors/ovl_En_Sth/z_en_sth.c b/src/overlays/actors/ovl_En_Sth/z_en_sth.c index 7f0242f229..f59de90536 100644 --- a/src/overlays/actors/ovl_En_Sth/z_en_sth.c +++ b/src/overlays/actors/ovl_En_Sth/z_en_sth.c @@ -61,12 +61,8 @@ static s16 sObjectIds[6] = { }; static FlexSkeletonHeader* sSkeletons[6] = { - &object_ahg_Skel_0000F0, - &object_boj_Skel_0000F0, - &object_boj_Skel_0000F0, - &object_boj_Skel_0000F0, - &object_boj_Skel_0000F0, - &object_boj_Skel_0000F0, + &object_ahg_Skel_0000F0, &object_boj_Skel_0000F0, &object_boj_Skel_0000F0, + &object_boj_Skel_0000F0, &object_boj_Skel_0000F0, &object_boj_Skel_0000F0, }; static AnimationHeader* sAnimations[6] = { diff --git a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c index adf159d81c..8f2716344c 100644 --- a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c +++ b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c @@ -186,7 +186,8 @@ void func_80B3A3D4(EnWonderTalk2* this, GlobalContext* globalCtx) { if ((this->switchFlag >= 0) && (this->talkMode != 4)) { Flags_SetSwitch(globalCtx, this->switchFlag); // "(Forced) I saved it! All of it!" - osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ (強制)セーブしたよ!おもいっきり! %x\n" VT_RST, this->switchFlag); + osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ (強制)セーブしたよ!おもいっきり! %x\n" VT_RST, + this->switchFlag); } if (this->talkMode == 4) { diff --git a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index 55a519643e..f615a12e9d 100644 --- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -344,8 +344,8 @@ s16 ObjOshihiki_GetHighestFloor(ObjOshihiki* this) { for (i = 1; i < ARRAY_COUNT(this->floorHeights); i++) { if (this->floorHeights[i] > this->floorHeights[highestFloor]) { highestFloor = i; - } else if ((this->floorBgIds[i] == BGCHECK_SCENE) && - ((this->floorHeights[i] - this->floorHeights[highestFloor]) > -0.001f)) { + } else if ((this->floorBgIds[i] == BGCHECK_SCENE) && + ((this->floorHeights[i] - this->floorHeights[highestFloor]) > -0.001f)) { highestFloor = i; } }