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') 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 d091a292b1159f3cd798c7c259e75c6fe6e27460 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 15 May 2017 21:39:34 -0400 Subject: First pass at sub_80BB764 (not matching) --- include/vars.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/vars.h b/include/vars.h index 55df0a5e3..07c96482e 100644 --- a/include/vars.h +++ b/include/vars.h @@ -26,6 +26,8 @@ #define VAR_BARBOACH_SIZE_RECORD 0x404F -#define VAR_PORTHOLE 0x40B4 +#define VAR_0x4054 0x4054 + +#define VAR_PORTHOLE 0x40B4 #endif // GUARD_VARS_H -- cgit v1.2.3 From 0c82a4aaab1bff5f4893c2e116a5a68112edc36a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 16 May 2017 13:40:50 -0400 Subject: get sub_80BB970 matching --- include/global.fieldmap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 508d7e4ed..0b72bbec5 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -104,7 +104,7 @@ struct CoordEvent struct BgEvent { - s16 x, y; + u16 x, y; u8 unk4; u8 kind; // 0x2 padding for the union beginning. @@ -119,7 +119,7 @@ struct BgEvent } hiddenItem; // secret base type - u16 secretBaseId; + u32 secretBaseId; } bgUnion; }; -- cgit v1.2.3 From 59023fb934d7f7e193cae719ec1f587ad7eaa93e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 16 May 2017 14:34:12 -0400 Subject: sub_80BBB24 --- include/vars.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/vars.h b/include/vars.h index 07c96482e..6a23695fb 100644 --- a/include/vars.h +++ b/include/vars.h @@ -28,6 +28,8 @@ #define VAR_0x4054 0x4054 +#define VAR_0x4097 0x4097 + #define VAR_PORTHOLE 0x40B4 #endif // GUARD_VARS_H -- 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/decoration.h | 19 +++++++++++-------- include/global.h | 36 ++++++++++++++++++------------------ include/vars.h | 1 + 3 files changed, 30 insertions(+), 26 deletions(-) (limited to 'include') diff --git a/include/decoration.h b/include/decoration.h index 4bad93d1f..4f24d451d 100644 --- a/include/decoration.h +++ b/include/decoration.h @@ -3,14 +3,17 @@ struct Decoration { - u8 id; - u8 name[16]; - u8 decor_field_11; - u8 decor_field_12; - u8 decor_field_13; - u16 price; - u8 *description; - void *tiles; + /*0x00*/ u8 id; + /*0x01*/ u8 name[16]; + /*0x11*/ u8 decor_field_11; + /*0x12*/ u8 decor_field_12; + /*0x13*/ u8 decor_field_13; + /*0x14*/ u16 price; + /*0x16*/ u8 *description; + /*0x1A*/ void *tiles; }; +extern struct Decoration gDecorations[0x77]; +extern void sub_80FF394(u16 unkr0, u16 unkr1, u16 unkr2); + #endif // GUARD_DECORATION_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" diff --git a/include/vars.h b/include/vars.h index 6a23695fb..c2bddeedc 100644 --- a/include/vars.h +++ b/include/vars.h @@ -28,6 +28,7 @@ #define VAR_0x4054 0x4054 +#define VAR_0x4089 0x4089 #define VAR_0x4097 0x4097 #define VAR_PORTHOLE 0x40B4 -- 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/decoration.h | 4 ++-- include/global.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/decoration.h b/include/decoration.h index 4f24d451d..d041a8007 100644 --- a/include/decoration.h +++ b/include/decoration.h @@ -9,8 +9,8 @@ struct Decoration /*0x12*/ u8 decor_field_12; /*0x13*/ u8 decor_field_13; /*0x14*/ u16 price; - /*0x16*/ u8 *description; - /*0x1A*/ void *tiles; + /*0x18*/ u8 *description; + /*0x1c*/ u16 *tiles; }; extern struct Decoration gDecorations[0x77]; 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 b9e8a5f766eb549ffbe0d70ad99396a0e41fde16 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 16 May 2017 20:23:55 -0400 Subject: sub_80BBFA4 and sub_80BBFD8 --- include/vars.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/vars.h b/include/vars.h index c2bddeedc..9a90a9468 100644 --- a/include/vars.h +++ b/include/vars.h @@ -1,6 +1,7 @@ #ifndef GUARD_VARS_H #define GUARD_VARS_H +#define VAR_0x401F 0x401F #define VAR_RECYCLE_GOODS 0x4020 #define VAR_REPEL_STEP_COUNT 0x4021 #define VAR_ICE_STEP_COUNT 0x4022 -- 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') 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') 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 5ee5e6b87e5cd8d67f505aa94f76dd38f10e8486 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 17 May 2017 11:21:52 -0400 Subject: couple more functions in tv.text_80BF544; fix type declaration of sub_80BF77C --- include/asm.inc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm.inc.h b/include/asm.inc.h index 0c111a991..e13b4668a 100644 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -292,7 +292,7 @@ u8 sub_80BF0B8(u32); void sub_80BF478(void); u16 sub_80BF674(u16 species); s8 sub_80BF720(TVShow *); -u8 sub_80BF77C(u32); +bool8 sub_80BF77C(u16); void sub_80BFD44(void *, u32, u8); void sub_80C0514(void *, u32, u8); -- 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') 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 3d9f4bb75b6df275e578f3945d998dcd916f9b58 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 17 May 2017 16:12:01 -0400 Subject: Players house TV check function --- include/flags.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/flags.h b/include/flags.h index 56325dea6..d2aa0c47f 100644 --- a/include/flags.h +++ b/include/flags.h @@ -51,6 +51,8 @@ #define SYS_BRAILLE_WAIT 0x851 #define SYS_BRAILLE_FLY 0x852 +#define SYS_TV_LATI 0x85D + #define SYS_SHOAL_ITEM 0x85F #define SYS_B_DASH 0x860 // got Running Shoes #define SYS_CTRL_OBJ_DELETE 0x861 -- cgit v1.2.3 From d1936a98b2d8acb81ff31c3a0deb35892d168de4 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 17 May 2017 17:09:02 -0400 Subject: GetMomOrDadStringForTVMessage (nonmatching) --- include/vars.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/vars.h b/include/vars.h index 9a90a9468..0322e38d3 100644 --- a/include/vars.h +++ b/include/vars.h @@ -1,6 +1,7 @@ #ifndef GUARD_VARS_H #define GUARD_VARS_H +#define VAR_0x4003 0x4003 #define VAR_0x401F 0x401F #define VAR_RECYCLE_GOODS 0x4020 #define VAR_REPEL_STEP_COUNT 0x4021 -- cgit v1.2.3 From dae64d9fc5f0779e13e75f65321b733d574b045b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 17 May 2017 17:21:47 -0400 Subject: sub_80BFD20 --- include/vars.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/vars.h b/include/vars.h index 0322e38d3..cb5bb3296 100644 --- a/include/vars.h +++ b/include/vars.h @@ -35,4 +35,6 @@ #define VAR_PORTHOLE 0x40B4 +#define VAR_0x40BC 0x40BC + #endif // GUARD_VARS_H -- 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') 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') 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') 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 b97e078c6e84cf6cf5fe7539e4dcc2d24de494c8 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 18 May 2017 13:38:20 -0400 Subject: sub_80BFD44 --- include/asm.inc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm.inc.h b/include/asm.inc.h index e13b4668a..3931f7f1c 100644 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -293,7 +293,7 @@ void sub_80BF478(void); u16 sub_80BF674(u16 species); s8 sub_80BF720(TVShow *); bool8 sub_80BF77C(u16); -void sub_80BFD44(void *, u32, u8); +void sub_80BFD44(u8 *, u32, u8); void sub_80C0514(void *, u32, u8); // src/tv.o -- 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/easy_chat.h | 1 + include/global.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include') diff --git a/include/easy_chat.h b/include/easy_chat.h index ee5ac4138..dca6b80c2 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -28,5 +28,6 @@ enum { u16 sub_80EB72C(u16 group); +void sub_80EB6FC(u16 *, u16); #endif // GUARD_EASYCHAT_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 ++- include/tv.h | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 include/tv.h (limited to 'include') 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 { diff --git a/include/tv.h b/include/tv.h new file mode 100644 index 000000000..e7186b05b --- /dev/null +++ b/include/tv.h @@ -0,0 +1,17 @@ +// +// Created by Scott Norton on 5/18/17. +// + +#ifndef POKERUBY_TV_H +#define POKERUBY_TV_H +enum +{ + TVSHOW_FAN_CLUB_LETTER = 1, + TVSHOW_RECENT_HAPPENINGS = 2, + TVSHOW_PKMN_FAN_CLUB_OPINIONS = 3, + TVSHOW_NAME_RATER_SHOW = 5, + TVSHOW_UNK_SHOWTYPE_06 = 6, + TVSHOW_UNK_SHOWTYPE_07 = 7, + TVSHOW_MASS_OUTBREAK = 41, +}; +#endif //POKERUBY_TV_H -- 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 +- include/tv.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include') 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; }; diff --git a/include/tv.h b/include/tv.h index e7186b05b..f6dd7a007 100644 --- a/include/tv.h +++ b/include/tv.h @@ -9,6 +9,7 @@ enum TVSHOW_FAN_CLUB_LETTER = 1, TVSHOW_RECENT_HAPPENINGS = 2, TVSHOW_PKMN_FAN_CLUB_OPINIONS = 3, + TVSHOW_UNKN_SHOWTYPE_04 = 4, TVSHOW_NAME_RATER_SHOW = 5, TVSHOW_UNK_SHOWTYPE_06 = 6, TVSHOW_UNK_SHOWTYPE_07 = 7, -- 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') 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') 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 7cc51195fc910852977a3213b39a45ed60aef8e8 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 18 May 2017 21:01:25 -0400 Subject: sub_80BF0B8 --- include/asm.inc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm.inc.h b/include/asm.inc.h index 3931f7f1c..b5191b068 100644 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -288,7 +288,7 @@ void sub_80BEA50(u16); void sub_80BEA5C(u16); bool8 GetPriceReduction(u8); void sub_80BEE84(u16); -u8 sub_80BF0B8(u32); +u8 sub_80BF0B8(int); void sub_80BF478(void); u16 sub_80BF674(u16 species); s8 sub_80BF720(TVShow *); -- cgit v1.2.3 From d4988da0cab8e88d390042d568641177ebb8ce41 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 18 May 2017 21:05:57 -0400 Subject: sub_80BF088 --- include/asm.inc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm.inc.h b/include/asm.inc.h index b5191b068..c28050929 100644 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -288,7 +288,7 @@ void sub_80BEA50(u16); void sub_80BEA5C(u16); bool8 GetPriceReduction(u8); void sub_80BEE84(u16); -u8 sub_80BF0B8(int); +size_t sub_80BF0B8(int); void sub_80BF478(void); u16 sub_80BF674(u16 species); s8 sub_80BF720(TVShow *); -- 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') 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 00861b751b8c468851bc2cb770e8aadf174013ba Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 18 May 2017 21:30:06 -0400 Subject: sub_80BEF10 --- include/contest_painting.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/contest_painting.h b/include/contest_painting.h index 896aa299b..a67748d02 100644 --- a/include/contest_painting.h +++ b/include/contest_painting.h @@ -6,6 +6,14 @@ #define MOSAIC_BIT_OBJ_HSIZE (8) #define MOSAIC_BIT_OBJ_VSIZE (12) +enum +{ + NORMAL_RANK, + SUPER_RANK, + HYPER_RANK, + MASTER_RANK, +}; + enum { CONTEST_COOL, -- 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/flags.h | 2 ++ include/global.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/flags.h b/include/flags.h index d2aa0c47f..0e408a833 100644 --- a/include/flags.h +++ b/include/flags.h @@ -63,3 +63,5 @@ #define SPECIAL_FLAG_1 0x4001 #endif // GUARD_FLAGS_H + +bool8 FlagGet(u16 flag); 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') 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') 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') 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 ++-- include/tv.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include') 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]; diff --git a/include/tv.h b/include/tv.h index f6dd7a007..c4aafebb5 100644 --- a/include/tv.h +++ b/include/tv.h @@ -11,8 +11,8 @@ enum TVSHOW_PKMN_FAN_CLUB_OPINIONS = 3, TVSHOW_UNKN_SHOWTYPE_04 = 4, TVSHOW_NAME_RATER_SHOW = 5, - TVSHOW_UNK_SHOWTYPE_06 = 6, - TVSHOW_UNK_SHOWTYPE_07 = 7, + TVSHOW_FISHING_ADVICE = 6, + TVSHOW_WORLD_OF_MASTERS = 7, TVSHOW_MASS_OUTBREAK = 41, }; #endif //POKERUBY_TV_H -- 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') 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') 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 ++++++++++++++ include/item.h | 19 +++++++++++++++++++ 2 files changed, 33 insertions(+) (limited to 'include') 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 diff --git a/include/item.h b/include/item.h index cc917dbc8..47af11940 100644 --- a/include/item.h +++ b/include/item.h @@ -1,8 +1,27 @@ #ifndef GUARD_ITEM_H #define GUARD_ITEM_H + typedef void (*ItemUseFunc)(u8); +struct Item +{ + u8 name[14]; + u16 itemId; + u16 price; + u8 holdEffect; + u8 holdEffectParam; + u8 *description; + u8 importance; + u8 unk19; + u8 pocket; + u8 type; + ItemUseFunc fieldUseFunc; + u8 battleUsage; + ItemUseFunc battleUseFunc; + u8 secondaryId; +}; + void CopyItemName(u16 itemId, u8 *string); bool8 IsBagPocketNonEmpty(u8 pocket); bool8 CheckBagHasItem(u16 itemId, u16 count); -- 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') 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 f5195f6462e54c9bf4c4035129a48c76dd15c0cb Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 19 May 2017 17:40:50 -0400 Subject: DoTVShow (back to swiss cheese) --- include/tv.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/tv.h b/include/tv.h index c4aafebb5..b1ed61a82 100644 --- a/include/tv.h +++ b/include/tv.h @@ -7,12 +7,17 @@ enum { TVSHOW_FAN_CLUB_LETTER = 1, - TVSHOW_RECENT_HAPPENINGS = 2, - TVSHOW_PKMN_FAN_CLUB_OPINIONS = 3, - TVSHOW_UNKN_SHOWTYPE_04 = 4, - TVSHOW_NAME_RATER_SHOW = 5, - TVSHOW_FISHING_ADVICE = 6, - TVSHOW_WORLD_OF_MASTERS = 7, + TVSHOW_RECENT_HAPPENINGS, + TVSHOW_PKMN_FAN_CLUB_OPINIONS, + TVSHOW_UNKN_SHOWTYPE_04, + TVSHOW_NAME_RATER_SHOW, + TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE, + TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE, + TVSHOW_POKEMON_TODAY_CAUGHT = 21, + TVSHOW_SMART_SHOPPER, + TVSHOW_POKEMON_TODAY_FAILED, + TVSHOW_FISHING_ADVICE, + TVSHOW_WORLD_OF_MASTERS, TVSHOW_MASS_OUTBREAK = 41, }; #endif //POKERUBY_TV_H -- 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') 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') 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') 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 ++++++++++++++++++++++++------------- include/pokedex.h | 2 +- 2 files changed, 25 insertions(+), 14 deletions(-) (limited to 'include') 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; diff --git a/include/pokedex.h b/include/pokedex.h index 5dd44cd2f..61597981b 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -135,7 +135,7 @@ void sub_8090A3C(u8); void sub_8090C68(void); u8 *GetPokemonCategory(u16); -bool8 sub_8090D90(u16, u8); +s8 sub_8090D90(u16, u8); u16 GetNationalPokedexCount(u8); u16 GetHoennPokedexCount(u8); bool8 sub_8090FC0(void); -- 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') 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') 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') 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') 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') 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