Skip to content

Commit cb895c4

Browse files
committed
linecap floor logic occurs when levelups possible
1 parent 2415527 commit cb895c4

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

src/modes/floor.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ drawFloor:
99
; x10
1010
lda multBy10Table, x
1111
tax
12-
; draw block tiles ($7B)
13-
lda #BLOCK_TILES
12+
; draw block tiles+3 ($7E)
13+
lda #BLOCK_TILES+3
1414
@loop:
1515
sta playfield+$46,X
1616
inx

src/playstate/completedrows.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ playState_checkForCompletedRows:
102102
tax
103103
ldy multBy10Table,x
104104
ldx #$0A
105-
lda #BLOCK_TILES
105+
lda #BLOCK_TILES+3
106106
@drawFloorSurface:
107107
sta playfield,y
108108
iny

src/playstate/updatestats.asm

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
levelUpPossible = generalCounter3
2+
13
playState_updateLinesAndStatistics:
24
jsr updateMusicSpeed
35
lda completedLines
46
bne @linesCleared
57
jmp addPoints
68

79
@linesCleared:
10+
ldy #$00
11+
sty levelUpPossible
812
tax
913
dec lineClearStatsByType-1,x
1014
bpl @noCarry
@@ -75,6 +79,7 @@ checkLevelUp:
7579
and #$0F
7680
bne @lineLoop
7781

82+
inc levelUpPossible ; used by floorcap check below
7883
lda practiseType
7984
cmp #MODE_TAPQTY
8085
beq @lineLoop
@@ -115,7 +120,7 @@ checkLevelUp:
115120
lda crashState
116121
ora #$08
117122
sta crashState
118-
lda #$06 ; checked in floor linecap stuff, just below
123+
lda #$06
119124
sta soundEffectSlot1Init
120125
lda renderFlags
121126
ora #RENDER_LEVEL
@@ -167,10 +172,9 @@ checkLinecap: ; set linecapState
167172
lda linecapState
168173
cmp #LINECAP_FLOOR
169174
bne @floorLinecapEnd
170-
; check level up sound is happening
171-
lda soundEffectSlot1Init
172-
cmp #6
173-
bne @floorLinecapEnd
175+
; check level up was possible
176+
lda levelUpPossible
177+
beq @floorLinecapEnd
174178
lda #$A
175179
sta garbageHole
176180
lda #1

0 commit comments

Comments
 (0)