Edit status bar text
- Removed debug infos (commented out) - Added score label
This commit is contained in:
parent
a1382611bc
commit
0932566285
22
snake.asm
22
snake.asm
@ -132,6 +132,9 @@ colorshade: ; a shade from dark-gray to bright yellow, and vice-versa (40 column
|
|||||||
BYTE #11,#11,#11,#11,#11,#12,#12,#12,#12,#12,#5,#5,#5
|
BYTE #11,#11,#11,#11,#11,#12,#12,#12,#12,#12,#5,#5,#5
|
||||||
BYTE #13,#13,#13,#13,#7,#7,#7,#7,#7,#7
|
BYTE #13,#13,#13,#13,#7,#7,#7,#7,#7,#7
|
||||||
BYTE #13,#13,#13,#13,#5,#5,#5,#12,#12,#12,#12,#12,#11,#11,#11,#11,#11
|
BYTE #13,#13,#13,#13,#5,#5,#5,#12,#12,#12,#12,#12,#11,#11,#11,#11,#11
|
||||||
|
scoreString:
|
||||||
|
BYTE "POINTS"
|
||||||
|
BYTE #0
|
||||||
|
|
||||||
; List
|
; List
|
||||||
; ----------------------------------------------------------------------
|
; ----------------------------------------------------------------------
|
||||||
@ -249,6 +252,13 @@ upperbarLoop:
|
|||||||
cpx #$ff
|
cpx #$ff
|
||||||
bne upperbarLoop
|
bne upperbarLoop
|
||||||
|
|
||||||
|
; Set upper bar text
|
||||||
|
lda #<scoreString
|
||||||
|
sta printStatusString
|
||||||
|
lda #>scoreString
|
||||||
|
sta printStatusString + 1
|
||||||
|
jsr printStatus
|
||||||
|
|
||||||
; Init game variables
|
; Init game variables
|
||||||
lda #FOOD_TILE
|
lda #FOOD_TILE
|
||||||
sta $500 ; Put first piece of food
|
sta $500 ; Put first piece of food
|
||||||
@ -702,12 +712,12 @@ genFoodY: ; calculate `random` modulo 22 (22 = SCREEN_H - 1)
|
|||||||
beq genFood
|
beq genFood
|
||||||
foodOK:
|
foodOK:
|
||||||
; debug -- print choosen X,Y for food
|
; debug -- print choosen X,Y for food
|
||||||
ldy #$18
|
; ldy #$18
|
||||||
lda calcTileX
|
; lda calcTileX
|
||||||
jsr printByte
|
; jsr printByte
|
||||||
ldy #$1b
|
; ldy #$1b
|
||||||
lda calcTileY
|
; lda calcTileY
|
||||||
jsr printByte
|
; jsr printByte
|
||||||
|
|
||||||
ldy #0
|
ldy #0
|
||||||
jsr calcTileMem ; calc food address in memory
|
jsr calcTileMem ; calc food address in memory
|
||||||
|
Loading…
Reference in New Issue
Block a user