2018-05-01 14:01:54 +02:00
|
|
|
#ifndef GUARD_TRAINER_CARD_H
|
|
|
|
#define GUARD_TRAINER_CARD_H
|
|
|
|
|
2020-02-07 18:48:47 +01:00
|
|
|
#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,
|
|
|
|
};
|
|
|
|
|
2018-05-01 14:01:54 +02:00
|
|
|
struct TrainerCard
|
|
|
|
{
|
|
|
|
/*0x00*/ u8 gender;
|
|
|
|
/*0x01*/ u8 stars;
|
|
|
|
/*0x02*/ bool8 hasPokedex;
|
2019-01-19 23:04:33 +01:00
|
|
|
/*0x03*/ bool8 caughtAllHoenn;
|
|
|
|
/*0x04*/ bool8 hasAllPaintings;
|
|
|
|
/*0x06*/ u16 hofDebutHours;
|
|
|
|
/*0x08*/ u16 hofDebutMinutes;
|
|
|
|
/*0x0A*/ u16 hofDebutSeconds;
|
|
|
|
/*0x0C*/ u16 caughtMonsCount;
|
2018-05-01 14:01:54 +02:00
|
|
|
/*0x0E*/ u16 trainerId;
|
|
|
|
/*0x10*/ u16 playTimeHours;
|
|
|
|
/*0x12*/ u16 playTimeMinutes;
|
|
|
|
/*0x14*/ u16 linkBattleWins;
|
|
|
|
/*0x16*/ u16 linkBattleLosses;
|
|
|
|
/*0x18*/ u16 battleTowerWins;
|
2019-01-20 18:24:35 +01:00
|
|
|
/*0x1A*/ u16 battleTowerStraightWins;
|
2018-05-01 14:01:54 +02:00
|
|
|
/*0x1C*/ u16 contestsWithFriends;
|
|
|
|
/*0x1E*/ u16 pokeblocksWithFriends;
|
|
|
|
/*0x20*/ u16 pokemonTrades;
|
|
|
|
/*0x24*/ u32 money;
|
2020-02-07 18:48:47 +01:00
|
|
|
/*0x28*/ u16 easyChatProfile[TRAINER_CARD_PROFILE_LENGTH];
|
2019-01-19 23:04:33 +01:00
|
|
|
/*0x30*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
2019-01-20 18:24:35 +01:00
|
|
|
/*0x38*/ u8 version;
|
2021-10-15 18:05:19 +02:00
|
|
|
/*0x3A*/ bool16 linkHasAllFrontierSymbols;
|
|
|
|
/*0x3C*/ union {
|
|
|
|
u32 berryCrush;
|
|
|
|
u32 frontier;
|
|
|
|
} linkPoints; // This field is used differently by FRLG vs Emerald
|
2019-01-20 18:24:35 +01:00
|
|
|
/*0x40*/ u32 unionRoomNum;
|
2020-02-07 18:48:47 +01:00
|
|
|
/*0x44*/ u8 filler[8];
|
|
|
|
/*0x4C*/ bool8 shouldDrawStickers; // FRLG only
|
|
|
|
/*0x4D*/ u8 unused;
|
|
|
|
/*0x4E*/ u8 monIconTint; // FRLG only
|
2022-08-23 18:39:24 +02:00
|
|
|
/*0x4F*/ u8 unionRoomClass;
|
2020-02-07 18:48:47 +01:00
|
|
|
/*0x50*/ u8 stickers[TRAINER_CARD_STICKER_TYPES]; // FRLG only
|
|
|
|
/*0x54*/ u16 monSpecies[PARTY_SIZE]; // FRLG only
|
2021-10-15 18:05:19 +02:00
|
|
|
// Note: Link players use linkHasAllFrontierSymbols, not the field below,
|
|
|
|
// which they use for a Wonder Card flag id instead (see CreateTrainerCardInBuffer)
|
|
|
|
/*0x60*/ bool16 hasAllFrontierSymbols;
|
2019-01-20 18:24:35 +01:00
|
|
|
/*0x62*/ u16 frontierBP;
|
2018-05-01 14:01:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct TrainerCard gTrainerCards[4];
|
|
|
|
|
2019-01-20 18:24:35 +01:00
|
|
|
u32 CountPlayerTrainerStars(void);
|
2019-02-10 06:50:46 +01:00
|
|
|
u8 GetTrainerCardStars(u8 cardId);
|
2021-10-15 18:05:19 +02:00
|
|
|
void CopyTrainerCardData(struct TrainerCard *dst, struct TrainerCard *src, u8 gameVersion);
|
2019-01-20 18:24:35 +01:00
|
|
|
void ShowPlayerTrainerCard(void (*callback)(void));
|
2022-05-21 21:21:50 +02:00
|
|
|
void ShowTrainerCardInLink(u8 cardId, void (*callback)(void));
|
2021-10-15 18:05:19 +02:00
|
|
|
void TrainerCard_GenerateCardForLinkPlayer(struct TrainerCard *);
|
2018-06-03 22:39:10 +02:00
|
|
|
|
2018-05-01 14:01:54 +02:00
|
|
|
#endif // GUARD_TRAINER_CARD_H
|