From c75a270a82fdf7f92d118c61237fea034cbc17f3 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 31 Aug 2020 13:16:24 -0400 Subject: Bump inja; trdata and trpoke to json --- include/trainer_data.h | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 include/trainer_data.h (limited to 'include/trainer_data.h') diff --git a/include/trainer_data.h b/include/trainer_data.h new file mode 100644 index 00000000..3abf9a9f --- /dev/null +++ b/include/trainer_data.h @@ -0,0 +1,70 @@ +#ifndef POKEDIAMOND_TRAINER_DATA_H +#define POKEDIAMOND_TRAINER_DATA_H + +#include "global.h" +#include "constants/pokemon.h" + +struct TrainerMonSpecies +{ + u16 difficulty; + u16 level; + u16 species; +}; + +struct TrainerMonSpeciesMoves +{ + u16 difficulty; + u16 level; + u16 moves[MON_MOVES]; +}; + +struct TrainerMonSpeciesItem +{ + u16 difficulty; + u16 level; + u16 species; + u16 item; +}; + +struct TrainerMonSpeciesItemMoves +{ + u16 difficulty; + u16 level; + u16 item; + u16 moves[MON_MOVES]; +}; + +union TrainerMon +{ + struct TrainerMonSpecies species; + struct TrainerMonSpeciesMoves species_moves; + struct TrainerMonSpeciesItem species_item; + struct TrainerMonSpeciesItemMoves species_item_moves; +}; + +#define TRTYPE_MON 0 +#define TRTYPE_MON_MOVES 1 +#define TRTYPE_MON_ITEM 2 +#define TRTYPE_MON_ITEM_MOVES 3 + +struct TrainerData +{ + u8 trainerType; + u8 trainerClass; + u8 unk_2; + u8 npoke; + u16 items[4]; + u32 unk_C; + u32 unk_10; +}; + +struct EnemyTrainerSet +{ + u32 flags; + struct PlayerParty * parties[4]; + u16 field_14[4]; + u32 trainer_idxs[4]; + struct TrainerData datas[4]; +}; + +#endif //POKEDIAMOND_TRAINER_DATA_H -- cgit v1.2.3 From 392f50eea4375637f23a4abc8643f525ba98f469 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 31 Aug 2020 16:47:15 -0400 Subject: constants/trainer_classes.h --- include/trainer_data.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'include/trainer_data.h') diff --git a/include/trainer_data.h b/include/trainer_data.h index 3abf9a9f..6a5b69a4 100644 --- a/include/trainer_data.h +++ b/include/trainer_data.h @@ -15,6 +15,7 @@ struct TrainerMonSpeciesMoves { u16 difficulty; u16 level; + u16 species; u16 moves[MON_MOVES]; }; @@ -30,6 +31,7 @@ struct TrainerMonSpeciesItemMoves { u16 difficulty; u16 level; + u16 species; u16 item; u16 moves[MON_MOVES]; }; @@ -58,13 +60,20 @@ struct TrainerData u32 unk_10; }; +struct TrainerDataLoaded +{ + struct TrainerData data; + u16 name[OT_NAME_LENGTH + 1]; + u8 padding[16]; +}; + struct EnemyTrainerSet { u32 flags; struct PlayerParty * parties[4]; - u16 field_14[4]; + u16 field_14[2]; u32 trainer_idxs[4]; - struct TrainerData datas[4]; + struct TrainerDataLoaded datas[4]; }; #endif //POKEDIAMOND_TRAINER_DATA_H -- cgit v1.2.3