Improve manual formatting inside clang-format off blocks

This commit is contained in:
Dragorn421
2022-04-09 12:34:50 +02:00
parent 541def8f29
commit c9f00c68c3
4 changed files with 12 additions and 5 deletions
+2 -1
View File
@@ -224,7 +224,8 @@ void UCodeDisas_ParseRenderMode(UCodeDisas* this, u32 mode) {
// clang-format off
if (this->enableLog == 0) {} else { osSyncPrintf("\nGBL_c1(%s, %s, %s, %s)|",
D_8012DDDC[0][a >> 12 & 3], D_8012DDDC[1][a >> 8 & 3], D_8012DDDC[2][a >> 4 & 3], D_8012DDDC[3][a >> 0 & 3]); }
D_8012DDDC[0][a >> 12 & 3], D_8012DDDC[1][a >> 8 & 3], D_8012DDDC[2][a >> 4 & 3], D_8012DDDC[3][a >> 0 & 3]);
}
// clang-format on
if (this->enableLog) {
+6 -2
View File
@@ -739,7 +739,9 @@ u16 Message_DrawItemIcon(GlobalContext* globalCtx, u16 itemId, Gfx** p, u16 i) {
MessageContext* msgCtx = &globalCtx->msgCtx;
// clang-format off
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); }
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
}
// clang-format on
gDPPipeSync(gfx++);
@@ -986,7 +988,9 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
break;
case MESSAGE_BACKGROUND:
// clang-format off
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); }
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING) { Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
}
// clang-format on
gDPPipeSync(gfx++);
gDPSetCombineMode(gfx++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
+2 -1
View File
@@ -2087,7 +2087,8 @@ void Interface_SetNaviCall(GlobalContext* globalCtx, u16 naviCallState) {
(globalCtx->csCtx.state == CS_STATE_IDLE)) {
// clang-format off
if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8); }
&D_801333E0, &D_801333E0, &D_801333E8);
}
// clang-format on
if (naviCallState == 0x1D) {