2019-01-13 12:15:23 +00:00
|
|
|
#ifndef GUARD_TRAINER_HILL_H
|
|
|
|
#define GUARD_TRAINER_HILL_H
|
|
|
|
|
2019-09-03 01:37:52 +00:00
|
|
|
#define HILL_TRAINER_NAME_LENGTH 11
|
|
|
|
|
|
|
|
struct TrainerHillTrainer
|
|
|
|
{
|
|
|
|
u8 name[HILL_TRAINER_NAME_LENGTH];
|
|
|
|
u8 facilityClass;
|
|
|
|
u32 unused;
|
2020-09-20 05:50:54 +00: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 01:37:52 +00:00
|
|
|
struct BattleTowerPokemon mons[PARTY_SIZE];
|
|
|
|
};
|
|
|
|
|
2019-09-03 18:35:01 +00:00
|
|
|
struct TrHillRoomTrainers
|
|
|
|
{
|
|
|
|
u8 name[2][HILL_TRAINER_NAME_LENGTH];
|
|
|
|
u8 facilityClass[2];
|
|
|
|
};
|
|
|
|
|
2019-09-04 19:42:53 +00:00
|
|
|
struct TrHillDisplay
|
2019-09-03 18:35:01 +00:00
|
|
|
{
|
2021-08-24 22:59:32 +00:00
|
|
|
// Metatile data. Add 0x200 to the values in this array to get metatiles.
|
2020-09-20 05:50:54 +00:00
|
|
|
// This data then overwrites the metatiles in the map starting at (0,5)
|
2021-08-24 22:59:32 +00:00
|
|
|
u8 metatileData[0x100];
|
|
|
|
// Collision data. One bit for each tile in column-major order,
|
2020-09-20 05:50:54 +00:00
|
|
|
// so every array entry is one row. 1 = impassable, 0 = passable
|
|
|
|
u16 collisionData[16];
|
|
|
|
// Trainer coordinates, starting at (0,6). Format is 0bYYYYXXXX.
|
|
|
|
u8 coords[2];
|
2021-08-24 22:59:32 +00:00
|
|
|
// Trainer facing directions. Same as (DIR_* - 1).
|
2020-09-20 05:50:54 +00:00
|
|
|
// Effectively an array of nibbles, one for each trainer.
|
|
|
|
u8 direction;
|
|
|
|
// Trainer sight ranges. Effectively an array of nibbles, one for each trainer.
|
2021-08-24 22:59:32 +00:00
|
|
|
u8 range;
|
2019-09-03 18:35:01 +00:00
|
|
|
};
|
|
|
|
|
2019-09-04 19:42:53 +00:00
|
|
|
struct TrHillFloor
|
|
|
|
{
|
2019-11-13 21:10:05 +00:00
|
|
|
u8 trainerNum1;
|
|
|
|
u8 trainerNum2;
|
2019-09-04 19:42:53 +00:00
|
|
|
struct TrainerHillTrainer trainers[2];
|
|
|
|
struct TrHillDisplay display;
|
|
|
|
};
|
|
|
|
|
2019-09-03 18:35:01 +00:00
|
|
|
struct TrHillTag
|
|
|
|
{
|
2019-11-13 21:31:01 +00:00
|
|
|
u8 numTrainers;
|
2019-09-03 18:35:01 +00:00
|
|
|
u8 unused1;
|
2019-09-04 19:42:53 +00:00
|
|
|
u8 numFloors;
|
2019-09-03 18:35:01 +00:00
|
|
|
u32 checksum;
|
2019-09-04 19:42:53 +00:00
|
|
|
struct TrHillFloor floors[0];
|
2019-09-03 18:35:01 +00:00
|
|
|
};
|
|
|
|
|
2019-03-01 06:49:11 +00:00
|
|
|
extern u32 *gTrainerHillVBlankCounter;
|
2019-01-13 12:15:23 +00:00
|
|
|
|
2019-01-13 19:50:08 +00: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 00:04:30 +00:00
|
|
|
bool8 InTrainerHillChallenge(void);
|
2019-01-13 19:50:08 +00:00
|
|
|
void PrintOnTrainerHillRecordsWindow(void);
|
2019-11-21 03:55:44 +00:00
|
|
|
void LoadTrainerHillObjectEventTemplates(void);
|
|
|
|
bool32 LoadTrainerHillFloorObjectEventScripts(void);
|
2019-11-13 21:10:05 +00:00
|
|
|
void GenerateTrainerHillFloorLayout(u16 *mapArg);
|
2019-01-13 19:50:08 +00:00
|
|
|
bool32 InTrainerHill(void);
|
|
|
|
u8 GetCurrentTrainerHillMapId(void);
|
2019-11-13 21:10:05 +00:00
|
|
|
const struct WarpEvent* SetWarpDestinationTrainerHill4F(void);
|
|
|
|
const struct WarpEvent* SetWarpDestinationTrainerHillFinalFloor(u8 warpEventId);
|
2019-01-13 19:50:08 +00:00
|
|
|
u16 LocalIdToHillTrainerId(u8 localId);
|
2019-11-21 03:55:44 +00:00
|
|
|
bool8 GetHillTrainerFlag(u8 objectEventId);
|
2019-01-13 19:50:08 +00:00
|
|
|
void SetHillTrainerFlag(void);
|
2019-08-04 19:35:35 +00:00
|
|
|
const u8 *GetTrainerHillTrainerScript(void);
|
2019-01-13 19:50:08 +00:00
|
|
|
void FillHillTrainerParty(void);
|
|
|
|
void FillHillTrainersParties(void);
|
|
|
|
u8 GetTrainerEncounterMusicIdInTrainerHill(u16 trainerId);
|
2019-11-13 21:10:05 +00:00
|
|
|
u8 GetNumFloorsInTrainerHillChallenge(void);
|
2020-06-24 20:27:00 +00:00
|
|
|
void TryLoadTrainerHillEReaderPalette(void);
|
|
|
|
bool32 OnTrainerHillEReaderChallengeFloor(void);
|
2019-01-13 19:50:08 +00:00
|
|
|
|
2019-01-13 12:15:23 +00:00
|
|
|
#endif // GUARD_TRAINER_HILL_H
|