diff --git a/actors.s b/actors.s index d6228ff..c73018e 100644 --- a/actors.s +++ b/actors.s @@ -3,6 +3,7 @@ level_speed_l .byte 255, 200, 210, 220, 230, 240 ;# increment of fractional pixe level_speed_h .byte 2, 2, 2, 2, 2, 2 ;level_speed_h .byte 0, 0, 0, 0, 0, 0 player_score_row .byte 2, 7, 12, 17 +player_lives_row .byte 3, 8, 13, 18 player_score_l .byte 0, 0, 0, 0 player_score_m .byte 0, 0, 0, 0 player_score_h .byte 0, 0, 0, 0 @@ -112,8 +113,8 @@ GAME_OVER = 255 ; ;# Scores ; -DOT_SCORE = $05 -box_score .byte 0, $40, $80, $120, $160, $200, $240 +DOT_SCORE = $01 +box_score .byte 0, $20, $40, $60, $80, $100, $120 add_score nop sed diff --git a/background.s b/background.s index a4237ae..4201861 100644 --- a/background.s +++ b/background.s @@ -200,9 +200,11 @@ init_panel nop bne ?3 ?4 ldx #0 - jsr update_score + jsr print_score + jsr print_lives inx - jsr update_score + jsr print_score + jsr print_lives rts player1_text .byte "PLAYER1", 0 @@ -221,6 +223,39 @@ player2_text .byte "PLAYER2", 0 ; c = " " ; pad.addch(row, col, ord(c)) ; i += 1 +update_lives nop + lda #MAZE_SCORE_COL + sta c + lda player_lives_row,x + sta r + lda #6 + sta size + jsr damage_string + +print_lives nop + ldy player_lives_row,x + jsr mazerow + lda player_lives,x + cmp #6 + bcc ?ok + lda #6 +?ok sta scratch_col + lda #40 + sec + sbc scratch_col + sta scratch_col + ldy #MAZE_SCORE_COL +?loop cpy scratch_col + bcc ?blank + lda #'*' + bne ?show +?blank lda #0 +?show sta (mazeaddr),y + iny + cpy #40 + bcc ?loop + rts + print_hex pha stx param_x @@ -241,6 +276,15 @@ print_hex pha ldx param_x rts +print_low_nibble stx param_x + and #$0f + tax + lda hexdigit,x + sta (mazeaddr),y + iny + ldx param_x + rts + ; def update_score(): update_score nop @@ -257,7 +301,7 @@ print_score nop jsr mazerow ldy #MAZE_SCORE_COL lda player_score_h,x - jsr print_hex + jsr print_low_nibble lda player_score_m,x jsr print_hex lda player_score_l,x diff --git a/fatfont128.dat b/fatfont128.dat index e70c492..c90aaf3 100644 Binary files a/fatfont128.dat and b/fatfont128.dat differ diff --git a/maze.s b/maze.s index 196d893..7864175 100644 --- a/maze.s +++ b/maze.s @@ -54,7 +54,7 @@ SCREEN_ROWS = 24 MAZE_LEFT_COL = 1 MAZE_RIGHT_COL = 31 MAZE_PANEL_COL = 33 -MAZE_SCORE_COL = 34 +MAZE_SCORE_COL = 35 ; 5 digits for score SCREEN_COLS = 40 ;# Orbiter goes around the outside border, but not through the maze