diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2019-09-03 14:35:01 -0400 |
---|---|---|
committer | huderlem <huderlem@gmail.com> | 2019-09-05 20:48:48 -0500 |
commit | a9918c3b898bd181cdb6db6d382b78d8122dfadb (patch) | |
tree | bc6c00c58a60e87898948094a478da37689e5c16 /include | |
parent | cb0fa2fdc357ad2b016ee53f9bdea5297ed9d4d1 (diff) |
Partial refactor of TryWriteTrainerHill_r
Diffstat (limited to 'include')
-rwxr-xr-x | include/ereader_helpers.h | 34 | ||||
-rw-r--r-- | include/trainer_hill.h | 33 |
2 files changed, 43 insertions, 24 deletions
diff --git a/include/ereader_helpers.h b/include/ereader_helpers.h index 2e77767aa..b0571e5c1 100755 --- a/include/ereader_helpers.h +++ b/include/ereader_helpers.h @@ -3,14 +3,17 @@ #include "trainer_hill.h" -struct Unk81D38FC +struct EReaderTrainerHillTrainer { u8 unk0; - u8 filler_1[3]; - u8 unk4[0x148]; - u8 unk14C[0x124]; + struct TrainerHillTrainer unk4; + u8 unk14C[0x100]; + u16 unk24C[16]; + u8 coords[2]; + u8 direction; + u8 range; u32 checksum; -}; +}; // size=0x274 struct EReaderTrainerHillSet { @@ -18,26 +21,9 @@ struct EReaderTrainerHillSet u8 id; u16 dummy; u32 checksum; - struct Unk81D38FC unk_8[6]; + struct EReaderTrainerHillTrainer unk_8[6]; u8 unk_ec0[40]; -}; - -struct Unk81D3998Sub -{ - u8 unk_000[4]; - u8 unk_004[0x148]; - u8 unk_14C[0x148]; - u8 unk_294[0x124]; -}; - -struct Unk81D3998 -{ - u8 unk_000; - u8 unk_001; - u8 unk_002; - int checksum; - struct Unk81D3998Sub unk_008[4]; -}; +}; // size = 0xf00 bool8 EReader_IsReceivedDataValid(struct EReaderTrainerHillSet *buffer); bool32 TryWriteTrainerHill(struct EReaderTrainerHillSet *arg0); diff --git a/include/trainer_hill.h b/include/trainer_hill.h index 1d1d2d5da..3086b2f8d 100644 --- a/include/trainer_hill.h +++ b/include/trainer_hill.h @@ -15,6 +15,39 @@ struct TrainerHillTrainer struct BattleTowerPokemon mons[PARTY_SIZE]; }; +struct TrHillRoomTrainers +{ + u8 name[2][HILL_TRAINER_NAME_LENGTH]; + u8 facilityClass[2]; +}; + +struct TrHillFloor +{ + u8 unk0; + u8 unk1; + struct TrainerHillTrainer trainers[2]; + 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 +}; + +struct TrHillTag +{ + u8 unkField_0; + u8 unused1; + u8 unkField_2; + u32 checksum; + struct TrHillFloor floors[4]; +}; + +struct TrHillStruct2 +{ + u8 floorId; + struct TrHillTag tag; +}; + extern u32 *gTrainerHillVBlankCounter; void CallTrainerHillFunction(void); |