dos33fsprogs/ootw/ootw.s

139 lines
1.9 KiB
ArmAsm
Raw Normal View History

; Ootw for Apple II Lores
2019-01-17 21:58:19 +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
sta KICKING
sta CROUCHING
2019-01-16 03:44:57 +00:00
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
;=======================
lda #1
sta slugg0_out
2019-01-18 21:04:52 +00:00
sta slugg1_out
sta slugg2_out
2019-01-18 20:16:37 +00:00
lda #0
sta slugg0_attack
sta slugg0_dieing
2019-01-18 21:04:52 +00:00
sta slugg1_attack
sta slugg1_dieing
sta slugg2_attack
sta slugg2_dieing
2019-01-18 20:16:37 +00:00
lda #$ff
sta slugg0_dir
2019-01-18 21:04:52 +00:00
sta slugg1_dir
sta slugg2_dir
2019-01-18 20:16:37 +00:00
jsr random16
and #$f
clc
adc #16
sta slugg0_x
2019-01-18 21:04:52 +00:00
jsr random16
and #$7
2019-01-18 21:04:52 +00:00
clc
adc #16
sta slugg1_x
clc
adc #10
2019-01-18 21:04:52 +00:00
sta slugg2_x
2019-01-18 20:16:37 +00:00
jsr random16
; and #$3
2019-01-18 20:16:37 +00:00
sta slugg0_gait
2019-01-18 21:04:52 +00:00
jsr random16
; and #$3
2019-01-18 21:04:52 +00:00
sta slugg1_gait
jsr random16
; and #$3
2019-01-18 21:04:52 +00:00
sta slugg2_gait
2019-01-17 21:58:19 +00:00
jsr ootw_pool
2019-01-16 03:44:57 +00:00
;===========================
; quit_level
;===========================
quit_level:
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-01-19 04:23:18 +00:00
.include "ootw_rope.s"
2019-01-17 21:58:19 +00:00
.include "ootw_pool.s"
.include "ootw_cavern.s"
.include "physicist.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-01-14 04:37:49 +00:00
.include "gr_putsprite.s"
.include "gr_offsets.s"
2019-01-18 05:18:06 +00:00
.include "random16.s"
.include "keyboard.s"
2019-01-17 20:56:43 +00:00
.include "ootw_pool.inc"
.include "ootw_cavern.inc"
2019-01-20 04:48:48 +00:00
.include "ootw_cavern2.inc"
.include "ootw_cavern3.inc"
2019-01-18 05:18:06 +00:00
.include "ootw_quake.inc"
2019-01-19 04:23:18 +00:00
.include "ootw_rope.inc"
2019-01-14 04:37:49 +00:00
.include "ootw_sprites.inc"
2019-01-18 18:51:09 +00:00
.include "slug_cutscene.s"