This commit is contained in:
Martin Pham 2024-03-09 13:33:37 +00:00 committed by GitHub
commit c1c3e3d222
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 1 deletions

View File

@ -85,6 +85,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
@ -149,6 +150,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

View File

@ -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) {

View File

@ -105,6 +105,7 @@ static const u8 optsCheatsStr[][64] = {
{ TEXT_OPT_CHEAT7 },
{ TEXT_OPT_CHEAT8 },
{ TEXT_OPT_CHEAT9 },
{ TEXT_OPT_FOREVER_CAP },
};
static const u8 bindStr[][32] = {
@ -282,6 +283,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 ),
};

View File

@ -13,6 +13,7 @@ struct CheatList {
bool ExitAnywhere;
bool HugeMario;
bool TinyMario;
bool ForeverCap;
};
extern struct CheatList Cheats;