From e226b7aca7318bfe9316b43b3def6ce8ce17701d Mon Sep 17 00:00:00 2001 From: Martin Pham Date: Sun, 2 Aug 2020 15:16:55 +0200 Subject: [PATCH 1/5] Update cheats.h ForeverCap flaf --- src/pc/cheats.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pc/cheats.h b/src/pc/cheats.h index eaf71ab4..0fb764eb 100644 --- a/src/pc/cheats.h +++ b/src/pc/cheats.h @@ -13,6 +13,7 @@ struct CheatList { bool ExitAnywhere; bool HugeMario; bool TinyMario; + bool ForeverCap; }; extern struct CheatList Cheats; From 07aae185c0c062cf1f7481000600ed1f53f995c5 Mon Sep 17 00:00:00 2001 From: Martin Pham Date: Sun, 2 Aug 2020 15:36:08 +0200 Subject: [PATCH 2/5] Update text_options_strings.h.in Add cheat menu --- include/text_options_strings.h.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/text_options_strings.h.in b/include/text_options_strings.h.in index a1ce481f..bad3255a 100644 --- a/include/text_options_strings.h.in +++ b/include/text_options_strings.h.in @@ -84,6 +84,7 @@ #define TEXT_OPT_CHEAT7 _("EXIT COURSE AT ANY TIME") #define TEXT_OPT_CHEAT8 _("HUGE MARIO") #define TEXT_OPT_CHEAT9 _("TINY MARIO") +#define TEXT_OPT_FOREVER_CAP _("FOREVER CAP") #else // VERSION @@ -148,6 +149,7 @@ #define TEXT_OPT_CHEAT7 _("Exit course at any time") #define TEXT_OPT_CHEAT8 _("Huge Mario") #define TEXT_OPT_CHEAT9 _("Tiny Mario") +#define TEXT_OPT_FOREVER_CAP _("Forever Cap") #endif // VERSION From 372e71bf36919a7064de86f6fbcdd15925187a3b Mon Sep 17 00:00:00 2001 From: Martin Pham Date: Sun, 2 Aug 2020 15:36:46 +0200 Subject: [PATCH 3/5] Update options_menu.c Add menu item --- src/game/options_menu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/game/options_menu.c b/src/game/options_menu.c index 56dba619..3a154f07 100644 --- a/src/game/options_menu.c +++ b/src/game/options_menu.c @@ -102,6 +102,7 @@ static const u8 optsCheatsStr[][64] = { { TEXT_OPT_CHEAT7 }, { TEXT_OPT_CHEAT8 }, { TEXT_OPT_CHEAT9 }, + { TEXT_OPT_FOREVER_CAP }, }; static const u8 bindStr[][32] = { From 708c3f86c1189326054006190333e28a8fdf6b58 Mon Sep 17 00:00:00 2001 From: Martin Pham Date: Sun, 2 Aug 2020 15:37:34 +0200 Subject: [PATCH 4/5] Update mario.c Forever Cap timeout --- src/game/mario.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/mario.c b/src/game/mario.c index 5f8e5114..4497abd6 100644 --- a/src/game/mario.c +++ b/src/game/mario.c @@ -1610,7 +1610,7 @@ u32 update_and_return_cap_flags(struct MarioState *m) { if ((m->capTimer <= 60) || ((action != ACT_READING_AUTOMATIC_DIALOG) && (action != ACT_READING_NPC_DIALOG) && (action != ACT_READING_SIGN) && (action != ACT_IN_CANNON))) { - m->capTimer -= 1; + if (Cheats.EnableCheats && Cheats.ForeverCap) { m->capTimer -= 0; } else { m->capTimer -= 1; } } if (m->capTimer == 0) { From feab74a634b257019b0550bb081440ad42b20d53 Mon Sep 17 00:00:00 2001 From: Martin Pham Date: Sun, 2 Aug 2020 16:15:03 +0200 Subject: [PATCH 5/5] Update options_menu.c --- src/game/options_menu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/game/options_menu.c b/src/game/options_menu.c index 3a154f07..999077cc 100644 --- a/src/game/options_menu.c +++ b/src/game/options_menu.c @@ -280,6 +280,7 @@ static struct Option optsCheats[] = { DEF_OPT_TOGGLE( optsCheatsStr[6], &Cheats.ExitAnywhere ), DEF_OPT_TOGGLE( optsCheatsStr[7], &Cheats.HugeMario ), DEF_OPT_TOGGLE( optsCheatsStr[8], &Cheats.TinyMario ), + DEF_OPT_TOGGLE( optsCheatsStr[9], &Cheats.ForeverCap ), };