From 7fbdb2435f2d332ca58522a688a9d7f49531e863 Mon Sep 17 00:00:00 2001 From: Reonu Date: Sun, 27 Jun 2021 13:03:53 +0100 Subject: [PATCH] added define for the 100 coin star --- include/config.h | 2 ++ src/game/interaction.c | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/config.h b/include/config.h index 871fd497..2e436be6 100644 --- a/include/config.h +++ b/include/config.h @@ -71,6 +71,8 @@ #define JUMP_KICK_FIX // Disables fall damage #define NO_FALL_DAMAGE +// Number of coins to spawn the "100 coin" star. If you remove the define altogether, then there won't be a 100 coin star at all. +#define X_COIN_STAR 100 // 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) diff --git a/src/game/interaction.c b/src/game/interaction.c index 27ae25f1..8deabb20 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -746,11 +746,12 @@ u32 interact_coin(struct MarioState *m, UNUSED u32 interactType, struct Object * m->healCounter += 4 * o->oDamageOrCoinValue; o->oInteractStatus = INT_STATUS_INTERACTED; - - if (COURSE_IS_MAIN_COURSE(gCurrCourseNum) && m->numCoins - o->oDamageOrCoinValue < 100 - && m->numCoins >= 100) { +#ifdef X_COIN_STAR + if (COURSE_IS_MAIN_COURSE(gCurrCourseNum) && m->numCoins - o->oDamageOrCoinValue < X_COIN_STAR + && m->numCoins >= X_COIN_STAR) { bhv_spawn_star_no_level_exit(6); } +#endif #if ENABLE_RUMBLE if (o->oDamageOrCoinValue >= 2) { queue_rumble_data(5, 80);