dos33fsprogs/games/ootw/intro/intro.s

146 lines
2.5 KiB
ArmAsm
Raw Normal View History

2021-03-23 02:05:03 +00:00
;==========================
; OOTW -- The Famous Intro
;==========================
2019-01-27 02:27:20 +00:00
.include "../zp.inc"
.include "../hardware.inc"
2019-01-27 02:52:00 +00:00
2019-01-27 02:27:20 +00:00
intro:
2019-03-03 19:05:00 +00:00
lda #0
sta INTRO_REPEAT ; by default, don't repeat
bit KEYRESET ; clear keyboard buffer
2019-01-27 02:27:20 +00:00
2019-03-03 19:05:00 +00:00
repeat_intro:
2019-01-27 02:52:00 +00:00
;===========================
; Enable graphics
bit LORES ; 40x40 lo-res
2019-01-27 02:52:00 +00:00
bit SET_GR
bit FULLGR ; full screen
2019-01-27 02:52:00 +00:00
;===========================
; Setup pages
2019-01-27 02:52:00 +00:00
lda #4 ; page to draw
2019-01-27 02:52:00 +00:00
sta DRAW_PAGE
lda #0 ; page to display
2019-01-27 02:52:00 +00:00
sta DISP_PAGE
; jmp tunnel1 ; debug, skip ahead
2019-02-06 04:46:31 +00:00
2021-03-23 02:05:03 +00:00
;===============================
; Opening scene with car
2021-03-23 02:05:03 +00:00
jsr intro_01_building
2021-03-23 02:26:56 +00:00
;===============================
; Walking to door
2019-02-06 05:32:54 +00:00
2021-03-23 02:26:56 +00:00
jsr intro_02_outer_door
2019-02-06 05:32:54 +00:00
2021-03-23 02:26:56 +00:00
;===============================
; Elevator
2019-03-02 16:42:59 +00:00
2021-03-23 02:26:56 +00:00
jsr intro_03_elevator
2019-01-27 05:20:20 +00:00
2021-03-23 02:39:48 +00:00
;===============================
; Keypad
2019-02-13 04:19:49 +00:00
2021-03-23 02:39:48 +00:00
jsr intro_04_keypad
2019-02-13 04:19:49 +00:00
2021-03-23 02:48:39 +00:00
;===============================
; Scanner
2019-02-13 04:19:49 +00:00
2021-03-23 02:48:39 +00:00
jsr intro_05_scanner
2019-03-02 16:42:59 +00:00
2021-03-23 02:58:32 +00:00
;===============================
; Nuclear Physics, part 1
2019-01-27 02:52:00 +00:00
2021-03-23 02:58:32 +00:00
jsr intro_06_console_part1
2021-03-23 03:02:27 +00:00
;===============================
; Drinking some Soda
2019-01-27 02:52:00 +00:00
2021-03-23 03:02:27 +00:00
jsr intro_07_soda
2021-03-23 02:58:32 +00:00
;===============================
; Nuclear Physics, part 2
2021-03-23 02:58:32 +00:00
jsr intro_06_console_part2
2019-01-27 17:42:52 +00:00
2021-03-23 03:06:58 +00:00
;===============================
; Lightning outside
2021-03-23 03:06:58 +00:00
jsr intro_08_lightning
2021-03-23 03:12:51 +00:00
;===============================
; Down in the tunnels
2021-03-23 03:12:51 +00:00
jsr intro_09_tunnel
2019-01-27 05:20:20 +00:00
2021-03-23 03:16:36 +00:00
;===============================
; Zapped
2021-03-23 03:16:36 +00:00
jsr intro_10_gone
2019-03-03 19:05:00 +00:00
; see if R pressed, if so, repeat
; otherwise, return and indicate we want to start the game
2019-01-27 05:20:20 +00:00
lda KEYPRESS
2019-03-03 19:05:00 +00:00
bpl check_repeat ; if no keypress, jump ahead
and #$7f ; clear high bit
cmp #'R'
bne check_repeat
lda INTRO_REPEAT
eor #$1
sta INTRO_REPEAT
check_repeat:
bit KEYRESET ; reset keyboard strobe
lda INTRO_REPEAT
beq done_intro
jmp repeat_intro
2019-03-03 19:05:00 +00:00
done_intro:
lda #1 ; start game
sta WHICH_LOAD
2019-01-27 02:52:00 +00:00
2019-01-27 02:27:20 +00:00
rts
.include "../gr_pageflip.s"
;.include "../gr_unrle.s"
;.include "../lz4_decode.s"
.include "../decompress_fast_v2.s"
.include "../gr_copy.s"
.include "../gr_offsets.s"
.include "../gr_overlay.s"
.include "../gr_vlin.s"
.include "../gr_plot.s"
.include "../gr_fast_clear.s"
.include "../gr_putsprite.s"
.include "../text_print.s"
.include "../gr_run_sequence.s"
2019-02-18 18:04:02 +00:00
2021-03-23 02:05:03 +00:00
;========================
; load all the sub-parts
;========================
.include "intro_01_building.s"
2021-03-23 02:26:56 +00:00
.include "intro_02_outer_door.s"
.include "intro_03_elevator.s"
2021-03-23 02:39:48 +00:00
.include "intro_04_keypad.s"
2021-03-23 02:48:39 +00:00
.include "intro_05_scanner.s"
2021-03-23 02:58:32 +00:00
.include "intro_06_console.s"
2021-03-23 03:02:27 +00:00
.include "intro_07_soda.s"
2021-03-23 03:06:58 +00:00
.include "intro_08_lightning.s"
2021-03-23 03:12:51 +00:00
.include "intro_09_tunnel.s"
2021-03-23 03:16:36 +00:00
.include "intro_10_gone.s"