Merge record mixing, pokemon and global with apprentice

This commit is contained in:
DizzyEggg
2018-10-13 20:38:46 +02:00
parent 74b81bf229
commit a496a763ca
11 changed files with 503 additions and 1316 deletions

17
include/apprentice.h Normal file
View File

@@ -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

View File

@@ -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;

View File

@@ -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);

View File

@@ -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