Debug menu cleanup
This commit is contained in:
parent
410dc1d6c0
commit
a34e0f6f6f
6 changed files with 975 additions and 837 deletions
|
@ -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::
|
||||
|
|
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
|
1740
src/debug.c
1740
src/debug.c
File diff suppressed because it is too large
Load diff
|
@ -1589,7 +1589,7 @@ void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *menuActi
|
|||
u32 i;
|
||||
|
||||
for (i = 0; i < itemCount; i++)
|
||||
AddTextPrinterParameterized(windowId, 1, menuActions[i].text, 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, menuActions[i].text, 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL);
|
||||
|
||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||
}
|
||||
|
@ -1653,7 +1653,7 @@ void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const
|
|||
for (i = 0; i < rows; i++)
|
||||
{
|
||||
for (j = 0; j < columns; j++)
|
||||
AddTextPrinterParameterized(windowId, 1, menuActions[(i * columns) + j].text, (optionWidth * j) + 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, menuActions[(i * columns) + j].text, (optionWidth * j) + 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL);
|
||||
}
|
||||
CopyWindowToVram(windowId, COPYWIN_GFX);
|
||||
}
|
||||
|
@ -1987,7 +1987,7 @@ void PrintPlayerNameOnWindow(u8 windowId, const u8 *src, u16 x, u16 y)
|
|||
|
||||
StringExpandPlaceholders(gStringVar4, src);
|
||||
|
||||
AddTextPrinterParameterized(windowId, 1, gStringVar4, x, y, TEXT_SKIP_DRAW, 0);
|
||||
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, x, y, TEXT_SKIP_DRAW, 0);
|
||||
}
|
||||
|
||||
static void UNUSED UnusedBlitBitmapRect(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height)
|
||||
|
|
|
@ -4778,7 +4778,7 @@ static void ResetStatsWindows(void)
|
|||
{
|
||||
FillWindowPixelBuffer(i, PIXEL_FILL(0));
|
||||
PutWindowTilemap(i);
|
||||
CopyWindowToVram(i, 3);
|
||||
CopyWindowToVram(i, COPYWIN_FULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5939,7 +5939,7 @@ static void EvoFormsPage_PrintNavigationButtons(void)
|
|||
|
||||
// DrawKeypadIcon(WIN_NAVIGATION_BUTTONS, 10, 5, 0); //(u8 windowId, u8 keypadIconId, u16 x, u16 y)
|
||||
PutWindowTilemap(WIN_NAVIGATION_BUTTONS);
|
||||
CopyWindowToVram(WIN_NAVIGATION_BUTTONS, 3);
|
||||
CopyWindowToVram(WIN_NAVIGATION_BUTTONS, COPYWIN_FULL);
|
||||
}
|
||||
|
||||
static void ResetEvoScreenDataStruct(void)
|
||||
|
@ -5998,10 +5998,10 @@ static void Task_LoadEvolutionScreen(u8 taskId)
|
|||
LoadTilesetTilemapHGSS(EVO_SCREEN);
|
||||
FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0));
|
||||
PutWindowTilemap(WIN_INFO);
|
||||
CopyWindowToVram(WIN_INFO, 3);
|
||||
CopyWindowToVram(WIN_INFO, COPYWIN_FULL);
|
||||
FillWindowPixelBuffer(WIN_NAVIGATION_BUTTONS, PIXEL_FILL(0));
|
||||
PutWindowTilemap(WIN_NAVIGATION_BUTTONS);
|
||||
CopyWindowToVram(WIN_NAVIGATION_BUTTONS, 3);
|
||||
CopyWindowToVram(WIN_NAVIGATION_BUTTONS, COPYWIN_FULL);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
|
@ -6676,10 +6676,10 @@ static void Task_LoadFormsScreen(u8 taskId)
|
|||
LoadTilesetTilemapHGSS(FORMS_SCREEN);
|
||||
FillWindowPixelBuffer(WIN_INFO, PIXEL_FILL(0));
|
||||
PutWindowTilemap(WIN_INFO);
|
||||
CopyWindowToVram(WIN_INFO, 3);
|
||||
CopyWindowToVram(WIN_INFO, COPYWIN_FULL);
|
||||
FillWindowPixelBuffer(WIN_NAVIGATION_BUTTONS, PIXEL_FILL(0));
|
||||
PutWindowTilemap(WIN_NAVIGATION_BUTTONS);
|
||||
CopyWindowToVram(WIN_NAVIGATION_BUTTONS, 3);
|
||||
CopyWindowToVram(WIN_NAVIGATION_BUTTONS, COPYWIN_FULL);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
|
|
|
@ -434,7 +434,7 @@ static void PrintInstructionsOnWindow(struct PokemonDebugMenu *data)
|
|||
else
|
||||
AddTextPrinterParameterized(WIN_INSTRUCTIONS, fontId, textInstructionsSubmenuTwo, x, 0, 0, NULL);
|
||||
}
|
||||
CopyWindowToVram(WIN_INSTRUCTIONS, 3);
|
||||
CopyWindowToVram(WIN_INSTRUCTIONS, COPYWIN_FULL);
|
||||
|
||||
//Bottom left text
|
||||
FillWindowPixelBuffer(WIN_BOTTOM_LEFT, PIXEL_FILL(0));
|
||||
|
@ -496,7 +496,7 @@ static void PrintDigitChars(struct PokemonDebugMenu *data)
|
|||
StringCopy(&text[i], GetSpeciesName(species));
|
||||
|
||||
FillWindowPixelBuffer(WIN_NAME_NUMBERS, 0x11);
|
||||
AddTextPrinterParameterized(WIN_NAME_NUMBERS, 1, text, 6, 0, 0, NULL);
|
||||
AddTextPrinterParameterized(WIN_NAME_NUMBERS, FONT_NORMAL, text, 6, 0, 0, NULL);
|
||||
}
|
||||
|
||||
static u32 CharDigitsToValue(u8 *charDigits, u8 maxDigits)
|
||||
|
@ -1067,7 +1067,7 @@ static void ResetPokemonDebugWindows(void)
|
|||
{
|
||||
FillWindowPixelBuffer(i, PIXEL_FILL(0));
|
||||
PutWindowTilemap(i);
|
||||
CopyWindowToVram(i, 3);
|
||||
CopyWindowToVram(i, COPYWIN_FULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue