diff options
author | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-01-31 03:08:44 -0500 |
---|---|---|
committer | YamaArashi <YamaArashi@users.noreply.github.com> | 2017-01-31 00:08:44 -0800 |
commit | 9813caaf5345ea28f8230d41461618673779c2fb (patch) | |
tree | 53b692aabb235c2f5a58060fa134bbdb3adbb67b | |
parent | b6b5453431af46791fd9d211efac64464c1dff85 (diff) |
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
-rw-r--r-- | include/asm.inc.h | 2 | ||||
-rw-r--r-- | include/global.h | 11 | ||||
-rw-r--r-- | src/mauville_old_man.c | 8 | ||||
-rw-r--r-- | src/new_game.c | 3 |
4 files changed, 12 insertions, 12 deletions
diff --git a/include/asm.inc.h b/include/asm.inc.h index 379b79f2d..f556fe4e5 100644 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -376,7 +376,7 @@ u16 sub_80EB72C(u16); void sub_80EBA5C(void); // asm/mauville_old_man.o -void sub_80F7AA4(void); +void SetMauvilleOldMan(void); void sub_80F7F30(void); // asm/menu_helpers.o 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]; diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index 82e936633..d03042ca5 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -35,10 +35,10 @@ void sub_80F7A34(void) void sub_80F7A6C(void) { - OldMan *oldMan = &gSaveBlock1.oldMan; + struct UnkMauvilleOldManStruct *bard = &gSaveBlock1.oldMan.oldMan1; - oldMan->oldMan1.unk_2D94 = 1; - oldMan->oldMan1.unk_2D95 = 0; + bard->unk_2D94 = 1; + bard->unk_2D95 = 0; } void sub_80F7A7C(void) @@ -59,7 +59,7 @@ void sub_80F7A98(void) sub_81099CC(); } -void sub_80F7AA4(void) +void SetMauvilleOldMan(void) { u32 var = ((u16)((gSaveBlock2.playerTrainerId[1] << 8 | gSaveBlock2.playerTrainerId[0])) % 10) / 2; diff --git a/src/new_game.c b/src/new_game.c index ddc9ea403..99c7839eb 100644 --- a/src/new_game.c +++ b/src/new_game.c @@ -70,6 +70,7 @@ void ClearPokedexFlags(void) void sub_8052DA8(void) { s32 i; + sub_80B2D1C(); for (i = 0; i < 5; i++) gSaveBlock1.sb1_2EFC_struct[i] = gUnknown_08216604; @@ -139,7 +140,7 @@ void NewGameInitData(void) sub_810C994(); sub_8133F80(); sub_80E6764(); - sub_80F7AA4(); + SetMauvilleOldMan(); sub_80FA17C(); sub_810FA54(); ResetLotteryCorner(); |