2019-01-13 13:15:23 +01:00
|
|
|
#ifndef GUARD_TRAINER_HILL_H
|
|
|
|
#define GUARD_TRAINER_HILL_H
|
|
|
|
|
2022-03-04 17:02:19 +01:00
|
|
|
#define DUMMY_HILL_MON { .nickname = __("$$$$$$$$$$$") }
|
2019-09-03 03:37:52 +02:00
|
|
|
|
|
|
|
struct TrainerHillTrainer
|
|
|
|
{
|
|
|
|
u8 name[HILL_TRAINER_NAME_LENGTH];
|
|
|
|
u8 facilityClass;
|
2022-03-31 19:11:44 +02:00
|
|
|
bool32 unused; // Set to TRUE on JP trainers
|
2020-09-20 07:50:54 +02:00
|
|
|
u16 speechBefore[EASY_CHAT_BATTLE_WORDS_COUNT];
|
|
|
|
u16 speechWin[EASY_CHAT_BATTLE_WORDS_COUNT];
|
|
|
|
u16 speechLose[EASY_CHAT_BATTLE_WORDS_COUNT];
|
|
|
|
u16 speechAfter[EASY_CHAT_BATTLE_WORDS_COUNT];
|
2019-09-03 03:37:52 +02:00
|
|
|
struct BattleTowerPokemon mons[PARTY_SIZE];
|
|
|
|
};
|
|
|
|
|
2022-03-04 17:02:19 +01:00
|
|
|
struct TrainerHillFloorMap
|
2019-09-03 20:35:01 +02:00
|
|
|
{
|
2022-03-04 17:02:19 +01:00
|
|
|
u8 metatileData[HILL_FLOOR_WIDTH * HILL_FLOOR_HEIGHT_MAIN]; // Add NUM_METATILES_IN_PRIMARY to the values in this array to get metatile ids.
|
|
|
|
u16 collisionData[HILL_FLOOR_WIDTH]; // One bit for each tile in column-major order, so every array entry is one row. 1 = impassable, 0 = passable
|
|
|
|
u8 trainerCoords[HILL_TRAINERS_PER_FLOOR]; // Starting at (0,6). Format is 0bYYYYXXXX.
|
|
|
|
u8 trainerDirections; // DIR_* - 1, 4 bits per trainer
|
|
|
|
u8 trainerRanges; // 4 bits per trainer
|
2019-09-03 20:35:01 +02:00
|
|
|
};
|
|
|
|
|
2022-03-04 17:02:19 +01:00
|
|
|
struct TrainerHillFloor
|
2019-09-04 21:42:53 +02:00
|
|
|
{
|
2019-11-13 22:10:05 +01:00
|
|
|
u8 trainerNum1;
|
|
|
|
u8 trainerNum2;
|
2022-03-04 17:02:19 +01:00
|
|
|
struct TrainerHillTrainer trainers[HILL_TRAINERS_PER_FLOOR];
|
|
|
|
struct TrainerHillFloorMap map;
|
2019-09-04 21:42:53 +02:00
|
|
|
};
|
|
|
|
|
2022-03-04 17:02:19 +01:00
|
|
|
struct TrainerHillChallenge
|
2019-09-03 20:35:01 +02:00
|
|
|
{
|
2019-11-13 22:31:01 +01:00
|
|
|
u8 numTrainers;
|
2019-09-03 20:35:01 +02:00
|
|
|
u8 unused1;
|
2019-09-04 21:42:53 +02:00
|
|
|
u8 numFloors;
|
2022-03-04 17:02:19 +01:00
|
|
|
u32 checksum; // A byte array sum of the floor data
|
|
|
|
struct TrainerHillFloor floors[0]; // Floor data is assumed to follow, so this will be intentionally read out of bounds
|
2019-09-03 20:35:01 +02:00
|
|
|
};
|
|
|
|
|
2019-03-01 07:49:11 +01:00
|
|
|
extern u32 *gTrainerHillVBlankCounter;
|
2019-01-13 13:15:23 +01:00
|
|
|
|
2019-01-13 20:50:08 +01:00
|
|
|
void CallTrainerHillFunction(void);
|
|
|
|
void ResetTrainerHillResults(void);
|
|
|
|
u8 GetTrainerHillOpponentClass(u16 trainerId);
|
|
|
|
void GetTrainerHillTrainerName(u8 *dst, u16 trainerId);
|
|
|
|
u8 GetTrainerHillTrainerFrontSpriteId(u16 trainerId);
|
|
|
|
void InitTrainerHillBattleStruct(void);
|
|
|
|
void FreeTrainerHillBattleStruct(void);
|
|
|
|
void CopyTrainerHillTrainerText(u8 which, u16 trainerId);
|
2019-10-07 02:04:30 +02:00
|
|
|
bool8 InTrainerHillChallenge(void);
|
2019-01-13 20:50:08 +01:00
|
|
|
void PrintOnTrainerHillRecordsWindow(void);
|
2019-11-21 04:55:44 +01:00
|
|
|
void LoadTrainerHillObjectEventTemplates(void);
|
|
|
|
bool32 LoadTrainerHillFloorObjectEventScripts(void);
|
2019-11-13 22:10:05 +01:00
|
|
|
void GenerateTrainerHillFloorLayout(u16 *mapArg);
|
2019-01-13 20:50:08 +01:00
|
|
|
bool32 InTrainerHill(void);
|
|
|
|
u8 GetCurrentTrainerHillMapId(void);
|
2019-11-13 22:10:05 +01:00
|
|
|
const struct WarpEvent* SetWarpDestinationTrainerHill4F(void);
|
|
|
|
const struct WarpEvent* SetWarpDestinationTrainerHillFinalFloor(u8 warpEventId);
|
2019-01-13 20:50:08 +01:00
|
|
|
u16 LocalIdToHillTrainerId(u8 localId);
|
2019-11-21 04:55:44 +01:00
|
|
|
bool8 GetHillTrainerFlag(u8 objectEventId);
|
2019-01-13 20:50:08 +01:00
|
|
|
void SetHillTrainerFlag(void);
|
2019-08-04 21:35:35 +02:00
|
|
|
const u8 *GetTrainerHillTrainerScript(void);
|
2019-01-13 20:50:08 +01:00
|
|
|
void FillHillTrainerParty(void);
|
|
|
|
void FillHillTrainersParties(void);
|
|
|
|
u8 GetTrainerEncounterMusicIdInTrainerHill(u16 trainerId);
|
2019-11-13 22:10:05 +01:00
|
|
|
u8 GetNumFloorsInTrainerHillChallenge(void);
|
2020-06-24 22:27:00 +02:00
|
|
|
void TryLoadTrainerHillEReaderPalette(void);
|
|
|
|
bool32 OnTrainerHillEReaderChallengeFloor(void);
|
2019-01-13 20:50:08 +01:00
|
|
|
|
2019-01-13 13:15:23 +01:00
|
|
|
#endif // GUARD_TRAINER_HILL_H
|