mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Document Trainer Card
This commit is contained in:
parent
faeb974c46
commit
084bd66924
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@ -1353,22 +1353,24 @@
|
||||
|
||||
#define SYSTEM_FLAGS (TRAINER_FLAGS_END + 1) // 0x860
|
||||
|
||||
#define FLAG_SYS_POKEMON_GET (SYSTEM_FLAGS + 0) // FLAG_0x860
|
||||
#define FLAG_SYS_POKEDEX_GET (SYSTEM_FLAGS + 1)
|
||||
#define FLAG_SYS_POKENAV_GET (SYSTEM_FLAGS + 2)
|
||||
#define FLAG_SYS_GAME_CLEAR (SYSTEM_FLAGS + 4)
|
||||
#define FLAG_SYS_CHAT_USED (SYSTEM_FLAGS + 5)
|
||||
#define FLAG_SYS_HIPSTER_MEET (SYSTEM_FLAGS + 6)
|
||||
#define FLAG_SYS_POKEMON_GET (SYSTEM_FLAGS + 0x0) // FLAG_0x860
|
||||
#define FLAG_SYS_POKEDEX_GET (SYSTEM_FLAGS + 0x1)
|
||||
#define FLAG_SYS_POKENAV_GET (SYSTEM_FLAGS + 0x2)
|
||||
#define FLAG_UNUSED_0x863 (SYSTEM_FLAGS + 0x3)
|
||||
#define FLAG_SYS_GAME_CLEAR (SYSTEM_FLAGS + 0x4)
|
||||
#define FLAG_SYS_CHAT_USED (SYSTEM_FLAGS + 0x5)
|
||||
#define FLAG_SYS_HIPSTER_MEET (SYSTEM_FLAGS + 0x6)
|
||||
|
||||
// Badges
|
||||
#define FLAG_BADGE01_GET (SYSTEM_FLAGS + 7)
|
||||
#define FLAG_BADGE02_GET (SYSTEM_FLAGS + 8)
|
||||
#define FLAG_BADGE03_GET (SYSTEM_FLAGS + 9)
|
||||
#define FLAG_BADGE01_GET (SYSTEM_FLAGS + 0x7)
|
||||
#define FLAG_BADGE02_GET (SYSTEM_FLAGS + 0x8)
|
||||
#define FLAG_BADGE03_GET (SYSTEM_FLAGS + 0x9)
|
||||
#define FLAG_BADGE04_GET (SYSTEM_FLAGS + 0xA)
|
||||
#define FLAG_BADGE05_GET (SYSTEM_FLAGS + 0xB)
|
||||
#define FLAG_BADGE06_GET (SYSTEM_FLAGS + 0xC)
|
||||
#define FLAG_BADGE07_GET (SYSTEM_FLAGS + 0xD)
|
||||
#define FLAG_BADGE08_GET (SYSTEM_FLAGS + 0xE)
|
||||
#define NUM_BADGES (1 + FLAG_BADGE08_GET - FLAG_BADGE01_GET)
|
||||
|
||||
// Towns and Cities
|
||||
#define FLAG_VISITED_LITTLEROOT_TOWN (SYSTEM_FLAGS + 0xF)
|
||||
|
@ -279,4 +279,7 @@
|
||||
|
||||
#define EVOS_PER_MON 5
|
||||
|
||||
#define NUM_MALE_LINK_FACILITY_CLASSES 8
|
||||
#define NUM_FEMALE_LINK_FACILITY_CLASSES 8
|
||||
|
||||
#endif // GUARD_CONSTANTS_POKEMON_H
|
||||
|
@ -4895,18 +4895,18 @@ extern const u16 gUnknown_08DC64FC[];
|
||||
extern const u16 gUnknown_08DC6510[];
|
||||
|
||||
// Trainer Card.
|
||||
extern const u16 gEmeraldTrainerCard0Star_Pal[];
|
||||
extern const u32 gEmeraldTrainerCard_Gfx[];
|
||||
extern const u16 gFireRedTrainerCard0Star_Pal[];
|
||||
extern const u32 gFireRedTrainerCard_Gfx[];
|
||||
extern const u32 gUnknown_08DD2AE0[];
|
||||
extern const u32 gUnknown_08DD21B0[];
|
||||
extern const u32 gUnknown_08DD2D30[];
|
||||
extern const u32 gUnknown_08DD2010[];
|
||||
extern const u32 gUnknown_08DD2B78[];
|
||||
extern const u32 gUnknown_08DD228C[];
|
||||
extern const u32 gUnknown_08DD2E5C[];
|
||||
extern const u32 gUnknown_08DD1F78[];
|
||||
extern const u16 gHoennTrainerCard0Star_Pal[];
|
||||
extern const u32 gHoennTrainerCard_Gfx[];
|
||||
extern const u16 gKantoTrainerCard0Star_Pal[];
|
||||
extern const u32 gKantoTrainerCard_Gfx[];
|
||||
extern const u32 gKantoTrainerCardBg_Tilemap[];
|
||||
extern const u32 gHoennTrainerCardBack_Tilemap[];
|
||||
extern const u32 gKantoTrainerCardBack_Tilemap[];
|
||||
extern const u32 gHoennTrainerCardFront_Tilemap[];
|
||||
extern const u32 gKantoTrainerCardFront_Tilemap[];
|
||||
extern const u32 gHoennTrainerCardFrontLink_Tilemap[];
|
||||
extern const u32 gKantoTrainerCardFrontLink_Tilemap[];
|
||||
extern const u32 gHoennTrainerCardBg_Tilemap[];
|
||||
|
||||
// Frontier Pass
|
||||
extern const u32 gUnknown_08DE08C8[];
|
||||
|
@ -8,6 +8,15 @@
|
||||
#define MENU_NOTHING_CHOSEN -2
|
||||
#define MENU_B_PRESSED -1
|
||||
|
||||
enum
|
||||
{
|
||||
SAVE_MENU_NAME,
|
||||
SAVE_MENU_CAUGHT,
|
||||
SAVE_MENU_PLAY_TIME,
|
||||
SAVE_MENU_LOCATION,
|
||||
SAVE_MENU_BADGES,
|
||||
};
|
||||
|
||||
struct MenuAction
|
||||
{
|
||||
const u8 *text;
|
||||
@ -23,7 +32,7 @@ void FreeAllOverworldWindowBuffers(void);
|
||||
void InitStandardTextBoxWindows(void);
|
||||
void sub_8197200(void);
|
||||
u16 RunTextPrintersAndIsPrinter0Active(void);
|
||||
void sub_81973A4(void);
|
||||
void LoadMessageBoxAndBorderGfx(void);
|
||||
void DrawDialogueFrame(u8 windowId, bool8 copyToVram);
|
||||
void ClearStdWindowAndFrame(u8 windowId, bool8 copyToVram);
|
||||
u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 fgColor, u8 bgColor, u8 shadowColor);
|
||||
@ -80,7 +89,7 @@ void sub_819786C(u8 windowId, bool8 copyToVram);
|
||||
void AddTextPrinterForMessage_2(bool8 allowSkippingDelayWithButtonPress);
|
||||
void RemoveStartMenuWindow(void);
|
||||
void DisplayYesNoMenuWithDefault(u8 initialCursorPos);
|
||||
void sub_819A344(u8 a0, u8 *dest, u8 color);
|
||||
void BufferSaveMenuText(u8 textId, u8 *dest, u8 color);
|
||||
void RemoveMapNamePopUpWindow(void);
|
||||
u8 GetMapNamePopUpWindowId(void);
|
||||
u8 AddMapNamePopUpWindow(void);
|
||||
|
@ -2514,11 +2514,11 @@ extern const u8 gText_WinsLosses[];
|
||||
extern const u8 gText_PokemonTrades[];
|
||||
extern const u8 gText_BerryCrush[];
|
||||
extern const u8 gText_UnionTradesAndBattles[];
|
||||
extern const u8 gText_Var1DarkGreyShadowLightGrey[];
|
||||
extern const u8 gText_NumPokeblocks[];
|
||||
extern const u8 gText_PokeblocksWithFriends[];
|
||||
extern const u8 gText_WonContestsWFriends[];
|
||||
extern const u8 gText_WSlashStraightSlash[];
|
||||
extern const u8 gText_Var1DarkLightGreyBP[];
|
||||
extern const u8 gText_WinsStraight[];
|
||||
extern const u8 gText_NumBP[];
|
||||
extern const u8 gText_BattleTower[];
|
||||
extern const u8 gText_BattlePtsWon[];
|
||||
|
||||
|
@ -1,6 +1,24 @@
|
||||
#ifndef GUARD_TRAINER_CARD_H
|
||||
#define GUARD_TRAINER_CARD_H
|
||||
|
||||
#define TRAINER_CARD_PROFILE_LENGTH 4
|
||||
#define TRAINER_CARD_STICKER_TYPES 3
|
||||
|
||||
enum
|
||||
{
|
||||
CARD_TYPE_FRLG,
|
||||
CARD_TYPE_RS,
|
||||
CARD_TYPE_EMERALD,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
MON_ICON_TINT_NORMAL,
|
||||
MON_ICON_TINT_BLACK,
|
||||
MON_ICON_TINT_PINK,
|
||||
MON_ICON_TINT_SEPIA,
|
||||
};
|
||||
|
||||
struct TrainerCard
|
||||
{
|
||||
/*0x00*/ u8 gender;
|
||||
@ -23,19 +41,19 @@ struct TrainerCard
|
||||
/*0x1E*/ u16 pokeblocksWithFriends;
|
||||
/*0x20*/ u16 pokemonTrades;
|
||||
/*0x24*/ u32 money;
|
||||
/*0x28*/ u16 var_28[4];
|
||||
/*0x28*/ u16 easyChatProfile[TRAINER_CARD_PROFILE_LENGTH];
|
||||
/*0x30*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x38*/ u8 version;
|
||||
/*0x3A*/ u16 var_3A;
|
||||
/*0x3A*/ bool16 hasAllFrontierSymbols;
|
||||
/*0x3C*/ u32 berryCrushPoints;
|
||||
/*0x40*/ u32 unionRoomNum;
|
||||
/*0x44*/ u8 filler44[0x8];
|
||||
/*0x4C*/ u8 var_4C;
|
||||
/*0x4D*/ u8 var_4D;
|
||||
/*0x4E*/ u8 var_4E;
|
||||
/*0x4F*/ u8 var_4F;
|
||||
/*0x50*/ u8 var_50[0x4];
|
||||
/*0x54*/ u16 monSpecies[PARTY_SIZE];
|
||||
/*0x44*/ u8 filler[8];
|
||||
/*0x4C*/ bool8 shouldDrawStickers; // FRLG only
|
||||
/*0x4D*/ u8 unused;
|
||||
/*0x4E*/ u8 monIconTint; // FRLG only
|
||||
/*0x4F*/ u8 facilityClass;
|
||||
/*0x50*/ u8 stickers[TRAINER_CARD_STICKER_TYPES]; // FRLG only
|
||||
/*0x54*/ u16 monSpecies[PARTY_SIZE]; // FRLG only
|
||||
/*0x60*/ bool16 hasAllSymbols;
|
||||
/*0x62*/ u16 frontierBP;
|
||||
};
|
||||
|
@ -7,7 +7,7 @@ u16 CreateMonPicSprite_HandleDeoxys(u16 species, u32 otId, u32 personality, bool
|
||||
u16 FreeAndDestroyMonPicSprite(u16 spriteId);
|
||||
u16 CreateTrainerPicSprite(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag);
|
||||
u16 FreeAndDestroyTrainerPicSprite(u16 spriteId);
|
||||
u16 sub_818D938(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId);
|
||||
u16 CreateTrainerCardTrainerPicSprite(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId);
|
||||
u16 PlayerGenderToFrontTrainerPicId_Debug(u8 gender, bool8 getClass);
|
||||
|
||||
#endif // GUARD_TRAINER_POKEMON_SPRITES_H
|
||||
|
@ -321,7 +321,7 @@ const struct RematchTrainer gRematchTable[REMATCH_TABLE_ENTRIES] =
|
||||
[REMATCH_WALLACE] = REMATCH(TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, EVER_GRANDE_CITY),
|
||||
};
|
||||
|
||||
static const u16 sBadgeFlags[8] =
|
||||
static const u16 sBadgeFlags[NUM_BADGES] =
|
||||
{
|
||||
FLAG_BADGE01_GET, FLAG_BADGE02_GET, FLAG_BADGE03_GET, FLAG_BADGE04_GET,
|
||||
FLAG_BADGE05_GET, FLAG_BADGE06_GET, FLAG_BADGE07_GET, FLAG_BADGE08_GET,
|
||||
|
@ -1190,16 +1190,16 @@ void Script_ShowLinkTrainerCard(void)
|
||||
// color into gStringVar2.
|
||||
bool32 GetLinkTrainerCardColor(u8 linkPlayerIndex)
|
||||
{
|
||||
u32 trainerCardColorIndex;
|
||||
u32 numStars;
|
||||
|
||||
gSpecialVar_0x8006 = linkPlayerIndex;
|
||||
StringCopy(gStringVar1, gLinkPlayers[linkPlayerIndex].name);
|
||||
|
||||
trainerCardColorIndex = GetTrainerCardStars(linkPlayerIndex);
|
||||
if (trainerCardColorIndex == 0)
|
||||
numStars = GetTrainerCardStars(linkPlayerIndex);
|
||||
if (numStars == 0)
|
||||
return FALSE;
|
||||
|
||||
StringCopy(gStringVar2, gTrainerCardColorNames[trainerCardColorIndex - 1]);
|
||||
StringCopy(gStringVar2, gTrainerCardColorNames[numStars - 1]);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ static void sub_8098154(u8 taskId)
|
||||
switch (task->data[0])
|
||||
{
|
||||
case 0:
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
|
@ -1424,21 +1424,19 @@ const u8 gUnknown_08DD1A18[] = INCBIN_U8("graphics/unknown/unknown_DD1A18.4bpp")
|
||||
|
||||
// trainer card
|
||||
|
||||
const u16 gEmeraldTrainerCard0Star_Pal[] = INCBIN_U16("graphics/trainer_card/0star.gbapal");
|
||||
const u32 gEmeraldTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card.4bpp.lz");
|
||||
const u16 gHoennTrainerCard0Star_Pal[] = INCBIN_U16("graphics/trainer_card/0star.gbapal");
|
||||
const u32 gHoennTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card.4bpp.lz");
|
||||
const u32 gHoennTrainerCardBg_Tilemap[] = INCBIN_U32("graphics/trainer_card/bg.bin.lz");
|
||||
const u32 gHoennTrainerCardFront_Tilemap[] = INCBIN_U32("graphics/trainer_card/front.bin.lz");
|
||||
const u32 gHoennTrainerCardBack_Tilemap[] = INCBIN_U32("graphics/trainer_card/back.bin.lz");
|
||||
const u32 gHoennTrainerCardFrontLink_Tilemap[] = INCBIN_U32("graphics/trainer_card/front_link.bin.lz");
|
||||
|
||||
const u32 gUnknown_08DD1F78[] = INCBIN_U32("graphics/unknown/unknown_DD1F78.bin.lz");
|
||||
const u32 gUnknown_08DD2010[] = INCBIN_U32("graphics/unknown/unknown_DD2010.bin.lz");
|
||||
const u32 gUnknown_08DD21B0[] = INCBIN_U32("graphics/unknown/unknown_DD21B0.bin.lz");
|
||||
const u32 gUnknown_08DD228C[] = INCBIN_U32("graphics/unknown/unknown_DD228C.bin.lz");
|
||||
|
||||
const u16 gFireRedTrainerCard0Star_Pal[] = INCBIN_U16("graphics/trainer_card/0star_fr.gbapal");
|
||||
const u32 gFireRedTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card_fr.4bpp.lz");
|
||||
|
||||
const u32 gUnknown_08DD2AE0[] = INCBIN_U32("graphics/unknown/unknown_DD2AE0.bin.lz");
|
||||
const u32 gUnknown_08DD2B78[] = INCBIN_U32("graphics/unknown/unknown_DD2B78.bin.lz");
|
||||
const u32 gUnknown_08DD2D30[] = INCBIN_U32("graphics/unknown/unknown_DD2D30.bin.lz");
|
||||
const u32 gUnknown_08DD2E5C[] = INCBIN_U32("graphics/unknown/unknown_DD2E5C.bin.lz");
|
||||
const u16 gKantoTrainerCard0Star_Pal[] = INCBIN_U16("graphics/trainer_card/0star_fr.gbapal");
|
||||
const u32 gKantoTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card_fr.4bpp.lz");
|
||||
const u32 gKantoTrainerCardBg_Tilemap[] = INCBIN_U32("graphics/trainer_card/bg_fr.bin.lz");
|
||||
const u32 gKantoTrainerCardFront_Tilemap[] = INCBIN_U32("graphics/trainer_card/front_fr.bin.lz");
|
||||
const u32 gKantoTrainerCardBack_Tilemap[] = INCBIN_U32("graphics/trainer_card/back_fr.bin.lz");
|
||||
const u32 gKantoTrainerCardFrontLink_Tilemap[] = INCBIN_U32("graphics/trainer_card/front_link_fr.bin.lz");
|
||||
|
||||
// pokemon storage system
|
||||
|
||||
|
@ -2188,7 +2188,7 @@ static void MainMenu_FormatSavegameBadges(void)
|
||||
u8 badgeCount = 0;
|
||||
u32 i;
|
||||
|
||||
for (i = FLAG_BADGE01_GET; i <= FLAG_BADGE08_GET; i++)
|
||||
for (i = FLAG_BADGE01_GET; i < FLAG_BADGE01_GET + NUM_BADGES; i++)
|
||||
{
|
||||
if (FlagGet(i))
|
||||
badgeCount++;
|
||||
|
@ -1287,7 +1287,7 @@ static bool32 sub_81963F0(u8 taskId)
|
||||
ChangeBgY(0, 0, 0);
|
||||
if (!gMatchCallState.triggeredFromScript)
|
||||
{
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
playerObjectId = GetEventObjectIdByLocalIdAndMap(EVENT_OBJ_ID_PLAYER, 0, 0);
|
||||
EventObjectClearHeldMovementIfFinished(&gEventObjects[playerObjectId]);
|
||||
ScriptMovement_UnfreezeEventObjects();
|
||||
@ -1746,7 +1746,7 @@ static void PopulateBattleFrontierStreak(int matchCallId, u8 *destStr)
|
||||
ConvertIntToDecimalStringN(destStr, gBattleFrontierStreakInfo.streak, STR_CONV_MODE_LEFT_ALIGN, i);
|
||||
}
|
||||
|
||||
static const u16 sBadgeFlags[] =
|
||||
static const u16 sBadgeFlags[NUM_BADGES] =
|
||||
{
|
||||
FLAG_BADGE01_GET,
|
||||
FLAG_BADGE02_GET,
|
||||
@ -1762,7 +1762,7 @@ static int GetNumOwnedBadges(void)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
for (i = 0; i < NUM_BADGES; i++)
|
||||
{
|
||||
if (!FlagGet(sBadgeFlags[i]))
|
||||
break;
|
||||
|
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++;
|
||||
|
@ -505,7 +505,7 @@ void sub_816B31C(void)
|
||||
|
||||
void Mailbox_DoRedrawMailboxMenuAfterReturn(void)
|
||||
{
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DrawDialogueFrame(0, 1);
|
||||
InitItemStorageMenu(CreateTask(ItemStorage_HandleReturnToProcessInput, 0), 1);
|
||||
FadeInFromBlack();
|
||||
@ -739,7 +739,7 @@ static void pal_fill_for_maplights_or_black(void)
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
taskId = CreateTask(Mailbox_HandleReturnToProcessInput, 0);
|
||||
if (sub_81D1C44(playerPCItemPageInfo.count) == TRUE)
|
||||
Mailbox_DrawMailboxMenu(taskId);
|
||||
@ -847,7 +847,7 @@ static void Mailbox_UpdateMailListAfterDeposit(void)
|
||||
&& playerPCItemPageInfo.itemsAbove != 0)
|
||||
playerPCItemPageInfo.itemsAbove--;
|
||||
ItemStorage_SetItemAndMailCount(taskId);
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
if (sub_81D1C44(playerPCItemPageInfo.count) == TRUE)
|
||||
Mailbox_DrawMailboxMenu(taskId);
|
||||
else
|
||||
|
@ -1895,14 +1895,26 @@ static const u16 sDeoxysBaseStats[] =
|
||||
[STAT_SPDEF] = 90,
|
||||
};
|
||||
|
||||
const u16 gLinkPlayerFacilityClasses[] =
|
||||
const u16 gLinkPlayerFacilityClasses[NUM_MALE_LINK_FACILITY_CLASSES + NUM_FEMALE_LINK_FACILITY_CLASSES] =
|
||||
{
|
||||
FACILITY_CLASS_COOLTRAINER_M, FACILITY_CLASS_BLACK_BELT, FACILITY_CLASS_CAMPER,
|
||||
FACILITY_CLASS_YOUNGSTER, FACILITY_CLASS_PSYCHIC_M, FACILITY_CLASS_BUG_CATCHER,
|
||||
FACILITY_CLASS_PKMN_BREEDER_M, FACILITY_CLASS_GUITARIST,
|
||||
FACILITY_CLASS_COOLTRAINER_F, FACILITY_CLASS_HEX_MANIAC, FACILITY_CLASS_PICNICKER,
|
||||
FACILITY_CLASS_LASS, FACILITY_CLASS_PSYCHIC_F, FACILITY_CLASS_BATTLE_GIRL,
|
||||
FACILITY_CLASS_PKMN_BREEDER_F, FACILITY_CLASS_BEAUTY
|
||||
// Male classes
|
||||
FACILITY_CLASS_COOLTRAINER_M,
|
||||
FACILITY_CLASS_BLACK_BELT,
|
||||
FACILITY_CLASS_CAMPER,
|
||||
FACILITY_CLASS_YOUNGSTER,
|
||||
FACILITY_CLASS_PSYCHIC_M,
|
||||
FACILITY_CLASS_BUG_CATCHER,
|
||||
FACILITY_CLASS_PKMN_BREEDER_M,
|
||||
FACILITY_CLASS_GUITARIST,
|
||||
// Female Classes
|
||||
FACILITY_CLASS_COOLTRAINER_F,
|
||||
FACILITY_CLASS_HEX_MANIAC,
|
||||
FACILITY_CLASS_PICNICKER,
|
||||
FACILITY_CLASS_LASS,
|
||||
FACILITY_CLASS_PSYCHIC_F,
|
||||
FACILITY_CLASS_BATTLE_GIRL,
|
||||
FACILITY_CLASS_PKMN_BREEDER_F,
|
||||
FACILITY_CLASS_BEAUTY
|
||||
};
|
||||
|
||||
static const u8 sHoldEffectToType[][2] =
|
||||
|
@ -1735,7 +1735,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
CreatePCMenu(task->data[1], &task->data[15]);
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DrawDialogueFrame(0, 0);
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, TEXT_SPEED_FF, NULL, 2, 1, 3);
|
||||
|
@ -475,7 +475,7 @@ static void sub_809F048(void)
|
||||
ShowBg(0);
|
||||
InitWindows(sUnknown_08510408);
|
||||
DeactivateAllTextPrinters();
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
}
|
||||
|
||||
static void CB2_ResetRtcScreen(void)
|
||||
|
@ -1304,7 +1304,7 @@ bool8 ScrCmd_cmdDB(struct ScriptContext *ctx)
|
||||
|
||||
if (msg == NULL)
|
||||
msg = (const u8 *)ctx->data[0];
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DrawDialogueFrame(0, 1);
|
||||
AddTextPrinterParameterized(0, 1, msg, 0, 1, 0, 0);
|
||||
return FALSE;
|
||||
|
@ -450,7 +450,7 @@ static bool32 InitStartMenuStep(void)
|
||||
sInitStartMenuData[0]++;
|
||||
break;
|
||||
case 2:
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DrawStdWindowFrame(sub_81979C4(sNumStartMenuActions), FALSE);
|
||||
sInitStartMenuData[1] = 0;
|
||||
sInitStartMenuData[0]++;
|
||||
@ -1314,37 +1314,37 @@ static void ShowSaveInfoWindow(void)
|
||||
|
||||
// Print region name
|
||||
yOffset = 1;
|
||||
sub_819A344(3, gStringVar4, TEXT_COLOR_GREEN);
|
||||
BufferSaveMenuText(SAVE_MENU_LOCATION, gStringVar4, TEXT_COLOR_GREEN);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, 0, yOffset, 0xFF, NULL);
|
||||
|
||||
// Print player name
|
||||
yOffset = 0x11;
|
||||
yOffset += 16;
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingPlayer, 0, yOffset, 0xFF, NULL);
|
||||
sub_819A344(0, gStringVar4, color);
|
||||
BufferSaveMenuText(SAVE_MENU_NAME, gStringVar4, color);
|
||||
xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70);
|
||||
PrintPlayerNameOnWindow(sSaveInfoWindowId, gStringVar4, xOffset, yOffset);
|
||||
|
||||
// Print badge count
|
||||
yOffset = 0x21;
|
||||
yOffset += 16;
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingBadges, 0, yOffset, 0xFF, NULL);
|
||||
sub_819A344(4, gStringVar4, color);
|
||||
BufferSaveMenuText(SAVE_MENU_BADGES, gStringVar4, color);
|
||||
xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, xOffset, yOffset, 0xFF, NULL);
|
||||
|
||||
if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE)
|
||||
{
|
||||
// Print pokedex count
|
||||
yOffset = 0x31;
|
||||
yOffset += 16;
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingPokedex, 0, yOffset, 0xFF, NULL);
|
||||
sub_819A344(1, gStringVar4, color);
|
||||
BufferSaveMenuText(SAVE_MENU_CAUGHT, gStringVar4, color);
|
||||
xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, xOffset, yOffset, 0xFF, NULL);
|
||||
}
|
||||
|
||||
// Print play time
|
||||
yOffset += 0x10;
|
||||
yOffset += 16;
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gText_SavingTime, 0, yOffset, 0xFF, NULL);
|
||||
sub_819A344(2, gStringVar4, color);
|
||||
BufferSaveMenuText(SAVE_MENU_PLAY_TIME, gStringVar4, color);
|
||||
xOffset = GetStringRightAlignXOffset(1, gStringVar4, 0x70);
|
||||
AddTextPrinterParameterized(sSaveInfoWindowId, 1, gStringVar4, xOffset, yOffset, 0xFF, NULL);
|
||||
|
||||
|
@ -1206,12 +1206,12 @@ const u8 gText_UnionTradesAndBattles[] = _("UNION TRADES & BATTLES");
|
||||
const u8 gText_BerryCrush[] = _("BERRY CRUSH");
|
||||
const u8 gText_WaitingTrainerFinishReading[] = _("Waiting for the other TRAINER to\nfinish reading your TRAINER CARD.");
|
||||
const u8 gText_PokeblocksWithFriends[] = _("{POKEBLOCK}S W/FRIENDS");
|
||||
const u8 gText_Var1DarkGreyShadowLightGrey[] = _("{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}");
|
||||
const u8 gText_NumPokeblocks[] = _("{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}");
|
||||
const u8 gText_WonContestsWFriends[] = _("WON CONTESTS W/FRIENDS");
|
||||
const u8 gText_BattlePtsWon[] = _("BATTLE POINTS WON");
|
||||
const u8 gText_Var1DarkLightGreyBP[] = _("{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}BP");
|
||||
const u8 gText_NumBP[] = _("{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}BP");
|
||||
const u8 gText_BattleTower[] = _("BATTLE TOWER");
|
||||
const u8 gText_WSlashStraightSlash[] = _("W/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY} STRAIGHT/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_2}");
|
||||
const u8 gText_WinsStraight[] = _("W/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY} STRAIGHT/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_2}");
|
||||
const u8 gText_BattleTower2[] = _("BATTLE TOWER");
|
||||
const u8 gText_BattleDome[] = _("BATTLE DOME");
|
||||
const u8 gText_BattlePalace[] = _("BATTLE PALACE");
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -331,7 +331,7 @@ static u16 sub_818D65C(u16 species, u32 otId, u32 personality, bool8 isFrontPic,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u16 sub_818D6CC(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId, bool8 isTrainer)
|
||||
static u16 CreateTrainerCardSprite(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId, bool8 isTrainer)
|
||||
{
|
||||
u8 *framePics;
|
||||
|
||||
@ -366,9 +366,10 @@ u16 sub_818D834(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 pal
|
||||
return sub_818D65C(species, otId, personality, isFrontPic, paletteSlot, windowId, FALSE);
|
||||
}
|
||||
|
||||
u16 sub_818D864(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId)
|
||||
// Unused, FRLG only
|
||||
u16 CreateTrainerCardMonIconSprite(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId)
|
||||
{
|
||||
return sub_818D6CC(species, otId, personality, isFrontPic, destX, destY, paletteSlot, windowId, FALSE);
|
||||
return CreateTrainerCardSprite(species, otId, personality, isFrontPic, destX, destY, paletteSlot, windowId, FALSE);
|
||||
}
|
||||
|
||||
u16 CreateTrainerPicSprite(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag)
|
||||
@ -386,9 +387,9 @@ u16 sub_818D904(u16 species, bool8 isFrontPic, u8 paletteSlot, u8 windowId)
|
||||
return sub_818D65C(species, 0, 0, isFrontPic, paletteSlot, windowId, TRUE);
|
||||
}
|
||||
|
||||
u16 sub_818D938(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId)
|
||||
u16 CreateTrainerCardTrainerPicSprite(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId)
|
||||
{
|
||||
return sub_818D6CC(species, 0, 0, isFrontPic, destX, destY, paletteSlot, windowId, TRUE);
|
||||
return CreateTrainerCardSprite(species, 0, 0, isFrontPic, destX, destY, paletteSlot, windowId, TRUE);
|
||||
}
|
||||
|
||||
u16 PlayerGenderToFrontTrainerPicId_Debug(u8 gender, bool8 getClass)
|
||||
|
2
src/tv.c
2
src/tv.c
@ -1943,7 +1943,7 @@ void sub_80EDB44(void)
|
||||
show = &gSaveBlock1Ptr->tvShows[sCurTVShowSlot];
|
||||
show->rivalTrainer.kind = TVSHOW_TODAYS_RIVAL_TRAINER;
|
||||
show->rivalTrainer.active = FALSE;
|
||||
for (i = FLAG_BADGE01_GET, nBadges = 0; i < FLAG_BADGE01_GET + 8; i ++)
|
||||
for (i = FLAG_BADGE01_GET, nBadges = 0; i < FLAG_BADGE01_GET + NUM_BADGES; i ++)
|
||||
{
|
||||
if (FlagGet(i))
|
||||
{
|
||||
|
@ -3376,7 +3376,7 @@ u8 sub_8016FF0(struct UnkStruct_Main4 * a0, u32 a1)
|
||||
|
||||
bool32 sub_8017020(const u8 *src)
|
||||
{
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DrawDialogueFrame(0, 1);
|
||||
StringExpandPlaceholders(gStringVar4, src);
|
||||
AddTextPrinterWithCustomSpeedForMessage(FALSE, 1);
|
||||
@ -3400,7 +3400,7 @@ bool8 PrintOnTextbox(u8 *textState, const u8 *str)
|
||||
switch (*textState)
|
||||
{
|
||||
case 0:
|
||||
sub_81973A4();
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
DrawDialogueFrame(0, 1);
|
||||
StringExpandPlaceholders(gStringVar4, str);
|
||||
AddTextPrinterForMessage_2(TRUE);
|
||||
@ -4316,9 +4316,9 @@ void sub_8018220(u8 *unused, struct UnkStruct_URoom *arg1, bool8 arg2)
|
||||
ConvertIntToDecimalStringN(arg1->field_C0[2], trainerCard->pokemonTrades, STR_CONV_MODE_LEFT_ALIGN, 5);
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(3, arg1->field_C0[2]);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
for (i = 0; i < TRAINER_CARD_PROFILE_LENGTH; i++)
|
||||
{
|
||||
CopyEasyChatWord(arg1->field_C0[i + 3], trainerCard->var_28[i]);
|
||||
CopyEasyChatWord(arg1->field_C0[i + 3], trainerCard->easyChatProfile[i]);
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(i + 4, arg1->field_C0[i + 3]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user