2019-01-28 02:37:09 +00:00
|
|
|
; Ootw for Apple II Lores -- Checkpoint2
|
|
|
|
|
|
|
|
; by Vince "Deater" Weaver <vince@deater.net>
|
|
|
|
|
|
|
|
.include "zp.inc"
|
|
|
|
.include "hardware.inc"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ootw_c2:
|
|
|
|
|
|
|
|
; Initialize some variables
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
sta GAME_OVER
|
2019-03-15 16:28:46 +00:00
|
|
|
sta PHYSICIST_STATE
|
2019-01-28 02:37:09 +00:00
|
|
|
|
|
|
|
lda #22
|
|
|
|
sta PHYSICIST_Y
|
|
|
|
lda #20
|
|
|
|
sta PHYSICIST_X
|
|
|
|
|
|
|
|
lda #1
|
|
|
|
sta DIRECTION
|
|
|
|
|
2019-03-20 18:41:31 +00:00
|
|
|
;=======================
|
|
|
|
; Run the intro
|
|
|
|
;=======================
|
|
|
|
|
2019-07-09 15:23:48 +00:00
|
|
|
; jsr ootw_c2_intro
|
2019-03-20 18:41:31 +00:00
|
|
|
|
2019-01-28 02:37:09 +00:00
|
|
|
;=======================
|
|
|
|
; Enter the game
|
|
|
|
;=======================
|
|
|
|
|
|
|
|
jsr ootw_cage
|
|
|
|
|
2019-07-09 15:23:48 +00:00
|
|
|
;=======================
|
|
|
|
; Start Levels
|
|
|
|
;=======================
|
|
|
|
|
|
|
|
lda #1
|
|
|
|
sta DIRECTION
|
|
|
|
lda #22
|
|
|
|
sta PHYSICIST_Y
|
|
|
|
lda #24
|
|
|
|
sta PHYSICIST_X
|
|
|
|
lda #0
|
|
|
|
sta PHYSICIST_STATE
|
|
|
|
sta WHICH_JAIL
|
|
|
|
|
|
|
|
;=========================
|
|
|
|
; c2_new_room
|
|
|
|
;=========================
|
|
|
|
; enter new room on level2
|
|
|
|
|
|
|
|
c2_new_room:
|
|
|
|
|
|
|
|
lda WHICH_JAIL
|
|
|
|
cmp #4
|
|
|
|
bcs elevator_room ; bge
|
|
|
|
jail_room:
|
|
|
|
jsr ootw_jail
|
|
|
|
jmp c2_check_done
|
|
|
|
|
|
|
|
elevator_room:
|
|
|
|
cmp #8
|
|
|
|
bcs multilevel_room ; bge
|
|
|
|
jsr ootw_elevator
|
|
|
|
jmp c2_check_done
|
|
|
|
|
|
|
|
multilevel_room:
|
|
|
|
; FIXME
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
c2_check_done:
|
|
|
|
; only exit if done level
|
|
|
|
; FIXME: or quit pressed?
|
|
|
|
|
|
|
|
lda WHICH_JAIL
|
|
|
|
cmp #11
|
|
|
|
bne c2_new_room
|
|
|
|
|
|
|
|
|
2019-01-28 02:37:09 +00:00
|
|
|
;===========================
|
|
|
|
; quit_level
|
|
|
|
;===========================
|
|
|
|
|
|
|
|
quit_level:
|
|
|
|
jsr TEXT
|
|
|
|
jsr HOME
|
|
|
|
lda KEYRESET ; clear strobe
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
sta DRAW_PAGE
|
|
|
|
|
|
|
|
lda #<end_message
|
|
|
|
sta OUTL
|
|
|
|
lda #>end_message
|
|
|
|
sta OUTH
|
|
|
|
|
|
|
|
jsr move_and_print
|
|
|
|
jsr move_and_print
|
|
|
|
|
|
|
|
wait_loop:
|
|
|
|
lda KEYPRESS
|
|
|
|
bpl wait_loop
|
|
|
|
|
|
|
|
lda KEYRESET ; clear strobe
|
|
|
|
|
|
|
|
jmp ootw_c2
|
|
|
|
|
|
|
|
|
|
|
|
end_message:
|
|
|
|
.byte 8,10,"PRESS RETURN TO CONTINUE",0
|
|
|
|
.byte 11,20,"ACCESS CODE: RAGE",0
|
|
|
|
|
|
|
|
.include "ootw_c2_cage.s"
|
2019-03-21 02:46:18 +00:00
|
|
|
.include "ootw_c2_jail.s"
|
2019-07-09 15:23:48 +00:00
|
|
|
.include "ootw_c2_elevator.s"
|
2019-03-20 18:41:31 +00:00
|
|
|
.include "ootw_c2_intro.s"
|
2019-01-28 02:37:09 +00:00
|
|
|
.include "physicist.s"
|
|
|
|
.include "text_print.s"
|
|
|
|
.include "gr_pageflip.s"
|
|
|
|
.include "gr_unrle.s"
|
|
|
|
.include "gr_fast_clear.s"
|
|
|
|
.include "gr_copy.s"
|
|
|
|
.include "gr_putsprite.s"
|
2019-03-01 18:04:21 +00:00
|
|
|
.include "gr_putsprite_flipped.s"
|
2019-03-23 05:25:13 +00:00
|
|
|
.include "gr_putsprite_crop.s"
|
2019-01-28 02:37:09 +00:00
|
|
|
.include "gr_offsets.s"
|
2019-03-20 18:41:31 +00:00
|
|
|
.include "gr_run_sequence.s"
|
|
|
|
.include "gr_overlay.s"
|
2019-01-28 02:37:09 +00:00
|
|
|
.include "random16.s"
|
|
|
|
.include "keyboard.s"
|
|
|
|
|
|
|
|
; room backgrounds
|
2019-03-08 17:19:55 +00:00
|
|
|
.include "ootw_graphics/cage/ootw_c2_cage.inc"
|
2019-03-21 02:46:18 +00:00
|
|
|
.include "ootw_graphics/l2jail/ootw_c2_jail.inc"
|
2019-01-28 02:37:09 +00:00
|
|
|
; sprites
|
2019-03-10 05:29:54 +00:00
|
|
|
.include "ootw_graphics/sprites/sprites_physicist.inc"
|
2019-03-20 18:41:31 +00:00
|
|
|
; intro
|
|
|
|
.include "ootw_graphics/l2intro/ootw_l2intro.inc"
|
|
|
|
|
2019-01-28 02:37:09 +00:00
|
|
|
|