summaryrefslogtreecommitdiff
path: root/include/trainer_hill.h
diff options
context:
space:
mode:
authortustin2121 <tustin2121@gmail.com>2020-09-20 01:50:54 -0400
committertustin2121 <tustin2121@gmail.com>2020-09-20 01:50:54 -0400
commit832be348989967b15ae813180b22640d7da732ab (patch)
tree5380159c83657106333c0c45541973ea150924c2 /include/trainer_hill.h
parent0d3646c0b904e98e7dfaf5e628f4269d9820c9c2 (diff)
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.
Diffstat (limited to 'include/trainer_hill.h')
-rw-r--r--include/trainer_hill.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/include/trainer_hill.h b/include/trainer_hill.h
index 3f0644248..94d29a7ca 100644
--- a/include/trainer_hill.h
+++ b/include/trainer_hill.h
@@ -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