From 424db9c41bbe0fa23910606f4c85a5d5db0c19d1 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Wed, 16 Sep 2020 00:15:52 -0500 Subject: split out pokemon funcs and decomp another nullsub --- include/pokemon.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 include/pokemon.h (limited to 'include/pokemon.h') diff --git a/include/pokemon.h b/include/pokemon.h new file mode 100644 index 0000000..c1da8d5 --- /dev/null +++ b/include/pokemon.h @@ -0,0 +1,51 @@ +#ifdef POKEMON_H +#define POKEMON_H + +struct gPokemon +{ + /* 0x0 */ u32 species; // pointer to string + /* 0x4 */ u32 category; // pointer to string + /* 0x8 */ u8 palette; // between 0 - 12 + /* 0x9 */ u8 size; // between 0x01 - 0x06 + /* 0xA */ u8 unk0; + /* 0xB */ u8 unk1; + /* 0xC */ s32 speed; + /* 0x10 */ u16 dial_sprite; + /* 0x12 */ u8 unk2; + /* 0x13 */ u8 type_1; // between 0x00 - 0x11 + /* 0x14 */ u8 type_2; // between 0x00 - 0x11 + /* 0x15 */ u8 walkable_tiles; // between 0x00 - 0x05 + /* 0x16 */ u8 friend_area; // 0x00 - 0x39 + /* 0x17 */ u8 ability_1; // between 0x00 - 0x4C + /* 0x18 */ u8 ability_2; // between 0x00 - 0x4C + /* 0x19 */ u8 shadow_size; // between 0x0 - 0x2 + /* 0x1A */ u8 unk3; + /* 0x1B */ u8 unk4; + /* 0x1C */ bool8 isMoving; + /* 0x1D */ u8 unk5; + /* 0x1E */ u16 base_hp; + /* 0x20 */ u16 base_exp; + /* 0x22 */ u16 unk6; + /* 0x24 */ u16 base_att; + /* 0x26 */ u16 base_sp_att; + /* 0x28 */ u16 base_def; + /* 0x2A */ u16 base_sp_def; + /* 0x2C */ u16 lowkick_dmg; + /* 0x2E */ u16 sizeorb_dmg; + /* 0x30 */ u8 unk7; + /* 0x31 */ u8 unk8; + /* 0x32 */ u8 unk9; + /* 0x33 */ bool8 unk10; + /* 0x34 */ u16 prior_evolution; + /* 0x36 */ u16 evol_type; + /* 0x38 */ u16 evol_need1; + /* 0x3A */ u16 evol_need2; + /* 0x3C */ u16 dexNum; + /* 0x3E */ u8 internalNum; + /* 0x40 */ u16 base_recruit; + /* 0x42 */ u16 unk11; + /* 0x44 */ u16 alphaNum; + /* 0x46 */ u16 parentNum; +} + +#endif -- cgit v1.2.3 From 977ef7d8aabe3befab5b3cc44210c7d4d8f0010d Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sun, 20 Sep 2020 19:33:21 -0500 Subject: fix guards --- include/pokemon.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/pokemon.h') diff --git a/include/pokemon.h b/include/pokemon.h index c1da8d5..864b611 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -1,4 +1,4 @@ -#ifdef POKEMON_H +#ifndef POKEMON_H #define POKEMON_H struct gPokemon @@ -46,6 +46,6 @@ struct gPokemon /* 0x42 */ u16 unk11; /* 0x44 */ u16 alphaNum; /* 0x46 */ u16 parentNum; -} +}; -#endif +#endif // POKEMON_H -- cgit v1.2.3 From cd050a5e7d66e28485a5b4e57ecdfb3d8c5f1e3c Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Wed, 23 Sep 2020 22:56:31 -0500 Subject: found more MonsterParameter funcs that weren't in the split and decomped a few of them --- include/pokemon.h | 44 +------------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) (limited to 'include/pokemon.h') diff --git a/include/pokemon.h b/include/pokemon.h index 864b611..fba7199 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -3,49 +3,7 @@ struct gPokemon { - /* 0x0 */ u32 species; // pointer to string - /* 0x4 */ u32 category; // pointer to string - /* 0x8 */ u8 palette; // between 0 - 12 - /* 0x9 */ u8 size; // between 0x01 - 0x06 - /* 0xA */ u8 unk0; - /* 0xB */ u8 unk1; - /* 0xC */ s32 speed; - /* 0x10 */ u16 dial_sprite; - /* 0x12 */ u8 unk2; - /* 0x13 */ u8 type_1; // between 0x00 - 0x11 - /* 0x14 */ u8 type_2; // between 0x00 - 0x11 - /* 0x15 */ u8 walkable_tiles; // between 0x00 - 0x05 - /* 0x16 */ u8 friend_area; // 0x00 - 0x39 - /* 0x17 */ u8 ability_1; // between 0x00 - 0x4C - /* 0x18 */ u8 ability_2; // between 0x00 - 0x4C - /* 0x19 */ u8 shadow_size; // between 0x0 - 0x2 - /* 0x1A */ u8 unk3; - /* 0x1B */ u8 unk4; - /* 0x1C */ bool8 isMoving; - /* 0x1D */ u8 unk5; - /* 0x1E */ u16 base_hp; - /* 0x20 */ u16 base_exp; - /* 0x22 */ u16 unk6; - /* 0x24 */ u16 base_att; - /* 0x26 */ u16 base_sp_att; - /* 0x28 */ u16 base_def; - /* 0x2A */ u16 base_sp_def; - /* 0x2C */ u16 lowkick_dmg; - /* 0x2E */ u16 sizeorb_dmg; - /* 0x30 */ u8 unk7; - /* 0x31 */ u8 unk8; - /* 0x32 */ u8 unk9; - /* 0x33 */ bool8 unk10; - /* 0x34 */ u16 prior_evolution; - /* 0x36 */ u16 evol_type; - /* 0x38 */ u16 evol_need1; - /* 0x3A */ u16 evol_need2; - /* 0x3C */ u16 dexNum; - /* 0x3E */ u8 internalNum; - /* 0x40 */ u16 base_recruit; - /* 0x42 */ u16 unk11; - /* 0x44 */ u16 alphaNum; - /* 0x46 */ u16 parentNum; + /* 0x0 */ u8* unk0; }; #endif // POKEMON_H -- cgit v1.2.3 From 96fdd3aae0ba1d923b358128012979a9a1a0eb38 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Thu, 1 Oct 2020 13:32:53 -0500 Subject: successful decomp of one pokemon data func and struct.. making headway --- include/pokemon.h | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'include/pokemon.h') diff --git a/include/pokemon.h b/include/pokemon.h index fba7199..68164ef 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -3,7 +3,42 @@ struct gPokemon { - /* 0x0 */ u8* unk0; + /* 0x0 */ u8* species; // verified + /* 0x4 */ u8* category; + /* 0x8 */ u8 overworld_sprite; // verified + /* 0x9 */ u8 size; + /* 0x9 */ u8 unkA; + /* 0xB */ u8 unkB; + /* 0xC */ s32 move_speed; + /* 0x10 */ u16 dialogue_sprites; // verified + /* 0x12 */ u8 unk12; //verified + /* 0x13 */ u8 type_1; + /* 0x14 */ u8 type_2; + /* 0x15 */ u8 walkable_tiles; + /* 0x16 */ u8 friend_area; // verified + /* 0x16 */ u8 ability_1; + /* 0x18 */ u8 ability_2; + /* 0x19 */ u8 shadow_size; + /* 0x1A */ u8 unk1A; + /* 0x1B */ u16 unk1B; + /* 0x1D */ u8 unk1D; + /* 0x1E */ u16 base_hp; + /* 0x20 */ u16 base_exp; // verified + /* 0x22 */ u16 unk22; // verified + /* 0x24 */ u16 base_att; + /* 0x26 */ u16 base_spatt; + /* 0x28 */ u16 base_def; + /* 0x2A */ u16 base_spdef; + /* 0x2C */ u16 lowkick_dmg; + /* 0x2E */ u16 sizeorb_dmg; + /* 0x30 */ u16 unk30; + /* 0x32 */ u16 unk32; + /* 0x34 */ u16 unk34; //verified + /* 0x36 */ u16 evolve_type; + /* 0x38 */ u32 evolve_need1; // verified + /* 0x3C */ u16 unk3C; + /* 0x3E */ s16 unk3E; // verified + /* 0x40 */ s16 base_recruit; // verified }; #endif // POKEMON_H -- cgit v1.2.3 From d60e36b6b81b691585c2f231356738af704e0c7b Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Thu, 1 Oct 2020 17:40:44 -0500 Subject: decomp a number of pokemon functions --- include/pokemon.h | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) (limited to 'include/pokemon.h') diff --git a/include/pokemon.h b/include/pokemon.h index 68164ef..0b408e3 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -3,27 +3,28 @@ struct gPokemon { - /* 0x0 */ u8* species; // verified + /* 0x0 */ u8* species; /* 0x4 */ u8* category; - /* 0x8 */ u8 overworld_sprite; // verified + /* 0x8 */ u8 overworld_sprite; /* 0x9 */ u8 size; - /* 0x9 */ u8 unkA; + /* 0xA */ u8 unkA; /* 0xB */ u8 unkB; /* 0xC */ s32 move_speed; - /* 0x10 */ u16 dialogue_sprites; // verified - /* 0x12 */ u8 unk12; //verified + /* 0x10 */ u16 dialogue_sprites; + /* 0x12 */ u8 unk12; /* 0x13 */ u8 type_1; /* 0x14 */ u8 type_2; /* 0x15 */ u8 walkable_tiles; - /* 0x16 */ u8 friend_area; // verified - /* 0x16 */ u8 ability_1; + /* 0x16 */ u8 friend_area; + /* 0x17 */ u8 ability_1; /* 0x18 */ u8 ability_2; /* 0x19 */ u8 shadow_size; /* 0x1A */ u8 unk1A; - /* 0x1B */ u16 unk1B; + /* 0x1B */ u8 unk1B; + /* 0x1C */ bool8 isMoving; /* 0x1D */ u8 unk1D; /* 0x1E */ u16 base_hp; - /* 0x20 */ u16 base_exp; // verified + /* 0x20 */ u16 base_exp; /* 0x22 */ u16 unk22; // verified /* 0x24 */ u16 base_att; /* 0x26 */ u16 base_spatt; @@ -31,14 +32,20 @@ struct gPokemon /* 0x2A */ u16 base_spdef; /* 0x2C */ u16 lowkick_dmg; /* 0x2E */ u16 sizeorb_dmg; - /* 0x30 */ u16 unk30; - /* 0x32 */ u16 unk32; - /* 0x34 */ u16 unk34; //verified + /* 0x30 */ u8 unk30; + /* 0x31 */ u8 unk31; + /* 0x32 */ u8 unk32; + /* 0x33 */ bool8 unk33; + /* 0x34 */ u16 evolve_from; //verified /* 0x36 */ u16 evolve_type; - /* 0x38 */ u32 evolve_need1; // verified - /* 0x3C */ u16 unk3C; - /* 0x3E */ s16 unk3E; // verified + /* 0x38 */ u16 evolve_need1; // verified + /* 0x3A */ u16 evolve_need2; // verified + /* 0x3C */ u16 dexNo; + /* 0x3E */ u16 internalNo; // verified /* 0x40 */ s16 base_recruit; // verified + /* 0x42 */ u16 alphabetNo; + /* 0x44 */ u16 parentNo; + /* 0x46 */ u16 unk46; }; #endif // POKEMON_H -- cgit v1.2.3 From 1b0fc9f3745f119e2ec363bef89e48d6edeeac41 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sun, 18 Oct 2020 18:16:28 -0500 Subject: decomp an evolve func for pokemon --- include/pokemon.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'include/pokemon.h') diff --git a/include/pokemon.h b/include/pokemon.h index 0b408e3..6c18f7d 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -1,6 +1,18 @@ #ifndef POKEMON_H #define POKEMON_H +struct EvolveStruct1 +{ + u16 evolve_from; + u16 evolve_type; +}; + +struct EvolveNeeds +{ + u16 evolve_need1; + u16 evolve_need2; +}; + struct gPokemon { /* 0x0 */ u8* species; @@ -36,10 +48,8 @@ struct gPokemon /* 0x31 */ u8 unk31; /* 0x32 */ u8 unk32; /* 0x33 */ bool8 unk33; - /* 0x34 */ u16 evolve_from; //verified - /* 0x36 */ u16 evolve_type; - /* 0x38 */ u16 evolve_need1; // verified - /* 0x3A */ u16 evolve_need2; // verified + /* 0x34 */ struct EvolveStruct1 pre; + /* 0x38 */ struct EvolveNeeds need; /* 0x3C */ u16 dexNo; /* 0x3E */ u16 internalNo; // verified /* 0x40 */ s16 base_recruit; // verified -- cgit v1.2.3