mirror of
https://github.com/robmcmullen/fujirun.git
synced 2025-08-09 22:25:19 +00:00
Added game over text
This commit is contained in:
5
logic.s
5
logic.s
@@ -97,8 +97,9 @@ evaluate_status nop
|
|||||||
sta actor_active,x
|
sta actor_active,x
|
||||||
rts
|
rts
|
||||||
|
|
||||||
?game_over nop
|
?game_over ldx #$ff
|
||||||
rts
|
txs
|
||||||
|
jmp check_restart
|
||||||
|
|
||||||
?alive lda #1
|
?alive lda #1
|
||||||
sta actor_active,x
|
sta actor_active,x
|
||||||
|
34
main.s
34
main.s
@@ -142,10 +142,39 @@ start nop
|
|||||||
|
|
||||||
;jsr clrscr
|
;jsr clrscr
|
||||||
jsr init_once
|
jsr init_once
|
||||||
jsr title_screen
|
|
||||||
|
restart jsr title_screen
|
||||||
jsr init_game
|
jsr init_game
|
||||||
jsr game_loop
|
jsr game_loop
|
||||||
|
|
||||||
|
check_restart ldx #34
|
||||||
|
ldy player_score_row
|
||||||
|
lda #<game_text
|
||||||
|
sta scratch_ptr
|
||||||
|
lda #>game_text
|
||||||
|
sta scratch_ptr+1
|
||||||
|
jsr printstr
|
||||||
|
ldx #35
|
||||||
|
ldy player_lives_row
|
||||||
|
lda #<over_text
|
||||||
|
sta scratch_ptr
|
||||||
|
lda #>over_text
|
||||||
|
sta scratch_ptr+1
|
||||||
|
jsr printstr
|
||||||
|
jsr pageflip
|
||||||
|
|
||||||
|
lda KBDSTROBE
|
||||||
|
?1 lda KEYBOARD
|
||||||
|
bpl ?1
|
||||||
|
lda KBDSTROBE
|
||||||
|
jmp restart
|
||||||
|
|
||||||
|
game_text .byte "GAME ",0
|
||||||
|
over_text .byte "OVER",0
|
||||||
|
|
||||||
|
forever
|
||||||
|
jmp forever
|
||||||
|
|
||||||
init_once
|
init_once
|
||||||
jsr init_screen_once
|
jsr init_screen_once
|
||||||
jsr init_actors_once
|
jsr init_actors_once
|
||||||
@@ -156,9 +185,6 @@ init_once
|
|||||||
bne ?1
|
bne ?1
|
||||||
rts
|
rts
|
||||||
|
|
||||||
forever
|
|
||||||
jmp forever
|
|
||||||
|
|
||||||
clrscr
|
clrscr
|
||||||
lda #0
|
lda #0
|
||||||
sta clr1+1
|
sta clr1+1
|
||||||
|
Reference in New Issue
Block a user