use more true & false constants

This commit is contained in:
BlackShark 2022-05-27 02:18:52 +02:00
parent b59fb7637a
commit 75a44fdd79
15 changed files with 28 additions and 28 deletions

View File

@ -653,9 +653,9 @@ static void AnimTask_SpiteTargetShadow_Step1(u8 taskId)
startLine = 0;
if (position == 1)
task->data[10] = ScanlineEffect_InitWave(startLine, startLine + 64, 2, 6, 0, SCANLINE_EFFECT_REG_BG1HOFS, 1);
task->data[10] = ScanlineEffect_InitWave(startLine, startLine + 64, 2, 6, 0, SCANLINE_EFFECT_REG_BG1HOFS, TRUE);
else
task->data[10] = ScanlineEffect_InitWave(startLine, startLine + 64, 2, 6, 0, SCANLINE_EFFECT_REG_BG2HOFS, 1);
task->data[10] = ScanlineEffect_InitWave(startLine, startLine + 64, 2, 6, 0, SCANLINE_EFFECT_REG_BG2HOFS, TRUE);
task->data[15]++;
break;

View File

@ -549,7 +549,7 @@ void LaunchStatusAnimation(u8 battlerId, u8 statusAnimId)
gBattleAnimAttacker = battlerId;
gBattleAnimTarget = battlerId;
LaunchBattleAnimation(gBattleAnims_StatusConditions, statusAnimId, 0);
LaunchBattleAnimation(gBattleAnims_StatusConditions, statusAnimId, FALSE);
taskId = CreateTask(Task_DoStatusAnimation, 10);
gTasks[taskId].data[0] = battlerId;
}

View File

@ -817,8 +817,8 @@ static void Debug_DrawNumber(s16 number, u16 *dest, bool8 unk)
static void Debug_DrawNumberPair(s16 number1, s16 number2, u16 *arg2)
{
arg2[4] = 0x1E;
Debug_DrawNumber(number2, arg2, 0);
Debug_DrawNumber(number1, arg2 + 5, 1);
Debug_DrawNumber(number2, arg2, FALSE);
Debug_DrawNumber(number1, arg2 + 5, TRUE);
}
// Because the healthbox is too large to fit into one sprite, it is divided into two sprites.

View File

@ -1190,7 +1190,7 @@ u8 DoFieldEndTurnEffects(void)
s32 j;
for (j = i + 1; j < gBattlersCount; j++)
{
if (GetWhoStrikesFirst(gBattlerByTurnOrder[i], gBattlerByTurnOrder[j], 0))
if (GetWhoStrikesFirst(gBattlerByTurnOrder[i], gBattlerByTurnOrder[j], FALSE))
SwapTurnOrder(i, j);
}
}

View File

@ -2254,7 +2254,7 @@ static u32 Cmd_PrintMessage(struct BerryCrushGame *game, u8 *args)
switch (game->cmdState)
{
case 0:
DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, FALSE);
if (args[1] & F_MSG_EXPAND)
{
StringExpandPlaceholders(gStringVar4, sMessages[args[0]]);
@ -3241,7 +3241,7 @@ static u32 Cmd_SaveGame(struct BerryCrushGame *game, u8 *args)
case 2:
if (!IsLinkTaskFinished())
return 0;
DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, FALSE);
AddTextPrinterParameterized2(0, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, 0, 2, 1, 3);
CopyWindowToVram(0, COPYWIN_FULL);
CreateTask(Task_LinkFullSave, 0);
@ -3389,7 +3389,7 @@ static u32 Cmd_StopGame(struct BerryCrushGame *game, u8 *args)
switch (game->cmdState)
{
case 0:
DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, FALSE);
if (game->playAgainState == PLAY_AGAIN_NO_BERRIES)
AddTextPrinterParameterized2(0, FONT_NORMAL, sMessages[MSG_NO_BERRIES], game->textSpeed, 0, 2, 1, 3);
else

View File

@ -826,7 +826,7 @@ static void ReturnToActionsMenuFromCategories(u8 taskId)
{
RemoveDecorationWindow(WINDOW_DECORATION_CATEGORIES);
AddDecorationActionsWindow();
DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, FALSE);
PrintCurMainMenuDescription();
gTasks[taskId].func = HandleDecorationActionsMenuInput;
}
@ -2664,7 +2664,7 @@ static void FieldCB_StopPuttingAwayDecorations(void)
u8 taskId;
FadeInFromBlack();
DrawDialogueFrame(0, 1);
DrawDialogueFrame(0, TRUE);
InitDecorationActionsWindow();
taskId = CreateTask(Task_ReinitializeDecorationMenuHandler, 8);
gTasks[taskId].tState = 0;

View File

@ -33,7 +33,7 @@ static void Task_DrawFieldMessage(u8 taskId)
task->tState++;
break;
case 1:
DrawDialogueFrame(0, 1);
DrawDialogueFrame(0, TRUE);
task->tState++;
break;
case 2:

View File

@ -514,7 +514,7 @@ static void Task_Hof_InitTeamSaveData(u8 taskId)
}
*lastSavedTeam = *sHofMonPtr;
DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, FALSE);
AddTextPrinterParameterized2(0, FONT_NORMAL, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3);
CopyWindowToVram(0, COPYWIN_FULL);
gTasks[taskId].func = Task_Hof_TrySaveData;
@ -724,7 +724,7 @@ static void Task_Hof_WaitAndPrintPlayerInfo(u8 taskId)
{
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20);
HallOfFame_PrintPlayerInfo(1, 2);
DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, FALSE);
AddTextPrinterParameterized2(0, FONT_NORMAL, gText_LeagueChamp, 0, NULL, 2, 1, 3);
CopyWindowToVram(0, COPYWIN_FULL);
gTasks[taskId].func = Task_Hof_ExitOnKeyPressed;
@ -1093,7 +1093,7 @@ static void Task_HofPC_HandleExit(u8 taskId)
static void Task_HofPC_PrintDataIsCorrupted(u8 taskId)
{
HofPCTopBar_Print(gText_AButtonExit, 8, TRUE);
DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, FALSE);
AddTextPrinterParameterized2(0, FONT_NORMAL, gText_HOFCorrupted, 0, NULL, 2, 1, 3);
CopyWindowToVram(0, COPYWIN_FULL);
gTasks[taskId].func = Task_HofPC_ExitOnButtonPress;

View File

@ -1848,7 +1848,7 @@ static void Task_Scene3_StartGroudon(u8 taskId)
{
gTasks[taskId].tState = 0;
gTasks[taskId].func = Task_Scene3_Groudon;
ScanlineEffect_InitWave(0, 160, 4, 4, 1, SCANLINE_EFFECT_REG_BG1HOFS, 0);
ScanlineEffect_InitWave(0, 160, 4, 4, 1, SCANLINE_EFFECT_REG_BG1HOFS, FALSE);
}
#define tScreenX data[1]
@ -2058,7 +2058,7 @@ static void Task_Scene3_LoadKyogre(u8 taskId)
gTasks[taskId].tDelay = 16;
gTasks[taskId].tZoom = 256;
PanFadeAndZoomScreen(gTasks[taskId].tScreenX, gTasks[taskId].tScreenY, gTasks[taskId].tZoom, 0);
ScanlineEffect_InitWave(0, 0xA0, 4, 4, 1, SCANLINE_EFFECT_REG_BG1VOFS, 0);
ScanlineEffect_InitWave(0, 0xA0, 4, 4, 1, SCANLINE_EFFECT_REG_BG1VOFS, FALSE);
}
static void Task_Scene3_Kyogre(u8 taskId)

View File

@ -1344,7 +1344,7 @@ static void SwitchBagPocket(u8 taskId, s16 deltaBagPocketId, bool16 skipEraseLis
DrawPocketIndicatorSquare(newPocket, TRUE);
FillBgTilemapBufferRect_Palette0(2, 11, 14, 2, 15, 16);
ScheduleBgCopyTilemapToVram(2);
SetBagVisualPocketId(newPocket, 1);
SetBagVisualPocketId(newPocket, TRUE);
RemoveBagSprite(ITEMMENUSPRITE_BALL);
AddSwitchPocketRotatingBallSprite(deltaBagPocketId);
SetTaskFuncWithFollowupFunc(taskId, Task_SwitchBagPocket, gTasks[taskId].func);

View File

@ -445,7 +445,7 @@ static void DisableTextPrinters(struct TextPrinterTemplate * printer, u16 a1)
static void DrawSongTextWindow(const u8 * str)
{
DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, FALSE);
AddTextPrinterParameterized(0, FONT_NORMAL, str, 0, 1, 1, DisableTextPrinters);
gDisableTextPrinters = TRUE;
CopyWindowToVram(0, COPYWIN_FULL);

View File

@ -4969,7 +4969,7 @@ static void Task_TryLearnNewMoves(u8 taskId)
{
u16 learnMove;
if (WaitFanfare(0) && ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON))))
if (WaitFanfare(FALSE) && ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON))))
{
RemoveLevelUpStatsWindow();
learnMove = MonTryLearningNewMove(&gPlayerParty[gPartyMenu.slotId], TRUE);

View File

@ -518,7 +518,7 @@ static void InitItemStorageMenu(u8 taskId, u8 var)
static void ItemStorageMenuPrint(const u8 *textPtr)
{
DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, FALSE);
AddTextPrinterParameterized(0, FONT_NORMAL, textPtr, 0, 1, 0, 0);
}
@ -572,7 +572,7 @@ void CB2_PlayerPCExitBagMenu(void)
static void ItemStorage_ReshowAfterBagMenu(void)
{
LoadMessageBoxAndBorderGfx();
DrawDialogueFrame(0, 1);
DrawDialogueFrame(0, TRUE);
InitItemStorageMenu(CreateTask(ItemStorage_HandleReturnToProcessInput, 0), 1);
FadeInFromBlack();
}
@ -1241,7 +1241,7 @@ static void ItemStorage_ReturnToMenuSelect(u8 taskId)
s16 *data = gTasks[taskId].data;
if (!IsDma3ManagerBusyWithBgCopy())
{
DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, FALSE);
// Select Withdraw/Toss by default depending on which was just exited
if (!tInTossMenu)

View File

@ -285,7 +285,7 @@ static void ReceiveExchangePacket(u32 multiplayerId)
static void PrintTextOnRecordMixing(const u8 *src)
{
DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, FALSE);
AddTextPrinterParameterized(0, FONT_NORMAL, src, 0, 1, 0, NULL);
CopyWindowToVram(0, COPYWIN_FULL);
}

View File

@ -1390,7 +1390,7 @@ static bool8 SlotTask_HandleBetInput(struct Task *task)
// SLOTTASK_MSG_NEED_3_COINS
static bool8 SlotTask_PrintMsg_Need3Coins(struct Task *task)
{
DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, FALSE);
AddTextPrinterParameterized(0, FONT_NORMAL, gText_YouDontHaveThreeCoins, 0, 1, 0, 0);
CopyWindowToVram(0, COPYWIN_FULL);
sSlotMachine->state = SLOTTASK_WAIT_MSG_NEED_3_COINS;
@ -1655,7 +1655,7 @@ static bool8 SlotTask_NoMatches(struct Task *task)
// SLOTTASK_ASK_QUIT
static bool8 SlotTask_AskQuit(struct Task *task)
{
DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, FALSE);
AddTextPrinterParameterized(0, FONT_NORMAL, gText_QuitTheGame, 0, 1, 0, 0);
CopyWindowToVram(0, COPYWIN_FULL);
CreateYesNoMenuParameterized(0x15, 7, 0x214, 0x180, 0xE, 0xF);
@ -1687,7 +1687,7 @@ static bool8 SlotTask_HandleQuitInput(struct Task *task)
// SLOTTASK_MSG_MAX_COINS
static bool8 SlotTask_PrintMsg_MaxCoins(struct Task *task)
{
DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, FALSE);
AddTextPrinterParameterized(0, FONT_NORMAL, gText_YouveGot9999Coins, 0, 1, 0, 0);
CopyWindowToVram(0, COPYWIN_FULL);
sSlotMachine->state = SLOTTASK_WAIT_MSG_MAX_COINS;
@ -1708,7 +1708,7 @@ static bool8 SlotTask_WaitMsg_MaxCoins(struct Task *task)
// SLOTTASK_MSG_NO_MORE_COINS
static bool8 SlotTask_PrintMsg_NoMoreCoins(struct Task *task)
{
DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, FALSE);
AddTextPrinterParameterized(0, FONT_NORMAL, gText_YouveRunOutOfCoins, 0, 1, 0, 0);
CopyWindowToVram(0, COPYWIN_FULL);
sSlotMachine->state = SLOTTASK_WAIT_MSG_NO_MORE_COINS;