More documenting trainer hill
- Renamed members and added comments in the TrHillDisplay struct. - Formatted the trainer hill data to better match the metatile layout its representing. - Documented the function which uses this data.
This commit is contained in:
@@ -8,10 +8,10 @@ struct TrainerHillTrainer
|
||||
u8 name[HILL_TRAINER_NAME_LENGTH];
|
||||
u8 facilityClass;
|
||||
u32 unused;
|
||||
u16 speechBefore[6];
|
||||
u16 speechWin[6];
|
||||
u16 speechLose[6];
|
||||
u16 speechAfter[6];
|
||||
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];
|
||||
struct BattleTowerPokemon mons[PARTY_SIZE];
|
||||
};
|
||||
|
||||
@@ -23,11 +23,19 @@ struct TrHillRoomTrainers
|
||||
|
||||
struct TrHillDisplay
|
||||
{
|
||||
u8 data[0x100];
|
||||
u16 unk3A0[16];
|
||||
u8 coords[2]; // x first 4 bits, y last 4 bits
|
||||
u8 direction; // array of 4 bits for each trainer
|
||||
u8 range; // array of 4 bits for each trainer
|
||||
// Metatile data. Add 0x200 to the values in this array to get metatiles.
|
||||
// This data then overwrites the metatiles in the map starting at (0,5)
|
||||
u8 metatileData[0x100];
|
||||
// Collision data. One bit for each tile in column-major order,
|
||||
// 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];
|
||||
// Trainer facing directions. Same as (DIR_* - 1).
|
||||
// Effectively an array of nibbles, one for each trainer.
|
||||
u8 direction;
|
||||
// Trainer sight ranges. Effectively an array of nibbles, one for each trainer.
|
||||
u8 range;
|
||||
};
|
||||
|
||||
struct TrHillFloor
|
||||
|
||||
Reference in New Issue
Block a user