2019-07-31 18:38:15 +00:00
|
|
|
; Ootw for Apple II Lores -- Checkpoint4 (the City)
|
|
|
|
|
|
|
|
; by Vince "Deater" Weaver <vince@deater.net>
|
|
|
|
|
|
|
|
.include "zp.inc"
|
|
|
|
.include "hardware.inc"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ootw_c4:
|
|
|
|
|
|
|
|
; Initialize some variables
|
|
|
|
|
|
|
|
;=======================
|
|
|
|
; Run the "intro"
|
|
|
|
;=======================
|
|
|
|
; just us falling?
|
|
|
|
|
|
|
|
ootw_c4_restart:
|
|
|
|
|
|
|
|
jsr ootw_city_init
|
|
|
|
|
|
|
|
;=========================
|
|
|
|
; c4_new_room
|
|
|
|
;=========================
|
|
|
|
; enter new room on level4
|
|
|
|
|
|
|
|
c4_new_room:
|
|
|
|
lda #0
|
|
|
|
sta GAME_OVER
|
|
|
|
|
|
|
|
jsr ootw_city
|
|
|
|
|
|
|
|
c4_check_done:
|
|
|
|
lda GAME_OVER
|
|
|
|
cmp #$ff
|
|
|
|
beq quit_level
|
|
|
|
|
2019-08-09 19:00:34 +00:00
|
|
|
;====================
|
|
|
|
; go to next level
|
|
|
|
l4_defeated:
|
|
|
|
lda WHICH_ROOM
|
|
|
|
cmp #5
|
2019-07-31 18:38:15 +00:00
|
|
|
bne c4_new_room
|
|
|
|
|
2019-08-09 19:00:34 +00:00
|
|
|
lda #5
|
|
|
|
sta WHICH_LOAD
|
|
|
|
rts
|
|
|
|
|
2019-07-31 18:38:15 +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
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
sta GAME_OVER
|
|
|
|
|
|
|
|
jmp ootw_c4_restart
|
|
|
|
|
|
|
|
|
|
|
|
end_message:
|
|
|
|
.byte 8,10,"PRESS RETURN TO CONTINUE",0
|
|
|
|
.byte 11,20,"ACCESS CODE: RCHG",0
|
|
|
|
|
|
|
|
.include "ootw_c4_city.s"
|
|
|
|
.include "text_print.s"
|
|
|
|
.include "gr_pageflip.s"
|
|
|
|
.include "gr_unrle.s"
|
|
|
|
.include "gr_fast_clear.s"
|
|
|
|
.include "gr_copy.s"
|
2019-08-10 01:46:04 +00:00
|
|
|
.include "gr_hlin.s"
|
2019-08-09 16:54:52 +00:00
|
|
|
.include "gr_twoscreen_scroll.s"
|
2019-07-31 18:38:15 +00:00
|
|
|
.include "gr_putsprite.s"
|
|
|
|
.include "gr_putsprite_flipped.s"
|
|
|
|
.include "gr_putsprite_crop.s"
|
|
|
|
.include "gr_offsets.s"
|
2019-08-17 22:12:04 +00:00
|
|
|
;.include "random16.s"
|
2019-07-31 18:38:15 +00:00
|
|
|
.include "keyboard.s"
|
|
|
|
|
|
|
|
.include "physicist.s"
|
|
|
|
.include "alien.s"
|
|
|
|
|
2019-08-08 04:38:55 +00:00
|
|
|
.include "door.s"
|
2019-08-14 17:59:58 +00:00
|
|
|
.include "charger.s"
|
2019-08-14 19:38:36 +00:00
|
|
|
.include "gun.s"
|
2019-08-10 01:46:04 +00:00
|
|
|
.include "laser.s"
|
2019-08-14 15:26:17 +00:00
|
|
|
.include "shield.s"
|
2019-08-14 17:29:11 +00:00
|
|
|
.include "blast.s"
|
2019-08-15 17:38:11 +00:00
|
|
|
.include "collision.s"
|
2019-08-20 17:49:27 +00:00
|
|
|
.include "dummy_friend.s"
|
2019-08-22 15:54:21 +00:00
|
|
|
.include "alien_laser.s"
|
2019-08-08 04:38:55 +00:00
|
|
|
|
2019-08-13 21:14:12 +00:00
|
|
|
.include "ootw_c4_action.s"
|
|
|
|
|
2019-07-31 18:38:15 +00:00
|
|
|
; room backgrounds
|
|
|
|
.include "ootw_graphics/l4city/ootw_c4_city.inc"
|
|
|
|
; sprites
|
|
|
|
.include "ootw_graphics/sprites/physicist.inc"
|
|
|
|
.include "ootw_graphics/sprites/alien.inc"
|
|
|
|
|
|
|
|
|