Skip to content

Commit 3141007

Browse files
committed
Use y, save byte
1 parent 937882a commit 3141007

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/playstate/updatestats.asm

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
levelUpPossible = generalCounter3
1+
; y reg tracks lines crossing multiple of 10 from @linesCleared until addPoints
22

33
playState_updateLinesAndStatistics:
44
jsr updateMusicSpeed
@@ -8,7 +8,6 @@ playState_updateLinesAndStatistics:
88

99
@linesCleared:
1010
ldy #$00
11-
sty levelUpPossible
1211
tax
1312
dec lineClearStatsByType-1,x
1413
bpl @noCarry
@@ -79,7 +78,7 @@ checkLevelUp:
7978
and #$0F
8079
bne @lineLoop
8180

82-
inc levelUpPossible ; used by floorcap check below
81+
iny ; used by floorcap check below
8382
lda practiseType
8483
cmp #MODE_TAPQTY
8584
beq @lineLoop
@@ -173,7 +172,7 @@ checkLinecap: ; set linecapState
173172
cmp #LINECAP_FLOOR
174173
bne @floorLinecapEnd
175174
; check level up was possible
176-
lda levelUpPossible
175+
tya
177176
beq @floorLinecapEnd
178177
lda #$A
179178
sta garbageHole

0 commit comments

Comments
 (0)