1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 22:44:30 +00:00

Add comments and macros to prevent match issues with formatting

This commit is contained in:
Roman971 2020-03-18 22:18:25 +01:00
parent 0704beba8d
commit 251aea64ab
9 changed files with 33 additions and 20 deletions

View file

@ -175,7 +175,7 @@ void FaultDrawer_SetCharPad(s8 padW, s8 padH)
void FaultDrawer_SetCursor(s32 x, s32 y)
{
if (sFaultDrawerStruct.osSyncPrintfEnabled)
osSyncPrintf(VT_CUP(%d, %d), (y - sFaultDrawerStruct.yStart) / (sFaultDrawerStruct.charH + sFaultDrawerStruct.charHPad), (x - sFaultDrawerStruct.xStart) / (sFaultDrawerStruct.charW + sFaultDrawerStruct.charWPad));
osSyncPrintf(VT_CUP("%d", "%d"), (y - sFaultDrawerStruct.yStart) / (sFaultDrawerStruct.charH + sFaultDrawerStruct.charHPad), (x - sFaultDrawerStruct.xStart) / (sFaultDrawerStruct.charW + sFaultDrawerStruct.charWPad));
sFaultDrawerStruct.cursorX = x;
sFaultDrawerStruct.cursorY = y;
}

View file

@ -6,7 +6,7 @@ void TitleSetup_InitImpl(GameState* gameState)
osSyncPrintf("ゼルダ共通データ初期化\n");
SaveContext_Init();
gameState->running = false;
gameState->init = Title_Init; gameState->size = sizeof(TitleContext);
SET_NEXT_GAMESTATE(gameState, Title_Init, TitleContext);
}
void TitleSetup_Destroy(GameState* gameState)

View file

@ -2434,9 +2434,14 @@ void Interface_SetNaviCall(GlobalContext* globalCtx, u16 naviCallState)
!interfaceCtx->naviCalling &&
(globalCtx->csCtx.state == 0))
{
// Whitespace matters for codegen here
if (naviCallState == 0x1E) Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
if (naviCallState == 0x1D) func_800F4524(&D_801333D4, NA_SE_VO_NA_HELLO_2, 32);
// clang-format off
// NOLINTNEXTLINE
if (naviCallState == 0x1E) Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8);
// clang-format on
if (naviCallState == 0x1D)
func_800F4524(&D_801333D4, NA_SE_VO_NA_HELLO_2, 32);
interfaceCtx->naviCalling = 1;
sCUpInvisible = 0;
@ -2478,14 +2483,16 @@ s32 Health_ChangeBy(GlobalContext* globalCtx, s16 healthChange)
// Translates to: " Fluctuation=%d (now=%d, max=%d) "
osSyncPrintf(" 増減=%d (now=%d, max=%d) ", healthChange, gSaveContext.health, gSaveContext.health_capacity);
// Whitespace matters for codegen here
if (healthChange > 0) Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
else if ((gSaveContext.double_defense != 0) && (healthChange < 0))
{
// clang-format off
// NOLINTNEXTLINE
if (healthChange > 0) Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8);
else if ((gSaveContext.double_defense != 0) && (healthChange < 0)) {
healthChange >>= 1;
// Translates to: "Heart decrease halved!!%d"
osSyncPrintf("ハート減少半分!!=%d\n", healthChange);
}
// clang-format on
gSaveContext.health += healthChange;
@ -3582,9 +3589,10 @@ void func_8008A994(InterfaceContext* interfaceCtx)
{
s32 sp18[4];
// Whitespace matters for codegen here
sp18[1] = 240; sp18[3] = 320;
// clang-format off
sp18[1] = SCREEN_HEIGHT; sp18[3] = SCREEN_WIDTH;
sp18[0] = 0; sp18[2] = 0;
// clang-format on
func_800AA4FC(&interfaceCtx->view, sp18);
func_800AB2C4(&interfaceCtx->view);

View file

@ -6,7 +6,7 @@ void Sample_Calc(SampleContext* this)
{
if (!~(this->state.input[0].padPressed | ~START_BUTTON))
{
this->state.init = func_800BCA64; this->state.size = sizeof(GlobalContext);
SET_NEXT_GAMESTATE(&this->state, func_800BCA64, GlobalContext);
this->state.running = false;
}
}
@ -73,9 +73,10 @@ void Sample_SetupView(SampleContext* this)
gfxCtx = this->state.gfxCtx;
func_800AA278(view, gfxCtx);
// clang-format off
v0[1] = SCREEN_HEIGHT; v0[3] = SCREEN_WIDTH;
v0[0] = 0;
v0[2] = 0;
v0[0] = 0; v0[2] = 0;
// clang-format on
func_800AA4FC(view, &v0);
func_800AA460(view, 60, 10, 12800);