From 20efe6984eb9ff9ac11dbb1c5d519c5134e7af60 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sat, 17 Dec 2016 13:43:44 +0100 Subject: Rename `charset` and use macro for build language --- include/global.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index be35f1299..d23204760 100644 --- a/include/global.h +++ b/include/global.h @@ -29,6 +29,14 @@ enum VERSION_RUBY = 2, }; +enum LanguageId { + LANGUAGE_JAPANESE = 1, + LANGUAGE_ENGLISH = 2, + LANGUAGE_GERMAN = 5, +}; + +#define GAME_LANGUAGE (LANGUAGE_ENGLISH) + enum { MALE, -- cgit v1.2.3 From b42f5c0f7fc9ac0161a6b6e2d764911ef375d040 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Thu, 29 Dec 2016 13:13:07 -0800 Subject: use BUGFIX ifdefs --- include/global.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index d23204760..66b6b6b50 100644 --- a/include/global.h +++ b/include/global.h @@ -2,10 +2,7 @@ #define GUARD_GLOBAL_H #include "gba/gba.h" - -#ifndef REVISION -#define REVISION 0 -#endif +#include "config.h" // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); -- cgit v1.2.3 From 4099235b1f26e313aeb94847c1b197d1dc4d4776 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Sun, 1 Jan 2017 20:26:55 -0800 Subject: mail data in save block 1 --- include/global.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 66b6b6b50..4d736cdef 100644 --- a/include/global.h +++ b/include/global.h @@ -174,9 +174,13 @@ struct EasyChatPair u16 words[2]; }; /*size = 0x8*/ -struct SaveBlock1_2B4C_Struct -{ - u8 filler[0x24]; +struct MailStruct +{ + /*0x00*/ u16 words[9]; + /*0x12*/ u8 playerName[8]; + /*0x1A*/ u8 trainerId[4]; + /*0x1E*/ u16 species; + /*0x20*/ u16 itemId; }; struct SaveBlock1 @@ -241,7 +245,7 @@ struct SaveBlock1 /*0x2B0E*/ u8 filler_2B0E[0xE]; /*0x2B1C*/ u16 unk2B1C[4]; /*0x2B24*/ u8 filler_2B24[0x28]; - /*0x2B4C*/ struct SaveBlock1_2B4C_Struct unkSave[16]; + /*0x2B4C*/ struct MailStruct mail[16]; /*0x2D8C*/ u8 filler_2D8C[0x48]; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff /*0x2DFC*/ u8 filler_2DFC[0x100]; -- cgit v1.2.3 From 98062c69d613fb1b9e2345924dd34d0bbdcfcc90 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Mon, 2 Jan 2017 04:27:51 -0500 Subject: label and document berry.c, decompress.c, item_use.c and label gBattleTypeFlags (#146) * make ROM match again * clean up item_use.c labels and clarify functions. * label and clarify some functions in decompress.c * label and clarify berry.c * rename 20239F8 to gBattleTypeFlags * formatting --- include/global.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 4d736cdef..004d9c50d 100644 --- a/include/global.h +++ b/include/global.h @@ -66,6 +66,15 @@ enum OPTIONS_BATTLE_STYLE_SET }; +enum +{ + BAG_ITEMS = 1, + BAG_POKEBALLS, + BAG_TMsHMs, + BAG_BERRIES, + BAG_KEYITEMS +}; + struct Coords16 { s16 x; -- cgit v1.2.3 From 2f362cf67ab65f62ec3a2a2a6497615cb8bc502c Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Tue, 3 Jan 2017 02:35:26 +0100 Subject: Partly decompile tv show --- include/global.h | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 84 insertions(+), 4 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 004d9c50d..b74956aa7 100644 --- a/include/global.h +++ b/include/global.h @@ -183,6 +183,84 @@ struct EasyChatPair u16 words[2]; }; /*size = 0x8*/ +struct TVShowCommon { + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; +}; + +struct TVShowFanClubLetter { + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u16 species; + u8 pad04[12]; + /*0x10*/ u8 playerName[8]; + /*0x18*/ u8 var18; +}; + +struct TVShowRecentHappenings { + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u16 var02; + u8 pad04[12]; + /*0x10*/ u8 var10[8]; + /*0x18*/ u8 var18; + u8 pad19[10]; +}; + +struct TVShowFanclubOpinions { + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u16 var02; + /*0x04*/ u8 var04A:4; + u8 var04B:4; + /*0x04*/ u8 var05[8]; + /*0x0D*/ u8 var0D; + /*0x0E*/ u8 var0E; + /*0x0F*/ u8 var0F; + /*0x10*/ u8 var10[8]; +}; + +struct TVShowNameRaterShow { + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u16 species; + /*0x04*/ u8 pokemonName[11]; + /*0x0F*/ u8 trainerName[11]; + /*0x1A*/ u8 random; + /*0x1B*/ u8 random2; + /*0x1C*/ u16 var1C; + /*0x1E*/ u8 language; + /*0x1F*/ u8 var1F; +}; + +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 var18; + u8 pad19[11]; +}; + +typedef union TVShow { + struct TVShowCommon common; + struct TVShowFanClubLetter fanclubLetter; + struct TVShowRecentHappenings recentHappenings; + struct TVShowFanclubOpinions fanclubOpinions; + struct TVShowNameRaterShow nameRaterShow; + struct TVShowMassOutbreak massOutbreak; +} TVShow; + struct MailStruct { /*0x00*/ u16 words[9]; @@ -241,17 +319,19 @@ struct SaveBlock1 /*0x2704*/ u8 decorDoll[40]; /*0x272C*/ u8 decorCushion[10]; /*0x2736*/ u8 padding_2736[2]; - /*0x2738*/ u8 tvShows[24][36]; // TODO: TV show struct + /*0x2738*/ TVShow tvShows[24]; /*0x2A98*/ u8 filler_2A98[0x64]; /*0x2AFC*/ u16 outbreakPokemonSpecies; /*0x2AFE*/ u8 outbreakLocationMapNum; /*0x2AFF*/ u8 outbreakLocationMapGroup; /*0x2B00*/ u8 outbreakPokemonLevel; - /*0x2B01*/ u8 filler_2B01[3]; + /*0x2B01*/ u8 outbreakUnk1; + /*0x2B02*/ u16 outbreakUnk2; /*0x2B04*/ u16 outbreakPokemonMoves[4]; - /*0x2B0C*/ u8 unk2B0C; + /*0x2B0C*/ u8 outbreakUnk4; /*0x2B0D*/ u8 outbreakPokemonProbability; - /*0x2B0E*/ u8 filler_2B0E[0xE]; + /*0x2B0E*/ u16 outbreakUnk5; + /*0x2B10*/ u8 filler_2B0E[0xC]; /*0x2B1C*/ u16 unk2B1C[4]; /*0x2B24*/ u8 filler_2B24[0x28]; /*0x2B4C*/ struct MailStruct mail[16]; -- cgit v1.2.3 From b6b8d053ecfc73c9ff0d4b5715404e3583501b84 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Wed, 4 Jan 2017 04:29:25 -0800 Subject: Emerald version enum --- include/global.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index b74956aa7..3ad3f3988 100644 --- a/include/global.h +++ b/include/global.h @@ -24,6 +24,7 @@ enum { VERSION_SAPPHIRE = 1, VERSION_RUBY = 2, + VERSION_EMERALD = 3, }; enum LanguageId { -- cgit v1.2.3 From 4b16d04dccb8013712d9f8853f13a21084718635 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Wed, 4 Jan 2017 22:20:17 -0500 Subject: decompile clock.c (#161) * remove matsuda debug menu from ld_script * decompile clock.c * formatting --- include/global.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 3ad3f3988..30f935521 100644 --- a/include/global.h +++ b/include/global.h @@ -359,10 +359,10 @@ extern struct SaveBlock1 gSaveBlock1; struct Time { - s16 days; - s8 hours; - s8 minutes; - s8 seconds; + /* 0x00 */ s16 days; + /* 0x02 */ s8 hours; + /* 0x03 */ s8 minutes; + /* 0x04 */ s8 seconds; }; struct Pokedex @@ -386,7 +386,7 @@ struct SaveBlock2_Sub /*0x04CC, 0x0574*/ u8 filler_4CC[0x31C]; }; -struct SaveBlock2 +struct SaveBlock2 /* 0x02024EA4 */ { /*0x00*/ u8 playerName[8]; /*0x08*/ u8 playerGender; // MALE, FEMALE -- cgit v1.2.3 From 94fb9ab2a9ed111c72a80693d8f29ea4bc531898 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Thu, 5 Jan 2017 22:50:45 -0500 Subject: more labels (#165) * more labels and match sub_810745C * formatting * move BattleStruct to battle.h and combine both loose structs * oops * more labels for rom4.c --- include/global.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 30f935521..846673dd7 100644 --- a/include/global.h +++ b/include/global.h @@ -397,12 +397,12 @@ struct SaveBlock2 /* 0x02024EA4 */ /*0x11*/ u8 playTimeSeconds; /*0x12*/ u8 playTimeVBlanks; /*0x13*/ u8 optionsButtonMode; // OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A] - u16 optionsTextSpeed:3; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST] - 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] - u16 optionsBattleSceneOff:1; // whether battle animations are disabled - u16 regionMapZoom:1; // whether the map is zoomed in + u16 optionsTextSpeed:3; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST] + 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] + u16 optionsBattleSceneOff:1; // whether battle animations are disabled + u16 regionMapZoom:1; // whether the map is zoomed in /*0x18*/ struct Pokedex pokedex; /*0x90*/ u8 filler_90[0x8]; /*0x98*/ struct Time localTimeOffset; -- cgit v1.2.3 From 746b12fb99bb435ea5fcd06b12032d40e088c6c9 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Thu, 5 Jan 2017 20:22:44 -0800 Subject: global.h formatting --- include/global.h | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 846673dd7..a5932d175 100644 --- a/include/global.h +++ b/include/global.h @@ -28,9 +28,9 @@ enum }; enum LanguageId { - LANGUAGE_JAPANESE = 1, - LANGUAGE_ENGLISH = 2, - LANGUAGE_GERMAN = 5, + LANGUAGE_JAPANESE = 1, + LANGUAGE_ENGLISH = 2, + LANGUAGE_GERMAN = 5, }; #define GAME_LANGUAGE (LANGUAGE_ENGLISH) @@ -359,10 +359,10 @@ extern struct SaveBlock1 gSaveBlock1; struct Time { - /* 0x00 */ s16 days; - /* 0x02 */ s8 hours; - /* 0x03 */ s8 minutes; - /* 0x04 */ s8 seconds; + /*0x00*/ s16 days; + /*0x02*/ s8 hours; + /*0x03*/ s8 minutes; + /*0x04*/ s8 seconds; }; struct Pokedex @@ -380,10 +380,10 @@ struct Pokedex struct SaveBlock2_Sub { - /*0x0000, 0x00A8*/ u8 filler_000[0x4C8]; - /*0x04C8, 0x0570*/ u16 var_4C8; - /*0x04CA, 0x0572*/ u16 var_4CA; - /*0x04CC, 0x0574*/ u8 filler_4CC[0x31C]; + /*0x0000, 0x00A8*/ u8 filler_000[0x4C8]; + /*0x04C8, 0x0570*/ u16 var_4C8; + /*0x04CA, 0x0572*/ u16 var_4CA; + /*0x04CC, 0x0574*/ u8 filler_4CC[0x31C]; }; struct SaveBlock2 /* 0x02024EA4 */ @@ -397,12 +397,12 @@ struct SaveBlock2 /* 0x02024EA4 */ /*0x11*/ u8 playTimeSeconds; /*0x12*/ u8 playTimeVBlanks; /*0x13*/ u8 optionsButtonMode; // OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A] - u16 optionsTextSpeed:3; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST] - 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] - u16 optionsBattleSceneOff:1; // whether battle animations are disabled - u16 regionMapZoom:1; // whether the map is zoomed in + /*0x14*/ u16 optionsTextSpeed:3; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST] + 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] + u16 optionsBattleSceneOff:1; // whether battle animations are disabled + u16 regionMapZoom:1; // whether the map is zoomed in /*0x18*/ struct Pokedex pokedex; /*0x90*/ u8 filler_90[0x8]; /*0x98*/ struct Time localTimeOffset; @@ -412,19 +412,19 @@ struct SaveBlock2 /* 0x02024EA4 */ struct UnkStruct_8054FF8_Substruct { - s16 x; - s16 y; - u8 field_8; + s16 x; + s16 y; + u8 field_8; }; struct UnkStruct_8054FF8 { - u8 a; - u8 b; - u8 c; - u8 d; - struct UnkStruct_8054FF8_Substruct sub; - u16 field_C; + u8 a; + u8 b; + u8 c; + u8 d; + struct UnkStruct_8054FF8_Substruct sub; + u16 field_C; }; extern struct SaveBlock2 gSaveBlock2; -- cgit v1.2.3 From 6b0268e0c0fb98014cb72f8a918a33c0645162d2 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Tue, 10 Jan 2017 23:15:38 -0500 Subject: finish decompiling field_control_avatar.c (#182) * start decompiling field_control_avatar.c * remove field_control_player_avatar.c * finish decompiling * cleanup * var and flag constants --- include/global.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index a5932d175..a9056ed55 100644 --- a/include/global.h +++ b/include/global.h @@ -410,11 +410,11 @@ struct SaveBlock2 /* 0x02024EA4 */ /*0xA8*/ struct SaveBlock2_Sub filler_A8; }; -struct UnkStruct_8054FF8_Substruct +struct MapPosition { s16 x; s16 y; - u8 field_8; + u8 height; }; struct UnkStruct_8054FF8 @@ -423,7 +423,7 @@ struct UnkStruct_8054FF8 u8 b; u8 c; u8 d; - struct UnkStruct_8054FF8_Substruct sub; + struct MapPosition sub; u16 field_C; }; -- cgit v1.2.3 From 0db72319326c6b29b0fdcdd1e7767a7e7ba46a1d Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Thu, 12 Jan 2017 00:53:22 -0500 Subject: decompile braille_puzzles.c (#187) * begin decompiling braille_puzzles.c * finish decompiling braille_puzzles.c --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index a9056ed55..8965fcd38 100644 --- a/include/global.h +++ b/include/global.h @@ -271,7 +271,7 @@ struct MailStruct /*0x20*/ u16 itemId; }; -struct SaveBlock1 +struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; /*0x04*/ struct WarpData location; -- cgit v1.2.3 From 97004d4c90d307e139e833f53dc1610ded01ef38 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Sat, 14 Jan 2017 19:25:40 -0800 Subject: decompile unknown_debug_menu --- include/global.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 8965fcd38..22927f749 100644 --- a/include/global.h +++ b/include/global.h @@ -380,7 +380,14 @@ struct Pokedex struct SaveBlock2_Sub { - /*0x0000, 0x00A8*/ u8 filler_000[0x4C8]; + /*0x0000, 0x00A8*/ u8 filler_000[0x4AE]; + /*0x04AE, 0x0556*/ u8 var_4AE; + /*0x04AF, 0x0557*/ u8 var_4AF; + /*0x04B0, 0x0558*/ u16 var_4B0; + /*0x04B2, 0x055A*/ u16 var_4B2; + /*0x04B4, 0x055C*/ u16 var_4B4; + /*0x04B6, 0x055E*/ u16 var_4B6; + /*0x04B8, 0x0560*/ u8 filler_4B8[0x10]; /*0x04C8, 0x0570*/ u16 var_4C8; /*0x04CA, 0x0572*/ u16 var_4CA; /*0x04CC, 0x0574*/ u8 filler_4CC[0x31C]; -- cgit v1.2.3 From 648c6c7093f5173694562929f615380f297ad306 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Tue, 17 Jan 2017 13:41:12 +0100 Subject: Move `gStringVar` declarations to text.h --- include/global.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 22927f749..736a1a5dc 100644 --- a/include/global.h +++ b/include/global.h @@ -15,11 +15,6 @@ #define POKEMON_NAME_LENGTH 10 #define OT_NAME_LENGTH 7 -extern u8 gStringVar1[]; -extern u8 gStringVar2[]; -extern u8 gStringVar3[]; -extern u8 gStringVar4[]; - enum { VERSION_SAPPHIRE = 1, -- cgit v1.2.3 From b6b5453431af46791fd9d211efac64464c1dff85 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sun, 29 Jan 2017 20:59:54 -0500 Subject: start decompiling mauville_old_man.c (#225) * some labels and enumerate player speeds * clear up speed enums * GetPlayerSpeed * oops * start decompiling mauville_old_man.c * formatting * decompile more of mauville_old_man.c * someone fix this please * formatting * make ROM build again * formatting again --- include/global.h | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 736a1a5dc..6c8b60484 100644 --- a/include/global.h +++ b/include/global.h @@ -266,6 +266,35 @@ struct MailStruct /*0x20*/ u16 itemId; }; +struct UnkMauvilleOldManStruct +{ + u8 unk_2D94; + u8 unk_2D95; + /*0x2D96*/ u16 mauvilleOldMan_ecArray[6]; + /*0x2DA2*/ u16 mauvilleOldMan_ecArray2[6]; + /*0x2DAE*/ u8 playerName[8]; + /*0x2DB6*/ u8 filler_2DB6[0x3]; + /*0x2DB9*/ u8 playerTrainerId[4]; + u8 unk_2DBD; + /* size = 0x1E */ +}; + +struct UnkMauvilleOldManStruct2 +{ + u8 filler0; + u8 unk1; + u8 unk2; + u16 mauvilleOldMan_ecArray[10]; + u16 mauvilleOldMan_ecArray2[6]; + u8 fillerF[0x4]; + /* size = 0x1E */ +}; + +typedef union OldMan { + struct UnkMauvilleOldManStruct oldMan1; + struct UnkMauvilleOldManStruct2 oldMan2; +} OldMan; + struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; @@ -331,7 +360,10 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2B1C*/ u16 unk2B1C[4]; /*0x2B24*/ u8 filler_2B24[0x28]; /*0x2B4C*/ struct MailStruct mail[16]; - /*0x2D8C*/ u8 filler_2D8C[0x48]; + /*0x2D8C*/ u8 filler_2D8C[0x8]; + OldMan oldMan; + ///*0x2D94*/ struct UnkMauvilleOldManStruct oldManStruct; + /*0x2DBC*/ u8 filler_2DBC[0x18]; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff /*0x2DFC*/ u8 filler_2DFC[0x100]; /*0x2EFC*/ struct SB1_2EFC_Struct sb1_2EFC_struct[5]; -- cgit v1.2.3 From 9813caaf5345ea28f8230d41461618673779c2fb Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Tue, 31 Jan 2017 03:08:44 -0500 Subject: make ROM match again (#227) * some labels and enumerate player speeds * clear up speed enums * GetPlayerSpeed * oops * start decompiling mauville_old_man.c * formatting * decompile more of mauville_old_man.c * someone fix this please * formatting * make ROM build again * formatting again * make ROM match again --- include/global.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 6c8b60484..56338a9e8 100644 --- a/include/global.h +++ b/include/global.h @@ -276,7 +276,7 @@ struct UnkMauvilleOldManStruct /*0x2DB6*/ u8 filler_2DB6[0x3]; /*0x2DB9*/ u8 playerTrainerId[4]; u8 unk_2DBD; - /* size = 0x1E */ + /* size = 0x2C */ }; struct UnkMauvilleOldManStruct2 @@ -286,8 +286,8 @@ struct UnkMauvilleOldManStruct2 u8 unk2; u16 mauvilleOldMan_ecArray[10]; u16 mauvilleOldMan_ecArray2[6]; - u8 fillerF[0x4]; - /* size = 0x1E */ + u8 fillerF[0x2]; + /* size = 0x2C */ }; typedef union OldMan { @@ -361,9 +361,8 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2B24*/ u8 filler_2B24[0x28]; /*0x2B4C*/ struct MailStruct mail[16]; /*0x2D8C*/ u8 filler_2D8C[0x8]; - OldMan oldMan; - ///*0x2D94*/ struct UnkMauvilleOldManStruct oldManStruct; - /*0x2DBC*/ u8 filler_2DBC[0x18]; + /*0x2D94*/ OldMan oldMan; + /*0x2DC0*/ u8 unk_2DC0[0x14]; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff /*0x2DFC*/ u8 filler_2DFC[0x100]; /*0x2EFC*/ struct SB1_2EFC_Struct sb1_2EFC_struct[5]; -- cgit v1.2.3 From 6035511c139549a0291b6b3d43b9b080f792b2b6 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sat, 18 Mar 2017 04:00:15 +0100 Subject: reorganize and add new headers for many files --- include/global.h | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 56338a9e8..ad08af84f 100644 --- a/include/global.h +++ b/include/global.h @@ -71,6 +71,11 @@ enum BAG_KEYITEMS }; +struct TextStruct +{ + const u8 *text; +}; + struct Coords16 { s16 x; @@ -167,7 +172,8 @@ struct RamScript struct SB1_2EFC_Struct { - u8 unknown[0x20]; + u16 var; + u8 unknown[0x1E]; }; struct EasyChatPair @@ -295,6 +301,25 @@ typedef union OldMan { struct UnkMauvilleOldManStruct2 oldMan2; } OldMan; +struct Unk_SB_Access_Struct1 +{ + u8 filler0[0xF8]; + struct SB1_2EFC_Struct sb1_2EFC_struct[5]; +}; + +struct Unk_SB_Access_Struct2 +{ + struct SB1_2EFC_Struct sb1_2EFC_struct2[12]; // each is 0x20 + /*0x2F84*/ u8 filler[0x18]; +}; + +/*0x2E04*/ +typedef union SB_Struct { + struct Unk_SB_Access_Struct1 unkSB1; + struct Unk_SB_Access_Struct2 unkSB2; +} SB_Struct; +// size is 0x198 + struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; @@ -364,8 +389,8 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2D94*/ OldMan oldMan; /*0x2DC0*/ u8 unk_2DC0[0x14]; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff - /*0x2DFC*/ u8 filler_2DFC[0x100]; - /*0x2EFC*/ struct SB1_2EFC_Struct sb1_2EFC_struct[5]; + /*0x2DFC*/ u8 filler_2DFC[0x8]; + /*0x2E04*/ SB_Struct sbStruct; /*0x2F9C*/ u8 filler_2F9C[0xA0]; /*0x303C*/ u8 filler_303C[0x38]; /*0x3074*/ u8 filler_3074[0x42]; -- cgit v1.2.3 From 7f03ba4951c5045274dab3f2a3de8e8d498b8df3 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Thu, 4 May 2017 00:37:07 +0000 Subject: decompile a little more of player_pc.c and dump half of battle_anim data incbins (#254) * matching sub_813A280 and sub_813A4B4 * move data to item_use.c * slightly less ugly NewGameInitPCItems * more less ugly NewGameInitPCItems - Game Freak doesn't know how to use structs * decompile HandleQuantityRolling and sub_813A6FC * partially label and comment battle_anim.c * decompile sub_813A794 and sub_813A83C * minor comments on battle_anim.c * decompile up to GF shenanigans #14390 * up to GF shenanigans #38571 * dump half of battle_anim_80CA710.s incbins * dump most incbins from battle_anim_812C144.s * obj_rot_scal fixes * subsprite * i cant even identify byte arrays --- include/global.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index ad08af84f..b50b56151 100644 --- a/include/global.h +++ b/include/global.h @@ -76,6 +76,11 @@ struct TextStruct const u8 *text; }; +struct FuncStruct +{ + void *func; +}; + struct Coords16 { s16 x; -- cgit v1.2.3 From c26ecaec0fbb5f322fd7f08dbf4e96082a33371e Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Wed, 3 May 2017 18:16:31 -0700 Subject: clean up whitespace --- include/global.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index b50b56151..59cbd3b89 100644 --- a/include/global.h +++ b/include/global.h @@ -73,12 +73,12 @@ enum struct TextStruct { - const u8 *text; + const u8 *text; }; struct FuncStruct { - void *func; + void *func; }; struct Coords16 @@ -177,7 +177,7 @@ struct RamScript struct SB1_2EFC_Struct { - u16 var; + u16 var; u8 unknown[0x1E]; }; @@ -287,41 +287,41 @@ struct UnkMauvilleOldManStruct /*0x2DB6*/ u8 filler_2DB6[0x3]; /*0x2DB9*/ u8 playerTrainerId[4]; u8 unk_2DBD; - /* size = 0x2C */ + /* size = 0x2C */ }; struct UnkMauvilleOldManStruct2 { - u8 filler0; - u8 unk1; - u8 unk2; - u16 mauvilleOldMan_ecArray[10]; - u16 mauvilleOldMan_ecArray2[6]; + u8 filler0; + u8 unk1; + u8 unk2; + u16 mauvilleOldMan_ecArray[10]; + u16 mauvilleOldMan_ecArray2[6]; u8 fillerF[0x2]; - /* size = 0x2C */ + /* size = 0x2C */ }; typedef union OldMan { - struct UnkMauvilleOldManStruct oldMan1; - struct UnkMauvilleOldManStruct2 oldMan2; + struct UnkMauvilleOldManStruct oldMan1; + struct UnkMauvilleOldManStruct2 oldMan2; } OldMan; struct Unk_SB_Access_Struct1 { - u8 filler0[0xF8]; - struct SB1_2EFC_Struct sb1_2EFC_struct[5]; + u8 filler0[0xF8]; + struct SB1_2EFC_Struct sb1_2EFC_struct[5]; }; struct Unk_SB_Access_Struct2 { - struct SB1_2EFC_Struct sb1_2EFC_struct2[12]; // each is 0x20 + struct SB1_2EFC_Struct sb1_2EFC_struct2[12]; // each is 0x20 /*0x2F84*/ u8 filler[0x18]; }; /*0x2E04*/ typedef union SB_Struct { - struct Unk_SB_Access_Struct1 unkSB1; - struct Unk_SB_Access_Struct2 unkSB2; + struct Unk_SB_Access_Struct1 unkSB1; + struct Unk_SB_Access_Struct2 unkSB2; } SB_Struct; // size is 0x198 @@ -395,7 +395,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2DC0*/ u8 unk_2DC0[0x14]; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff /*0x2DFC*/ u8 filler_2DFC[0x8]; - /*0x2E04*/ SB_Struct sbStruct; + /*0x2E04*/ SB_Struct sbStruct; /*0x2F9C*/ u8 filler_2F9C[0xA0]; /*0x303C*/ u8 filler_303C[0x38]; /*0x3074*/ u8 filler_3074[0x42]; -- cgit v1.2.3 From f492004cb605a45b0b43e94121a0f504d7fb10cc Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Wed, 3 May 2017 21:50:25 -0700 Subject: introduce YesNoFuncTable struct --- include/global.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 59cbd3b89..f4f9f0048 100644 --- a/include/global.h +++ b/include/global.h @@ -76,11 +76,6 @@ struct TextStruct const u8 *text; }; -struct FuncStruct -{ - void *func; -}; - struct Coords16 { s16 x; -- cgit v1.2.3 From a85fc2a69c48a22ea400ae14b697c5600c8c7a8b Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Fri, 5 May 2017 00:43:55 -0400 Subject: use macros and defines for save.c making it easier to add new sections --- include/global.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index f4f9f0048..62e557ef4 100644 --- a/include/global.h +++ b/include/global.h @@ -485,6 +485,13 @@ struct UnkStruct_8054FF8 u16 field_C; }; +// wasnt defined so I had to define it +struct HallOfFame +{ + u8 filler[0x1F00]; +}; + +extern struct HallOfFame gHallOfFame; extern struct SaveBlock2 gSaveBlock2; #endif // GUARD_GLOBAL_H -- cgit v1.2.3 From 12ef81ae0df9f1ab1ae26f3f3e390495c781fdc2 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sat, 6 May 2017 03:59:09 +0200 Subject: Various German patches --- include/global.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 62e557ef4..4d9c837fa 100644 --- a/include/global.h +++ b/include/global.h @@ -28,7 +28,11 @@ enum LanguageId { LANGUAGE_GERMAN = 5, }; +#if defined(ENGLISH) #define GAME_LANGUAGE (LANGUAGE_ENGLISH) +#elif defined(GERMAN) +#define GAME_LANGUAGE (LANGUAGE_GERMAN) +#endif enum { -- cgit v1.2.3 From 91208b74b8e7cf6c18526417d7a3c093c955c1fe Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 7 May 2017 14:42:45 +0200 Subject: Start decompiling easy_chat --- include/global.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 4d9c837fa..5de9f48d3 100644 --- a/include/global.h +++ b/include/global.h @@ -386,10 +386,13 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2B0D*/ u8 outbreakPokemonProbability; /*0x2B0E*/ u16 outbreakUnk5; /*0x2B10*/ u8 filler_2B0E[0xC]; - /*0x2B1C*/ u16 unk2B1C[4]; - /*0x2B24*/ u8 filler_2B24[0x28]; + /*0x2B1C*/ u16 unk2B1C[6]; + /*0x2B28*/ u16 unk2B28[6]; + /*0x2B34*/ u16 unk2B34[6]; + /*0x2B40*/ u16 unk2B40[6]; /*0x2B4C*/ struct MailStruct mail[16]; - /*0x2D8C*/ u8 filler_2D8C[0x8]; + /*0x2D8C*/ u8 unk2D8C[4]; + /*0x2D90*/ u8 filler_2D90[0x4]; /*0x2D94*/ OldMan oldMan; /*0x2DC0*/ u8 unk_2DC0[0x14]; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff -- cgit v1.2.3 From 64412ee4c45a53712dd94410966ec68771b83fdd Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Mon, 8 May 2017 22:23:56 +0200 Subject: Decompile ShowLinkBattleRecords --- include/global.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 5de9f48d3..ce17d78a1 100644 --- a/include/global.h +++ b/include/global.h @@ -402,7 +402,9 @@ struct SaveBlock1 /* 0x02025734 */ /*0x303C*/ u8 filler_303C[0x38]; /*0x3074*/ u8 filler_3074[0x42]; /*0x30B6*/ u8 filler_30B6; - /*0x30B7*/ u8 filler_30B7[0x59]; + /*0x30B7*/ u8 filler_30B7[1]; + /*0x30B8*/ u8 linkBattleRecords[5][16]; + /*0x3108*/ u8 filler_3108[8]; /*0x3110*/ u8 giftRibbons[7]; /*0x3117*/ u8 filler_311B[0x2D]; /*0x3144*/ struct Roamer roamer; @@ -495,7 +497,7 @@ struct UnkStruct_8054FF8 // wasnt defined so I had to define it struct HallOfFame { - u8 filler[0x1F00]; + u8 filler[0x1F00]; }; extern struct HallOfFame gHallOfFame; -- cgit v1.2.3 From e6868bbdb2b9a0f00085029817d3a451781973cd Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Mon, 8 May 2017 13:55:31 -0700 Subject: decompile roamer.s --- include/global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index ce17d78a1..ca5335697 100644 --- a/include/global.h +++ b/include/global.h @@ -156,7 +156,8 @@ struct Roamer /*0x10*/ u8 cute; /*0x11*/ u8 smart; /*0x12*/ u8 tough; - /*0x13*/ u8 active; + /*0x13*/ bool8 active; + /*0x14*/ u8 filler[0x8]; }; struct RamScriptData @@ -408,7 +409,6 @@ struct SaveBlock1 /* 0x02025734 */ /*0x3110*/ u8 giftRibbons[7]; /*0x3117*/ u8 filler_311B[0x2D]; /*0x3144*/ struct Roamer roamer; - /*0x3158*/ u8 filler_3158[0x8]; /*0x3160*/ struct EnigmaBerry enigmaBerry; /*0x3690*/ struct RamScript ramScript; /*0x3A7C*/ u8 filler_3A7C[0x10]; -- cgit v1.2.3 From a83ced6d98f301f4aade1c571d8c0cc9e43d0450 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Mon, 8 May 2017 23:13:46 -0500 Subject: fix some nonmatching functions (#284) * fix some nonmatching functions * delete trailing whitespace --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index ca5335697..4cbbef5cc 100644 --- a/include/global.h +++ b/include/global.h @@ -296,7 +296,7 @@ struct UnkMauvilleOldManStruct2 u8 unk1; u8 unk2; u16 mauvilleOldMan_ecArray[10]; - u16 mauvilleOldMan_ecArray2[6]; + u8 mauvilleOldMan_ecArray2[12]; u8 fillerF[0x2]; /* size = 0x2C */ }; -- cgit v1.2.3 From fe5f0749278b7f6fb18d39ac2aab6db1de822625 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 15 May 2017 00:35:20 -0400 Subject: Disassemble a function called by the secret base clearing routine --- include/global.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 4cbbef5cc..e106e2b6f 100644 --- a/include/global.h +++ b/include/global.h @@ -98,6 +98,7 @@ struct SecretBaseRecord u8 sbr_field_1_0:4; u8 gender:1; u8 sbr_field_1_5:1; + u8 sbr_field_1_6:2; u8 sbr_field_2[7]; // 0xFF bytes? u8 trainerId[4]; // byte 0 is used for determining trainer class u16 sbr_field_e; -- cgit v1.2.3 From ca26346cff5ca1448896a499072255100cedeb66 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 16 May 2017 17:08:11 -0400 Subject: sub_80BBCCC (almost matching) --- include/global.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index e106e2b6f..28d7b1c96 100644 --- a/include/global.h +++ b/include/global.h @@ -94,24 +94,24 @@ struct UCoords16 struct SecretBaseRecord { - u8 sbr_field_0; // ID? - u8 sbr_field_1_0:4; - u8 gender:1; - u8 sbr_field_1_5:1; - u8 sbr_field_1_6:2; - u8 sbr_field_2[7]; // 0xFF bytes? - u8 trainerId[4]; // byte 0 is used for determining trainer class - u16 sbr_field_e; - u8 sbr_field_10; - u8 sbr_field_11; - u8 decorations[16]; - u8 sbr_field_22[16]; - u32 partyPersonality[6]; - u16 partyMoves[6 * 4]; - u16 partySpecies[6]; - u16 partyHeldItems[6]; - u8 partyLevels[6]; - u8 partyEVs[6]; + /*0x1A08*/ u8 sbr_field_0; // ID? + /*0x1A09*/ u8 sbr_field_1_0:4; + /*0x1A09*/ u8 gender:1; + /*0x1A09*/ u8 sbr_field_1_5:1; + /*0x1A09*/ u8 sbr_field_1_6:2; + /*0x1A0A*/ u8 sbr_field_2[7]; // 0xFF bytes? + /*0x1A12*/ u8 trainerId[4]; // byte 0 is used for determining trainer class + /*0x1A16*/ u16 sbr_field_e; + /*0x1A18*/ u8 sbr_field_10; + /*0x1A19*/ u8 sbr_field_11; + /*0x1A1A*/ u8 decorations[16]; + /*0x1A2A*/ u8 sbr_field_22[16]; + /*0x1A3A*/ u32 partyPersonality[6]; + /*0x1A52*/ u16 partyMoves[6 * 4]; + /*0x1A6A*/ u16 partySpecies[6]; + /*0x1A76*/ u16 partyHeldItems[6]; + /*0x1A82*/ u8 partyLevels[6]; + /*0x1A88*/ u8 partyEVs[6]; }; #include "game_stat.h" -- cgit v1.2.3 From 40c81240b45b43e5f904bcd0b6b91c69b1f70e3c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 16 May 2017 19:49:00 -0400 Subject: sub_80BBDD0 (nonmatching) --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 28d7b1c96..c8b07cf69 100644 --- a/include/global.h +++ b/include/global.h @@ -105,7 +105,7 @@ struct SecretBaseRecord /*0x1A18*/ u8 sbr_field_10; /*0x1A19*/ u8 sbr_field_11; /*0x1A1A*/ u8 decorations[16]; - /*0x1A2A*/ u8 sbr_field_22[16]; + /*0x1A2A*/ u8 decorationPos[16]; /*0x1A3A*/ u32 partyPersonality[6]; /*0x1A52*/ u16 partyMoves[6 * 4]; /*0x1A6A*/ u16 partySpecies[6]; -- cgit v1.2.3 From 651630d5dc8e2b79e522e07863f0c35965752e9b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 16 May 2017 22:06:23 -0400 Subject: sub_80BC300 (nonmatching) --- include/global.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index c8b07cf69..8e6be79da 100644 --- a/include/global.h +++ b/include/global.h @@ -107,11 +107,11 @@ struct SecretBaseRecord /*0x1A1A*/ u8 decorations[16]; /*0x1A2A*/ u8 decorationPos[16]; /*0x1A3A*/ u32 partyPersonality[6]; - /*0x1A52*/ u16 partyMoves[6 * 4]; - /*0x1A6A*/ u16 partySpecies[6]; - /*0x1A76*/ u16 partyHeldItems[6]; - /*0x1A82*/ u8 partyLevels[6]; - /*0x1A88*/ u8 partyEVs[6]; + /*0x1A54*/ u16 partyMoves[6 * 4]; + /*0x1A84*/ u16 partySpecies[6]; + /*0x1A90*/ u16 partyHeldItems[6]; + /*0x1A9C*/ u8 partyLevels[6]; + /*0x1AA2*/ u8 partyEVs[6]; }; #include "game_stat.h" -- cgit v1.2.3 From 1c6396051a016689c568a00ab89b0d15d58f87ce Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 16 May 2017 22:36:43 -0400 Subject: ClearTVShowData --- include/global.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 8e6be79da..4f1e189ba 100644 --- a/include/global.h +++ b/include/global.h @@ -194,6 +194,7 @@ struct EasyChatPair struct TVShowCommon { /*0x00*/ u8 var00; /*0x01*/ u8 var01; + /*0x02*/ u8 pad02[34]; }; struct TVShowFanClubLetter { -- cgit v1.2.3 From 90b3f0464ad38761caac2a7da747d3ca23a8c1ae Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 17 May 2017 12:39:27 -0400 Subject: More work on tv --- include/global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 4f1e189ba..f08c76bac 100644 --- a/include/global.h +++ b/include/global.h @@ -210,7 +210,7 @@ struct TVShowRecentHappenings { /*0x00*/ u8 var00; /*0x01*/ u8 var01; /*0x02*/ u16 var02; - u8 pad04[12]; + /*0x04*/ u16 var04[6]; /*0x10*/ u8 var10[8]; /*0x18*/ u8 var18; u8 pad19[10]; @@ -222,7 +222,7 @@ struct TVShowFanclubOpinions { /*0x02*/ u16 var02; /*0x04*/ u8 var04A:4; u8 var04B:4; - /*0x04*/ u8 var05[8]; + /*0x05*/ u8 var05[8]; /*0x0D*/ u8 var0D; /*0x0E*/ u8 var0E; /*0x0F*/ u8 var0F; -- cgit v1.2.3 From ebea499a3f052456ece4272ae06c55eee0194cdf Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 17 May 2017 20:51:05 -0400 Subject: sub_80BE9D4 (mostly matching) --- include/global.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index f08c76bac..4790c4ed2 100644 --- a/include/global.h +++ b/include/global.h @@ -261,6 +261,17 @@ struct TVShowMassOutbreak { u8 pad19[11]; }; +struct TVShowUnknownTVShowType { + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u8 var02; + /*0x03*/ u8 var03; + /*0x04*/ u16 var04; + /*0x06*/ u8 language; + u8 pad07[12]; + /*0x13*/ u8 playerName[8]; +}; + typedef union TVShow { struct TVShowCommon common; struct TVShowFanClubLetter fanclubLetter; @@ -268,6 +279,7 @@ typedef union TVShow { struct TVShowFanclubOpinions fanclubOpinions; struct TVShowNameRaterShow nameRaterShow; struct TVShowMassOutbreak massOutbreak; + struct TVShowUnknownTVShowType unknownTvShowType; } TVShow; struct MailStruct -- cgit v1.2.3 From 0aabedd7514ad7831ec76c93e4e9e83e3c68809d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 17 May 2017 22:20:27 -0400 Subject: More tv fns --- include/global.h | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 4790c4ed2..522ec065b 100644 --- a/include/global.h +++ b/include/global.h @@ -272,6 +272,19 @@ struct TVShowUnknownTVShowType { /*0x13*/ u8 playerName[8]; }; +struct TVShowUnknownTVShowType2 { + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u16 var02; + /*0x04*/ u16 var04; + /*0x06*/ u16 var06; + /*0x08*/ u16 var08; + /*0x0a*/ u8 var0a; + /*0x0b*/ u8 language; + u8 pad0c[7]; + /*0x13*/ u8 playerName[8]; +}; + typedef union TVShow { struct TVShowCommon common; struct TVShowFanClubLetter fanclubLetter; @@ -280,6 +293,7 @@ typedef union TVShow { struct TVShowNameRaterShow nameRaterShow; struct TVShowMassOutbreak massOutbreak; struct TVShowUnknownTVShowType unknownTvShowType; + struct TVShowUnknownTVShowType2 unknownTvShowType2; } TVShow; struct MailStruct @@ -339,6 +353,21 @@ typedef union SB_Struct { } SB_Struct; // size is 0x198 +struct UnknownSaveStruct2A98 { + u8 var00; + u8 var01; + u16 var02; + u16 var04; + u16 var06; + u16 var08; + u8 var0a; + u8 pad0b[25]; +}; + +struct UnknownSaveStruct2ABC { + u8 pad00[4]; +}; + struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; @@ -389,7 +418,8 @@ struct SaveBlock1 /* 0x02025734 */ /*0x272C*/ u8 decorCushion[10]; /*0x2736*/ u8 padding_2736[2]; /*0x2738*/ TVShow tvShows[24]; - /*0x2A98*/ u8 filler_2A98[0x64]; + /*0x2A98*/ struct UnknownSaveStruct2A98 unknown_2A98; + /*0x2ABC*/ struct UnknownSaveStruct2ABC unknown_2ABC[16]; /*0x2AFC*/ u16 outbreakPokemonSpecies; /*0x2AFE*/ u8 outbreakLocationMapNum; /*0x2AFF*/ u8 outbreakLocationMapGroup; -- cgit v1.2.3 From 095d071cab1950f404f7fb5b6c0ff04ccc6c37f2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 18 May 2017 11:21:58 -0400 Subject: Merge tv show list and extra attributes into a single struct --- include/global.h | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 522ec065b..4b70d3283 100644 --- a/include/global.h +++ b/include/global.h @@ -354,14 +354,19 @@ typedef union SB_Struct { // size is 0x198 struct UnknownSaveStruct2A98 { - u8 var00; - u8 var01; - u16 var02; - u16 var04; - u16 var06; - u16 var08; - u8 var0a; - u8 pad0b[25]; + u8 var00; + u8 var01; + u16 var02; + u16 var04; + u16 var06; + u16 var08; + u8 var0a; + u8 pad0b[25]; +}; + +struct SaveTVStruct { + TVShow shows[24]; + struct UnknownSaveStruct2A98 unknown_2A98; }; struct UnknownSaveStruct2ABC { @@ -417,8 +422,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2704*/ u8 decorDoll[40]; /*0x272C*/ u8 decorCushion[10]; /*0x2736*/ u8 padding_2736[2]; - /*0x2738*/ TVShow tvShows[24]; - /*0x2A98*/ struct UnknownSaveStruct2A98 unknown_2A98; + /*0x2738*/ struct SaveTVStruct tvShows; /*0x2ABC*/ struct UnknownSaveStruct2ABC unknown_2ABC[16]; /*0x2AFC*/ u16 outbreakPokemonSpecies; /*0x2AFE*/ u8 outbreakLocationMapNum; -- cgit v1.2.3 From 040da53bfb3ba60183f9fbbd33c6e2382d0933c1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 18 May 2017 15:27:56 -0400 Subject: sub_80EB6FC in easy_chat.c --- include/global.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 4b70d3283..73a826dd2 100644 --- a/include/global.h +++ b/include/global.h @@ -227,6 +227,7 @@ struct TVShowFanclubOpinions { /*0x0E*/ u8 var0E; /*0x0F*/ u8 var0F; /*0x10*/ u8 var10[8]; + /*0x18*/ u16 var18[6]; }; struct TVShowNameRaterShow { -- cgit v1.2.3 From 7eae0a2880f83475f2caa09a7817d07f6f02bbaa Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 18 May 2017 16:50:56 -0400 Subject: Another chunk of fns; move tv show enums to new include/tv.h for easier reference --- include/global.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 73a826dd2..5ea13f7cc 100644 --- a/include/global.h +++ b/include/global.h @@ -227,7 +227,8 @@ struct TVShowFanclubOpinions { /*0x0E*/ u8 var0E; /*0x0F*/ u8 var0F; /*0x10*/ u8 var10[8]; - /*0x18*/ u16 var18[6]; + /*0x18*/ u16 var18[2]; + /*0x1C*/ u16 var1C[4]; }; struct TVShowNameRaterShow { -- cgit v1.2.3 From 25e6b775b934474983d55052619a8483032b2abd Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 18 May 2017 17:26:58 -0400 Subject: Another set of functions responsible for initializing TV shows? --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 5ea13f7cc..4a82972b5 100644 --- a/include/global.h +++ b/include/global.h @@ -201,7 +201,7 @@ struct TVShowFanClubLetter { /*0x00*/ u8 var00; /*0x01*/ u8 var01; /*0x02*/ u16 species; - u8 pad04[12]; + /*0x04*/ u16 pad04[6]; /*0x10*/ u8 playerName[8]; /*0x18*/ u8 var18; }; -- cgit v1.2.3 From 67ec48a2be4464b306fbd8d07fd6809b60904016 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 18 May 2017 20:29:16 -0400 Subject: sub_80BF1B4 --- include/global.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 4a82972b5..f8e53f72c 100644 --- a/include/global.h +++ b/include/global.h @@ -194,7 +194,9 @@ struct EasyChatPair struct TVShowCommon { /*0x00*/ u8 var00; /*0x01*/ u8 var01; - /*0x02*/ u8 pad02[34]; + /*0x02*/ u8 pad02[32]; + /*0x22*/ u8 trainerIdLo; + /*0x23*/ u8 trainerIdHi; }; struct TVShowFanClubLetter { -- cgit v1.2.3 From b848027e01ca1b6af3a50fab2a04cdd0056fbecd Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 18 May 2017 20:49:00 -0400 Subject: sub_80BF154 --- include/global.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index f8e53f72c..a6ab3eb63 100644 --- a/include/global.h +++ b/include/global.h @@ -289,6 +289,15 @@ struct TVShowUnknownTVShowType2 { /*0x13*/ u8 playerName[8]; }; +struct TVShowSmartShopper { + u8 var00; + u8 var01; + u8 boughtOrSoldFlag; + u8 pad03[3]; + u16 itemIds[3]; + u16 itemAmounts[3]; +}; + typedef union TVShow { struct TVShowCommon common; struct TVShowFanClubLetter fanclubLetter; @@ -298,6 +307,7 @@ typedef union TVShow { struct TVShowMassOutbreak massOutbreak; struct TVShowUnknownTVShowType unknownTvShowType; struct TVShowUnknownTVShowType2 unknownTvShowType2; + struct TVShowSmartShopper smartshopperShow; } TVShow; struct MailStruct -- cgit v1.2.3 From f3e4f2f2104a86dc36415120b90c54793e324c39 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 18 May 2017 21:13:43 -0400 Subject: SetContestCategoryStringVarForInterview --- include/global.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index a6ab3eb63..086b858d0 100644 --- a/include/global.h +++ b/include/global.h @@ -298,6 +298,14 @@ struct TVShowSmartShopper { u16 itemAmounts[3]; }; +struct TVShowContestWinner { + u8 var00; + u8 var01; + u8 pad02[17]; + u8 contestCategory:3; + u8 var13_3:5; +}; + typedef union TVShow { struct TVShowCommon common; struct TVShowFanClubLetter fanclubLetter; @@ -308,6 +316,7 @@ typedef union TVShow { struct TVShowUnknownTVShowType unknownTvShowType; struct TVShowUnknownTVShowType2 unknownTvShowType2; struct TVShowSmartShopper smartshopperShow; + struct TVShowContestWinner contestShow; } TVShow; struct MailStruct -- cgit v1.2.3 From 8e1c137a5b468643c28a1940b96db82f63762b8b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 18 May 2017 21:53:42 -0400 Subject: sub_80BEE84 --- include/global.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 086b858d0..9a9e08fbb 100644 --- a/include/global.h +++ b/include/global.h @@ -393,7 +393,9 @@ struct SaveTVStruct { }; struct UnknownSaveStruct2ABC { - u8 pad00[4]; + u8 val0; + u8 val1; + u16 val2; }; struct SaveBlock1 /* 0x02025734 */ -- cgit v1.2.3 From ed1cec5ab54507d498c52291146c8d29afa6ff67 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 19 May 2017 10:48:52 -0400 Subject: DoTVShowInSearchOfTrainers --- include/global.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 9a9e08fbb..0f794d8f0 100644 --- a/include/global.h +++ b/include/global.h @@ -398,6 +398,21 @@ struct UnknownSaveStruct2ABC { u16 val2; }; +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; +}; + struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; @@ -459,7 +474,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2B0C*/ u8 outbreakUnk4; /*0x2B0D*/ u8 outbreakPokemonProbability; /*0x2B0E*/ u16 outbreakUnk5; - /*0x2B10*/ u8 filler_2B0E[0xC]; + /*0x2B18*/ struct GabbyAndTyData gabbyAndTyData; /*0x2B1C*/ u16 unk2B1C[6]; /*0x2B28*/ u16 unk2B28[6]; /*0x2B34*/ u16 unk2B34[6]; -- cgit v1.2.3 From bade8566271df0ef7f27370573561f4d03f2caf5 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 19 May 2017 11:05:17 -0400 Subject: DoTVShowPokemonAngler --- include/global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 0f794d8f0..17fd3c4a5 100644 --- a/include/global.h +++ b/include/global.h @@ -265,7 +265,7 @@ struct TVShowMassOutbreak { u8 pad19[11]; }; -struct TVShowUnknownTVShowType { +struct TVShowPokemonAngler { /*0x00*/ u8 var00; /*0x01*/ u8 var01; /*0x02*/ u8 var02; @@ -313,7 +313,7 @@ typedef union TVShow { struct TVShowFanclubOpinions fanclubOpinions; struct TVShowNameRaterShow nameRaterShow; struct TVShowMassOutbreak massOutbreak; - struct TVShowUnknownTVShowType unknownTvShowType; + struct TVShowPokemonAngler pokemonAngler; struct TVShowUnknownTVShowType2 unknownTvShowType2; struct TVShowSmartShopper smartshopperShow; struct TVShowContestWinner contestShow; -- cgit v1.2.3 From 63f05cfc7c3634545a9230b0ce41259bcc61aef0 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 19 May 2017 11:32:40 -0400 Subject: Plug another hole in tv.c --- include/global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 17fd3c4a5..cd7bdcdb3 100644 --- a/include/global.h +++ b/include/global.h @@ -276,7 +276,7 @@ struct TVShowPokemonAngler { /*0x13*/ u8 playerName[8]; }; -struct TVShowUnknownTVShowType2 { +struct TVShowWorldOfMasters { /*0x00*/ u8 var00; /*0x01*/ u8 var01; /*0x02*/ u16 var02; @@ -314,7 +314,7 @@ typedef union TVShow { struct TVShowNameRaterShow nameRaterShow; struct TVShowMassOutbreak massOutbreak; struct TVShowPokemonAngler pokemonAngler; - struct TVShowUnknownTVShowType2 unknownTvShowType2; + struct TVShowWorldOfMasters worldOfMasters; struct TVShowSmartShopper smartshopperShow; struct TVShowContestWinner contestShow; } TVShow; -- cgit v1.2.3 From b0925c52d7294e1f2ce2db2c8de08f8df2a8bd64 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 19 May 2017 12:05:04 -0400 Subject: DoTVShowPokemonFanClubOpinions --- include/global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index cd7bdcdb3..836ba3880 100644 --- a/include/global.h +++ b/include/global.h @@ -224,8 +224,8 @@ struct TVShowFanclubOpinions { /*0x02*/ u16 var02; /*0x04*/ u8 var04A:4; u8 var04B:4; - /*0x05*/ u8 var05[8]; - /*0x0D*/ u8 var0D; + /*0x05*/ u8 playerName[8]; + /*0x0D*/ u8 language; /*0x0E*/ u8 var0E; /*0x0F*/ u8 var0F; /*0x10*/ u8 var10[8]; -- cgit v1.2.3 From b93526ae45dc97dd5bd226a9715f7c6de9142d6d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 19 May 2017 13:34:42 -0400 Subject: DoTVShowPokemonFanClubLetter --- include/global.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 836ba3880..e372afe15 100644 --- a/include/global.h +++ b/include/global.h @@ -205,7 +205,7 @@ struct TVShowFanClubLetter { /*0x02*/ u16 species; /*0x04*/ u16 pad04[6]; /*0x10*/ u8 playerName[8]; - /*0x18*/ u8 var18; + /*0x18*/ u8 language; }; struct TVShowRecentHappenings { @@ -213,8 +213,8 @@ struct TVShowRecentHappenings { /*0x01*/ u8 var01; /*0x02*/ u16 var02; /*0x04*/ u16 var04[6]; - /*0x10*/ u8 var10[8]; - /*0x18*/ u8 var18; + /*0x10*/ u8 playerName[8]; + /*0x18*/ u8 language; u8 pad19[10]; }; @@ -261,7 +261,7 @@ struct TVShowMassOutbreak { /*0x14*/ u8 level; /*0x15*/ u8 var15; /*0x16*/ u16 var16; - /*0x18*/ u8 var18; + /*0x18*/ u8 language; u8 pad19[11]; }; -- cgit v1.2.3 From 00d1e98f5a4f7830b08b37e647092daa19f0a18d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 19 May 2017 14:03:02 -0400 Subject: DoTVShowPokemonTodayFailedCapture --- include/global.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index e372afe15..4ba4100dd 100644 --- a/include/global.h +++ b/include/global.h @@ -199,6 +199,19 @@ struct TVShowCommon { /*0x23*/ u8 trainerIdHi; }; +struct TVShowPokemonToday { + /*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; @@ -317,6 +330,7 @@ typedef union TVShow { struct TVShowWorldOfMasters worldOfMasters; struct TVShowSmartShopper smartshopperShow; struct TVShowContestWinner contestShow; + struct TVShowPokemonToday pokemonToday; } TVShow; struct MailStruct -- cgit v1.2.3 From d1851f99bcd24e1dd51920e9f4a44cebe04d5bb4 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 19 May 2017 14:51:11 -0400 Subject: DoTVShowPokemonTodaySuccessfulCapture --- include/global.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 4ba4100dd..a437a3b0d 100644 --- a/include/global.h +++ b/include/global.h @@ -200,6 +200,19 @@ struct TVShowCommon { }; 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; @@ -331,6 +344,7 @@ typedef union TVShow { struct TVShowSmartShopper smartshopperShow; struct TVShowContestWinner contestShow; struct TVShowPokemonToday pokemonToday; + struct TVShowPokemonTodayFailed pokemonTodayFailed; } TVShow; struct MailStruct -- cgit v1.2.3 From f8c731037ecf076d5ea6374fd7f953d062425852 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 19 May 2017 15:44:40 -0400 Subject: DoTVShowTheNameRaterShow --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index a437a3b0d..3454ab0b8 100644 --- a/include/global.h +++ b/include/global.h @@ -269,7 +269,7 @@ struct TVShowNameRaterShow { /*0x1B*/ u8 random2; /*0x1C*/ u16 var1C; /*0x1E*/ u8 language; - /*0x1F*/ u8 var1F; + /*0x1F*/ u8 pokemonNameLanguage; }; struct TVShowMassOutbreak { -- cgit v1.2.3 From 39b15cb589dde612854ba1e0ea1365daccbfc7a2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 20 May 2017 11:19:34 -0400 Subject: sub_80C004C --- include/global.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 3454ab0b8..a294b3e01 100644 --- a/include/global.h +++ b/include/global.h @@ -194,7 +194,9 @@ struct EasyChatPair struct TVShowCommon { /*0x00*/ u8 var00; /*0x01*/ u8 var01; - /*0x02*/ u8 pad02[32]; + /*0x02*/ u8 pad02[30]; + /*0x20*/ u8 srcTrainerIdLo; + /*0x21*/ u8 srcTrainerIdHi; /*0x22*/ u8 trainerIdLo; /*0x23*/ u8 trainerIdHi; }; -- cgit v1.2.3 From dc229fe94ad23c057aae619ec429a073a00a8508 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 20 May 2017 11:31:15 -0400 Subject: sub_80C00B4 --- include/global.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index a294b3e01..7544ecdb2 100644 --- a/include/global.h +++ b/include/global.h @@ -194,7 +194,9 @@ struct EasyChatPair struct TVShowCommon { /*0x00*/ u8 var00; /*0x01*/ u8 var01; - /*0x02*/ u8 pad02[30]; + /*0x02*/ u8 pad02[28]; + /*0x20*/ u8 srcTrainerId2Lo; + /*0x21*/ u8 srcTrainerId2Hi; /*0x20*/ u8 srcTrainerIdLo; /*0x21*/ u8 srcTrainerIdHi; /*0x22*/ u8 trainerIdLo; -- cgit v1.2.3 From 37e3c21eb38449690f995b7e5258bf00ce9a77c2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 20 May 2017 11:36:08 -0400 Subject: sub_80C0134 --- include/global.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 7544ecdb2..2340e3b84 100644 --- a/include/global.h +++ b/include/global.h @@ -194,9 +194,12 @@ struct EasyChatPair struct TVShowCommon { /*0x00*/ u8 var00; /*0x01*/ u8 var01; - /*0x02*/ u8 pad02[28]; - /*0x20*/ u8 srcTrainerId2Lo; - /*0x21*/ u8 srcTrainerId2Hi; + /*0x02*/ u8 pad02[20]; + /*0x16*/ u16 var16[3]; + /*0x1C*/ u8 srcTrainerId3Lo; + /*0x1D*/ u8 srcTrainerId3Hi; + /*0x1E*/ u8 srcTrainerId2Lo; + /*0x1F*/ u8 srcTrainerId2Hi; /*0x20*/ u8 srcTrainerIdLo; /*0x21*/ u8 srcTrainerIdHi; /*0x22*/ u8 trainerIdLo; -- cgit v1.2.3 From bc75a7d97920cf51627e0803285d096d22c949d9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 20 May 2017 15:22:22 -0400 Subject: sub_80C01D4 (nonmatching but presumed functionally correct) --- include/global.h | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 2340e3b84..3dcab7c95 100644 --- a/include/global.h +++ b/include/global.h @@ -323,20 +323,30 @@ struct TVShowWorldOfMasters { }; struct TVShowSmartShopper { - u8 var00; - u8 var01; - u8 boughtOrSoldFlag; - u8 pad03[3]; - u16 itemIds[3]; - u16 itemAmounts[3]; + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u8 boughtOrSoldFlag; + /*0x03*/ u8 pad03[3]; + /*0x06*/ u16 itemIds[3]; + /*0x0C*/ u16 itemAmounts[3]; +}; + +struct TVShowBravoTrainerPokemonProfiles { + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u16 species; + /*0x04*/ u8 pad04[15]; + /*0x13*/ u8 contestCategory:3; + /*0x13*/ u8 var13_3:5; }; -struct TVShowContestWinner { - u8 var00; - u8 var01; - u8 pad02[17]; - u8 contestCategory:3; - u8 var13_3:5; +struct TVShowBravoTrainerBattleTowerSpotlight { + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u8 pad02[8]; + /*0x0A*/ u16 var0a; + /*0x0C*/ u8 pad0c[8]; + /*0x14*/ u16 var14; }; typedef union TVShow { @@ -349,7 +359,8 @@ typedef union TVShow { struct TVShowPokemonAngler pokemonAngler; struct TVShowWorldOfMasters worldOfMasters; struct TVShowSmartShopper smartshopperShow; - struct TVShowContestWinner contestShow; + struct TVShowBravoTrainerPokemonProfiles bravoTrainer; + struct TVShowBravoTrainerBattleTowerSpotlight bravoTrainerTower; struct TVShowPokemonToday pokemonToday; struct TVShowPokemonTodayFailed pokemonTodayFailed; } TVShow; -- cgit v1.2.3 From 63a793195844a3a0575872fb05b8027af92129de Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 20 May 2017 18:29:08 -0400 Subject: sub_80BE3BC --- include/global.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 3dcab7c95..4496e3a3d 100644 --- a/include/global.h +++ b/include/global.h @@ -325,10 +325,13 @@ struct TVShowWorldOfMasters { struct TVShowSmartShopper { /*0x00*/ u8 var00; /*0x01*/ u8 var01; - /*0x02*/ u8 boughtOrSoldFlag; - /*0x03*/ u8 pad03[3]; + /*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 { -- cgit v1.2.3 From 2bf7a71cd8eeb5790c89ae02e2df722aa4f80dc2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 20 May 2017 19:03:22 -0400 Subject: sub_80BE320 --- include/global.h | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 4496e3a3d..2090415f9 100644 --- a/include/global.h +++ b/include/global.h @@ -346,10 +346,16 @@ struct TVShowBravoTrainerPokemonProfiles { struct TVShowBravoTrainerBattleTowerSpotlight { /*0x00*/ u8 var00; /*0x01*/ u8 var01; - /*0x02*/ u8 pad02[8]; - /*0x0A*/ u16 var0a; - /*0x0C*/ u8 pad0c[8]; - /*0x14*/ u16 var14; + /*0x02*/ u8 trainerName[8]; + /*0x0A*/ u16 species; + /*0x0C*/ u8 pokemonName[8]; + /*0x14*/ u16 winningMove; + /*0x16*/ u16 var16; + /*0x18*/ u8 pad18[2]; + /*0x1A*/ u8 btLevel; + /*0x1B*/ u8 var1b; + /*0x1C*/ u8 var1c; + /*0x1D*/ u8 language; }; typedef union TVShow { @@ -577,7 +583,11 @@ struct Pokedex struct SaveBlock2_Sub { - /*0x0000, 0x00A8*/ u8 filler_000[0x4AE]; + /*0x0000, 0x00A4*/ u8 filler_000[0x3D8]; + /*0x03D8, 0x0480*/ u16 var_480; + /*0x03DA, 0x0482*/ u16 var_482; + /*0x03DC, 0x0484*/ u8 filler_3DC[0xD1]; + /*0x04AD, 0x0555*/ u8 var_4AD; /*0x04AE, 0x0556*/ u8 var_4AE; /*0x04AF, 0x0557*/ u8 var_4AF; /*0x04B0, 0x0558*/ u16 var_4B0; @@ -587,7 +597,9 @@ struct SaveBlock2_Sub /*0x04B8, 0x0560*/ u8 filler_4B8[0x10]; /*0x04C8, 0x0570*/ u16 var_4C8; /*0x04CA, 0x0572*/ u16 var_4CA; - /*0x04CC, 0x0574*/ u8 filler_4CC[0x31C]; + /*0x04CC, 0x0574*/ u8 filler_4CC[4]; + /*0x04D0, 0x0578*/ u8 var_4D0; + /*0x04D1, 0x0579*/ u8 filler_4D1[0x317]; }; struct SaveBlock2 /* 0x02024EA4 */ -- cgit v1.2.3 From a9b2b463ac3842ae2d38c174f34df420b9246519 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 20 May 2017 19:30:35 -0400 Subject: sub_80BE284; gSaveBlock1.tvShows.unknown_2A98 is a TVShow union object --- include/global.h | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 2090415f9..6528da35d 100644 --- a/include/global.h +++ b/include/global.h @@ -338,9 +338,13 @@ struct TVShowBravoTrainerPokemonProfiles { /*0x00*/ u8 var00; /*0x01*/ u8 var01; /*0x02*/ u16 species; - /*0x04*/ u8 pad04[15]; + /*0x04*/ u8 pad04[4]; + /*0x08*/ u8 pokemonNickname[11]; /*0x13*/ u8 contestCategory:3; - /*0x13*/ u8 var13_3:5; + /*0x13*/ u8 contestRank:2; + /*0x13*/ u8 var13_5:2; + /*0x13*/ u8 var13_7:1; + /*0x14*/ }; struct TVShowBravoTrainerBattleTowerSpotlight { @@ -431,20 +435,9 @@ typedef union SB_Struct { } SB_Struct; // size is 0x198 -struct UnknownSaveStruct2A98 { - u8 var00; - u8 var01; - u16 var02; - u16 var04; - u16 var06; - u16 var08; - u8 var0a; - u8 pad0b[25]; -}; - struct SaveTVStruct { TVShow shows[24]; - struct UnknownSaveStruct2A98 unknown_2A98; + TVShow unknown_2A98; }; struct UnknownSaveStruct2ABC { -- cgit v1.2.3 From a0fb46bbb40b800af0c55366de479ca977de1aa4 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 20 May 2017 19:51:00 -0400 Subject: sub_80BE23C --- include/global.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 6528da35d..a0b6db39d 100644 --- a/include/global.h +++ b/include/global.h @@ -338,13 +338,13 @@ struct TVShowBravoTrainerPokemonProfiles { /*0x00*/ u8 var00; /*0x01*/ u8 var01; /*0x02*/ u16 species; - /*0x04*/ u8 pad04[4]; + /*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*/ + /*0x14*/ u16 var14; }; struct TVShowBravoTrainerBattleTowerSpotlight { @@ -355,7 +355,7 @@ struct TVShowBravoTrainerBattleTowerSpotlight { /*0x0C*/ u8 pokemonName[8]; /*0x14*/ u16 winningMove; /*0x16*/ u16 var16; - /*0x18*/ u8 pad18[2]; + /*0x18*/ u16 var18[1]; /*0x1A*/ u8 btLevel; /*0x1B*/ u8 var1b; /*0x1C*/ u8 var1c; -- cgit v1.2.3 From 7b89b6241f7c210c2a97a075d2ef5cd4c0a7a875 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 20 May 2017 21:00:05 -0400 Subject: sub_80BE074 nonmatching --- include/global.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index a0b6db39d..5edb3239f 100644 --- a/include/global.h +++ b/include/global.h @@ -345,6 +345,9 @@ struct TVShowBravoTrainerPokemonProfiles { /*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 { -- cgit v1.2.3 From 4a9cb7aa4de9571f79c46e0df1733b26849c0904 Mon Sep 17 00:00:00 2001 From: NieDzejkob Date: Sat, 7 Jan 2017 23:08:51 +0100 Subject: Decompile daycare_empty_slot and unify the function prototype of daycare_count_pokemon. Presumably identify the daycare data in the save structure --- include/global.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 5edb3239f..2045f5b43 100644 --- a/include/global.h +++ b/include/global.h @@ -536,9 +536,9 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2D94*/ OldMan oldMan; /*0x2DC0*/ u8 unk_2DC0[0x14]; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff - /*0x2DFC*/ u8 filler_2DFC[0x8]; - /*0x2E04*/ SB_Struct sbStruct; - /*0x2F9C*/ u8 filler_2F9C[0xA0]; + /*0x2DFC*/ u8 filler_2DFC[0x100]; + /*0x2EFC*/ struct SB1_2EFC_Struct sb1_2EFC_struct[5]; + /*0x2F9C*/ struct BoxPokemon filler_2F9C[2]; // daycare related /*0x303C*/ u8 filler_303C[0x38]; /*0x3074*/ u8 filler_3074[0x42]; /*0x30B6*/ u8 filler_30B6; -- cgit v1.2.3 From b60ad4ccba10b7c570b633edcdb74c64055a0aa4 Mon Sep 17 00:00:00 2001 From: NieDzejkob Date: Sun, 14 May 2017 17:50:01 +0200 Subject: Make it build with all the label changes --- include/global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 2045f5b43..443b2a1d2 100644 --- a/include/global.h +++ b/include/global.h @@ -536,8 +536,8 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2D94*/ OldMan oldMan; /*0x2DC0*/ u8 unk_2DC0[0x14]; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff - /*0x2DFC*/ u8 filler_2DFC[0x100]; - /*0x2EFC*/ struct SB1_2EFC_Struct sb1_2EFC_struct[5]; + /*0x2DFC*/ u8 filler_2DFC[0x8]; + /*0x2E04*/ SB_Struct sbStruct; /*0x2F9C*/ struct BoxPokemon filler_2F9C[2]; // daycare related /*0x303C*/ u8 filler_303C[0x38]; /*0x3074*/ u8 filler_3074[0x42]; -- cgit v1.2.3 From 6563ec9bada46058c095be12ff1719a525a6f799 Mon Sep 17 00:00:00 2001 From: NieDzejkob Date: Sun, 14 May 2017 18:35:47 +0200 Subject: Name gSaveBlock1.daycareData, decompile sub_8041648 --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 443b2a1d2..957181d45 100644 --- a/include/global.h +++ b/include/global.h @@ -538,7 +538,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff /*0x2DFC*/ u8 filler_2DFC[0x8]; /*0x2E04*/ SB_Struct sbStruct; - /*0x2F9C*/ struct BoxPokemon filler_2F9C[2]; // daycare related + /*0x2F9C*/ struct BoxPokemon daycareData[2]; /*0x303C*/ u8 filler_303C[0x38]; /*0x3074*/ u8 filler_3074[0x42]; /*0x30B6*/ u8 filler_30B6; -- cgit v1.2.3 From d0549706007b1a24ffd75ba40594e70dda3ee123 Mon Sep 17 00:00:00 2001 From: NieDzejkob Date: Mon, 15 May 2017 16:19:18 +0200 Subject: Rename PlaySE to PlaySoundEffect - wide code is good code, daycare.c renames, match sub_80B92AC in record_mixing --- include/global.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 957181d45..df95ce529 100644 --- a/include/global.h +++ b/include/global.h @@ -464,6 +464,10 @@ struct GabbyAndTyData { u8 valB; }; +typedef struct RecordMixing_UnknownStruct { + u8 data[0x38]; +} RecordMixing_UnknownStruct; + struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; @@ -539,8 +543,8 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2DFC*/ u8 filler_2DFC[0x8]; /*0x2E04*/ SB_Struct sbStruct; /*0x2F9C*/ struct BoxPokemon daycareData[2]; - /*0x303C*/ u8 filler_303C[0x38]; - /*0x3074*/ u8 filler_3074[0x42]; + /*0x303C*/ struct RecordMixing_UnknownStruct filler_303C[2]; + /*0x30AC*/ u8 filler_30AC[0xA]; /*0x30B6*/ u8 filler_30B6; /*0x30B7*/ u8 filler_30B7[1]; /*0x30B8*/ u8 linkBattleRecords[5][16]; -- cgit v1.2.3 From 80dd8f3f41ebe3bdbc5b12b9db4e4fbed1baec04 Mon Sep 17 00:00:00 2001 From: NieDzejkob Date: Sun, 21 May 2017 14:26:13 +0200 Subject: typedef struct is not in style of the repo --- include/global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index df95ce529..34946c895 100644 --- a/include/global.h +++ b/include/global.h @@ -464,9 +464,9 @@ struct GabbyAndTyData { u8 valB; }; -typedef struct RecordMixing_UnknownStruct { +struct RecordMixing_UnknownStruct { u8 data[0x38]; -} RecordMixing_UnknownStruct; +}; struct SaveBlock1 /* 0x02025734 */ { -- cgit v1.2.3 From 4d2b22a899c11dfcacfec6889968ab01655a3fe3 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Fri, 26 May 2017 14:53:51 +0200 Subject: Add headers --- include/global.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 34946c895..a24f98033 100644 --- a/include/global.h +++ b/include/global.h @@ -4,6 +4,19 @@ #include "gba/gba.h" #include "config.h" +// IDE support +#define _(x) x +#define __(x) x +#define INCBIN_U8 {0} +#define INCBIN_U16 {0} +#define INCBIN_U32 {0} +#define INCBIN_S8 {0} +#define INCBIN_S16 {0} +#define INCBIN_S32 {0} +void * memcpy (void *, const void *, size_t); +void * memset (void *, int, size_t); +int strcmp (const char *, const char *); + // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); -- cgit v1.2.3 From 2aae7e99d52fc488e75309909d279b459f5e1d80 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Fri, 26 May 2017 15:35:40 +0200 Subject: Make rom build again --- include/global.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index a24f98033..95dd640a9 100644 --- a/include/global.h +++ b/include/global.h @@ -5,6 +5,7 @@ #include "config.h" // IDE support +#ifdef __APPLE__ #define _(x) x #define __(x) x #define INCBIN_U8 {0} @@ -16,6 +17,7 @@ void * memcpy (void *, const void *, size_t); void * memset (void *, int, size_t); int strcmp (const char *, const char *); +#endif // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); -- cgit v1.2.3 From 03e4f7c9cf592feefc10c1276fb8f648a7fe2bcd Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 26 May 2017 20:22:45 -0400 Subject: Rid code base of redundant SaveTVStruct and define unknown_2a98 as the last of 25 TVShow objects --- include/global.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 34946c895..efe67c55c 100644 --- a/include/global.h +++ b/include/global.h @@ -438,11 +438,6 @@ typedef union SB_Struct { } SB_Struct; // size is 0x198 -struct SaveTVStruct { - TVShow shows[24]; - TVShow unknown_2A98; -}; - struct UnknownSaveStruct2ABC { u8 val0; u8 val1; @@ -517,7 +512,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; -- cgit v1.2.3 From 2cd382d3c65c19dbd9812ce977d6cfcc2aef8dff Mon Sep 17 00:00:00 2001 From: Scott Norton Date: Tue, 30 May 2017 08:38:05 -0400 Subject: ResetGabbyAndTy (nonmatching) --- include/global.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index efe67c55c..8db05ba9f 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; @@ -445,18 +445,18 @@ 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 move1; + /*2b16*/ u16 move2; + /*2b18*/ u8 mapnum; + /*2b19*/ u8 val9; + /*2b1a*/ u8 valA_0:1; + /*2b1a*/ u8 valA_1:1; + /*2b1a*/ u8 valA_2:1; + /*2b1a*/ u8 valA_3:1; + /*2b1a*/ u8 valA_4:4; + /*2b1b*/ u8 valB; }; struct RecordMixing_UnknownStruct { @@ -524,7 +524,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]; @@ -607,11 +607,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; -- cgit v1.2.3 From f2e369d6835a4405644f1a1c9936a06d7cb52775 Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 30 May 2017 10:01:24 -0400 Subject: GabbyAndTyBeforeInterview --- include/global.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 8db05ba9f..def6708c3 100644 --- a/include/global.h +++ b/include/global.h @@ -94,7 +94,7 @@ struct UCoords16 struct SecretBaseRecord { - /*ID?*/ /*0x1A08*/ u8 sbr_field_0; + /*ID?*/ /*0x1A08*/ u8 sbr_field_0; /*0x1A09*/ u8 sbr_field_1_0:4; /*0x1A09*/ u8 gender:1; /*0x1A09*/ u8 sbr_field_1_5:1; @@ -445,18 +445,18 @@ struct UnknownSaveStruct2ABC { }; struct GabbyAndTyData { - /*2b10*/ u16 mon1; - /*2b12*/ u16 mon2; - /*2b14*/ u16 move1; - /*2b16*/ u16 move2; - /*2b18*/ u8 mapnum; - /*2b19*/ u8 val9; - /*2b1a*/ u8 valA_0:1; - /*2b1a*/ u8 valA_1:1; - /*2b1a*/ u8 valA_2:1; - /*2b1a*/ u8 valA_3:1; - /*2b1a*/ u8 valA_4:4; - /*2b1b*/ u8 valB; + /*2b10*/ u16 mon1; + /*2b12*/ u16 mon2; + /*2b14*/ u16 move1; + /*2b16*/ u16 move2; + /*2b18*/ u8 mapnum; + /*2b19*/ u8 val9; // counter? + /*2b1a*/ u8 valA_0:1; + /*2b1a*/ u8 valA_1:1; + /*2b1a*/ u8 valA_2:1; + /*2b1a*/ u8 valA_3:1; + /*2b1a*/ u8 valA_4:4; + /*2b1b*/ u8 valB; }; struct RecordMixing_UnknownStruct { @@ -607,11 +607,11 @@ struct SaveBlock2 /* 0x02024EA4 */ /*0x10*/ u8 playTimeMinutes; /*0x11*/ u8 playTimeSeconds; /*0x12*/ u8 playTimeVBlanks; - /*OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A]*/ /*0x13*/ u8 optionsButtonMode; - /*OPTIONS_TEXT_SPEED_[SLOW/MID/FAST]*/ /*0x14*/ u16 optionsTextSpeed:3; + /*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 - /*OPTIONS_SOUND_[MONO/STEREO]*/ u16 optionsSound:1; - /*OPTIONS_BATTLE_STYLE_[SHIFT/SET]*/ u16 optionsBattleStyle:1; + /*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; -- cgit v1.2.3 From 432f5372c711696e818a26c545ac030539f72f5e Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 30 May 2017 10:29:22 -0400 Subject: sub_80BDC14; get ResetGabbyAndTy matching --- include/global.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index def6708c3..311a84af8 100644 --- a/include/global.h +++ b/include/global.h @@ -455,8 +455,14 @@ struct GabbyAndTyData { /*2b1a*/ u8 valA_1:1; /*2b1a*/ u8 valA_2:1; /*2b1a*/ u8 valA_3:1; - /*2b1a*/ u8 valA_4:4; - /*2b1b*/ u8 valB; + /*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 { -- cgit v1.2.3 From 4450be586e712c9903f70425edfd7b3fd9bebd20 Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 30 May 2017 10:39:12 -0400 Subject: More Gabby and Ty functions --- include/global.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 311a84af8..0257e4110 100644 --- a/include/global.h +++ b/include/global.h @@ -447,10 +447,10 @@ struct UnknownSaveStruct2ABC { struct GabbyAndTyData { /*2b10*/ u16 mon1; /*2b12*/ u16 mon2; - /*2b14*/ u16 move1; - /*2b16*/ u16 move2; + /*2b14*/ u16 lastMove; + /*2b16*/ u16 quote; /*2b18*/ u8 mapnum; - /*2b19*/ u8 val9; // counter? + /*2b19*/ u8 battleNum; /*2b1a*/ u8 valA_0:1; /*2b1a*/ u8 valA_1:1; /*2b1a*/ u8 valA_2:1; -- cgit v1.2.3 From 47e2ef7b9be4a1e470cb03fd868af10413eaef34 Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 30 May 2017 13:34:24 -0400 Subject: DoTVShowBravoTrainerPokemonProfile --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 0257e4110..2fad98eb4 100644 --- a/include/global.h +++ b/include/global.h @@ -342,7 +342,7 @@ struct TVShowBravoTrainerPokemonProfiles { /*0x08*/ u8 pokemonNickname[11]; /*0x13*/ u8 contestCategory:3; /*0x13*/ u8 contestRank:2; - /*0x13*/ u8 var13_5:2; + /*0x13*/ u8 contestResult:2; /*0x13*/ u8 var13_7:1; /*0x14*/ u16 var14; /*0x16*/ u8 playerName[8]; -- cgit v1.2.3 From 859a04c318904a3894896c0c66f47def453df858 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 31 May 2017 08:40:15 -0400 Subject: Get sub_80C01D4 closer to matching --- include/global.h | 181 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 94 insertions(+), 87 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 2fad98eb4..9a95cf41f 100644 --- a/include/global.h +++ b/include/global.h @@ -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 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 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 -- cgit v1.2.3 From e085596d7d63c8e3814192a1a8c628810cc89eda Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 31 May 2017 08:40:15 -0400 Subject: Get sub_80C01D4 closer to matching --- include/global.h | 181 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 94 insertions(+), 87 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 2fad98eb4..9a95cf41f 100644 --- a/include/global.h +++ b/include/global.h @@ -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 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 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 -- cgit v1.2.3 From 4a6d595e5171ed4dc3742c3ff43e771b731a9716 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 5 Jun 2017 16:34:47 -0400 Subject: Assign types to structures passed to secret base exchange packet receipt subroutine staged for decompilation; decompile sub_8041324 --- include/global.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 9a95cf41f..716aae15f 100644 --- a/include/global.h +++ b/include/global.h @@ -472,10 +472,16 @@ struct GabbyAndTyData { /*2b1b*/ u8 valB_5:3; }; -struct RecordMixing_UnknownStruct { +struct RecordMixing_UnknownStructSub { u8 data[0x38]; }; +struct RecordMixing_UnknownStruct { + struct RecordMixing_UnknownStructSub data[2]; + u32 unk70; + u16 unk74[0x2]; +}; + struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; @@ -551,8 +557,8 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2DFC*/ u8 filler_2DFC[0x8]; /*0x2E04*/ SB_Struct sbStruct; /*0x2F9C*/ struct BoxPokemon daycareData[2]; - /*0x303C*/ struct RecordMixing_UnknownStruct filler_303C[2]; - /*0x30AC*/ u8 filler_30AC[0xA]; + /*0x303C*/ struct RecordMixing_UnknownStruct filler_303C; + /*0x30AC*/ u8 filler_30B4[0x2]; /*0x30B6*/ u8 filler_30B6; /*0x30B7*/ u8 filler_30B7[1]; /*0x30B8*/ u8 linkBattleRecords[5][16]; -- cgit v1.2.3 From 585cab7a47066e5e70d89180e7e7154652058400 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 7 Jun 2017 15:45:12 -0400 Subject: sub_8086870 (nonmatching) --- include/global.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 716aae15f..67a9548b6 100644 --- a/include/global.h +++ b/include/global.h @@ -10,6 +10,8 @@ // to help in decompiling #define asm_comment(x) asm volatile("@ -- " x " -- ") +#define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided\n") + #define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0])) #define POKEMON_NAME_LENGTH 10 -- cgit v1.2.3 From a3162cb844dbbc6bbfd850163526c42cc0191d1c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 11 Jun 2017 21:04:00 -0400 Subject: Finish FldEff_FieldMoveShowMon except solitary nonmatching function --- include/global.h | 8 ++++++++ 1 file changed, 8 insertions(+) mode change 100644 => 100755 include/global.h (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h old mode 100644 new mode 100755 index 67a9548b6..13db2620f --- a/include/global.h +++ b/include/global.h @@ -12,6 +12,14 @@ #define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided\n") +#define nonmatching(fndec, x) {\ +__attribute__((naked))\ +fndec\ +{\ + asm_unified(x);\ +}\ +} + #define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0])) #define POKEMON_NAME_LENGTH 10 -- cgit v1.2.3 From 701fd38c53050ab89380b32448700e39dc685cd6 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 13 Jun 2017 22:09:06 -0400 Subject: Fix mixed whitespace --- include/global.h | 170 +++++++++++++++++++++++++++---------------------------- 1 file changed, 85 insertions(+), 85 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 13db2620f..7c6c5ab5f 100755 --- a/include/global.h +++ b/include/global.h @@ -16,7 +16,7 @@ __attribute__((naked))\ fndec\ {\ - asm_unified(x);\ + asm_unified(x);\ }\ } @@ -108,7 +108,7 @@ struct SecretBaseRecord /*0x1A09*/ u8 sbr_field_1_0:4; /*0x1A09*/ u8 gender:1; /*0x1A09*/ u8 sbr_field_1_5:1; - /*0x1A09*/ u8 sbr_field_1_6:2; + /*0x1A09*/ u8 sbr_field_1_6:2; /*0x1A0A*/ u8 sbr_field_2[7]; // 0xFF bytes? /*0x1A12*/ u8 trainerId[4]; // byte 0 is used for determining trainer class /*0x1A16*/ u16 sbr_field_e; @@ -204,16 +204,16 @@ struct EasyChatPair struct TVShowCommon { /*0x00*/ u8 var00; /*0x01*/ u8 var01; - /*0x02*/ u8 pad02[20]; - /*0x16*/ u16 var16[3]; - /*0x1C*/ u8 srcTrainerId3Lo; - /*0x1D*/ u8 srcTrainerId3Hi; - /*0x1E*/ u8 srcTrainerId2Lo; - /*0x1F*/ u8 srcTrainerId2Hi; - /*0x20*/ u8 srcTrainerIdLo; - /*0x21*/ u8 srcTrainerIdHi; - /*0x22*/ u8 trainerIdLo; - /*0x23*/ u8 trainerIdHi; + /*0x02*/ u8 pad02[20]; + /*0x16*/ u16 var16[3]; + /*0x1C*/ u8 srcTrainerId3Lo; + /*0x1D*/ u8 srcTrainerId3Hi; + /*0x1E*/ u8 srcTrainerId2Lo; + /*0x1F*/ u8 srcTrainerId2Hi; + /*0x20*/ u8 srcTrainerIdLo; + /*0x21*/ u8 srcTrainerIdHi; + /*0x22*/ u8 trainerIdLo; + /*0x23*/ u8 trainerIdHi; }; struct TVShowFanClubLetter { @@ -229,7 +229,7 @@ struct TVShowRecentHappenings { /*0x00*/ u8 var00; /*0x01*/ u8 var01; /*0x02*/ u16 var02; - /*0x04*/ u16 var04[6]; + /*0x04*/ u16 var04[6]; /*0x10*/ u8 playerName[8]; /*0x18*/ u8 language; /*0x19*/ u8 pad19[10]; @@ -251,10 +251,10 @@ struct TVShowFanclubOpinions { }; struct TVShowUnknownType04 { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; - /*0x02*/ u8 pad02[4]; - /*0x06*/ u16 var06; + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u8 pad02[4]; + /*0x06*/ u16 var06; }; struct TVShowNameRaterShow { @@ -271,34 +271,34 @@ struct TVShowNameRaterShow { }; 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; + /*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; + /*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 { @@ -314,15 +314,15 @@ struct TVShowPokemonToday { }; 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]; + /*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 { @@ -339,27 +339,27 @@ struct TVShowPokemonTodayFailed { }; struct TVShowPokemonAngler { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; - /*0x02*/ u8 var02; - /*0x03*/ u8 var03; - /*0x04*/ u16 var04; - /*0x06*/ u8 language; - u8 pad07[12]; - /*0x13*/ u8 playerName[8]; + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u8 var02; + /*0x03*/ u8 var03; + /*0x04*/ u16 var04; + /*0x06*/ u8 language; + u8 pad07[12]; + /*0x13*/ u8 playerName[8]; }; struct TVShowWorldOfMasters { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; - /*0x02*/ u16 var02; - /*0x04*/ u16 var04; - /*0x06*/ u16 var06; - /*0x08*/ u16 var08; - /*0x0a*/ u8 var0a; - /*0x0b*/ u8 language; - u8 pad0c[7]; - /*0x13*/ u8 playerName[8]; + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u16 var02; + /*0x04*/ u16 var04; + /*0x06*/ u16 var06; + /*0x08*/ u16 var08; + /*0x0a*/ u8 var0a; + /*0x0b*/ u8 language; + u8 pad0c[7]; + /*0x13*/ u8 playerName[8]; }; struct TVShowMassOutbreak { @@ -386,15 +386,15 @@ typedef union TVShow { struct TVShowFanClubLetter fanclubLetter; struct TVShowRecentHappenings recentHappenings; struct TVShowFanclubOpinions fanclubOpinions; - struct TVShowUnknownType04 unkShow04; + struct TVShowUnknownType04 unkShow04; struct TVShowNameRaterShow nameRaterShow; - struct TVShowBravoTrainerPokemonProfiles bravoTrainer; - struct TVShowBravoTrainerBattleTowerSpotlight bravoTrainerTower; + struct TVShowBravoTrainerPokemonProfiles bravoTrainer; + struct TVShowBravoTrainerBattleTowerSpotlight bravoTrainerTower; struct TVShowPokemonToday pokemonToday; - struct TVShowSmartShopper smartshopperShow; + struct TVShowSmartShopper smartshopperShow; struct TVShowPokemonTodayFailed pokemonTodayFailed; - struct TVShowPokemonAngler pokemonAngler; - struct TVShowWorldOfMasters worldOfMasters; + struct TVShowPokemonAngler pokemonAngler; + struct TVShowWorldOfMasters worldOfMasters; struct TVShowMassOutbreak massOutbreak; } TVShow; @@ -456,9 +456,9 @@ typedef union SB_Struct { // size is 0x198 struct UnknownSaveStruct2ABC { - u8 val0; - u8 val1; - u16 val2; + u8 val0; + u8 val1; + u16 val2; }; struct GabbyAndTyData { @@ -483,13 +483,13 @@ struct GabbyAndTyData { }; struct RecordMixing_UnknownStructSub { - u8 data[0x38]; + u8 data[0x38]; }; struct RecordMixing_UnknownStruct { - struct RecordMixing_UnknownStructSub data[2]; - u32 unk70; - u16 unk74[0x2]; + struct RecordMixing_UnknownStructSub data[2]; + u32 unk70; + u16 unk74[0x2]; }; struct SaveBlock1 /* 0x02025734 */ @@ -541,7 +541,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2704*/ u8 decorDoll[40]; /*0x272C*/ u8 decorCushion[10]; /*0x2736*/ u8 padding_2736[2]; - /*0x2738*/ TVShow tvShows[25]; + /*0x2738*/ TVShow tvShows[25]; /*0x2ABC*/ struct UnknownSaveStruct2ABC unknown_2ABC[16]; /*0x2AFC*/ u16 outbreakPokemonSpecies; /*0x2AFE*/ u8 outbreakLocationMapNum; @@ -608,8 +608,8 @@ struct Pokedex struct SaveBlock2_Sub { /*0x0000, 0x00A4*/ u8 filler_000[0x3D8]; - /*0x03D8, 0x0480*/ u16 var_480; - /*0x03DA, 0x0482*/ u16 var_482; + /*0x03D8, 0x0480*/ u16 var_480; + /*0x03DA, 0x0482*/ u16 var_482; /*0x03DC, 0x0484*/ u8 filler_3DC[0xD1]; /*0x04AD, 0x0555*/ u8 var_4AD; /*0x04AE, 0x0556*/ u8 var_4AE; -- cgit v1.2.3 From ed372b11baf8f09ff5a305b697a859b8c5b7b3f1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 13 Jun 2017 22:20:21 -0400 Subject: Fix leading whitespace; remove unnecessary data struct macros --- include/global.h | 162 +++++++++++++++++++++++++++---------------------------- 1 file changed, 81 insertions(+), 81 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 9a95cf41f..c5338a6c6 100644 --- a/include/global.h +++ b/include/global.h @@ -98,7 +98,7 @@ struct SecretBaseRecord /*0x1A09*/ u8 sbr_field_1_0:4; /*0x1A09*/ u8 gender:1; /*0x1A09*/ u8 sbr_field_1_5:1; - /*0x1A09*/ u8 sbr_field_1_6:2; + /*0x1A09*/ u8 sbr_field_1_6:2; /*0x1A0A*/ u8 sbr_field_2[7]; // 0xFF bytes? /*0x1A12*/ u8 trainerId[4]; // byte 0 is used for determining trainer class /*0x1A16*/ u16 sbr_field_e; @@ -194,16 +194,16 @@ struct EasyChatPair struct TVShowCommon { /*0x00*/ u8 var00; /*0x01*/ u8 var01; - /*0x02*/ u8 pad02[20]; - /*0x16*/ u16 var16[3]; - /*0x1C*/ u8 srcTrainerId3Lo; - /*0x1D*/ u8 srcTrainerId3Hi; - /*0x1E*/ u8 srcTrainerId2Lo; - /*0x1F*/ u8 srcTrainerId2Hi; - /*0x20*/ u8 srcTrainerIdLo; - /*0x21*/ u8 srcTrainerIdHi; - /*0x22*/ u8 trainerIdLo; - /*0x23*/ u8 trainerIdHi; + /*0x02*/ u8 pad02[20]; + /*0x16*/ u16 var16[3]; + /*0x1C*/ u8 srcTrainerId3Lo; + /*0x1D*/ u8 srcTrainerId3Hi; + /*0x1E*/ u8 srcTrainerId2Lo; + /*0x1F*/ u8 srcTrainerId2Hi; + /*0x20*/ u8 srcTrainerIdLo; + /*0x21*/ u8 srcTrainerIdHi; + /*0x22*/ u8 trainerIdLo; + /*0x23*/ u8 trainerIdHi; }; struct TVShowFanClubLetter { @@ -219,7 +219,7 @@ struct TVShowRecentHappenings { /*0x00*/ u8 var00; /*0x01*/ u8 var01; /*0x02*/ u16 var02; - /*0x04*/ u16 var04[6]; + /*0x04*/ u16 var04[6]; /*0x10*/ u8 playerName[8]; /*0x18*/ u8 language; /*0x19*/ u8 pad19[10]; @@ -241,10 +241,10 @@ struct TVShowFanclubOpinions { }; struct TVShowUnknownType04 { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; - /*0x02*/ u8 pad02[4]; - /*0x06*/ u16 var06; + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u8 pad02[4]; + /*0x06*/ u16 var06; }; struct TVShowNameRaterShow { @@ -261,34 +261,34 @@ struct TVShowNameRaterShow { }; 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; + /*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; + /*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 { @@ -304,15 +304,15 @@ struct TVShowPokemonToday { }; 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]; + /*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 { @@ -329,27 +329,27 @@ struct TVShowPokemonTodayFailed { }; struct TVShowPokemonAngler { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; - /*0x02*/ u8 var02; - /*0x03*/ u8 var03; - /*0x04*/ u16 var04; - /*0x06*/ u8 language; - u8 pad07[12]; - /*0x13*/ u8 playerName[8]; + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u8 var02; + /*0x03*/ u8 var03; + /*0x04*/ u16 var04; + /*0x06*/ u8 language; + u8 pad07[12]; + /*0x13*/ u8 playerName[8]; }; struct TVShowWorldOfMasters { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; - /*0x02*/ u16 var02; - /*0x04*/ u16 var04; - /*0x06*/ u16 var06; - /*0x08*/ u16 var08; - /*0x0a*/ u8 var0a; - /*0x0b*/ u8 language; - u8 pad0c[7]; - /*0x13*/ u8 playerName[8]; + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u16 var02; + /*0x04*/ u16 var04; + /*0x06*/ u16 var06; + /*0x08*/ u16 var08; + /*0x0a*/ u8 var0a; + /*0x0b*/ u8 language; + u8 pad0c[7]; + /*0x13*/ u8 playerName[8]; }; struct TVShowMassOutbreak { @@ -376,15 +376,15 @@ typedef union TVShow { struct TVShowFanClubLetter fanclubLetter; struct TVShowRecentHappenings recentHappenings; struct TVShowFanclubOpinions fanclubOpinions; - struct TVShowUnknownType04 unkShow04; + struct TVShowUnknownType04 unkShow04; struct TVShowNameRaterShow nameRaterShow; - struct TVShowBravoTrainerPokemonProfiles bravoTrainer; - struct TVShowBravoTrainerBattleTowerSpotlight bravoTrainerTower; + struct TVShowBravoTrainerPokemonProfiles bravoTrainer; + struct TVShowBravoTrainerBattleTowerSpotlight bravoTrainerTower; struct TVShowPokemonToday pokemonToday; - struct TVShowSmartShopper smartshopperShow; + struct TVShowSmartShopper smartshopperShow; struct TVShowPokemonTodayFailed pokemonTodayFailed; - struct TVShowPokemonAngler pokemonAngler; - struct TVShowWorldOfMasters worldOfMasters; + struct TVShowPokemonAngler pokemonAngler; + struct TVShowWorldOfMasters worldOfMasters; struct TVShowMassOutbreak massOutbreak; } TVShow; @@ -446,9 +446,9 @@ typedef union SB_Struct { // size is 0x198 struct UnknownSaveStruct2ABC { - u8 val0; - u8 val1; - u16 val2; + u8 val0; + u8 val1; + u16 val2; }; struct GabbyAndTyData { @@ -473,7 +473,7 @@ struct GabbyAndTyData { }; struct RecordMixing_UnknownStruct { - u8 data[0x38]; + u8 data[0x38]; }; struct SaveBlock1 /* 0x02025734 */ @@ -525,7 +525,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2704*/ u8 decorDoll[40]; /*0x272C*/ u8 decorCushion[10]; /*0x2736*/ u8 padding_2736[2]; - /*0x2738*/ TVShow tvShows[25]; + /*0x2738*/ TVShow tvShows[25]; /*0x2ABC*/ struct UnknownSaveStruct2ABC unknown_2ABC[16]; /*0x2AFC*/ u16 outbreakPokemonSpecies; /*0x2AFE*/ u8 outbreakLocationMapNum; @@ -592,8 +592,8 @@ struct Pokedex struct SaveBlock2_Sub { /*0x0000, 0x00A4*/ u8 filler_000[0x3D8]; - /*0x03D8, 0x0480*/ u16 var_480; - /*0x03DA, 0x0482*/ u16 var_482; + /*0x03D8, 0x0480*/ u16 var_480; + /*0x03DA, 0x0482*/ u16 var_482; /*0x03DC, 0x0484*/ u8 filler_3DC[0xD1]; /*0x04AD, 0x0555*/ u8 var_4AD; /*0x04AE, 0x0556*/ u8 var_4AE; -- cgit v1.2.3 From 3d4c2f73cb19ef1f5215600c15272dd4d54c4fc0 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 14 Jun 2017 22:54:42 -0400 Subject: FILE MODES BrokeBack --- include/global.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 include/global.h (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h old mode 100755 new mode 100644 -- cgit v1.2.3 From baa9f7f55f64f15f5bff54017537b8e467671b34 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 14 Jun 2017 23:07:27 -0400 Subject: Move min/max macros to global.h --- include/global.h | 3 +++ 1 file changed, 3 insertions(+) mode change 100644 => 100755 include/global.h (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h old mode 100644 new mode 100755 index ba06b3e57..0e7c43437 --- a/include/global.h +++ b/include/global.h @@ -25,6 +25,9 @@ fndec\ #define POKEMON_NAME_LENGTH 10 #define OT_NAME_LENGTH 7 +#define min(a, b) (a >= b ? a : b) +#define max(a, b) (a <= b ? a : b) + enum { VERSION_SAPPHIRE = 1, -- cgit v1.2.3 From 0de38858f641934699ce934e2bdb3dc1495baec9 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Fri, 16 Jun 2017 17:46:13 -0500 Subject: decompile sub_8121E10 - sub_8122838 --- include/global.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 0e7c43437..433169c21 100755 --- a/include/global.h +++ b/include/global.h @@ -610,10 +610,11 @@ struct Pokedex struct SaveBlock2_Sub { - /*0x0000, 0x00A4*/ u8 filler_000[0x3D8]; + /*0x0000, 0x00A8*/ u8 filler_000[0x3D8]; /*0x03D8, 0x0480*/ u16 var_480; /*0x03DA, 0x0482*/ u16 var_482; - /*0x03DC, 0x0484*/ u8 filler_3DC[0xD1]; + /*0x03DC, 0x0484*/ u8 filler_3DC[0xD0]; + /*0x04AC, 0x0554*/ u8 var_4AC; /*0x04AD, 0x0555*/ u8 var_4AD; /*0x04AE, 0x0556*/ u8 var_4AE; /*0x04AF, 0x0557*/ u8 var_4AF; -- cgit v1.2.3 From 15298927a80f2131a347949bea2cb19577d941f2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 17 Jun 2017 10:50:56 -0400 Subject: Decompile map object data (nonmatching wip 1) --- include/global.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 include/global.h (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h old mode 100755 new mode 100644 -- cgit v1.2.3 From 654209b1f624bbafaabcf5450c02356d124ff576 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Fri, 23 Jun 2017 11:47:54 -0500 Subject: fix formatting of global.h --- include/global.h | 258 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 139 insertions(+), 119 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 9da4bd57c..80b54a54b 100755 --- a/include/global.h +++ b/include/global.h @@ -14,9 +14,9 @@ #define INCBIN_S8 {0} #define INCBIN_S16 {0} #define INCBIN_S32 {0} -void * memcpy (void *, const void *, size_t); -void * memset (void *, int, size_t); -int strcmp (const char *, const char *); +void * memcpy (void *, const void *, size_t); +void * memset (void *, int, size_t); +int strcmp (const char *, const char *); #endif // Prevent cross-jump optimization. @@ -50,7 +50,8 @@ enum VERSION_EMERALD = 3, }; -enum LanguageId { +enum LanguageId +{ LANGUAGE_JAPANESE = 1, LANGUAGE_ENGLISH = 2, LANGUAGE_GERMAN = 5, @@ -219,22 +220,24 @@ struct EasyChatPair u16 words[2]; }; /*size = 0x8*/ -struct TVShowCommon { +struct TVShowCommon +{ /*0x00*/ u8 var00; /*0x01*/ u8 var01; - /*0x02*/ u8 pad02[20]; - /*0x16*/ u16 var16[3]; - /*0x1C*/ u8 srcTrainerId3Lo; - /*0x1D*/ u8 srcTrainerId3Hi; - /*0x1E*/ u8 srcTrainerId2Lo; - /*0x1F*/ u8 srcTrainerId2Hi; - /*0x20*/ u8 srcTrainerIdLo; - /*0x21*/ u8 srcTrainerIdHi; - /*0x22*/ u8 trainerIdLo; - /*0x23*/ u8 trainerIdHi; -}; - -struct TVShowFanClubLetter { + /*0x02*/ u8 pad02[20]; + /*0x16*/ u16 var16[3]; + /*0x1C*/ u8 srcTrainerId3Lo; + /*0x1D*/ u8 srcTrainerId3Hi; + /*0x1E*/ u8 srcTrainerId2Lo; + /*0x1F*/ u8 srcTrainerId2Hi; + /*0x20*/ u8 srcTrainerIdLo; + /*0x21*/ u8 srcTrainerIdHi; + /*0x22*/ u8 trainerIdLo; + /*0x23*/ u8 trainerIdHi; +}; + +struct TVShowFanClubLetter +{ /*0x00*/ u8 var00; /*0x01*/ u8 var01; /*0x02*/ u16 species; @@ -243,7 +246,8 @@ struct TVShowFanClubLetter { /*0x18*/ u8 language; }; -struct TVShowRecentHappenings { +struct TVShowRecentHappenings +{ /*0x00*/ u8 var00; /*0x01*/ u8 var01; /*0x02*/ u16 var02; @@ -253,7 +257,8 @@ struct TVShowRecentHappenings { /*0x19*/ u8 pad19[10]; }; -struct TVShowFanclubOpinions { +struct TVShowFanclubOpinions +{ /*0x00*/ u8 var00; /*0x01*/ u8 var01; /*0x02*/ u16 var02; @@ -268,14 +273,16 @@ struct TVShowFanclubOpinions { /*0x1C*/ u16 var1C[4]; }; -struct TVShowUnknownType04 { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; - /*0x02*/ u8 pad02[4]; - /*0x06*/ u16 var06; +struct TVShowUnknownType04 +{ + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u8 pad02[4]; + /*0x06*/ u16 var06; }; -struct TVShowNameRaterShow { +struct TVShowNameRaterShow +{ /*0x00*/ u8 var00; /*0x01*/ u8 var01; /*0x02*/ u16 species; @@ -288,38 +295,41 @@ struct TVShowNameRaterShow { /*0x1F*/ u8 pokemonNameLanguage; }; -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 { +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 language; @@ -331,19 +341,21 @@ struct TVShowPokemonToday { /*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 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 { +struct TVShowPokemonTodayFailed +{ /*0x00*/ u8 var00; /*0x01*/ u8 var01; /*0x02*/ u8 language; @@ -356,31 +368,34 @@ struct TVShowPokemonTodayFailed { /*0x13*/ u8 playerName[8]; }; -struct TVShowPokemonAngler { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; - /*0x02*/ u8 var02; - /*0x03*/ u8 var03; - /*0x04*/ u16 var04; - /*0x06*/ u8 language; - u8 pad07[12]; - /*0x13*/ u8 playerName[8]; +struct TVShowPokemonAngler +{ + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u8 var02; + /*0x03*/ u8 var03; + /*0x04*/ u16 var04; + /*0x06*/ u8 language; + u8 pad07[12]; + /*0x13*/ u8 playerName[8]; }; -struct TVShowWorldOfMasters { - /*0x00*/ u8 var00; - /*0x01*/ u8 var01; - /*0x02*/ u16 var02; - /*0x04*/ u16 var04; - /*0x06*/ u16 var06; - /*0x08*/ u16 var08; - /*0x0a*/ u8 var0a; - /*0x0b*/ u8 language; - u8 pad0c[7]; - /*0x13*/ u8 playerName[8]; +struct TVShowWorldOfMasters +{ + /*0x00*/ u8 var00; + /*0x01*/ u8 var01; + /*0x02*/ u16 var02; + /*0x04*/ u16 var04; + /*0x06*/ u16 var06; + /*0x08*/ u16 var08; + /*0x0a*/ u8 var0a; + /*0x0b*/ u8 language; + u8 pad0c[7]; + /*0x13*/ u8 playerName[8]; }; -struct TVShowMassOutbreak { +struct TVShowMassOutbreak +{ /*0x00*/ u8 var00; /*0x01*/ u8 var01; /*0x02*/ u8 var02; @@ -396,23 +411,24 @@ struct TVShowMassOutbreak { /*0x15*/ u8 var15; /*0x16*/ u16 var16; /*0x18*/ u8 language; - u8 pad19[11]; + u8 pad19[11]; }; -typedef union TVShow { +typedef union TVShow +{ struct TVShowCommon common; struct TVShowFanClubLetter fanclubLetter; struct TVShowRecentHappenings recentHappenings; struct TVShowFanclubOpinions fanclubOpinions; - struct TVShowUnknownType04 unkShow04; + struct TVShowUnknownType04 unkShow04; struct TVShowNameRaterShow nameRaterShow; - struct TVShowBravoTrainerPokemonProfiles bravoTrainer; - struct TVShowBravoTrainerBattleTowerSpotlight bravoTrainerTower; + struct TVShowBravoTrainerPokemonProfiles bravoTrainer; + struct TVShowBravoTrainerBattleTowerSpotlight bravoTrainerTower; struct TVShowPokemonToday pokemonToday; - struct TVShowSmartShopper smartshopperShow; + struct TVShowSmartShopper smartshopperShow; struct TVShowPokemonTodayFailed pokemonTodayFailed; - struct TVShowPokemonAngler pokemonAngler; - struct TVShowWorldOfMasters worldOfMasters; + struct TVShowPokemonAngler pokemonAngler; + struct TVShowWorldOfMasters worldOfMasters; struct TVShowMassOutbreak massOutbreak; } TVShow; @@ -427,16 +443,15 @@ struct MailStruct struct UnkMauvilleOldManStruct { - u8 unk_2D94; - u8 unk_2D95; + u8 unk_2D94; + u8 unk_2D95; /*0x2D96*/ u16 mauvilleOldMan_ecArray[6]; /*0x2DA2*/ u16 mauvilleOldMan_ecArray2[6]; /*0x2DAE*/ u8 playerName[8]; /*0x2DB6*/ u8 filler_2DB6[0x3]; /*0x2DB9*/ u8 playerTrainerId[4]; - u8 unk_2DBD; - /* size = 0x2C */ -}; + u8 unk_2DBD; +}; /*size = 0x2C*/ struct UnkMauvilleOldManStruct2 { @@ -446,10 +461,10 @@ struct UnkMauvilleOldManStruct2 u16 mauvilleOldMan_ecArray[10]; u8 mauvilleOldMan_ecArray2[12]; u8 fillerF[0x2]; - /* size = 0x2C */ -}; +}; /*size = 0x2C*/ -typedef union OldMan { +typedef union OldMan +{ struct UnkMauvilleOldManStruct oldMan1; struct UnkMauvilleOldManStruct2 oldMan2; } OldMan; @@ -462,24 +477,27 @@ struct Unk_SB_Access_Struct1 struct Unk_SB_Access_Struct2 { - struct SB1_2EFC_Struct sb1_2EFC_struct2[12]; // each is 0x20 - /*0x2F84*/ u8 filler[0x18]; + /*0x0000*/ struct SB1_2EFC_Struct sb1_2EFC_struct2[12]; // each is 0x20 + /*0x2F84*/ u8 filler[0x18]; }; /*0x2E04*/ -typedef union SB_Struct { +typedef union SB_Struct +{ struct Unk_SB_Access_Struct1 unkSB1; struct Unk_SB_Access_Struct2 unkSB2; } SB_Struct; // size is 0x198 -struct UnknownSaveStruct2ABC { +struct UnknownSaveStruct2ABC +{ u8 val0; u8 val1; u16 val2; }; -struct GabbyAndTyData { +struct GabbyAndTyData +{ /*2b10*/ u16 mon1; /*2b12*/ u16 mon2; /*2b14*/ u16 lastMove; @@ -500,11 +518,13 @@ struct GabbyAndTyData { /*2b1b*/ u8 valB_5:3; }; -struct RecordMixing_UnknownStructSub { +struct RecordMixing_UnknownStructSub +{ u8 data[0x38]; }; -struct RecordMixing_UnknownStruct { +struct RecordMixing_UnknownStruct +{ struct RecordMixing_UnknownStructSub data[2]; u32 unk70; u16 unk74[0x2]; @@ -654,13 +674,13 @@ struct SaveBlock2 /* 0x02024EA4 */ /*0x10*/ u8 playTimeMinutes; /*0x11*/ u8 playTimeSeconds; /*0x12*/ u8 playTimeVBlanks; - /*OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A]*/ /*0x13*/ u8 optionsButtonMode; - /*OPTIONS_TEXT_SPEED_[SLOW/MID/FAST]*/ /*0x14*/ u16 optionsTextSpeed:3; + /*0x13*/ u8 optionsButtonMode; // OPTIONS_BUTTON_MODE_[NORMAL/LR/L_EQUALS_A] + /*0x14*/ u16 optionsTextSpeed:3; // OPTIONS_TEXT_SPEED_[SLOW/MID/FAST] u16 optionsWindowFrameType:5; // Specifies one of the 20 decorative borders for text boxes - /*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 + u16 optionsSound:1; // OPTIONS_SOUND_[MONO/STEREO] + u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET] + u16 optionsBattleSceneOff:1; // whether battle animations are disabled + u16 regionMapZoom:1; // whether the map is zoomed in /*0x18*/ struct Pokedex pokedex; /*0x90*/ u8 filler_90[0x8]; /*0x98*/ struct Time localTimeOffset; -- cgit v1.2.3