mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-27 02:31:00 +00:00
duke: escape now quits to title
This commit is contained in:
parent
05eb07de14
commit
8a222dd57a
@ -42,7 +42,7 @@ DUKE: duke.o
|
||||
ld65 -o DUKE duke.o -C ../linker_scripts/apple2_2000.inc
|
||||
|
||||
duke.o: duke.s zp.inc hardware.inc duke.s \
|
||||
print_help.s gr_fast_clear.s \
|
||||
print_help.s gr_fast_clear.s quit_yn.s \
|
||||
graphics/duke_graphics.inc \
|
||||
maps/level1_map.lzsa \
|
||||
status_bar.s draw_duke.s move_duke.s gr_putsprite_crop.s \
|
||||
|
11
duke/TODO
11
duke/TODO
@ -1,3 +1,14 @@
|
||||
door
|
||||
~~~~
|
||||
door animation
|
||||
sad noise wehn not have key
|
||||
key in inventory
|
||||
key pickup noise
|
||||
NO BONUS message
|
||||
back to title screen
|
||||
are you sure message on quit
|
||||
|
||||
|
||||
sound:
|
||||
~~~~~~
|
||||
click on jump
|
||||
|
@ -5,7 +5,7 @@
|
||||
; Zero Page
|
||||
.include "zp.inc"
|
||||
.include "hardware.inc"
|
||||
|
||||
.include "common_defines.inc"
|
||||
|
||||
TILES = $9000
|
||||
BIG_TILEMAP = $9400
|
||||
@ -155,7 +155,7 @@ no_frame_oflo:
|
||||
;===========================
|
||||
|
||||
lda LEVEL_OVER
|
||||
bpl do_duke_loop
|
||||
beq do_duke_loop
|
||||
|
||||
jmp done_with_duke
|
||||
|
||||
@ -174,7 +174,8 @@ do_duke_loop:
|
||||
done_with_duke:
|
||||
bit KEYRESET ; clear keypress
|
||||
|
||||
jmp done_with_duke
|
||||
rts ; exit back
|
||||
|
||||
|
||||
;==========================
|
||||
; includes
|
||||
@ -195,6 +196,7 @@ done_with_duke:
|
||||
.include "keyboard.s"
|
||||
.include "joystick.s"
|
||||
.include "print_help.s"
|
||||
.include "quit_yn.s"
|
||||
|
||||
.include "draw_duke.s"
|
||||
.include "move_duke.s"
|
||||
|
@ -205,7 +205,7 @@ space_pressed:
|
||||
|
||||
check_return:
|
||||
cmp #13
|
||||
bne done_keypress
|
||||
bne check_escape
|
||||
|
||||
return_pressed:
|
||||
|
||||
@ -245,6 +245,16 @@ laser_assign:
|
||||
done_return:
|
||||
jmp no_keypress
|
||||
|
||||
check_escape:
|
||||
cmp #27
|
||||
bne done_keypress
|
||||
|
||||
jsr print_quit
|
||||
|
||||
jmp done_keypress
|
||||
|
||||
|
||||
|
||||
done_keypress:
|
||||
no_keypress:
|
||||
bit KEYRESET
|
||||
|
46
duke/quit_yn.s
Normal file
46
duke/quit_yn.s
Normal file
@ -0,0 +1,46 @@
|
||||
; Quit? Are you sure?
|
||||
|
||||
print_quit:
|
||||
bit KEYRESET ; clear keyboard
|
||||
bit SET_TEXT
|
||||
|
||||
jsr normal_text
|
||||
|
||||
lda #' '|$80
|
||||
sta clear_all_color+1
|
||||
jsr clear_all
|
||||
|
||||
lda #<quit_text
|
||||
sta OUTL
|
||||
lda #>quit_text
|
||||
sta OUTH
|
||||
jsr move_and_print_list
|
||||
|
||||
jsr page_flip
|
||||
|
||||
query_quit:
|
||||
lda KEYPRESS
|
||||
bpl query_quit
|
||||
bit KEYRESET
|
||||
|
||||
cmp #'Y'|$80
|
||||
beq really_quit
|
||||
cmp #'y'|$80
|
||||
beq really_quit
|
||||
|
||||
bit SET_GR
|
||||
rts
|
||||
|
||||
really_quit:
|
||||
lda #GAME_OVER
|
||||
sta LEVEL_OVER
|
||||
|
||||
lda #LOAD_TITLE
|
||||
sta WHICH_LOAD
|
||||
|
||||
rts
|
||||
|
||||
quit_text:
|
||||
.byte 8,10,"ARE YOU SURE YOU WANT TO",0
|
||||
.byte 14,11,"QUIT? (Y/N)",0
|
||||
.byte 255
|
@ -127,6 +127,7 @@ SOUND_STATUS = $DE
|
||||
GRID_PAGE = $DF
|
||||
ANIMATE_FRAME = $E0
|
||||
LEVEL_OVER = $E1
|
||||
GAME_OVER = $FF
|
||||
LOCATIONS_L = $E2
|
||||
LOCATIONS_H = $E3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user