From 7c33bbf2faa952b158498f3c657c04db32630a30 Mon Sep 17 00:00:00 2001 From: Agent X <44549182+AgentXLP@users.noreply.github.com> Date: Wed, 30 Apr 2025 18:49:03 -0400 Subject: [PATCH] Fix star doors in rom hacks --- src/game/interaction.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/interaction.c b/src/game/interaction.c index a5c86316e..584032fd4 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -1141,7 +1141,7 @@ u32 interact_warp_door(struct MarioState *m, UNUSED u32 interactType, struct Obj u32 get_door_save_file_flag(struct Object *door) { if (door == NULL) { return 0; } u32 saveFileFlag = 0; - s16 requiredNumStars = door->oBehParams >> 24; + s16 requiredNumStars = (u32)door->oBehParams >> 24; s16 isCcmDoor = door->oPosX < 0.0f; s16 isPssDoor = door->oPosY > 500.0f; @@ -1182,7 +1182,7 @@ u32 get_door_save_file_flag(struct Object *door) { u32 interact_door(struct MarioState *m, UNUSED u32 interactType, struct Object *o) { if (!m || !o) { return FALSE; } if (m->playerIndex != 0 && o == NULL) { return FALSE; } - s16 requiredNumStars = o->oBehParams >> 24; + s16 requiredNumStars = (u32)o->oBehParams >> 24; s16 numStars = save_file_get_total_star_count(gCurrSaveFileNum - 1, COURSE_MIN - 1, COURSE_MAX - 1); if (o->oAction != 0) { return FALSE; }