From 20dbc834369cf8e6e8ec2ea71b08d9ce0e97a17c Mon Sep 17 00:00:00 2001 From: Oliver Bell Date: Tue, 14 Jan 2025 12:10:27 +0000 Subject: [PATCH] fix rings scatter in widescreen --- scripts/progress.py | 2 +- src/game/stage/rings_scatter.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/progress.py b/scripts/progress.py index c79d0d01e..fda8ad49e 100644 --- a/scripts/progress.py +++ b/scripts/progress.py @@ -17,7 +17,7 @@ def collect_non_matching_funcs(): for i in range(len(lines)): line = lines[i] if "NONMATCH" in line: - # if "unused" in line.lower(): + # if "unused_" in line.lower(): # continue matcher = r'(NONMATCH|ASM_FUNC)\(".*",\W*\w*\W*(\w*).*\)' match = re.findall(matcher, line) diff --git a/src/game/stage/rings_scatter.c b/src/game/stage/rings_scatter.c index 18bbb7dfd..3f769aff8 100644 --- a/src/game/stage/rings_scatter.c +++ b/src/game/stage/rings_scatter.c @@ -300,7 +300,8 @@ void RingsScatterSingleplayer_FlippedGravity(void) ring->velY -= sp08; - if ((screenX + TILE_WIDTH) > 0 && screenX + TILE_WIDTH < 256 && screenY > -8 && screenY < (DISPLAY_HEIGHT + TILE_WIDTH)) { + if ((screenX + TILE_WIDTH) > 0 && screenX + TILE_WIDTH < (DISPLAY_WIDTH + (TILE_WIDTH * 2)) && screenY > -TILE_WIDTH + && screenY < (DISPLAY_HEIGHT + TILE_WIDTH)) { if (ring->unkC >= 32 || (gStageTime & 0x2) == 0) { if ((!sp10) || (s->oamBaseIndex == 0xFF)) { s->oamBaseIndex = 0xFF; @@ -413,7 +414,8 @@ void RingsScatterSingleplayer_NormalGravity(void) ring->velY += sp08; - if ((screenX + TILE_WIDTH) > 0 && screenX + TILE_WIDTH < 256 && (screenY > -8) && (screenY < (DISPLAY_HEIGHT + 8))) { + if ((screenX + TILE_WIDTH) > 0 && screenX + TILE_WIDTH < (DISPLAY_WIDTH + (TILE_WIDTH * 2)) && (screenY > -TILE_WIDTH) + && (screenY < (DISPLAY_HEIGHT + TILE_WIDTH))) { if (ring->unkC >= 32 || ((gStageTime & 0x2) == 0)) { if ((!sp10) || (s->oamBaseIndex == 0xFF)) { s->oamBaseIndex = 0xFF;