duke: update level end code

This commit is contained in:
Vince Weaver 2020-12-15 11:20:23 -05:00
parent db9eaa4932
commit 724ea17c9d
4 changed files with 51 additions and 1 deletions

View File

@ -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 quit_yn.s text_drawbox.s \
print_help.s gr_fast_clear.s quit_yn.s text_drawbox.s level_end.s \
graphics/duke_graphics.inc \
maps/level1_map.lzsa \
status_bar.s draw_duke.s move_duke.s gr_putsprite_crop.s \

View File

@ -199,6 +199,7 @@ done_with_duke:
.include "text_drawbox.s"
.include "print_help.s"
.include "quit_yn.s"
.include "level_end.s"
.include "draw_duke.s"
.include "move_duke.s"

48
duke/level_end.s Normal file
View File

@ -0,0 +1,48 @@
; Print bonuses
level_end:
bit KEYRESET ; clear keyboard
bit SET_TEXT
lda #' '|$80
sta clear_all_color+1
jsr clear_all
lda #12
sta drawbox_x1
lda #26
sta drawbox_x2
lda #8
sta drawbox_y1
lda #12
sta drawbox_y2
jsr drawbox
jsr normal_text
lda #<bonus_text
sta OUTL
lda #>bonus_text
sta OUTH
jsr move_and_print_list
jsr page_flip
level_end_wait:
lda KEYPRESS
bpl level_end_wait
bit KEYRESET
really_end_level:
lda #NEXT_LEVEL
sta LEVEL_OVER
; FIXME: point to next level
lda #LOAD_TITLE
sta WHICH_LOAD
rts
bonus_text:
.byte 14,10,"BONUS: NONE",0
.byte 255

View File

@ -128,6 +128,7 @@ GRID_PAGE = $DF
ANIMATE_FRAME = $E0
LEVEL_OVER = $E1
GAME_OVER = $FF
NEXT_LEVEL = $01
LOCATIONS_L = $E2
LOCATIONS_H = $E3