From da45377c7ca178e98288ab771c9e4a3772b20d49 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 26 Dec 2019 17:41:43 +1000 Subject: [PATCH] Replace struct cheatthing with struct menu_item --- src/game/cheats.c | 6 +++--- src/include/game/cheats.h | 2 +- src/include/types.h | 5 ----- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/game/cheats.c b/src/game/cheats.c index d5efb86b4..b11984113 100644 --- a/src/game/cheats.c +++ b/src/game/cheats.c @@ -904,10 +904,10 @@ s32 menuhandlerCheatBuddy(s32 arg0, struct menu_item *item, s32 arg2) return 0; } -char *cheatGetNameIfUnlocked(struct cheatthing *thing) +char *cheatGetNameIfUnlocked(struct menu_item *item) { - if (cheatIsUnlocked(thing->cheat_id)) { - return textGet(g_CheatSpecs[thing->cheat_id].nametextid); + if (cheatIsUnlocked(item->param)) { + return textGet(g_CheatSpecs[item->param].nametextid); } return textGet(0x544a); // "----------" diff --git a/src/include/game/cheats.h b/src/include/game/cheats.h index d400e3bbe..92deb8850 100644 --- a/src/include/game/cheats.h +++ b/src/include/game/cheats.h @@ -9,7 +9,7 @@ u32 func0f106ea0(void); u32 func0f1071c4(void); void func0f1074ec(void); u32 func0f107510(void); -char *cheatGetNameIfUnlocked(struct cheatthing *thing); +char *cheatGetNameIfUnlocked(struct menu_item *item); u32 cheatGetMarquee(void); s32 cheatGetByTimedStageIndex(s32 stage_index, s32 difficulty); s32 cheatGetByCompletedStageIndex(s32 stage_index); diff --git a/src/include/types.h b/src/include/types.h index bfa08ba31..0474eac88 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -2603,11 +2603,6 @@ struct cutscenegroup { u16 namefileid; }; -struct cheatthing { - u8 unk00; - u8 cheat_id; -}; - struct cheatspec { u16 nametextid; u16 time;