diff --git a/games/keen/Makefile b/games/keen/Makefile index 5c039eff..39ab93f2 100644 --- a/games/keen/Makefile +++ b/games/keen/Makefile @@ -50,7 +50,7 @@ keen_title.o: keen_title.s zp.inc hardware.inc \ KEEN_MARS: keen_mars.o ld65 -o KEEN_MARS keen_mars.o -C ../../linker_scripts/apple2_2000.inc -keen_mars.o: keen_mars.s zp.inc hardware.inc \ +keen_mars.o: keen_mars.s zp.inc hardware.inc game_over.s \ sound_effects.s speaker_tone.s print_help.s \ maps/mars_map.gr.zx02 graphics/parts.gr.zx02 ca65 -o keen_mars.o keen_mars.s -l keen_mars.lst diff --git a/games/keen/TODO b/games/keen/TODO index 8814916f..e77231db 100644 --- a/games/keen/TODO +++ b/games/keen/TODO @@ -6,7 +6,7 @@ lo-res version + check raygun count before shooting + fix background tile when get item + fix keybindings/help menu -+ play jingle entering/leaving level ++ better start/stop level music + implement leaving level + animate death + game over screen if out of lives @@ -14,3 +14,13 @@ lo-res version hi-res version ~~~~~~~~~~~~~~ + + +mars +~~~~ ++ convert to full tilemap ++ mark completed levels + +title +~~~~~ ++ actual menu? + diff --git a/games/keen/game_over.s b/games/keen/game_over.s new file mode 100644 index 00000000..344333b3 --- /dev/null +++ b/games/keen/game_over.s @@ -0,0 +1,47 @@ +; GAME OVER MAN + +game_over: + bit KEYRESET ; clear keyboard + bit SET_TEXT + + lda #' '|$80 + sta clear_all_color+1 + jsr clear_all + + lda #6 + sta drawbox_x1 + lda #33 + sta drawbox_x2 + lda #8 + sta drawbox_y1 + lda #13 + sta drawbox_y2 + jsr drawbox + + jsr normal_text + + lda #game_over_text + sta OUTH + jsr move_and_print_list + + jsr page_flip + +query_game_over: + lda KEYPRESS + bpl query_game_over + bit KEYRESET + +really_game_over: + lda #GAME_OVER + sta LEVEL_OVER + + lda #LOAD_TITLE + sta WHICH_LOAD + + rts + +game_over_text: +.byte 15,10,"GAME OVER",0 +.byte 255 diff --git a/games/keen/keen_mars.s b/games/keen/keen_mars.s index 2c8dbc1a..c5c17856 100644 --- a/games/keen/keen_mars.s +++ b/games/keen/keen_mars.s @@ -1,6 +1,6 @@ ; Keen MARS main map -; TODO: should make it scrollable, etc +; TODO: should make it scrollable, etc / tilemap ; by deater (Vince Weaver) @@ -9,7 +9,7 @@ .include "hardware.inc" .include "common_defines.inc" -keen_start: +mars_start: ;=================== ; init screen jsr TEXT @@ -23,6 +23,9 @@ keen_start: jsr clear_all ; avoid grey stripes at load + lda KEENS + bmi return_to_title + ;===================== ; init vars ;===================== @@ -126,12 +129,16 @@ do_keen_loop: done_with_keen: + cmp #GAME_OVER + beq return_to_title + + ; else, start level + bit KEYRESET ; clear keypress ; sound effect jsr entry_music -; jsr exit_music lda #LOAD_KEEN1 sta WHICH_LOAD @@ -139,6 +146,18 @@ done_with_keen: rts ; exit back +return_to_title: + + jsr game_over + + lda #LOAD_TITLE + sta WHICH_LOAD + + rts + + + + ;========================== ; includes ;========================== @@ -165,7 +184,8 @@ parts_zx02: .include "text_drawbox.s" .include "print_help.s" .include "quit_yn.s" -; .include "level_end.s" + .include "game_over.s" + .include "sound_effects.s" .include "speaker_tone.s"