Skip to content

Commit

Permalink
fix rings scatter in widescreen
Browse files Browse the repository at this point in the history
  • Loading branch information
freshollie committed Jan 14, 2025
1 parent c20fd5e commit 20dbc83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions src/game/stage/rings_scatter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 20dbc83

Please sign in to comment.