diff options
author | GriffinR <griffin.richards@comcast.net> | 2019-11-05 15:08:07 -0500 |
---|---|---|
committer | huderlem <huderlem@gmail.com> | 2019-11-06 16:38:02 -0600 |
commit | 58dcd6d99dd7456006fe834e5fbab6b120698280 (patch) | |
tree | 4323e8ab8aa90ba186fec649a8c251e48c3256d9 /src | |
parent | 481c09fcad0db1bacadea534a3cc6cc291e8dfbd (diff) |
Clean up mystery event msg
Diffstat (limited to 'src')
-rw-r--r-- | src/field_specials.c | 19 | ||||
-rwxr-xr-x | src/mevent2.c | 11 |
2 files changed, 16 insertions, 14 deletions
diff --git a/src/field_specials.c b/src/field_specials.c index 7c323792a..65bc3a095 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -55,6 +55,7 @@ #include "constants/heal_locations.h" #include "constants/map_types.h" #include "constants/maps.h" +#include "constants/mevent.h" #include "constants/tv.h" #include "constants/script_menu.h" #include "constants/songs.h" @@ -1655,19 +1656,19 @@ void BufferLottoTicketNumber(void) } } -u16 sub_813986C(void) +u16 GetMysteryEventCardVal(void) { switch (gSpecialVar_Result) { - case 0: - return mevent_081445C0(3); - case 1: - return mevent_081445C0(4); - case 2: - return mevent_081445C0(0); - case 3: + case GET_NUM_STAMPS: + return mevent_081445C0(GET_NUM_STAMPS_INTERNAL); + case GET_MAX_STAMPS: + return mevent_081445C0(GET_MAX_STAMPS_INTERNAL); + case GET_CARD_BATTLES_WON: + return mevent_081445C0(GET_CARD_BATTLES_WON_INTERNAL); + case 3: // Never occurs return mevent_081445C0(1); - case 4: + case 4: // Never occurs return mevent_081445C0(2); default: return 0; diff --git a/src/mevent2.c b/src/mevent2.c index f36e5d06b..aedc7b366 100755 --- a/src/mevent2.c +++ b/src/mevent2.c @@ -9,6 +9,7 @@ #include "string_util.h" #include "new_game.h" #include "mevent.h" +#include "constants/mevent.h" #include "constants/species.h" static EWRAM_DATA bool32 gUnknown_02022C70 = FALSE; @@ -493,7 +494,7 @@ u16 mevent_081445C0(u32 command) { switch (command) { - case 0: + case GET_CARD_BATTLES_WON_INTERNAL: { struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data; if (data->unk_08_0 == 2) @@ -503,7 +504,7 @@ u16 mevent_081445C0(u32 command) } break; } - case 1: + case 1: // Never occurs { struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data; if (data->unk_08_0 == 2) @@ -513,7 +514,7 @@ u16 mevent_081445C0(u32 command) } break; } - case 2: + case 2: // Never occurs { struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data; if (data->unk_08_0 == 2) @@ -523,14 +524,14 @@ u16 mevent_081445C0(u32 command) } break; } - case 3: + case GET_NUM_STAMPS_INTERNAL: { struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data; if (data->unk_08_0 == 1) return sub_801B4CC(); break; } - case 4: + case GET_MAX_STAMPS_INTERNAL: { struct WonderCard *data = &gSaveBlock1Ptr->unk_322C.wonderCard.data; if (data->unk_08_0 == 1) |