Document Trainer Card
This commit is contained in:
22
src/menu.c
22
src/menu.c
@@ -159,7 +159,7 @@ void sub_8197200(void)
|
||||
ChangeBgX(0, 0, 0);
|
||||
ChangeBgY(0, 0, 0);
|
||||
DeactivateAllTextPrinters();
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
}
|
||||
|
||||
u16 RunTextPrintersAndIsPrinter0Active(void)
|
||||
@@ -209,7 +209,7 @@ void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonP
|
||||
AddTextPrinterParameterized2(0, 1, gStringVar4, speed, NULL, 2, 1, 3);
|
||||
}
|
||||
|
||||
void sub_81973A4(void)
|
||||
void LoadMessageBoxAndBorderGfx(void)
|
||||
{
|
||||
LoadMessageBoxGfx(0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM * 0x10);
|
||||
LoadUserWindowBorderGfx(0, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM * 0x10);
|
||||
@@ -458,7 +458,7 @@ u16 sub_81978D0(u8 colorNum)
|
||||
|
||||
void DisplayItemMessageOnField(u8 taskId, const u8 *string, TaskFunc callback)
|
||||
{
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DisplayMessageAndContinueTask(taskId, 0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM, 1, GetPlayerTextSpeedDelay(), string, callback);
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
@@ -2133,7 +2133,7 @@ void blit_move_info_icon(u8 windowId, u8 iconId, u16 x, u16 y)
|
||||
BlitBitmapRectToWindow(windowId, gFireRedMenuElements_Gfx + gMoveMenuInfoIcons[iconId].offset * 32, 0, 0, 128, 128, x, y, gMoveMenuInfoIcons[iconId].width, gMoveMenuInfoIcons[iconId].height);
|
||||
}
|
||||
|
||||
void sub_819A344(u8 a0, u8 *dest, u8 color)
|
||||
void BufferSaveMenuText(u8 textId, u8 *dest, u8 color)
|
||||
{
|
||||
s32 curFlag;
|
||||
s32 flagCount;
|
||||
@@ -2147,28 +2147,28 @@ void sub_819A344(u8 a0, u8 *dest, u8 color)
|
||||
*(string++) = EXT_CTRL_CODE_SHADOW;
|
||||
*(string++) = color + 1;
|
||||
|
||||
switch (a0)
|
||||
switch (textId)
|
||||
{
|
||||
case 0:
|
||||
case SAVE_MENU_NAME:
|
||||
StringCopy(string, gSaveBlock2Ptr->playerName);
|
||||
break;
|
||||
case 1:
|
||||
case SAVE_MENU_CAUGHT:
|
||||
if (IsNationalPokedexEnabled())
|
||||
string = ConvertIntToDecimalStringN(string, GetNationalPokedexCount(FLAG_GET_CAUGHT), STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
else
|
||||
string = ConvertIntToDecimalStringN(string, GetHoennPokedexCount(FLAG_GET_CAUGHT), STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
*string = EOS;
|
||||
break;
|
||||
case 2:
|
||||
case SAVE_MENU_PLAY_TIME:
|
||||
string = ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->playTimeHours, STR_CONV_MODE_LEFT_ALIGN, 3);
|
||||
*(string++) = CHAR_COLON;
|
||||
ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->playTimeMinutes, STR_CONV_MODE_LEADING_ZEROS, 2);
|
||||
break;
|
||||
case 3:
|
||||
case SAVE_MENU_LOCATION:
|
||||
GetMapNameGeneric(string, gMapHeader.regionMapSectionId);
|
||||
break;
|
||||
case 4:
|
||||
for (curFlag = FLAG_BADGE01_GET, flagCount = 0, endOfString = string + 1; curFlag <= FLAG_BADGE08_GET; curFlag++)
|
||||
case SAVE_MENU_BADGES:
|
||||
for (curFlag = FLAG_BADGE01_GET, flagCount = 0, endOfString = string + 1; curFlag < FLAG_BADGE01_GET + NUM_BADGES; curFlag++)
|
||||
{
|
||||
if (FlagGet(curFlag))
|
||||
flagCount++;
|
||||
|
||||
Reference in New Issue
Block a user