diff options
author | camthesaxman <cameronghall@cox.net> | 2017-12-22 00:57:31 -0600 |
---|---|---|
committer | camthesaxman <cameronghall@cox.net> | 2017-12-22 00:57:31 -0600 |
commit | 2415720ea6760217355f286da83b9955c881bf1b (patch) | |
tree | 03486998989b00cfcc83d6504a39987c1d4f044e /src | |
parent | 71d3e605290b2069d3571478a3736b04d658decb (diff) |
fix 0x2DFC in SaveBlock1
Diffstat (limited to 'src')
-rw-r--r-- | src/contest.c | 2 | ||||
-rw-r--r-- | src/scene/new_game.c | 14 | ||||
-rw-r--r-- | src/script_pokemon_util_80C4BF0.c | 4 |
3 files changed, 8 insertions, 12 deletions
diff --git a/src/contest.c b/src/contest.c index 210d09548..cd7efee7a 100644 --- a/src/contest.c +++ b/src/contest.c @@ -5574,7 +5574,7 @@ bool8 sub_80B2A7C(u8 a) { shared15DE0.personality = gContestMons[i].personality; shared15DE0.otId = gContestMons[i].otId; - shared15DE0.unk8 = gContestMons[i].species; + shared15DE0.species = gContestMons[i].species; StringCopy(shared15DE0.nickname, gContestMons[i].nickname); if (gIsLinkContest & 1) StringCopy(shared15DE0.trainerName, gLinkPlayers[i].name); diff --git a/src/scene/new_game.c b/src/scene/new_game.c index e3d6996ac..98ef0853d 100644 --- a/src/scene/new_game.c +++ b/src/scene/new_game.c @@ -24,6 +24,7 @@ #include "rtc.h" #include "script.h" #include "secret_base.h" +#include "text.h" #include "tv.h" EWRAM_DATA u8 gDifferentSaveFile = 0; @@ -35,14 +36,10 @@ extern u16 gSaveFileStatus; extern u8 gUnknown_0819FA81[]; -const struct SB1_2EFC_Struct gUnknown_08216604 = +static const struct ContestWinner sEmptyContestWinner = { - 0x0000, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - } + .nickname = {EOS}, + .trainerName = {EOS}, }; void write_word_to_mem(u32 var, u8 *dataPtr) @@ -89,8 +86,7 @@ void sub_8052DA8(void) sub_80B2D1C(); for (i = 0; i < 5; i++) - gSaveBlock1.contestWinners[i] = gUnknown_08216604; - //gSaveBlock1.sbStruct.unkSB1.sb1_2EFC_struct[i] = gUnknown_08216604; + gSaveBlock1.contestWinners[8 + i] = sEmptyContestWinner; } void ZeroBattleTowerData(void) diff --git a/src/script_pokemon_util_80C4BF0.c b/src/script_pokemon_util_80C4BF0.c index dc48adc9b..1128e386d 100644 --- a/src/script_pokemon_util_80C4BF0.c +++ b/src/script_pokemon_util_80C4BF0.c @@ -111,7 +111,7 @@ void sub_80C4C78(void) break; } - returnVar = gSaveBlock1.sbStruct.unkSB2.sb1_2EFC_struct2[var].var; + returnVar = gSaveBlock1.contestWinners[var].species; if(returnVar == 0) gSpecialVar_0x8004 = returnVar; @@ -144,7 +144,7 @@ u8 sub_80C4D50(void) int i; for (i = 0; i < 5; i++) - if (gSaveBlock1.sbStruct.unkSB2.sb1_2EFC_struct2[i + 8].var) + if (gSaveBlock1.contestWinners[i + 8].species != 0) retVar++; return retVar; |