2019-01-27 21:37:09 -05: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
|
|
|
|
|
2019-03-20 14:41:31 -04:00
|
|
|
;=======================
|
|
|
|
; Run the intro
|
|
|
|
;=======================
|
|
|
|
|
2019-08-22 13:28:12 -04:00
|
|
|
jsr ootw_c2_intro
|
2019-03-20 14:41:31 -04:00
|
|
|
|
2019-01-27 21:37:09 -05:00
|
|
|
;=======================
|
|
|
|
; Enter the game
|
|
|
|
;=======================
|
2019-07-20 12:17:25 -04:00
|
|
|
ootw_c2_restart:
|
2019-01-27 21:37:09 -05:00
|
|
|
|
2019-08-22 13:28:12 -04:00
|
|
|
jsr ootw_cage
|
|
|
|
lda GAME_OVER
|
|
|
|
cmp #$ff
|
|
|
|
beq quit_level
|
2019-01-27 21:37:09 -05:00
|
|
|
|
2019-07-09 11:23:48 -04:00
|
|
|
;=======================
|
2019-07-09 15:02:18 -04:00
|
|
|
; Start Level After Cage
|
2019-07-09 11:23:48 -04:00
|
|
|
;=======================
|
|
|
|
|
2019-07-19 13:13:23 -04:00
|
|
|
jsr ootw_jail_init
|
2019-07-09 11:23:48 -04:00
|
|
|
|
|
|
|
;=========================
|
|
|
|
; c2_new_room
|
|
|
|
;=========================
|
|
|
|
; enter new room on level2
|
|
|
|
|
|
|
|
c2_new_room:
|
2019-07-09 15:02:18 -04:00
|
|
|
lda #0
|
|
|
|
sta GAME_OVER
|
2019-07-09 11:23:48 -04:00
|
|
|
|
|
|
|
lda WHICH_JAIL
|
2019-07-11 15:21:11 -04:00
|
|
|
cmp #7
|
2019-07-09 11:23:48 -04:00
|
|
|
bcs elevator_room ; bge
|
|
|
|
jail_room:
|
|
|
|
jsr ootw_jail
|
|
|
|
jmp c2_check_done
|
|
|
|
|
|
|
|
elevator_room:
|
|
|
|
jsr ootw_elevator
|
|
|
|
|
|
|
|
c2_check_done:
|
2019-07-09 15:02:18 -04:00
|
|
|
lda GAME_OVER
|
|
|
|
cmp #$ff
|
|
|
|
beq quit_level
|
|
|
|
|
2019-08-20 11:39:37 -04:00
|
|
|
cmp #77
|
2019-07-09 11:23:48 -04:00
|
|
|
bne c2_new_room
|
|
|
|
|
2019-08-20 11:39:37 -04:00
|
|
|
;=========================
|
|
|
|
; end of level
|
|
|
|
;=========================
|
|
|
|
lda #3
|
|
|
|
sta WHICH_LOAD
|
|
|
|
rts
|
2019-07-09 11:23:48 -04:00
|
|
|
|
2019-01-27 21:37:09 -05: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
|
|
|
|
|
2019-07-20 12:17:25 -04:00
|
|
|
lda #0
|
|
|
|
sta GAME_OVER
|
|
|
|
|
|
|
|
jmp ootw_c2_restart
|
2019-01-27 21:37:09 -05:00
|
|
|
|
|
|
|
|
|
|
|
end_message:
|
|
|
|
.byte 8,10,"PRESS RETURN TO CONTINUE",0
|
|
|
|
.byte 11,20,"ACCESS CODE: RAGE",0
|
|
|
|
|
|
|
|
.include "ootw_c2_cage.s"
|
2019-03-20 22:46:18 -04:00
|
|
|
.include "ootw_c2_jail.s"
|
2019-07-09 11:23:48 -04:00
|
|
|
.include "ootw_c2_elevator.s"
|
2019-03-20 14:41:31 -04:00
|
|
|
.include "ootw_c2_intro.s"
|
2019-01-27 21:37:09 -05:00
|
|
|
.include "text_print.s"
|
|
|
|
.include "gr_pageflip.s"
|
|
|
|
.include "gr_unrle.s"
|
|
|
|
.include "gr_fast_clear.s"
|
|
|
|
.include "gr_copy.s"
|
2019-07-12 12:52:39 -04:00
|
|
|
.include "gr_copy_offset.s"
|
2019-01-27 21:37:09 -05:00
|
|
|
.include "gr_putsprite.s"
|
2019-03-01 13:04:21 -05:00
|
|
|
.include "gr_putsprite_flipped.s"
|
2019-03-23 01:25:13 -04:00
|
|
|
.include "gr_putsprite_crop.s"
|
2019-01-27 21:37:09 -05:00
|
|
|
.include "gr_offsets.s"
|
2019-07-12 00:59:42 -04:00
|
|
|
.include "gr_offsets_hl.s"
|
2019-03-20 14:41:31 -04:00
|
|
|
.include "gr_run_sequence.s"
|
|
|
|
.include "gr_overlay.s"
|
2019-07-18 20:10:09 -04:00
|
|
|
.include "gr_vlin.s"
|
2019-08-15 23:49:36 -04:00
|
|
|
.include "gr_hlin.s"
|
2019-08-17 18:12:04 -04:00
|
|
|
;.include "random16.s"
|
2019-01-27 21:37:09 -05:00
|
|
|
.include "keyboard.s"
|
|
|
|
|
2019-07-18 13:53:52 -04:00
|
|
|
.include "physicist.s"
|
|
|
|
.include "alien.s"
|
2019-07-19 11:13:29 -04:00
|
|
|
.include "friend.s"
|
2019-07-18 13:53:52 -04:00
|
|
|
|
2019-08-15 23:49:36 -04:00
|
|
|
.include "gun.s"
|
|
|
|
.include "blast.s"
|
|
|
|
.include "laser.s"
|
2019-08-22 11:54:21 -04:00
|
|
|
.include "alien_laser.s"
|
2019-08-15 23:49:36 -04:00
|
|
|
.include "shield.s"
|
|
|
|
.include "door.s"
|
|
|
|
.include "collision.s"
|
|
|
|
|
2019-07-15 12:03:54 -04:00
|
|
|
; background miners
|
|
|
|
.include "ootw_c2_miners.s"
|
|
|
|
|
2019-01-27 21:37:09 -05:00
|
|
|
; room backgrounds
|
2019-07-18 21:01:54 -04:00
|
|
|
.include "ootw_graphics/l2cage/ootw_c2_cage.inc"
|
2019-03-20 22:46:18 -04:00
|
|
|
.include "ootw_graphics/l2jail/ootw_c2_jail.inc"
|
2019-01-27 21:37:09 -05:00
|
|
|
; sprites
|
2019-07-29 14:05:53 -04:00
|
|
|
.include "ootw_graphics/sprites/physicist.inc"
|
|
|
|
.include "ootw_graphics/sprites/alien.inc"
|
|
|
|
.include "ootw_graphics/sprites/friend.inc"
|
2019-03-20 14:41:31 -04:00
|
|
|
; intro
|
|
|
|
.include "ootw_graphics/l2intro/ootw_l2intro.inc"
|
2019-07-12 00:43:23 -04:00
|
|
|
; city movie
|
2019-07-24 15:51:19 -04:00
|
|
|
.include "ootw_graphics/l2city/city_movie.inc"
|
2019-07-19 21:30:23 -04:00
|
|
|
; laser movie
|
|
|
|
.include "ootw_graphics/l2laser/ootw_c2_laser.inc"
|
2019-07-15 12:03:54 -04:00
|
|
|
|
2019-07-20 12:37:54 -04:00
|
|
|
.include "audio.s"
|
|
|
|
|