From 99867d968c37c99eb8dbffbbfd86e368bdd7025b Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Wed, 20 Mar 2019 11:53:13 -0400 Subject: [PATCH] ootw: possible to end level1 and progress to level2 --- ootw/TODO | 7 +++-- ootw/ootw.s | 17 +++++++++-- ootw/ootw_c2.s | 3 -- ootw/ootw_graphics/l2intro/Makefile | 18 ++++++++++++ .../{endl1 => l2intro}/ootw2_cage.png | Bin ootw/ootw_mesa.s | 27 ++++++++++++++---- 6 files changed, 59 insertions(+), 13 deletions(-) create mode 100644 ootw/ootw_graphics/l2intro/Makefile rename ootw/ootw_graphics/{endl1 => l2intro}/ootw2_cage.png (100%) diff --git a/ootw/TODO b/ootw/TODO index 8a53a475..838d6396 100644 --- a/ootw/TODO +++ b/ootw/TODO @@ -6,6 +6,10 @@ KNOWN BUGS: TODO: ++ sprites that don't draw off edge of screen ++ Revamp movement + + movement -- note these are hard due to limitations of the Apple II keyboard + running: Missing one running frame + ability to jump @@ -44,10 +48,9 @@ rope_room: cutscenes: + death by beast -+ aliens shooting beast -+ aliens shooting physicist Level/Checkpoint #2: + Intro movie + Swing in the cage + Ability to pick up gun, with all that entails ++ Elevator ride, view of city? diff --git a/ootw/ootw.s b/ootw/ootw.s index 07254080..e94e6701 100644 --- a/ootw/ootw.s +++ b/ootw/ootw.s @@ -1,4 +1,4 @@ -; Ootw for Apple II Lores +; Ootw Level 1 for Apple II Lores ; by Vince "Deater" Weaver @@ -47,8 +47,21 @@ ootw: ;=========================== ; quit_level ;=========================== + lda GAME_OVER ; see why we quit + cmp #$ff + beq l1_quit_or_died -quit_level: + ;==================== + ; go to next level +l1_defeated: + lda #2 ; go to next level + sta WHICH_LOAD + rts + + ;======================== + ; print death message + ; then restart +l1_quit_or_died: jsr TEXT jsr HOME lda KEYRESET ; clear strobe diff --git a/ootw/ootw_c2.s b/ootw/ootw_c2.s index 08dc8067..a4290fa8 100644 --- a/ootw/ootw_c2.s +++ b/ootw/ootw_c2.s @@ -23,9 +23,6 @@ ootw_c2: lda #1 sta DIRECTION - lda #40 - sta BOULDER_Y - ;======================= ; Enter the game ;======================= diff --git a/ootw/ootw_graphics/l2intro/Makefile b/ootw/ootw_graphics/l2intro/Makefile new file mode 100644 index 00000000..27dccd71 --- /dev/null +++ b/ootw/ootw_graphics/l2intro/Makefile @@ -0,0 +1,18 @@ +include ../../../Makefile.inc + +PNG2RLE = ../../../gr-utils/png2rle +PNG2LZ4 = ../../../gr-utils/png2lz4 + +all: ootw_l2intro.inc + +##### + +ootw_l2intro.inc: $(PNG2RLE) \ + ootw2_cage.png + $(PNG2RLE) asm ootw2_cage.png intro_cage_rle > ootw_l2intro.inc + +##### + +clean: + rm -f *~ *.o *.lst *.lzz *.inc + diff --git a/ootw/ootw_graphics/endl1/ootw2_cage.png b/ootw/ootw_graphics/l2intro/ootw2_cage.png similarity index 100% rename from ootw/ootw_graphics/endl1/ootw2_cage.png rename to ootw/ootw_graphics/l2intro/ootw2_cage.png diff --git a/ootw/ootw_mesa.s b/ootw/ootw_mesa.s index 68018d5d..5703aaec 100644 --- a/ootw/ootw_mesa.s +++ b/ootw/ootw_mesa.s @@ -102,6 +102,14 @@ levelend_not_first: dec LEVELEND_PROGRESS dec LEVELEND_PROGRESS + bne not_beginning_of_end +beginning_of_end: + lda #5 + sta GAME_OVER + jmp l1_game_over_check + +not_beginning_of_end: + ldx LEVELEND_PROGRESS lda endl1_progression,X sta GBASL @@ -168,12 +176,19 @@ level1_ending: mesa_frame_no_oflo: - ; check if done this level - - lda GAME_OVER + ;======================================== + ;======================================== + ; check if at edge of screen or game over + ;======================================== + ;======================================== +l1_game_over_check: + lda GAME_OVER ; if not game over, skip ahead beq not_done_mesa - cmp #$ff ; check if dead + cmp #$ff ; check if died, if so exit + beq done_mesa + + cmp #$5 ; check if defeated, if so exit beq done_mesa ;==================== @@ -244,11 +259,11 @@ done_mesa: ;===================== ; long(er) wait - ; waits approximately ?? ms + ; waits approximately 10ms * X long_wait: lda #64 - jsr WAIT ; delay + jsr WAIT ; delay 1/2(26+27A+5A^2) us, 11,117 dex bne long_wait rts