Sync trainer_card.c
This commit is contained in:
@@ -133,10 +133,10 @@
|
||||
#define FACILITY_CLASS_CRUSH_KIN 0x81
|
||||
#define FACILITY_CLASS_SIS_AND_BRO_2 0x82
|
||||
#define FACILITY_CLASS_PKMN_PROF 0x83
|
||||
#define FACILITY_CLASS_PLAYER 0x84
|
||||
#define FACILITY_CLASS_PLAYER_2 0x85
|
||||
#define FACILITY_CLASS_PLAYER_3 0x86
|
||||
#define FACILITY_CLASS_PLAYER_4 0x87
|
||||
#define FACILITY_CLASS_BRENDAN 0x84
|
||||
#define FACILITY_CLASS_MAY 0x85
|
||||
#define FACILITY_CLASS_RED 0x86
|
||||
#define FACILITY_CLASS_LEAF 0x87
|
||||
#define FACILITY_CLASS_TEAM_ROCKET_2 0x88
|
||||
#define FACILITY_CLASS_PSYCHIC_4 0x89
|
||||
#define FACILITY_CLASS_CRUSH_GIRL 0x8A
|
||||
|
||||
@@ -1327,6 +1327,7 @@
|
||||
#define FLAG_0x808 (SYS_FLAGS + 0x8)
|
||||
|
||||
#define PERMA_SYS_FLAGS_START 0x820
|
||||
|
||||
#define FLAG_BADGE01_GET (SYS_FLAGS + 0x20)
|
||||
#define FLAG_BADGE02_GET (SYS_FLAGS + 0x21)
|
||||
#define FLAG_BADGE03_GET (SYS_FLAGS + 0x22)
|
||||
@@ -1335,6 +1336,8 @@
|
||||
#define FLAG_BADGE06_GET (SYS_FLAGS + 0x25)
|
||||
#define FLAG_BADGE07_GET (SYS_FLAGS + 0x26)
|
||||
#define FLAG_BADGE08_GET (SYS_FLAGS + 0x27)
|
||||
#define NUM_BADGES (1 + FLAG_BADGE08_GET - FLAG_BADGE01_GET)
|
||||
|
||||
#define FLAG_SYS_POKEMON_GET (SYS_FLAGS + 0x28)
|
||||
#define FLAG_SYS_POKEDEX_GET (SYS_FLAGS + 0x29)
|
||||
#define FLAG_0x82A (SYS_FLAGS + 0x2A)
|
||||
|
||||
@@ -12,4 +12,6 @@
|
||||
#define MON_ICON_TINT_PINK 2
|
||||
#define MON_ICON_TINT_SEPIA 3
|
||||
|
||||
#define NUM_LINK_TRAINER_CARD_CLASSES 8
|
||||
|
||||
#endif // GUARD_CONSTANTS_TRAINER_CARD_H
|
||||
|
||||
+4
-4
@@ -4845,10 +4845,10 @@ extern const u32 gBuyMenuFrame_Pal[];
|
||||
extern const u16 gUnknown_8D2FBB4[];
|
||||
|
||||
// trainer card
|
||||
extern const u16 gFireRedTrainerCard_Pal[];
|
||||
extern const u32 gFireRedTrainerCard_Gfx[];
|
||||
extern const u16 gEmeraldTrainerCard_Pal[];
|
||||
extern const u32 gEmeraldTrainerCard_Gfx[];
|
||||
extern const u16 gKantoTrainerCard_Pal[];
|
||||
extern const u32 gKantoTrainerCard_Gfx[];
|
||||
extern const u16 gHoennTrainerCard_Pal[];
|
||||
extern const u32 gHoennTrainerCard_Gfx[];
|
||||
|
||||
// battle_interface
|
||||
extern const u32 gFile_graphics_battle_interface_ball_status_bar_sheet[];
|
||||
|
||||
@@ -25,19 +25,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*/ u32 berriesPicked;
|
||||
/*0x48*/ u32 jumpsInRow;
|
||||
/*0x4C*/ bool8 var_4C;
|
||||
/*0x4C*/ bool8 shouldDrawStickers;
|
||||
/*0x4D*/ bool8 hasAllMons;
|
||||
/*0x4E*/ u8 var_4E;
|
||||
/*0x4F*/ u8 var_4F;
|
||||
/*0x50*/ u8 var_50[4];
|
||||
/*0x4E*/ u8 monIconTint;
|
||||
/*0x4F*/ u8 facilityClass;
|
||||
/*0x50*/ u8 stickers[TRAINER_CARD_STICKER_TYPES];
|
||||
/*0x54*/ u16 monSpecies[PARTY_SIZE];
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
u16 sub_810C330(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);
|
||||
bool16 ResetAllPicSprites(void);
|
||||
u16 sub_818D3E4(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, u8 paletteSlot, u16 paletteTag);
|
||||
u16 sub_818D7D8(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag);
|
||||
|
||||
@@ -1127,11 +1127,11 @@ static void LinkOpponentHandleDrawTrainerPic(void)
|
||||
}
|
||||
else if (gLinkPlayers[GetBattlerMultiplayerId(gActiveBattler)].gender != MALE)
|
||||
{
|
||||
trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PLAYER_4];
|
||||
trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_LEAF];
|
||||
}
|
||||
else
|
||||
{
|
||||
trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PLAYER_3];
|
||||
trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_RED];
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1152,11 +1152,11 @@ static void LinkOpponentHandleDrawTrainerPic(void)
|
||||
}
|
||||
else if (gLinkPlayers[GetMultiplayerId() ^ BIT_SIDE].gender != MALE)
|
||||
{
|
||||
trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PLAYER_4];
|
||||
trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_LEAF];
|
||||
}
|
||||
else
|
||||
{
|
||||
trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_PLAYER_3];
|
||||
trainerPicId = gFacilityClassToPicIndex[FACILITY_CLASS_RED];
|
||||
}
|
||||
}
|
||||
DecompressTrainerFrontPic(trainerPicId, gActiveBattler);
|
||||
|
||||
@@ -133,10 +133,10 @@ const u8 gFacilityClassToPicIndex[] =
|
||||
[FACILITY_CLASS_CRUSH_KIN] = 130,
|
||||
[FACILITY_CLASS_SIS_AND_BRO_2] = 131,
|
||||
[FACILITY_CLASS_PKMN_PROF] = 132,
|
||||
[FACILITY_CLASS_PLAYER] = 133,
|
||||
[FACILITY_CLASS_PLAYER_2] = 134,
|
||||
[FACILITY_CLASS_PLAYER_3] = 135,
|
||||
[FACILITY_CLASS_PLAYER_4] = 136,
|
||||
[FACILITY_CLASS_BRENDAN] = TRAINER_PIC_RS_BRENDAN_2,
|
||||
[FACILITY_CLASS_MAY] = TRAINER_PIC_RS_MAY_2,
|
||||
[FACILITY_CLASS_RED] = TRAINER_PIC_RED,
|
||||
[FACILITY_CLASS_LEAF] = TRAINER_PIC_LEAF,
|
||||
[FACILITY_CLASS_TEAM_ROCKET_2] = 137,
|
||||
[FACILITY_CLASS_PSYCHIC_4] = 138,
|
||||
[FACILITY_CLASS_CRUSH_GIRL] = 139,
|
||||
@@ -287,10 +287,10 @@ const u8 gFacilityClassToTrainerClass[] =
|
||||
[FACILITY_CLASS_CRUSH_KIN] = CLASS_CRUSH_KIN,
|
||||
[FACILITY_CLASS_SIS_AND_BRO_2] = CLASS_SIS_AND_BRO_2,
|
||||
[FACILITY_CLASS_PKMN_PROF] = CLASS_PKMN_PROF,
|
||||
[FACILITY_CLASS_PLAYER] = CLASS_PLAYER,
|
||||
[FACILITY_CLASS_PLAYER_2] = CLASS_PLAYER,
|
||||
[FACILITY_CLASS_PLAYER_3] = CLASS_PLAYER,
|
||||
[FACILITY_CLASS_PLAYER_4] = CLASS_PLAYER,
|
||||
[FACILITY_CLASS_BRENDAN] = CLASS_PLAYER,
|
||||
[FACILITY_CLASS_MAY] = CLASS_PLAYER,
|
||||
[FACILITY_CLASS_RED] = CLASS_PLAYER,
|
||||
[FACILITY_CLASS_LEAF] = CLASS_PLAYER,
|
||||
[FACILITY_CLASS_TEAM_ROCKET_2] = CLASS_TEAM_ROCKET,
|
||||
[FACILITY_CLASS_PSYCHIC_4] = CLASS_PSYCHIC_2,
|
||||
[FACILITY_CLASS_CRUSH_GIRL] = CLASS_CRUSH_GIRL,
|
||||
|
||||
+4
-4
@@ -1210,10 +1210,10 @@ const u32 gUnknown_8E990F8[] = INCBIN_U32("graphics/interface/naming_screen_8E99
|
||||
|
||||
const u8 gUnknown_8E99118[] = INCBIN_U8("graphics/tm_case/unk_8E99118.4bpp");
|
||||
|
||||
const u16 gFireRedTrainerCard_Pal[] = INCBIN_U16("graphics/trainer_card/0star.gbapal");
|
||||
const u32 gFireRedTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card.4bpp.lz");
|
||||
const u16 gEmeraldTrainerCard_Pal[] = INCBIN_U16("graphics/trainer_card/0star_em.gbapal");
|
||||
const u32 gEmeraldTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card_em.4bpp.lz");
|
||||
const u16 gKantoTrainerCard_Pal[] = INCBIN_U16("graphics/trainer_card/0star.gbapal");
|
||||
const u32 gKantoTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card.4bpp.lz");
|
||||
const u16 gHoennTrainerCard_Pal[] = INCBIN_U16("graphics/trainer_card/0star_em.gbapal");
|
||||
const u32 gHoennTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card_em.4bpp.lz");
|
||||
|
||||
const u16 gUnknown_8E99D8C[] = INCBIN_U16("graphics/link_rfu/unk_8E99DAC.gbapal");
|
||||
const u32 gUnknown_8E99DAC[] = INCBIN_U32("graphics/link_rfu/unk_8E99DAC.4bpp.lz");
|
||||
|
||||
+454
-407
File diff suppressed because it is too large
Load Diff
@@ -300,7 +300,7 @@ u16 sub_810C2FC(u16 species, bool8 isFrontPic, u8 paletteSlot, u8 windowId)
|
||||
return sub_810C050(species, 0, 0, isFrontPic, paletteSlot, windowId, TRUE);
|
||||
}
|
||||
|
||||
u16 sub_810C330(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_810C0C0(species, 0, 0, isFrontPic, destX, destY, paletteSlot, windowId, TRUE);
|
||||
}
|
||||
|
||||
+3
-2
@@ -46,6 +46,7 @@
|
||||
#include "constants/cable_club.h"
|
||||
#include "constants/field_weather.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/trainer_card.h"
|
||||
#include "constants/union_room.h"
|
||||
|
||||
static EWRAM_DATA u8 sUnionRoomPlayerName[12] = {};
|
||||
@@ -4727,9 +4728,9 @@ static void ViewURoomPartnerTrainerCard(u8 *unused, struct UnkStruct_URoom * uro
|
||||
ConvertIntToDecimalStringN(uroom->trainerCardStrbufs[2], trainerCard->pokemonTrades, STR_CONV_MODE_LEFT_ALIGN, 5);
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(3, uroom->trainerCardStrbufs[2]);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
for (i = 0; i < TRAINER_CARD_PROFILE_LENGTH; i++)
|
||||
{
|
||||
CopyEasyChatWord(uroom->trainerCardStrbufs[i + 3], trainerCard->var_28[i]);
|
||||
CopyEasyChatWord(uroom->trainerCardStrbufs[i + 3], trainerCard->easyChatProfile[i]);
|
||||
DynamicPlaceholderTextUtil_SetPlaceholderPtr(i + 4, uroom->trainerCardStrbufs[i + 3]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user