2019-03-20 15:53:13 +00:00
|
|
|
; Ootw Level 1 for Apple II Lores
|
2019-01-17 21:58:19 +00:00
|
|
|
|
2019-01-18 16:33:23 +00:00
|
|
|
; by Vince "Deater" Weaver <vince@deater.net>
|
2019-01-13 06:10:44 +00:00
|
|
|
|
|
|
|
.include "zp.inc"
|
|
|
|
.include "hardware.inc"
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-01-16 03:44:57 +00:00
|
|
|
ootw:
|
2019-01-17 22:14:19 +00:00
|
|
|
; Initialize some variables
|
|
|
|
|
2019-01-16 03:44:57 +00:00
|
|
|
lda #0
|
2019-01-17 21:58:19 +00:00
|
|
|
sta GAME_OVER
|
2019-01-18 05:18:06 +00:00
|
|
|
sta EQUAKE_PROGRESS
|
|
|
|
sta EARTH_OFFSET
|
2019-03-15 16:28:46 +00:00
|
|
|
sta PHYSICIST_STATE
|
2019-01-20 06:02:41 +00:00
|
|
|
sta WHICH_CAVE
|
2019-01-25 02:41:01 +00:00
|
|
|
sta BEAST_OUT
|
2019-07-11 15:43:16 +00:00
|
|
|
sta ON_ELEVATOR
|
2019-08-17 05:34:23 +00:00
|
|
|
sta HAVE_GUN
|
2019-07-25 21:09:44 +00:00
|
|
|
|
2019-07-29 19:02:58 +00:00
|
|
|
;==========================
|
|
|
|
; Handle Underwater Arrival
|
|
|
|
;==========================
|
2019-07-25 21:09:44 +00:00
|
|
|
|
2019-08-20 04:28:47 +00:00
|
|
|
jsr ootw_c1_arrival
|
2019-07-25 21:09:44 +00:00
|
|
|
|
2019-07-28 04:09:30 +00:00
|
|
|
lda GAME_OVER
|
|
|
|
bmi end_c1
|
2019-07-25 21:09:44 +00:00
|
|
|
|
2019-07-29 19:02:58 +00:00
|
|
|
|
|
|
|
;==========================
|
|
|
|
; Exit the Pool
|
|
|
|
;==========================
|
|
|
|
|
2019-08-20 04:28:47 +00:00
|
|
|
jsr exit_pool
|
2019-07-29 19:02:58 +00:00
|
|
|
|
|
|
|
|
2019-07-25 21:09:44 +00:00
|
|
|
; Initialize some variables
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
sta GAME_OVER
|
|
|
|
sta EQUAKE_PROGRESS
|
|
|
|
sta EARTH_OFFSET
|
|
|
|
sta PHYSICIST_STATE
|
|
|
|
sta WHICH_CAVE
|
|
|
|
sta BEAST_OUT
|
|
|
|
sta ON_ELEVATOR
|
|
|
|
|
|
|
|
|
2019-03-16 20:21:41 +00:00
|
|
|
lda #1
|
|
|
|
sta BEFORE_SWING
|
|
|
|
|
2019-01-17 22:14:19 +00:00
|
|
|
lda #22
|
|
|
|
sta PHYSICIST_Y
|
|
|
|
lda #20
|
|
|
|
sta PHYSICIST_X
|
|
|
|
|
|
|
|
lda #1
|
|
|
|
sta DIRECTION
|
|
|
|
|
2019-01-18 05:27:32 +00:00
|
|
|
lda #40
|
|
|
|
sta BOULDER_Y
|
|
|
|
|
2019-01-18 20:16:37 +00:00
|
|
|
;=======================
|
|
|
|
; Initialize the slugs
|
|
|
|
;=======================
|
|
|
|
|
2019-01-21 04:46:05 +00:00
|
|
|
jsr init_slugs
|
2019-01-18 21:04:52 +00:00
|
|
|
|
2019-01-21 04:46:05 +00:00
|
|
|
;=======================
|
|
|
|
; Enter the game
|
|
|
|
;=======================
|
2019-01-18 21:04:52 +00:00
|
|
|
|
2019-08-19 20:20:28 +00:00
|
|
|
jsr ootw_pool
|
2019-08-19 14:32:10 +00:00
|
|
|
|
2019-01-16 03:44:57 +00:00
|
|
|
;===========================
|
|
|
|
; quit_level
|
|
|
|
;===========================
|
2019-07-28 04:09:30 +00:00
|
|
|
end_c1:
|
2019-03-20 15:53:13 +00:00
|
|
|
lda GAME_OVER ; see why we quit
|
|
|
|
cmp #$ff
|
|
|
|
beq l1_quit_or_died
|
|
|
|
|
|
|
|
;====================
|
|
|
|
; 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:
|
2019-01-16 03:44:57 +00:00
|
|
|
jsr TEXT
|
|
|
|
jsr HOME
|
|
|
|
lda KEYRESET ; clear strobe
|
|
|
|
|
2019-01-16 05:28:23 +00:00
|
|
|
lda #0
|
|
|
|
sta DRAW_PAGE
|
|
|
|
|
|
|
|
lda #<end_message
|
|
|
|
sta OUTL
|
|
|
|
lda #>end_message
|
|
|
|
sta OUTH
|
|
|
|
|
|
|
|
jsr move_and_print
|
|
|
|
jsr move_and_print
|
|
|
|
|
2019-01-16 03:44:57 +00:00
|
|
|
wait_loop:
|
|
|
|
lda KEYPRESS
|
|
|
|
bpl wait_loop
|
|
|
|
|
|
|
|
lda KEYRESET ; clear strobe
|
|
|
|
|
|
|
|
jmp ootw
|
|
|
|
|
|
|
|
|
2019-01-16 05:28:23 +00:00
|
|
|
end_message:
|
|
|
|
.byte 8,10,"PRESS RETURN TO CONTINUE",0
|
|
|
|
.byte 11,20,"ACCESS CODE: IH8S",0
|
2019-01-16 03:44:57 +00:00
|
|
|
|
2019-07-25 21:09:44 +00:00
|
|
|
; rooms
|
|
|
|
.include "ootw_c1_arrival.s"
|
2019-07-11 15:43:16 +00:00
|
|
|
.include "ootw_c1_rope.s"
|
|
|
|
.include "ootw_c1_pool.s"
|
|
|
|
.include "ootw_c1_cavern.s"
|
|
|
|
.include "ootw_c1_mesa.s"
|
2019-07-25 21:09:44 +00:00
|
|
|
|
|
|
|
; movement
|
2019-01-17 21:58:19 +00:00
|
|
|
.include "physicist.s"
|
2019-08-17 22:04:23 +00:00
|
|
|
.include "ootw_c1_sluggy.s"
|
2019-08-17 21:54:40 +00:00
|
|
|
.include "ootw_c1_beast.s"
|
2019-01-20 06:05:52 +00:00
|
|
|
.include "earthquake.s"
|
2019-01-16 05:28:23 +00:00
|
|
|
.include "text_print.s"
|
2019-01-13 06:10:44 +00:00
|
|
|
.include "gr_pageflip.s"
|
|
|
|
.include "gr_unrle.s"
|
|
|
|
.include "gr_fast_clear.s"
|
|
|
|
.include "gr_copy.s"
|
2019-03-01 16:53:56 +00:00
|
|
|
.include "gr_make_quake.s"
|
2019-01-14 04:37:49 +00:00
|
|
|
.include "gr_putsprite.s"
|
2019-03-01 17:04:29 +00:00
|
|
|
.include "gr_putsprite_flipped.s"
|
2019-01-14 04:37:49 +00:00
|
|
|
.include "gr_offsets.s"
|
2019-08-19 20:20:28 +00:00
|
|
|
.include "gr_hlin.s"
|
2019-01-18 05:18:06 +00:00
|
|
|
.include "random16.s"
|
2019-01-19 03:27:01 +00:00
|
|
|
.include "keyboard.s"
|
2019-03-19 04:31:18 +00:00
|
|
|
.include "gr_overlay.s"
|
2019-03-22 05:14:33 +00:00
|
|
|
.include "gr_putsprite_crop.s"
|
2019-03-19 04:31:18 +00:00
|
|
|
|
2019-01-23 04:00:59 +00:00
|
|
|
; room backgrounds
|
2019-07-24 19:51:19 +00:00
|
|
|
.include "ootw_graphics/l1pool/ootw_pool.inc"
|
|
|
|
.include "ootw_graphics/l1caves/ootw_cavern.inc"
|
|
|
|
.include "ootw_graphics/l1caves/ootw_cavern2.inc"
|
|
|
|
.include "ootw_graphics/l1caves/ootw_cavern3.inc"
|
|
|
|
.include "ootw_graphics/l1rope/ootw_rope.inc"
|
|
|
|
.include "ootw_graphics/l1rope/ootw_swing.inc"
|
|
|
|
.include "ootw_graphics/l1underwater/ootw_underwater.inc"
|
2019-01-23 04:00:59 +00:00
|
|
|
; sprites
|
2019-07-29 18:05:53 +00:00
|
|
|
.include "ootw_graphics/sprites/l1_background.inc"
|
|
|
|
.include "ootw_graphics/sprites/physicist.inc"
|
|
|
|
.include "ootw_graphics/sprites/physicist_l1_swim.inc"
|
|
|
|
.include "ootw_graphics/sprites/slugs.inc"
|
|
|
|
.include "ootw_graphics/sprites/beast.inc"
|
2019-03-31 02:24:19 +00:00
|
|
|
; cutscene data
|
2019-07-24 19:51:19 +00:00
|
|
|
.include "ootw_graphics/l1end/ootw_l1end.inc"
|
|
|
|
.include "ootw_graphics/l1end_scenes/ootw_beast_end.inc"
|
|
|
|
.include "ootw_graphics/l1end_scenes/ootw_slug_end.inc"
|
|
|
|
.include "ootw_graphics/l1end_scenes/ootw_beast_intro.inc"
|