Skip to content

Commit 52b4c16

Browse files
committed
improve nextsprite perf in the general case
1 parent a8aeae1 commit 52b4c16

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Fixed ingame score display at 8 million with Classic Scoring
1414
* Fixed CNROM legal screen CHR bank
1515
* Fixed CNROM legal to title flicker
16+
* Fixed a bug in Sonic Drop
1617
* Block Tool pieces wrap around
1718
* Always Next Box removed
1819
* 0001 seeds are ignored

src/sprites/piece.asm

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,10 @@ stageSpriteForCurrentPiece_return:
136136
rts
137137

138138
stageSpriteForNextPiece:
139-
lda practiseType
140-
cmp #MODE_HARDDROP
141-
beq @alwaysNextBox
142-
lda debugFlag
143-
bne @alwaysNextBox
144139
lda displayNextPiece
145-
bne @ret
140+
bne @maybeDisplayNextPiece
146141

147-
@alwaysNextBox:
142+
@displayNextPiece:
148143
lda #$C8
149144
sta spriteXOffset
150145
lda #$77
@@ -153,4 +148,11 @@ stageSpriteForNextPiece:
153148
lda orientationToSpriteTable,x
154149
sta spriteIndexInOamContentLookup
155150
jmp loadSpriteIntoOamStaging
156-
@ret: rts
151+
152+
@maybeDisplayNextPiece:
153+
lda practiseType
154+
cmp #MODE_HARDDROP
155+
beq @displayNextPiece
156+
lda debugFlag
157+
bne @displayNextPiece
158+
rts

0 commit comments

Comments
 (0)