Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug menu cleanup #3390

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions data/scripts/debug.inc
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,28 @@ Debug_BoxFilledMessage::
Debug_BoxFilledMessage_Text:
.string "Storage boxes filled!$"

Debug_Script_1::
Debug_EventScript_Script_1::
end

Debug_Script_2::
Debug_EventScript_Script_2::
end

Debug_Script_3::
Debug_EventScript_Script_3::
end

Debug_Script_4::
Debug_EventScript_Script_4::
end

Debug_Script_5::
Debug_EventScript_Script_5::
end

Debug_Script_6::
Debug_EventScript_Script_6::
end

Debug_Script_7::
Debug_EventScript_Script_7::
end

Debug_Script_8::
Debug_EventScript_Script_8::
end

Debug_CheckSaveBlock::
Expand Down
32 changes: 16 additions & 16 deletions src/battle_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ void CB2_BattleDebugMenu(void)
data->currentMainListItemId = 0;
data->activeWindow = ACTIVE_WIN_MAIN;
data->secondaryListTaskId = 0xFF;
CopyWindowToVram(data->mainListWindowId, 3);
CopyWindowToVram(data->mainListWindowId, COPYWIN_FULL);
gMain.state++;
break;
case 5:
Expand All @@ -737,7 +737,7 @@ static void PutMovesPointsText(struct BattleDebugMenu *data)
{
text[0] = CHAR_SPACE;
StringCopy(text + 1, gMoveNames[gBattleMons[data->aiBattlerId].moves[i]]);
AddTextPrinterParameterized(data->aiMovesWindowId, 1, text, 0, i * 15, 0, NULL);
AddTextPrinterParameterized(data->aiMovesWindowId, FONT_NORMAL, text, 0, i * 15, 0, NULL);
for (count = 0, j = 0; j < MAX_BATTLERS_COUNT; j++)
{
if (data->spriteIds.aiIconSpriteIds[j] == 0xFF)
Expand All @@ -746,18 +746,18 @@ static void PutMovesPointsText(struct BattleDebugMenu *data)
ConvertIntToDecimalStringN(text,
gBattleStruct->aiFinalScore[data->aiBattlerId][battlerDef][i],
STR_CONV_MODE_RIGHT_ALIGN, 3);
AddTextPrinterParameterized(data->aiMovesWindowId, 1, text, 83 + count * 54, i * 15, 0, NULL);
AddTextPrinterParameterized(data->aiMovesWindowId, FONT_NORMAL, text, 83 + count * 54, i * 15, 0, NULL);

ConvertIntToDecimalStringN(text,
AI_DATA->simulatedDmg[data->aiBattlerId][battlerDef][i],
STR_CONV_MODE_RIGHT_ALIGN, 3);
AddTextPrinterParameterized(data->aiMovesWindowId, 1, text, 110 + count * 54, i * 15, 0, NULL);
AddTextPrinterParameterized(data->aiMovesWindowId, FONT_NORMAL, text, 110 + count * 54, i * 15, 0, NULL);

count++;
}
}

CopyWindowToVram(data->aiMovesWindowId, 3);
CopyWindowToVram(data->aiMovesWindowId, COPYWIN_FULL);
Free(text);
}

Expand Down Expand Up @@ -849,7 +849,7 @@ static void PutAiInfoText(struct BattleDebugMenu *data)
// item names
for (i = 0; i < ARRAY_COUNT(sAiInfoItemNames); i++)
{
AddTextPrinterParameterized(data->aiMovesWindowId, 1, sAiInfoItemNames[i], 3, i * 15, 0, NULL);
AddTextPrinterParameterized(data->aiMovesWindowId, FONT_NORMAL, sAiInfoItemNames[i], 3, i * 15, 0, NULL);
}

// items info
Expand All @@ -861,13 +861,13 @@ static void PutAiInfoText(struct BattleDebugMenu *data)
u16 holdEffect = AI_DATA->holdEffects[i];
u16 item = AI_DATA->items[i];
u8 x = (i == B_POSITION_PLAYER_LEFT) ? 83 + (i) * 75 : 83 + (i-1) * 75;
AddTextPrinterParameterized(data->aiMovesWindowId, 0, gAbilityNames[ability], x, 0, 0, NULL);
AddTextPrinterParameterized(data->aiMovesWindowId, 0, ItemId_GetName(item), x, 15, 0, NULL);
AddTextPrinterParameterized(data->aiMovesWindowId, 0, GetHoldEffectName(holdEffect), x, 30, 0, NULL);
AddTextPrinterParameterized(data->aiMovesWindowId, FONT_SMALL, gAbilityNames[ability], x, 0, 0, NULL);
AddTextPrinterParameterized(data->aiMovesWindowId, FONT_SMALL, ItemId_GetName(item), x, 15, 0, NULL);
AddTextPrinterParameterized(data->aiMovesWindowId, FONT_SMALL, GetHoldEffectName(holdEffect), x, 30, 0, NULL);
}
}

CopyWindowToVram(data->aiMovesWindowId, 3);
CopyWindowToVram(data->aiMovesWindowId, COPYWIN_FULL);
Free(text);
}

Expand Down Expand Up @@ -914,7 +914,7 @@ static void PutAiPartyText(struct BattleDebugMenu *data)
AddTextPrinterParameterized5(data->aiMovesWindowId, FONT_SMALL_NARROW, text, i * 41, 35 + (j + 1) * 15, 0, NULL, 0, 0);
}

CopyWindowToVram(data->aiMovesWindowId, 3);
CopyWindowToVram(data->aiMovesWindowId, COPYWIN_FULL);
Free(text);
}

Expand Down Expand Up @@ -1177,7 +1177,7 @@ static void Task_DebugMenuProcessInput(u8 taskId)
data->currentSecondaryListItemId = listItemId;
data->modifyWindowId = AddWindow(&sModifyWindowTemplate);
PutWindowTilemap(data->modifyWindowId);
CopyWindowToVram(data->modifyWindowId, 3);
CopyWindowToVram(data->modifyWindowId, COPYWIN_FULL);
SetUpModifyArrows(data);
PrintDigitChars(data);
data->activeWindow = ACTIVE_WIN_MODIFY;
Expand Down Expand Up @@ -1261,8 +1261,8 @@ static void PrintOnBattlerWindow(u8 windowId, u8 battlerId)
StringCopy(&text[4], gBattleMons[battlerId].nickname);

FillWindowPixelBuffer(windowId, 0x11);
AddTextPrinterParameterized(windowId, 1, text, 0, 0, 0, NULL);
CopyWindowToVram(windowId, 3);
AddTextPrinterParameterized(windowId, FONT_NORMAL, text, 0, 0, 0, NULL);
CopyWindowToVram(windowId, COPYWIN_FULL);
}

static void UpdateWindowsOnChangedBattler(struct BattleDebugMenu *data)
Expand Down Expand Up @@ -1368,7 +1368,7 @@ static void CreateSecondaryListMenu(struct BattleDebugMenu *data)
listTemplate.windowId = data->secondaryListWindowId;

data->secondaryListTaskId = ListMenuInit(&listTemplate, 0, 0);
CopyWindowToVram(data->secondaryListWindowId, 3);
CopyWindowToVram(data->secondaryListWindowId, COPYWIN_FULL);
}

static void PadString(const u8 *src, u8 *dst)
Expand Down Expand Up @@ -1497,7 +1497,7 @@ static void PrintDigitChars(struct BattleDebugMenu *data)

text[i] = EOS;

AddTextPrinterParameterized(data->modifyWindowId, 1, text, 3, 0, 0, NULL);
AddTextPrinterParameterized(data->modifyWindowId, FONT_NORMAL, text, 3, 0, 0, NULL);
}

static const u32 GetBitfieldToAndValue(u32 currBit, u32 bitsCount)
Expand Down
Loading
Loading