From 8e70d87f299d8623d2caf11a043968301804ad0c Mon Sep 17 00:00:00 2001 From: Reonu Date: Sun, 27 Jun 2021 13:00:26 +0100 Subject: [PATCH] added nonstop stars toggle --- include/config.h | 2 ++ src/game/interaction.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/include/config.h b/include/config.h index 32a04950..871fd497 100644 --- a/include/config.h +++ b/include/config.h @@ -71,6 +71,8 @@ #define JUMP_KICK_FIX // Disables fall damage #define NO_FALL_DAMAGE +// Stars don't kick you out of the level +// #define NON_STOP_STARS // Uncomment this if you want global star IDs (useful for creating an open world hack ala MVC) //#define GLOBAL_STAR_IDS // Uncomment this if you want to skip the title screen (Super Mario 64 logo) diff --git a/src/game/interaction.c b/src/game/interaction.c index 6bc26c05..27ae25f1 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -769,7 +769,11 @@ u32 interact_water_ring(struct MarioState *m, UNUSED u32 interactType, struct Ob u32 interact_star_or_key(struct MarioState *m, UNUSED u32 interactType, struct Object *o) { u32 starIndex; u32 starGrabAction = ACT_STAR_DANCE_EXIT; +#ifdef NON_STOP_STARS + u32 noExit = 1; +#else u32 noExit = (o->oInteractionSubtype & INT_SUBTYPE_NO_EXIT) != 0; +#endif u32 grandStar = (o->oInteractionSubtype & INT_SUBTYPE_GRAND_STAR) != 0; if (m->health >= 0x100) {