From bfc4b338cbd3e78062c71ff6f72f821631277c1b Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Tue, 22 Aug 2017 17:34:42 -0500 Subject: rename some mauville man stuff --- include/global.h | 52 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 15 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index f076274cc..bb501ac93 100644 --- a/include/global.h +++ b/include/global.h @@ -447,11 +447,19 @@ struct MailStruct /*0x20*/ u16 itemId; }; -struct UnkMauvilleOldManStruct + +// Mauville Pokemon Center men + +struct MauvilleManCommon +{ + u8 id; +}; + +struct MauvilleManBard { - u8 unk_2D94; + u8 id; u8 unk_2D95; - /*0x2D96*/ u16 mauvilleOldMan_ecArray[6]; + /*0x2D96*/ u16 songLyrics[6]; /*0x2DA2*/ u16 mauvilleOldMan_ecArray2[6]; /*0x2DAE*/ u8 playerName[8]; /*0x2DB6*/ u8 filler_2DB6[0x3]; @@ -459,29 +467,43 @@ struct UnkMauvilleOldManStruct u8 unk_2DBD; }; /*size = 0x2C*/ -struct UnkMauvilleOldManStruct2 +struct MauvilleManHipster { - u8 filler0; + u8 id; u8 unk1; - u8 unk2; - u16 mauvilleOldMan_ecArray[10]; - u8 mauvilleOldMan_ecArray2[12]; - u8 fillerF[0x2]; -}; /*size = 0x2C*/ +}; -struct MauvilleOldManTrader +struct MauvilleManTrader { - u8 unk0; + u8 id; u8 unk1[4]; u8 unk5[4][11]; u8 unk31; }; +struct MauvilleManStoryteller +{ + u8 id; +}; + +struct MauvilleManGiddy +{ + u8 id; + u8 unk1; + u8 unk2; + u16 mauvilleOldMan_ecArray[10]; + u8 mauvilleOldMan_ecArray2[12]; + u8 fillerF[0x2]; +}; /*size = 0x2C*/ + typedef union OldMan { - struct UnkMauvilleOldManStruct oldMan1; - struct UnkMauvilleOldManStruct2 oldMan2; - struct MauvilleOldManTrader trader; + struct MauvilleManCommon common; + struct MauvilleManBard bard; + struct MauvilleManHipster hipster; + struct MauvilleManTrader trader; + struct MauvilleManStoryteller storyteller; + struct MauvilleManGiddy giddy; u8 filler[0x40]; } OldMan; -- cgit v1.2.3 From 988f5a685a36d3591d07f71ca778d988fb26720a Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 01:10:30 -0500 Subject: decompile up to sub_80F8598 --- include/global.h | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index bb501ac93..67039d50e 100644 --- a/include/global.h +++ b/include/global.h @@ -457,14 +457,14 @@ struct MauvilleManCommon struct MauvilleManBard { - u8 id; - u8 unk_2D95; - /*0x2D96*/ u16 songLyrics[6]; - /*0x2DA2*/ u16 mauvilleOldMan_ecArray2[6]; - /*0x2DAE*/ u8 playerName[8]; - /*0x2DB6*/ u8 filler_2DB6[0x3]; - /*0x2DB9*/ u8 playerTrainerId[4]; - u8 unk_2DBD; + /*0x00*/ u8 id; + /*0x01*/ u8 unk_2D95; + /*0x02*/ u16 songLyrics[6]; + /*0x0E*/ u16 mauvilleOldMan_ecArray2[6]; + /*0x1A*/ u8 playerName[8]; + /*0x22*/ u8 filler_2DB6[0x3]; + /*0x25*/ u8 playerTrainerId[4]; + /*0x29*/ u8 unk_2DBD; }; /*size = 0x2C*/ struct MauvilleManHipster @@ -484,18 +484,24 @@ struct MauvilleManTrader struct MauvilleManStoryteller { u8 id; + u8 unk1; + u8 filler2[2]; + u8 unk4[4]; + u8 unk8[4][7]; + u8 unk24[2][4]; // unknown length }; struct MauvilleManGiddy { - u8 id; - u8 unk1; - u8 unk2; - u16 mauvilleOldMan_ecArray[10]; - u8 mauvilleOldMan_ecArray2[12]; - u8 fillerF[0x2]; + /*0x00*/ u8 id; + /*0x01*/ u8 unk1; + /*0x02*/ u8 questionNum; + /*0x04*/ u16 mauvilleOldMan_ecArray[10]; + /*0x18*/ u8 questionList[12]; + /*0x24*/ u8 fillerF[0x2]; }; /*size = 0x2C*/ + typedef union OldMan { struct MauvilleManCommon common; -- cgit v1.2.3 From a277e60789d9ea78fe03a4bcded2edf7b91e548e Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 13:40:03 -0500 Subject: finish decompiling mauville_old_man --- 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 67039d50e..f172c12a3 100644 --- a/include/global.h +++ b/include/global.h @@ -484,7 +484,7 @@ struct MauvilleManTrader struct MauvilleManStoryteller { u8 id; - u8 unk1; + bool8 unk1; u8 filler2[2]; u8 unk4[4]; u8 unk8[4][7]; -- cgit v1.2.3 From 1ae38be0a46d1d901a2d9e5bb22938a0cecf6b7f Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 15:19:55 -0500 Subject: do some renaming and reorganizing --- 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 f172c12a3..32a6beb2b 100644 --- a/include/global.h +++ b/include/global.h @@ -464,7 +464,7 @@ struct MauvilleManBard /*0x1A*/ u8 playerName[8]; /*0x22*/ u8 filler_2DB6[0x3]; /*0x25*/ u8 playerTrainerId[4]; - /*0x29*/ u8 unk_2DBD; + /*0x29*/ bool8 hasChangedSong; }; /*size = 0x2C*/ struct MauvilleManHipster @@ -502,7 +502,7 @@ struct MauvilleManGiddy }; /*size = 0x2C*/ -typedef union OldMan +union MauvilleMan { struct MauvilleManCommon common; struct MauvilleManBard bard; @@ -511,7 +511,7 @@ typedef union OldMan struct MauvilleManStoryteller storyteller; struct MauvilleManGiddy giddy; u8 filler[0x40]; -} OldMan; +}; struct Unk_SB_Access_Struct1 { @@ -668,7 +668,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2B4C*/ struct MailStruct mail[16]; /*0x2D8C*/ u8 unk2D8C[4]; /*0x2D90*/ u8 filler_2D90[0x4]; - /*0x2D94*/ OldMan oldMan; + /*0x2D94*/ union MauvilleMan mauvilleMan; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff /*0x2DFC*/ u8 filler_2DFC[0x8]; /*0x2E04*/ SB_Struct sbStruct; -- cgit v1.2.3 From 4a583141ba483dcd49f49760a29c403c5d259efb Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 15:33:07 -0500 Subject: more labeling and fix German build --- 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 32a6beb2b..6c0fc28ef 100644 --- a/include/global.h +++ b/include/global.h @@ -460,7 +460,7 @@ struct MauvilleManBard /*0x00*/ u8 id; /*0x01*/ u8 unk_2D95; /*0x02*/ u16 songLyrics[6]; - /*0x0E*/ u16 mauvilleOldMan_ecArray2[6]; + /*0x0E*/ u16 temporaryLyrics[6]; /*0x1A*/ u8 playerName[8]; /*0x22*/ u8 filler_2DB6[0x3]; /*0x25*/ u8 playerTrainerId[4]; -- cgit v1.2.3 From 1b715eb7ba38ff408acf5e5e0a9ea88642f912bb Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 16:52:49 -0500 Subject: more Mauville man labeling --- 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 6c0fc28ef..0e0c29045 100644 --- a/include/global.h +++ b/include/global.h @@ -478,7 +478,7 @@ struct MauvilleManTrader u8 id; u8 unk1[4]; u8 unk5[4][11]; - u8 unk31; + bool8 alreadyTraded; }; struct MauvilleManStoryteller @@ -487,7 +487,7 @@ struct MauvilleManStoryteller bool8 unk1; u8 filler2[2]; u8 unk4[4]; - u8 unk8[4][7]; + u8 playerNames[4][7]; u8 unk24[2][4]; // unknown length }; -- cgit v1.2.3 From 670255f950a98f8a5cc636a20682b9ed42a31b21 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 19:54:39 -0500 Subject: fix build for real this time --- 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 0e0c29045..875ea7815 100644 --- a/include/global.h +++ b/include/global.h @@ -486,9 +486,9 @@ struct MauvilleManStoryteller u8 id; bool8 unk1; u8 filler2[2]; - u8 unk4[4]; - u8 playerNames[4][7]; - u8 unk24[2][4]; // unknown length + u8 gameStatIDs[4]; + u8 trainerNames[4][7]; + u8 unk24[4][4]; }; struct MauvilleManGiddy -- cgit v1.2.3 From 8c57ef0fad270bc795d0b64a75d96fafc0f63513 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 20:50:39 -0500 Subject: finish labeling script --- include/global.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 875ea7815..7c673f13e 100644 --- a/include/global.h +++ b/include/global.h @@ -494,11 +494,10 @@ struct MauvilleManStoryteller struct MauvilleManGiddy { /*0x00*/ u8 id; - /*0x01*/ u8 unk1; + /*0x01*/ u8 taleCounter; /*0x02*/ u8 questionNum; - /*0x04*/ u16 mauvilleOldMan_ecArray[10]; + /*0x04*/ u16 randomWords[10]; /*0x18*/ u8 questionList[12]; - /*0x24*/ u8 fillerF[0x2]; }; /*size = 0x2C*/ -- cgit v1.2.3 From b6ea4d9a77cdb6b416d3dd94eef68ce8a56cd4eb Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 24 Aug 2017 21:18:07 -0500 Subject: label more stuff in mauville_old_man.c --- include/global.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 7c673f13e..ab7d43955 100644 --- a/include/global.h +++ b/include/global.h @@ -458,7 +458,6 @@ struct MauvilleManCommon struct MauvilleManBard { /*0x00*/ u8 id; - /*0x01*/ u8 unk_2D95; /*0x02*/ u16 songLyrics[6]; /*0x0E*/ u16 temporaryLyrics[6]; /*0x1A*/ u8 playerName[8]; @@ -470,7 +469,7 @@ struct MauvilleManBard struct MauvilleManHipster { u8 id; - u8 unk1; + bool8 alreadySpoken; }; struct MauvilleManTrader @@ -484,11 +483,11 @@ struct MauvilleManTrader struct MauvilleManStoryteller { u8 id; - bool8 unk1; + bool8 alreadyRecorded; u8 filler2[2]; u8 gameStatIDs[4]; u8 trainerNames[4][7]; - u8 unk24[4][4]; + u8 statValues[4][4]; }; struct MauvilleManGiddy @@ -509,7 +508,7 @@ union MauvilleMan struct MauvilleManTrader trader; struct MauvilleManStoryteller storyteller; struct MauvilleManGiddy giddy; - u8 filler[0x40]; + u8 filler[0x40]; // needed to pad out the struct }; struct Unk_SB_Access_Struct1 -- cgit v1.2.3