diff options
author | yenatch <yenatch@gmail.com> | 2017-06-12 19:01:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-12 19:01:41 -0400 |
commit | e09e1da6c252e17cf6db429ad142b05dbf156548 (patch) | |
tree | 433367371faa7567a4214adf29c5853170f5585b /include | |
parent | b741c626e72a2c52351fddbbfc536f66183d009f (diff) | |
parent | e085596d7d63c8e3814192a1a8c628810cc89eda (diff) |
Merge pull request #314 from PikalaxALT/tv
Finish decompilation of tv.s
Diffstat (limited to 'include')
-rw-r--r--[-rwxr-xr-x] | include/asm.inc.h | 2 | ||||
-rw-r--r-- | include/battle.h | 25 | ||||
-rw-r--r--[-rwxr-xr-x] | include/field_effect_helpers.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/field_map_obj.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/field_player_avatar.h | 0 | ||||
-rw-r--r-- | include/fieldmap.h | 1 | ||||
-rw-r--r-- | include/global.fieldmap.h | 33 | ||||
-rw-r--r-- | include/global.h | 230 | ||||
-rw-r--r--[-rwxr-xr-x] | include/trainer_see.h | 0 |
9 files changed, 166 insertions, 125 deletions
diff --git a/include/asm.inc.h b/include/asm.inc.h index dbd3f0820..e087acd28 100755..100644 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -286,7 +286,7 @@ void sub_80BD674(void *, u32, u8); // asm/tv.o void ClearTVShowData(void); -void UpdateTVScreensOnMap(u32, u32); +void UpdateTVScreensOnMap(int, int); void ResetGabbyAndTy(void); u8 sub_80BDEAC(u8 *); void sub_80BE160(TVShow *); diff --git a/include/battle.h b/include/battle.h index 3b4771869..9714c6add 100644 --- a/include/battle.h +++ b/include/battle.h @@ -146,4 +146,29 @@ extern struct UnknownStruct1 unk_2016A00; extern struct UnkBattleStruct4 gUnknown_02024CA8[]; extern struct AI_ThinkingStruct gAIThinkingSpace; +struct UnknownStruct11 +{ + u8 unk0; + u8 unk1; + u8 unk2; + u8 unk3; + u8 unk4; + u8 unk5_0:1; + u8 unk5_1:1; + u16 unk6; + u8 unk8[10]; + u8 unk12; + u8 unk13; + u8 unk14[10]; + u8 filler1E[2]; + u16 unk20; + u16 unk22; + u16 unk24; + u16 unk26; + u16 unk28; + u8 unk2A[10]; + u8 filler34[2]; + u8 unk36[10]; +}; + #endif // GUARD_BATTLE_H diff --git a/include/field_effect_helpers.h b/include/field_effect_helpers.h index 62f492bdc..62f492bdc 100755..100644 --- a/include/field_effect_helpers.h +++ b/include/field_effect_helpers.h diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 0347b90d4..0347b90d4 100755..100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index fc21c4e3c..fc21c4e3c 100755..100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h diff --git a/include/fieldmap.h b/include/fieldmap.h index 530e15798..1aa99031d 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -2,6 +2,7 @@ #define GUARD_FIELDMAP2_H #include "field_map_obj.h" +extern struct BackupMapData gUnknown_03004870; struct MapHeader *mapconnection_get_mapheader(struct MapConnection *connection); int GetMapBorderIdAt(int x, int y); extern bool8 IsMetatileDirectionallyImpassable(struct MapObject *mapObject, s16 x, s16 y, u8 direction); diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 0b72bbec5..a0fe0e6ab 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -63,6 +63,13 @@ struct MapData struct Tileset *secondaryTileset; }; +struct BackupMapData +{ + s32 width; + s32 height; + u16 *map; +}; + struct MapObjectTemplate { /*0x00*/ u8 localId; @@ -153,20 +160,20 @@ struct MapConnections struct MapHeader { - struct MapData *mapData; - struct MapEvents *events; - u8 *mapScripts; - struct MapConnections *connections; - u16 music; - u16 mapDataId; - u8 name; - u8 cave; - u8 weather; + /* 0x00 */ struct MapData *mapData; + /* 0x04 */ struct MapEvents *events; + /* 0x08 */ u8 *mapScripts; + /* 0x0C */ struct MapConnections *connections; + /* 0x10 */ u16 music; + /* 0x12 */ u16 mapDataId; + /* 0x14 */ u8 name; + /* 0x15 */ u8 cave; + /* 0x16 */ u8 weather; /* 0x17 */ u8 mapType; - u8 filler_18; - u8 escapeRope; - u8 flags; - u8 battleType; + /* 0x18 */ u8 filler_18; + /* 0x19 */ u8 escapeRope; + /* 0x1A */ u8 flags; + /* 0x1B */ u8 battleType; }; struct MapObject diff --git a/include/global.h b/include/global.h index 34946c895..9a95cf41f 100644 --- a/include/global.h +++ b/include/global.h @@ -94,7 +94,7 @@ struct UCoords16 struct SecretBaseRecord { - /*0x1A08*/ u8 sbr_field_0; // ID? + /*ID?*/ /*0x1A08*/ u8 sbr_field_0; /*0x1A09*/ u8 sbr_field_1_0:4; /*0x1A09*/ u8 gender:1; /*0x1A09*/ u8 sbr_field_1_5:1; @@ -206,32 +206,6 @@ struct TVShowCommon { /*0x23*/ u8 trainerIdHi; }; -struct TVShowPokemonToday { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; - /*0x02*/ u8 language; - /*0x03*/ u8 language2; - /*0x04*/ u8 nickname[11]; - /*0x0F*/ u8 ball; - /*0x10*/ u16 species; - /*0x12*/ u8 var12; - /*0x13*/ u8 playerName[8]; -}; - - -struct TVShowPokemonTodayFailed { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; - /*0x02*/ u8 language; - /*0x03*/ u8 pad03[9]; - /*0x0c*/ u16 species; - /*0x0e*/ u16 species2; - /*0x10*/ u8 var10; - /*0x11*/ u8 var11; - /*0x12*/ u8 var12; - /*0x13*/ u8 playerName[8]; -}; - struct TVShowFanClubLetter { /*0x00*/ u8 var00; /*0x01*/ u8 var01; @@ -248,7 +222,7 @@ struct TVShowRecentHappenings { /*0x04*/ u16 var04[6]; /*0x10*/ u8 playerName[8]; /*0x18*/ u8 language; - u8 pad19[10]; + /*0x19*/ u8 pad19[10]; }; struct TVShowFanclubOpinions { @@ -256,7 +230,7 @@ struct TVShowFanclubOpinions { /*0x01*/ u8 var01; /*0x02*/ u16 var02; /*0x04*/ u8 var04A:4; - u8 var04B:4; + /*0x04*/ u8 var04B:4; /*0x05*/ u8 playerName[8]; /*0x0D*/ u8 language; /*0x0E*/ u8 var0E; @@ -266,6 +240,13 @@ struct TVShowFanclubOpinions { /*0x1C*/ u16 var1C[4]; }; +struct TVShowUnknownType04 { + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u8 pad02[4]; + /*0x06*/ u16 var06; +}; + struct TVShowNameRaterShow { /*0x00*/ u8 var00; /*0x01*/ u8 var01; @@ -279,23 +260,72 @@ struct TVShowNameRaterShow { /*0x1F*/ u8 pokemonNameLanguage; }; -struct TVShowMassOutbreak { +struct TVShowBravoTrainerPokemonProfiles { + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u16 species; + /*0x04*/ u16 var04[2]; + /*0x08*/ u8 pokemonNickname[11]; + /*0x13*/ u8 contestCategory:3; + /*0x13*/ u8 contestRank:2; + /*0x13*/ u8 contestResult:2; + /*0x13*/ u8 var13_7:1; + /*0x14*/ u16 var14; + /*0x16*/ u8 playerName[8]; + /*0x1E*/ u8 language; + /*0x1F*/ u8 var1f; +}; + +struct TVShowBravoTrainerBattleTowerSpotlight { + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u8 trainerName[8]; + /*0x0A*/ u16 species; + /*0x0C*/ u8 pokemonName[8]; + /*0x14*/ u16 defeatedSpecies; + /*0x16*/ u16 var16; + /*0x18*/ u16 var18[1]; + /*0x1A*/ u8 btLevel; + /*0x1B*/ u8 var1b; + /*0x1C*/ u8 var1c; + /*0x1D*/ u8 language; +}; + +struct TVShowPokemonToday { /*0x00*/ u8 var00; /*0x01*/ u8 var01; - /*0x02*/ u8 var02; - /*0x03*/ u8 var03; - /*0x04*/ u16 moves[4]; - /*0x0C*/ u16 species; - /*0x0E*/ u16 var0E; - /*0x10*/ u8 locationMapNum; - /*0x11*/ u8 locationMapGroup; + /*0x02*/ u8 language; + /*0x03*/ u8 language2; + /*0x04*/ u8 nickname[11]; + /*0x0F*/ u8 ball; + /*0x10*/ u16 species; /*0x12*/ u8 var12; - /*0x13*/ u8 probability; - /*0x14*/ u8 level; - /*0x15*/ u8 var15; - /*0x16*/ u16 var16; - /*0x18*/ u8 language; - u8 pad19[11]; + /*0x13*/ u8 playerName[8]; +}; + +struct TVShowSmartShopper { + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u8 priceReduced; + /*0x03*/ u8 language; + /*0x04*/ u8 pad04[2]; + /*0x06*/ u16 itemIds[3]; + /*0x0C*/ u16 itemAmounts[3]; + /*0x12*/ u8 shopLocation; + /*0x13*/ u8 playerName[8]; +}; + +struct TVShowPokemonTodayFailed { + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u8 language; + /*0x03*/ u8 pad03[9]; + /*0x0c*/ u16 species; + /*0x0e*/ u16 species2; + /*0x10*/ u8 var10; + /*0x11*/ u8 var11; + /*0x12*/ u8 var12; + /*0x13*/ u8 playerName[8]; }; struct TVShowPokemonAngler { @@ -322,47 +352,23 @@ struct TVShowWorldOfMasters { /*0x13*/ u8 playerName[8]; }; -struct TVShowSmartShopper { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; - /*0x02*/ u8 priceReduced; - /*0x03*/ u8 language; - /*0x04*/ u8 pad04[2]; - /*0x06*/ u16 itemIds[3]; - /*0x0C*/ u16 itemAmounts[3]; - /*0x12*/ u8 shopLocation; - /*0x13*/ u8 playerName[8]; -}; - -struct TVShowBravoTrainerPokemonProfiles { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; - /*0x02*/ u16 species; - /*0x04*/ u16 var04[2]; - /*0x08*/ u8 pokemonNickname[11]; - /*0x13*/ u8 contestCategory:3; - /*0x13*/ u8 contestRank:2; - /*0x13*/ u8 var13_5:2; - /*0x13*/ u8 var13_7:1; - /*0x14*/ u16 var14; - /*0x16*/ u8 playerName[8]; - /*0x1E*/ u8 language; - /*0x1F*/ u8 var1f; -}; - -struct TVShowBravoTrainerBattleTowerSpotlight { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; - /*0x02*/ u8 trainerName[8]; - /*0x0A*/ u16 species; - /*0x0C*/ u8 pokemonName[8]; - /*0x14*/ u16 winningMove; - /*0x16*/ u16 var16; - /*0x18*/ u16 var18[1]; - /*0x1A*/ u8 btLevel; - /*0x1B*/ u8 var1b; - /*0x1C*/ u8 var1c; - /*0x1D*/ u8 language; +struct TVShowMassOutbreak { + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u8 var02; + /*0x03*/ u8 var03; + /*0x04*/ u16 moves[4]; + /*0x0C*/ u16 species; + /*0x0E*/ u16 var0E; + /*0x10*/ u8 locationMapNum; + /*0x11*/ u8 locationMapGroup; + /*0x12*/ u8 var12; + /*0x13*/ u8 probability; + /*0x14*/ u8 level; + /*0x15*/ u8 var15; + /*0x16*/ u16 var16; + /*0x18*/ u8 language; + u8 pad19[11]; }; typedef union TVShow { @@ -370,15 +376,16 @@ typedef union TVShow { struct TVShowFanClubLetter fanclubLetter; struct TVShowRecentHappenings recentHappenings; struct TVShowFanclubOpinions fanclubOpinions; + struct TVShowUnknownType04 unkShow04; struct TVShowNameRaterShow nameRaterShow; - struct TVShowMassOutbreak massOutbreak; - struct TVShowPokemonAngler pokemonAngler; - struct TVShowWorldOfMasters worldOfMasters; - struct TVShowSmartShopper smartshopperShow; struct TVShowBravoTrainerPokemonProfiles bravoTrainer; struct TVShowBravoTrainerBattleTowerSpotlight bravoTrainerTower; struct TVShowPokemonToday pokemonToday; + struct TVShowSmartShopper smartshopperShow; struct TVShowPokemonTodayFailed pokemonTodayFailed; + struct TVShowPokemonAngler pokemonAngler; + struct TVShowWorldOfMasters worldOfMasters; + struct TVShowMassOutbreak massOutbreak; } TVShow; struct MailStruct @@ -438,11 +445,6 @@ typedef union SB_Struct { } SB_Struct; // size is 0x198 -struct SaveTVStruct { - TVShow shows[24]; - TVShow unknown_2A98; -}; - struct UnknownSaveStruct2ABC { u8 val0; u8 val1; @@ -450,18 +452,24 @@ struct UnknownSaveStruct2ABC { }; struct GabbyAndTyData { - u16 mon1; - u16 mon2; - u16 move1; - u16 move2; - u8 mapnum; - u8 val9; - u8 valA_0:1; - u8 valA_1:1; - u8 valA_2:1; - u8 valA_3:1; - u8 valA_4:4; - u8 valB; + /*2b10*/ u16 mon1; + /*2b12*/ u16 mon2; + /*2b14*/ u16 lastMove; + /*2b16*/ u16 quote; + /*2b18*/ u8 mapnum; + /*2b19*/ u8 battleNum; + /*2b1a*/ u8 valA_0:1; + /*2b1a*/ u8 valA_1:1; + /*2b1a*/ u8 valA_2:1; + /*2b1a*/ u8 valA_3:1; + /*2b1a*/ u8 valA_4:1; + /*2b1a*/ u8 valA_5:3; + /*2b1b*/ u8 valB_0:1; + /*2b1b*/ u8 valB_1:1; + /*2b1b*/ u8 valB_2:1; + /*2b1b*/ u8 valB_3:1; + /*2b1b*/ u8 valB_4:1; + /*2b1b*/ u8 valB_5:3; }; struct RecordMixing_UnknownStruct { @@ -517,7 +525,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2704*/ u8 decorDoll[40]; /*0x272C*/ u8 decorCushion[10]; /*0x2736*/ u8 padding_2736[2]; - /*0x2738*/ struct SaveTVStruct tvShows; + /*0x2738*/ TVShow tvShows[25]; /*0x2ABC*/ struct UnknownSaveStruct2ABC unknown_2ABC[16]; /*0x2AFC*/ u16 outbreakPokemonSpecies; /*0x2AFE*/ u8 outbreakLocationMapNum; @@ -529,7 +537,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2B0C*/ u8 outbreakUnk4; /*0x2B0D*/ u8 outbreakPokemonProbability; /*0x2B0E*/ u16 outbreakUnk5; - /*0x2B18*/ struct GabbyAndTyData gabbyAndTyData; + /*0x2B10*/ struct GabbyAndTyData gabbyAndTyData; /*0x2B1C*/ u16 unk2B1C[6]; /*0x2B28*/ u16 unk2B28[6]; /*0x2B34*/ u16 unk2B34[6]; @@ -612,11 +620,11 @@ struct SaveBlock2 /* 0x02024EA4 */ /*0x10*/ u8 playTimeMinutes; /*0x11*/ u8 playTimeSeconds; /*0x12*/ u8 playTimeVBlanks; - /*0x13*/ u8 optionsButtonMode; // OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A] - /*0x14*/ u16 optionsTextSpeed:3; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST] + /*OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A]*/ /*0x13*/ u8 optionsButtonMode; + /*OPTIONS_TEXT_SPEED_[SLOW/MID/FAST]*/ /*0x14*/ u16 optionsTextSpeed:3; u16 optionsWindowFrameType:5; // Specifies one of the 20 decorative borders for text boxes - u16 optionsSound:1; // OPTIONS_SOUND_[MONO/STEREO] - u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET] + /*OPTIONS_SOUND_[MONO/STEREO]*/ u16 optionsSound:1; + /*OPTIONS_BATTLE_STYLE_[SHIFT/SET]*/ u16 optionsBattleStyle:1; u16 optionsBattleSceneOff:1; // whether battle animations are disabled u16 regionMapZoom:1; // whether the map is zoomed in /*0x18*/ struct Pokedex pokedex; diff --git a/include/trainer_see.h b/include/trainer_see.h index b80a41641..b80a41641 100755..100644 --- a/include/trainer_see.h +++ b/include/trainer_see.h |