diff options
author | DizzyEggg <jajkodizzy@wp.pl> | 2018-10-13 20:38:46 +0200 |
---|---|---|
committer | DizzyEggg <jajkodizzy@wp.pl> | 2018-10-13 20:38:46 +0200 |
commit | a496a763ca54871e19e2482b550127e2aa709b05 (patch) | |
tree | 57444aa80fa54470f5dd1eaf6185c4af0fb3a8af /include | |
parent | 74b81bf229ded3212ab77701aebd4e16799731ec (diff) |
Merge record mixing, pokemon and global with apprentice
Diffstat (limited to 'include')
-rw-r--r-- | include/apprentice.h | 17 | ||||
-rw-r--r-- | include/global.h | 29 | ||||
-rw-r--r-- | include/pokemon.h | 28 | ||||
-rw-r--r-- | include/script_menu.h | 1 |
4 files changed, 43 insertions, 32 deletions
diff --git a/include/apprentice.h b/include/apprentice.h new file mode 100644 index 000000000..98185e3c2 --- /dev/null +++ b/include/apprentice.h @@ -0,0 +1,17 @@ +#ifndef GUARD_APPRENTICE_H +#define GUARD_APPRENTICE_H + +#define APPRENTICE_SPECIES_COUNT 10 + +struct ApprenticeTrainer +{ + u8 name[6][PLAYER_NAME_LENGTH + 1]; // For all six languages. + u16 otId; + u16 facilityClass; + u16 species[APPRENTICE_SPECIES_COUNT]; + u8 rest[14]; +}; + +extern const struct ApprenticeTrainer gApprentices[]; + +#endif // GUARD_APPRENTICE_H diff --git a/include/global.h b/include/global.h index 9b66f7da6..ec9fc99bf 100644 --- a/include/global.h +++ b/include/global.h @@ -295,13 +295,21 @@ struct UnknownSaveBlock2Struct u8 field_EB; }; // sizeof = 0xEC -struct UnkRecordMixingStruct +struct ApprenticeMon +{ + u16 species; + u16 moves[4]; + u16 item; +}; + +struct Apprentice { u8 field_0_0:5; u8 field_0_1:2; u8 field_1; u8 field_2; - u8 field_3[37]; + u8 field_3; + struct ApprenticeMon monData[3]; u16 unk28[6]; u8 playerId[4]; u8 playerName[PLAYER_NAME_LENGTH]; @@ -473,6 +481,15 @@ struct BattleFrontier /*0xEFC*/ struct FrontierMonData field_EFC[3]; }; +struct Sav2_B8 +{ + u8 unk0_0:2; + u8 unk0_1:2; + u8 unk0_2:2; + u8 unk0_3:2; + u16 unk2; +}; + struct SaveBlock2 { /*0x00*/ u8 playerName[PLAYER_NAME_LENGTH + 1]; @@ -500,12 +517,14 @@ struct SaveBlock2 // TODO: fix and verify labels /*0xB0*/ u8 field_B0; /*0xB1*/ u8 field_B1_0:2; - /*0xB1*/ u8 field_B1_1:6; + /*0xB1*/ u8 field_B1_1:4; + /*0xB1*/ u8 field_B1_2:2; /*0xB2*/ u8 field_B2_0:3; /*0xB2*/ u8 field_B2_1:2; /*0xB3*/ u8 field_B3; - /*0xB4*/ u8 field_B4[0x28]; - /*0xDC*/ struct UnkRecordMixingStruct field_DC[4]; + /*0xB4*/ u8 field_B4[3]; + /*0xB8*/ struct Sav2_B8 field_B8[9]; + /*0xDC*/ struct Apprentice field_DC[4]; /*0x1EC*/ struct BerryCrush berryCrush; /*0x1FC*/ struct PokemonJumpResults pokeJump; /*0x20C*/ struct BerryPickingResults berryPick; diff --git a/include/pokemon.h b/include/pokemon.h index 9eddd8155..d261fba85 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -240,32 +240,6 @@ struct PokemonStorage /*0x83C2*/ u8 boxWallpapers[14]; }; -struct UnknownPokemonSubStruct2 -{ - u16 species; - u16 moves[4]; - u16 item; -}; - -struct UnknownPokemonStruct2 -{ - u8 field_0_0 : 5; - u8 field_0_1 : 2; - u8 field_1; - u8 field_2; - u8 field_3; - struct UnknownPokemonSubStruct2 mons[3]; - u8 field_28[23]; - u8 language; -}; - -struct UnknownPokemonStruct3 -{ - u8 field_0[48]; - u16 field_30; - u8 field_32[38]; -}; - struct Unknown_806F160_Struct { u8 field_0_0:4; @@ -472,7 +446,7 @@ void CreateMonWithIVsOTID(struct Pokemon *mon, u16 species, u8 level, u8 *ivs, u void CreateMonWithEVSpread(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 evSpread); void sub_806819C(struct Pokemon *mon, struct UnknownPokemonStruct *src); void sub_8068338(struct Pokemon *mon, struct UnknownPokemonStruct *src, bool8 lvl50); -void sub_8068528(struct Pokemon *mon, const struct UnknownPokemonStruct2 *src, u8 monId); +void CreateApprenticeMon(struct Pokemon *mon, const struct Apprentice *src, u8 monId); void CreateMonWithEVSpreadPersonalityOTID(struct Pokemon *mon, u16 species, u8 level, u8 nature, u8 fixedIV, u8 evSpread, u32 otId); void sub_80686FC(struct Pokemon *mon, struct UnknownPokemonStruct *dest); void CreateObedientMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId); diff --git a/include/script_menu.h b/include/script_menu.h index c50bef00f..8870e80b9 100644 --- a/include/script_menu.h +++ b/include/script_menu.h @@ -13,5 +13,6 @@ s32 convert_pixel_width_to_tile_width(s32); u8 CreateWindowFromRect(u8, u8, u8, u8); void sub_80E2A78(u8); u32 display_text_and_get_width(const u8*, u32); +u8 sub_80E2D5C(u8 arg0, u8 tileWidth); #endif //GUARD_SCRIPT_MENU_H |