Finish the sprites for the flea and the 300, 600 and 900 score notices.

This commit is contained in:
Jeremy Rand 2020-06-18 23:35:20 -04:00
parent eb480d76d8
commit 936b7315ce
2 changed files with 741 additions and 7 deletions

View File

@ -6,6 +6,17 @@
;Copyright © 2020 Jeremy Rand. All rights reserved.
;
;
; The actual game is a 30x30 grid of 8x8 tiles.
; The GS can do 30 wide with 10 tiles to spare.
; The GS can only do 25 tiles tall though. So,
; the screen will be 30 wide pushed to the right-
; most side. The left side will have the score,
; count of lives and the high score. Rather than
; having them at the top, running that info on
; the side will give us more vertical height for
; more on-screen action.
case on
mcopy game.macros
keep game
@ -13,7 +24,7 @@
game start
jsl setupScreen
lda #0
lda colourPalette
jsl setColour
ldx #$2003
@ -175,6 +186,24 @@ game start
ldx #$3463
jsl flea1
ldx #$346b
jsl flea2
ldx #$3473
jsl flea3
ldx #$347b
jsl flea4
ldx #$3483
jsl score300
ldx #$348b
jsl score600
ldx #$3493
jsl score900
jsl waitForKey
rtl
@ -219,14 +248,30 @@ nextWord anop
waitForKey entry
short i,m
loop anop
loop2 short i,m
loop1 anop
lda $e0c000
bpl loop
bpl loop1
sta $e0c010
long i,m
rtl
and #$007f
cmp #$0051
beq quit
cmp #$0071
beq quit
cmp #$001b
beq quit
lda colourPalette
inc a
cmp #$000e
blt skip
lda #$0000
skip sta colourPalette
jsl setColour
bra loop2
quit rtl
backupStack dc i2'0'
colourPalette dc i2'0'
end

View File

@ -3488,7 +3488,7 @@ flea1 entry
sta $9f,s
tsc
adc #$00A4
adc #$00a4
tcs
phd
phd
@ -3504,7 +3504,7 @@ flea1 entry
sta $a1,s
tsc
adc #$00A4
adc #$00a4
tcs
pea $ccac
@ -3545,6 +3545,695 @@ flea1 entry
_spriteFooter
flea2 entry
_spriteHeader
; $a - Green
; $b - Red
; $c - Off-white
;
; ....|..OO|O...
; ....|.ROO|OO..
; ....|RROO|OOO.
; ...O|OOOO|OOOO
; ...O|OO.G|.OOO
; ....|..G.|.GOO
; ....|.G..|G..G
; ....|.G.G|..G.
;
lda #$cccc
tcd ; Off-white, Off-white, Off-white, Off-white
dex
dex
dex
dex
txa
tcs
clc
lda $1,s
and #$00ff
ora #$cc00
sta $1,s
lda $3,s
and #$ff0f
ora #$00c0
sta $3,s
lda $a1,s
and #$00f0
ora #$cc0b
sta $a1,s
lda $a3,s
and #$ff00
ora #$00cc
sta $a3,s
tsc
adc #$0142
tcs
pea $ccbb
lda $3,s
and #$0f00
ora #$c0cc
sta $3,s
lda $9f,s
and #$f0ff
ora #$0c00
sta $9f,s
tsc
adc #$00a4
tcs
phd
phd
lda $9f,s
and #$f0ff
ora #$0c00
sta $9f,s
lda $a1,s
and #$f000
ora #$0acc
sta $a1,s
lda $a3,s
and #$00f0
ora #$cc0c
sta $a3,s
tsc
adc #$0140
tcs
lda $1,s
and #$0fff
ora #$a000
sta $1,s
lda $3,s
and #$00f0
ora #$cc0a
sta $3,s
tsc
adc #$00a0
tcs
lda $1,s
and #$fff0
ora #$000a
sta $1,s
lda $3,s
and #$f00f
ora #$0aa0
sta $3,s
lda $a1,s
and #$f0f0
ora #$0a0a
sta $a1,s
lda $a3,s
and #$0fff
ora #$a000
sta $a3,s
_spriteFooter
flea3 entry
_spriteHeader
; $a - Green
; $b - Red
; $c - Off-white
;
; ....|..OO|O...
; ....|.ROO|OO..
; ....|RROO|OOO.
; ...O|OOOO|OOOO
; ...O|OO.G|.OOO
; ....|..G.|G.OO
; ....|..G.|.G.G
; ....|...G|..G.
;
lda #$cccc
tcd ; Off-white, Off-white, Off-white, Off-white
dex
dex
dex
dex
txa
tcs
clc
lda $1,s
and #$00ff
ora #$cc00
sta $1,s
lda $3,s
and #$ff0f
ora #$00c0
sta $3,s
lda $a1,s
and #$00f0
ora #$cc0b
sta $a1,s
lda $a3,s
and #$ff00
ora #$00cc
sta $a3,s
tsc
adc #$0142
tcs
pea $ccbb
lda $3,s
and #$0f00
ora #$c0cc
sta $3,s
lda $9f,s
and #$f0ff
ora #$0c00
sta $9f,s
tsc
adc #$00a4
tcs
phd
phd
lda $9f,s
and #$f0ff
ora #$0c00
sta $9f,s
lda $a1,s
and #$f000
ora #$0acc
sta $a1,s
lda $a3,s
and #$00f0
ora #$cc0c
sta $a3,s
tsc
adc #$0140
tcs
lda $1,s
and #$0fff
ora #$a000
sta $1,s
lda $3,s
and #$000f
ora #$cca0
sta $3,s
tsc
adc #$00a0
tcs
lda $1,s
and #$0fff
ora #$a000
sta $1,s
lda $3,s
and #$f0f0
ora #$0a0a
sta $3,s
lda $a1,s
and #$f0ff
ora #$0a00
sta $a1,s
lda $a3,s
and #$0fff
ora #$a000
sta $a3,s
_spriteFooter
flea4 entry
_spriteHeader
; $a - Green
; $b - Red
; $c - Off-white
;
; ....|..OO|O...
; ....|.ROO|OO..
; ....|RROO|OOO.
; ...O|OOOO|OOOO
; ...O|OOG.|GOOO
; ....|..G.|G.OO
; ....|..G.|.G.G
; ....|...G|.G.G
;
lda #$cccc
tcd ; Off-white, Off-white, Off-white, Off-white
dex
dex
dex
dex
txa
tcs
clc
lda $1,s
and #$00ff
ora #$cc00
sta $1,s
lda $3,s
and #$ff0f
ora #$00c0
sta $3,s
lda $a1,s
and #$00f0
ora #$cc0b
sta $a1,s
lda $a3,s
and #$ff00
ora #$00cc
sta $a3,s
tsc
adc #$0142
tcs
pea $ccbb
lda $3,s
and #$0f00
ora #$c0cc
sta $3,s
lda $9f,s
and #$f0ff
ora #$0c00
sta $9f,s
tsc
adc #$00a4
tcs
phd
phd
lda $9f,s
and #$f0ff
ora #$0c00
sta $9f,s
lda $a1,s
and #$0f00
ora #$a0cc
sta $a1,s
tsc
adc #$00a4
tcs
pea $ccac
lda $9f,s
and #$0fff
ora #$a000
sta $9f,s
lda $a1,s
and #$000f
ora #$cca0
sta $a1,s
tsc
adc #$013e
tcs
lda $1,s
and #$0fff
ora #$a000
sta $1,s
lda $3,s
and #$f0f0
ora #$0a0a
sta $3,s
lda $a1,s
and #$f0ff
ora #$0a00
sta $a1,s
lda $a3,s
and #$f0f0
ora #$0a0a
sta $a3,s
_spriteFooter
score300 entry
_spriteHeader
; $7 - Green
; $8 - Red
; $9 - Off-white
;
; ....|....|....
; ....|....|....
; .OOO|.OOO|.OOO
; ...O|.O.O|.O.O
; .OOO|.O.O|.O.O
; ...O|.O.O|.O.O
; .OOO|.OOO|.OOO
; ....|....|....
;
clc
txa
adc #$013a
tcs
lda $1,s
and #$00f0
ora #$9909
sta $1,s
lda $3,s
and #$00f0
ora #$9909
sta $3,s
lda $5,s
and #$00f0
ora #$9909
sta $5,s
lda $a1,s
and #$f0ff
ora #$0900
sta $a1,s
lda $a3,s
and #$f0f0
ora #$0909
sta $a3,s
lda $a5,s
and #$f0f0
ora #$0909
sta $a5,s
tsc
adc #$0140
tcs
lda $1,s
and #$00f0
ora #$9909
sta $1,s
lda $3,s
and #$f0f0
ora #$0909
sta $3,s
lda $5,s
and #$f0f0
ora #$0909
sta $5,s
lda $a1,s
and #$f0ff
ora #$0900
sta $a1,s
lda $a3,s
and #$f0f0
ora #$0909
sta $a3,s
lda $a5,s
and #$f0f0
ora #$0909
sta $a5,s
tsc
adc #$0140
tcs
lda $1,s
and #$00f0
ora #$9909
sta $1,s
lda $3,s
and #$00f0
ora #$9909
sta $3,s
lda $5,s
and #$00f0
ora #$9909
sta $5,s
_spriteFooter
score600 entry
_spriteHeader
; $7 - Green
; $8 - Red
; $9 - Off-white
;
; ....|....|....
; ....|....|....
; .OOO|.OOO|.OOO
; .O..|.O.O|.O.O
; .OOO|.O.O|.O.O
; .O.O|.O.O|.O.O
; .OOO|.OOO|.OOO
; ....|....|....
;
clc
txa
adc #$013a
tcs
lda $1,s
and #$00f0
ora #$9909
sta $1,s
lda $3,s
and #$00f0
ora #$9909
sta $3,s
lda $5,s
and #$00f0
ora #$9909
sta $5,s
lda $a1,s
and #$fff0
ora #$0009
sta $a1,s
lda $a3,s
and #$f0f0
ora #$0909
sta $a3,s
lda $a5,s
and #$f0f0
ora #$0909
sta $a5,s
tsc
adc #$0140
tcs
lda $1,s
and #$00f0
ora #$9909
sta $1,s
lda $3,s
and #$f0f0
ora #$0909
sta $3,s
lda $5,s
and #$f0f0
ora #$0909
sta $5,s
lda $a1,s
and #$f0f0
ora #$0909
sta $a1,s
lda $a3,s
and #$f0f0
ora #$0909
sta $a3,s
lda $a5,s
and #$f0f0
ora #$0909
sta $a5,s
tsc
adc #$0140
tcs
lda $1,s
and #$00f0
ora #$9909
sta $1,s
lda $3,s
and #$00f0
ora #$9909
sta $3,s
lda $5,s
and #$00f0
ora #$9909
sta $5,s
_spriteFooter
score900 entry
_spriteHeader
; $7 - Green
; $8 - Red
; $9 - Off-white
;
; ....|....|....
; ....|....|....
; .OOO|.OOO|.OOO
; .O.O|.O.O|.O.O
; .OOO|.O.O|.O.O
; ...O|.O.O|.O.O
; .OOO|.OOO|.OOO
; ....|....|....
;
clc
txa
adc #$013a
tcs
lda $1,s
and #$00f0
ora #$9909
sta $1,s
lda $3,s
and #$00f0
ora #$9909
sta $3,s
lda $5,s
and #$00f0
ora #$9909
sta $5,s
lda $a1,s
and #$f0f0
ora #$0909
sta $a1,s
lda $a3,s
and #$f0f0
ora #$0909
sta $a3,s
lda $a5,s
and #$f0f0
ora #$0909
sta $a5,s
tsc
adc #$0140
tcs
lda $1,s
and #$00f0
ora #$9909
sta $1,s
lda $3,s
and #$f0f0
ora #$0909
sta $3,s
lda $5,s
and #$f0f0
ora #$0909
sta $5,s
lda $a1,s
and #$f0ff
ora #$0900
sta $a1,s
lda $a3,s
and #$f0f0
ora #$0909
sta $a3,s
lda $a5,s
and #$f0f0
ora #$0909
sta $a5,s
tsc
adc #$0140
tcs
lda $1,s
and #$00f0
ora #$9909
sta $1,s
lda $3,s
and #$00f0
ora #$9909
sta $3,s
lda $5,s
and #$00f0
ora #$9909
sta $5,s
_spriteFooter
backupStack dc i2'0'
end