diff options
author | DizzyEggg <jajkodizzy@wp.pl> | 2018-05-26 00:25:36 +0200 |
---|---|---|
committer | DizzyEggg <jajkodizzy@wp.pl> | 2018-05-26 00:25:36 +0200 |
commit | 9e7965fab085a06f700756f448fbc072ee7e0095 (patch) | |
tree | dbd3bd7e5f65c5b7e63b1710fe4d429df6feaf63 /include | |
parent | b051cbaaab8bacd0cdc65ce609a92bc9dd868a1f (diff) |
document record mixing
Diffstat (limited to 'include')
-rw-r--r-- | include/battle_tower.h | 25 | ||||
-rw-r--r-- | include/fldeff_80F9BCC.h | 4 | ||||
-rw-r--r-- | include/global.h | 51 | ||||
-rw-r--r-- | include/mauville_old_man.h | 4 | ||||
-rw-r--r-- | include/mystery_event_script.h | 1 | ||||
-rw-r--r-- | include/pokemon.h | 27 | ||||
-rw-r--r-- | include/record_mixing.h | 4 | ||||
-rw-r--r-- | include/tv.h | 4 |
8 files changed, 61 insertions, 59 deletions
diff --git a/include/battle_tower.h b/include/battle_tower.h index 7bacf5249..9d4553132 100644 --- a/include/battle_tower.h +++ b/include/battle_tower.h @@ -1,7 +1,8 @@ #ifndef GUARD_BATTLE_TOWER_H #define GUARD_BATTLE_TOWER_H -struct RSBattleTowerRecord { +struct RSBattleTowerRecord +{ /*0x00*/ u8 battleTowerLevelType; // 0 = level 50, 1 = level 100 /*0x01*/ u8 trainerClass; /*0x02*/ u16 winStreak; @@ -15,30 +16,16 @@ struct RSBattleTowerRecord { /*0xA4*/ u16 unk_11c8; }; -struct EmeraldBattleTowerRecord { - /*0x00*/ u8 battleTowerLevelType; // 0 = level 50, 1 = level 100 - /*0x01*/ u8 trainerClass; - /*0x02*/ u16 winStreak; - /*0x04*/ u8 name[8]; - /*0x0C*/ u8 trainerId[4]; - /*0x10*/ struct { - u16 easyChat[6]; - } greeting; - /*0x1C*/ u8 filler_1c[0x18]; - /*0x34*/ struct UnknownPokemonStruct party[4]; - /*0xe4*/ u8 language; - u8 filler_e5[7]; -}; - -union BattleTowerRecord { +union BattleTowerRecord +{ struct RSBattleTowerRecord ruby_sapphire; struct EmeraldBattleTowerRecord emerald; }; u16 sub_8164FCC(u8, u8); -void sub_81659DC(union BattleTowerRecord *a0, union BattleTowerRecord *a1); +void sub_81659DC(struct RSBattleTowerRecord *a0, struct RSBattleTowerRecord *a1); bool32 sub_816587C(union BattleTowerRecord *, union BattleTowerRecord *); -bool32 sub_8164F70(union BattleTowerRecord *); +void CalcEmeraldBattleTowerChecksum(struct EmeraldBattleTowerRecord *); void sub_81628A0(union BattleTowerRecord *); #endif //GUARD_BATTLE_TOWER_H diff --git a/include/fldeff_80F9BCC.h b/include/fldeff_80F9BCC.h index 4169e328d..ba775cd6d 100644 --- a/include/fldeff_80F9BCC.h +++ b/include/fldeff_80F9BCC.h @@ -9,8 +9,8 @@ void sub_80FA5E4(s16 id, s16 x, s16 y); void sub_80FA794(s16 x, s16 y); -void sub_80FB00C(void); -void sub_80FB074(void); +void CreateRecordMixingSprite(void); +void DestroyRecordMixingSprite(void); void overworld_poison_effect(void); bool8 sub_80FADE4(u16, u8); diff --git a/include/global.h b/include/global.h index b869da813..f9e0aa66e 100644 --- a/include/global.h +++ b/include/global.h @@ -103,6 +103,8 @@ enum LanguageId #define VARS_COUNT 256 #define MAIL_COUNT 16 #define SECRET_BASES_COUNT 20 +#define TV_SHOWS_COUNT 25 +#define POKE_NEWS_COUNT 16 #define PC_ITEMS_COUNT 50 #define BAG_ITEMS_COUNT 30 #define BAG_KEYITEMS_COUNT 30 @@ -263,6 +265,49 @@ struct UnkRecordMixingStruct u8 field_38[10]; }; +struct UnknownPokemonStruct +{ + u16 species; + u16 heldItem; + u16 moves[4]; + u8 level; + u8 ppBonuses; + u8 hpEV; + u8 attackEV; + u8 defenseEV; + u8 speedEV; + u8 spAttackEV; + u8 spDefenseEV; + u32 otId; + u32 hpIV:5; + u32 attackIV:5; + u32 defenseIV:5; + u32 speedIV:5; + u32 spAttackIV:5; + u32 spDefenseIV:5; + u32 gap:1; + u32 altAbility:1; + u32 personality; + u8 nickname[POKEMON_NAME_LENGTH + 1]; + u8 friendship; +}; + +struct EmeraldBattleTowerRecord +{ + /*0x00*/ u8 battleTowerLevelType; // 0 = level 50, 1 = level 100 + /*0x01*/ u8 trainerClass; + /*0x02*/ u16 winStreak; + /*0x04*/ u8 name[8]; + /*0x0C*/ u8 trainerId[4]; + /*0x10*/ struct { + u16 easyChat[6]; + } greeting; + /*0x1C*/ u8 filler_1c[0x18]; + /*0x34*/ struct UnknownPokemonStruct party[4]; + /*0xE4*/ u8 language; + /*0xE8*/ u32 checksum; +}; + struct SaveBlock2 { /*0x00*/ u8 playerName[PLAYER_NAME_LENGTH]; @@ -302,7 +347,7 @@ struct SaveBlock2 // All below could be a one giant struct - /*0x64C*/ u8 field_64C[236]; + /*0x64C*/ struct EmeraldBattleTowerRecord battleTower; /*0x738*/ struct UnknownSaveBlock2Struct field_738[5]; // No idea here, it's probably wrong, no clue. /*0xBD4*/ u16 field_BD4; /*0xBD6*/ u16 field_BD6; @@ -763,8 +808,8 @@ struct SaveBlock1 /*0x????*/ u8 decorDoll[40]; /*0x????*/ u8 decorCushion[10]; /*0x27CA*/ u8 padding_27CA[2]; - /*0x27CC*/ TVShow tvShows[25]; - /*0x2B50*/ PokeNews pokeNews[16]; + /*0x27CC*/ TVShow tvShows[TV_SHOWS_COUNT]; + /*0x2B50*/ PokeNews pokeNews[POKE_NEWS_COUNT]; /*0x2B90*/ u16 outbreakPokemonSpecies; /*0x2B92*/ u8 outbreakLocationMapNum; /*0x2B93*/ u8 outbreakLocationMapGroup; diff --git a/include/mauville_old_man.h b/include/mauville_old_man.h index b1f10314a..e318ac8bb 100644 --- a/include/mauville_old_man.h +++ b/include/mauville_old_man.h @@ -19,8 +19,8 @@ void ScrSpecial_SetMauvilleOldManMapObjGfx(void); u8 sub_81201C8(void); void sub_8120B70(OldMan *dest); void sub_8120670(void); -void sub_8120D34(union OldMan * oldMan, u32 r1, u32 r6); -void sub_8120CD0(union OldMan * oldMan, u32 unused, u32 a2); +void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 r1, u32 r6); +void SanitizeReceivedEmeraldOldMan(union OldMan * oldMan, u32 unused, u32 a2); void ResetMauvilleOldManFlag(void); #endif // GUARD_MAUVILLE_OLD_MAN_H diff --git a/include/mystery_event_script.h b/include/mystery_event_script.h index 0857c7188..991cab53a 100644 --- a/include/mystery_event_script.h +++ b/include/mystery_event_script.h @@ -6,6 +6,5 @@ bool32 sub_8153884(u32 *a0); u32 RunMysteryEventScript(u8 *script); void SetMysteryEventScriptStatus(u32 val); u16 GetRecordMixingGift(void); -u16 GetRecordMixingGift(void); #endif // GUARD_MYSTERY_EVENT_SCRIPT_H diff --git a/include/pokemon.h b/include/pokemon.h index b6b0d6d36..37028821a 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -240,33 +240,6 @@ struct PokemonStorage /*0x83C2*/ u8 boxWallpapers[14]; }; -struct UnknownPokemonStruct -{ - u16 species; - u16 heldItem; - u16 moves[4]; - u8 level; - u8 ppBonuses; - u8 hpEV; - u8 attackEV; - u8 defenseEV; - u8 speedEV; - u8 spAttackEV; - u8 spDefenseEV; - u32 otId; - u32 hpIV:5; - u32 attackIV:5; - u32 defenseIV:5; - u32 speedIV:5; - u32 spAttackIV:5; - u32 spDefenseIV:5; - u32 gap:1; - u32 altAbility:1; - u32 personality; - u8 nickname[POKEMON_NAME_LENGTH + 1]; - u8 friendship; -}; - struct UnknownPokemonSubStruct2 { u16 species; diff --git a/include/record_mixing.h b/include/record_mixing.h index 900951516..3cd4d649e 100644 --- a/include/record_mixing.h +++ b/include/record_mixing.h @@ -26,12 +26,10 @@ struct UnkRecordMixingStruct2 struct UnkRecordMixingStruct2b field_120[2]; }; - - // Exported RAM declarations // Exported ROM declarations - +void sub_80E6BE8(void); void sub_80E8260(struct UnkRecordMixingStruct2 *arg0); #endif //GUARD_RECORD_MIXING_H diff --git a/include/tv.h b/include/tv.h index 1b3423275..17be8c43c 100644 --- a/include/tv.h +++ b/include/tv.h @@ -16,7 +16,7 @@ void sub_80EED10(void); void sub_80EED34(void); void sub_80EED60(u16 delta); void sub_80F01B8(void); -void sub_80F01E8(void *src, u32 size, u8 masterIdx); +void ReceiveTvShowsData(void *src, u32 size, u8 masterIdx); void sub_80EE4DC(struct Pokemon *pokemon, u8 ribbonMonDataIdx); u32 GetPlayerIDAsU32(void); bool8 GetPriceReduction(u8 newsKind); @@ -30,7 +30,7 @@ void sub_80EEA70(void); void sub_80EDB44(void); void sub_80EDC60(const u16 *words); void sub_80EDA80(void); -void sub_80F0C7C(void *src, u32 size, u8 masterIdx); +void ReceivePokeNewsData(void *src, u32 size, u8 masterIdx); void sub_80F0BB8(void); void sub_80ED950(bool8 flag); void sub_80EEC80(void); |