From 0932566285477ba838fc37ff5441fe5a38374b0b Mon Sep 17 00:00:00 2001 From: giomba Date: Wed, 5 Sep 2018 23:10:55 +0200 Subject: [PATCH] Edit status bar text - Removed debug infos (commented out) - Added score label --- snake.asm | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/snake.asm b/snake.asm index 6ff2dbd..bdb882e 100644 --- a/snake.asm +++ b/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 #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 +scoreString: + BYTE "POINTS" + BYTE #0 ; List ; ---------------------------------------------------------------------- @@ -249,6 +252,13 @@ upperbarLoop: cpx #$ff bne upperbarLoop + ; Set upper bar text + lda #scoreString + sta printStatusString + 1 + jsr printStatus + ; Init game variables lda #FOOD_TILE sta $500 ; Put first piece of food @@ -702,12 +712,12 @@ genFoodY: ; calculate `random` modulo 22 (22 = SCREEN_H - 1) beq genFood foodOK: ; debug -- print choosen X,Y for food - ldy #$18 - lda calcTileX - jsr printByte - ldy #$1b - lda calcTileY - jsr printByte + ; ldy #$18 + ; lda calcTileX + ; jsr printByte + ; ldy #$1b + ; lda calcTileY + ; jsr printByte ldy #0 jsr calcTileMem ; calc food address in memory