Skip to content

Commit a6ace2c

Browse files
authored
Merge branch 'master' into mapper_edit
2 parents be3131c + 5979fa2 commit a6ace2c

File tree

3 files changed

+38
-37
lines changed

3 files changed

+38
-37
lines changed

src/nmi/render_mode_play_and_demo.asm

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,6 @@ updateLineClearingAnimation:
231231
tay
232232
lda vramPlayfieldRows,y
233233
sta generalCounter
234-
lda generalCounter
235-
clc
236-
adc #$06
237-
sta generalCounter
238234

239235
iny
240236
lda vramPlayfieldRows,y

src/nmi/render_util.asm

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ render_playfield:
5555
rts
5656

5757
vramPlayfieldRows:
58-
.word $20C6,$20E6,$2106,$2126
59-
.word $2146,$2166,$2186,$21A6
60-
.word $21C6,$21E6,$2206,$2226
61-
.word $2246,$2266,$2286,$22A6
62-
.word $22C6,$22E6,$2306,$2326
58+
.word $20CC,$20EC,$210C,$212C
59+
.word $214C,$216C,$218C,$21AC
60+
.word $21CC,$21EC,$220C,$222C
61+
.word $224C,$226C,$228C,$22AC
62+
.word $22CC,$22EC,$230C,$232C
6363

6464
copyPlayfieldRowToVRAM:
6565
ldx vramRow
@@ -76,8 +76,6 @@ copyPlayfieldRowToVRAM:
7676
dex
7777

7878
lda vramPlayfieldRows,x
79-
clc
80-
adc #$06
8179
sta PPUADDR
8280
@copyRow:
8381
ldx #$0A

src/playstate/preparenext.asm

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -44,36 +44,18 @@ playState_prepareNext:
4444
lda linecapState
4545
cmp #LINECAP_HALT
4646
bne @linecapHaltEnd
47-
lda #'G'
48-
sta playfield+$67
49-
sta playfield+$68
50-
lda #$28
51-
sta playfield+$6A
52-
lda #0
53-
sta vramRow
54-
jsr typeBEndingStuffEnd
55-
rts
47+
ldx #<haltEndingGraphic
48+
ldy #>haltEndingGraphic
49+
jmp copyGraphic
5650
@linecapHaltEnd:
57-
5851
jsr practisePrepareNext
5952
inc playState
6053
rts
61-
6254
typeBEndingStuff:
63-
; copy success graphic
64-
ldx #$5C
65-
ldy #$0
66-
@copySuccessGraphic:
67-
lda typebSuccessGraphic,y
68-
cmp #$80
69-
beq @graphicCopied
70-
sta playfield,x
71-
inx
72-
iny
73-
jmp @copySuccessGraphic
74-
@graphicCopied:
75-
lda #$00
76-
sta vramRow
55+
ldx #<typebSuccessGraphic
56+
ldy #>typebSuccessGraphic
57+
copyGraphic:
58+
jsr copyGraphicToPlayfield
7759

7860
typeBEndingStuffEnd:
7961
; play sfx
@@ -98,5 +80,30 @@ sleep_gameplay_nextSprite:
9880
bne @loop
9981
rts
10082

83+
copyGraphicToPlayfield:
84+
lda #$09 ; default row
85+
copyGraphicToPlayfieldAtCustomRow:
86+
stx generalCounter
87+
sty generalCounter2
88+
tax
89+
lda multBy10Table,x
90+
clc
91+
adc #$02 ; indent
92+
tax
93+
ldy #$00
94+
@copySuccessGraphic:
95+
lda (generalCounter),y
96+
beq @graphicCopied
97+
sta playfield,x
98+
inx
99+
iny
100+
bne @copySuccessGraphic
101+
@graphicCopied: ; 0 in accumulator
102+
sta vramRow
103+
rts
104+
105+
; $28 is ! in game tileset
106+
haltEndingGraphic:
107+
.byte $FF,"G","G",$FF,$28,$00
101108
typebSuccessGraphic:
102-
.byte $17,$12,$0C,$0E,$FF,$28,$80
109+
.byte "N","I","C","E",$FF,$28,$00

0 commit comments

Comments
 (0)