diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/global.h | 49 | ||||
-rw-r--r-- | include/load_save.h | 20 | ||||
-rw-r--r-- | include/pokemon.h | 8 |
3 files changed, 58 insertions, 19 deletions
diff --git a/include/global.h b/include/global.h index c43b57e03..ebef8e1dd 100644 --- a/include/global.h +++ b/include/global.h @@ -184,7 +184,8 @@ struct SaveBlock2 /*0xEE1*/ u8 field_EE1; /*0xEE2*/ u8 field_EE2[7]; /*0xEE9*/ u8 field_EE9; - /*0xEEA*/ u8 field_EEA[22]; + /*0xEEA*/ u8 field_EEA[66]; + // sizeof=0xF2C }; extern struct SaveBlock2 *gSaveBlock2Ptr; @@ -618,6 +619,23 @@ struct ContestWinner u8 contestRank; }; +struct DaycareMon +{ + struct BoxPokemon mon; + struct MailStruct mail; + u8 OT_name[OT_NAME_LENGTH + 1]; + u8 monName[11]; + u8 language; + u32 stepsTaken; +}; + +struct DaycareData +{ + struct DaycareMon mons[2]; + u32 offspringPersonality; + u8 stepCounter; +}; + #define FLAGS_NUMBER 300 #define VARS_NUMBER 256 @@ -686,33 +704,26 @@ struct SaveBlock1 /*0x????*/ u16 unk2B1C[6]; /*0x????*/ u16 unk2B28[6]; /*0x????*/ u16 unk2B34[6]; - /*0x????*/ u16 unk2B40[6]; + /*0x????*/ u16 unk2B3A[3]; /*0x2BE0*/ struct MailStruct mail[16]; - /*0x2E20*/ u8 additionalPhrases; // bitfield for 33 additional phrases in easy chat system + /*0x2E20*/ u8 additionalPhrases[5]; // bitfield for 33 additional phrases in easy chat system /*0x2E25*/ u8 unk2E25[3]; // possibly padding? /*0x2E28*/ OldMan oldMan; /*0x2e64*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff /*0x2e8c*/ u8 filler_2E8C[0x4]; /*0x2e90*/ struct ContestWinner contestWinners[13]; // 0 - 5 used in contest hall, 6 - 7 unused?, 8 - 12 museum - - // TODO: fix - - /*0x????*/ struct BoxPokemon daycareData[2]; - /*0x????*/ struct RecordMixing_UnknownStruct filler_303C; - /*0x????*/ u8 filler_30B4[0x2]; - /*0x????*/ u8 filler_30B6; - /*0x????*/ u8 filler_30B7[1]; - /*0x????*/ struct LinkBattleRecord linkBattleRecords[5]; - /*0x????*/ u8 filler_3108[8]; - + /*0x3030*/ struct DaycareData daycare; + /*0x3150*/ struct LinkBattleRecord linkBattleRecords[5]; + /*0x31A0*/ u8 filler_31A0[8]; /*0x31A8*/ u8 giftRibbons[52]; /*0x31DC*/ struct Roamer roamer; /*0x31F8*/ struct EnigmaBerry enigmaBerry; - - // TODO: fix - /*0x????*/ struct RamScript ramScript; - /*0x????*/ struct RecordMixingGift recordMixingGift; - /*0x????*/ u8 unk3A8C[52]; //pokedex related + /*0x3728*/ struct RamScript ramScript; + /*0x3B14*/ struct RecordMixingGift recordMixingGift; + /*0x3B24*/ u8 seen2[52]; + /*0x3B58*/ u8 lilycoveLady[536]; // TODO: convert to a union + /*0x3D70*/ u8 babyPhrase[24]; // TODO: convert to a struct + // sizeof: 0x3D88 }; extern struct SaveBlock1* gSaveBlock1Ptr; diff --git a/include/load_save.h b/include/load_save.h new file mode 100644 index 000000000..2dce65385 --- /dev/null +++ b/include/load_save.h @@ -0,0 +1,20 @@ +#ifndef GUARD_LOAD_SAVE_H +#define GUARD_LOAD_SAVE_H + +extern bool32 gFlashMemoryPresent; + +void CheckForFlashMemory(void); +void MoveSaveBlocks_ResetHeap(void); +bool32 GetSecretBase2Field_9(void); +void ClearSecretBase2Field_9(void); +void SetSecretBase2Field_9(void); +void SetSecretBase2Field_9_AndHideBG(void); +void ClearSecretBase2Field_9_2(void); +void SavePlayerParty(void); +void LoadPlayerParty(void); +void SaveSerializedGame(void); +void LoadSerializedGame(void); +void LoadPlayerBag(void); +void SavePlayerBag(void); + +#endif // GUARD_LOAD_SAVE_H diff --git a/include/pokemon.h b/include/pokemon.h index 299a25391..a9d6c6888 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -261,6 +261,14 @@ struct Pokemon extern struct Pokemon gPlayerParty[6]; extern struct Pokemon gEnemyParty[6]; +struct PokemonStorage +{ + /*0x0000*/ u8 currentBox; + /*0x0001*/ struct BoxPokemon boxes[14][30]; + /*0x8344*/ u8 boxNames[14][9]; + /*0x83C2*/ u8 boxWallpapers[14]; +}; + struct BaseStats { /* 0x00 */ u8 baseHP; |