ootw: update intro to auto-run

This commit is contained in:
Vince Weaver 2019-02-03 12:06:45 -05:00
parent 460160fec8
commit 69d202b12a
6 changed files with 150 additions and 203 deletions

View File

@ -61,7 +61,8 @@ intro.o: intro.s \
intro_tunnel1.inc intro_tunnel2.inc intro_gone.inc \
intro_graphics/01_building/intro_car.inc \
intro_graphics/01_building/intro_building_car.inc \
intro_graphics/01_building/intro_building.inc
intro_graphics/01_building/intro_building.inc \
intro_graphics/02_outer_door/outer_door.inc
ca65 -o intro.o intro.s -l intro.lst
####

View File

@ -45,164 +45,18 @@ intro:
jsr gr_copy_to_current
jsr page_flip
building_loop:
lda KEYPRESS
bpl building_loop
bit KEYRESET
;==================================
; draw the car driving up
lda #>(intro_car1)
sta GBASH
lda #<(intro_car1)
sta GBASL
lda #$10 ; load to $1000
jsr load_rle_gr
lda #<building_sequence
sta INTRO_LOOPL
lda #>building_sequence
sta INTRO_LOOPH
jsr gr_overlay
jsr page_flip
jsr run_sequence
building_loop2:
lda KEYPRESS
bpl building_loop2
bit KEYRESET
lda #>(intro_car2)
sta GBASH
lda #<(intro_car2)
sta GBASL
lda #$10 ; load to $1000
jsr load_rle_gr
jsr gr_overlay
jsr page_flip
building_loop3:
lda KEYPRESS
bpl building_loop3
bit KEYRESET
lda #>(intro_car3)
sta GBASH
lda #<(intro_car3)
sta GBASL
lda #$10 ; load to $1000
jsr load_rle_gr
jsr gr_overlay
jsr page_flip
building_loop4:
lda KEYPRESS
bpl building_loop4
bit KEYRESET
lda #>(intro_car4)
sta GBASH
lda #<(intro_car4)
sta GBASL
lda #$10 ; load to $1000
jsr load_rle_gr
jsr gr_overlay
jsr page_flip
building_loop5:
lda KEYPRESS
bpl building_loop5
bit KEYRESET
lda #>(intro_car5)
sta GBASH
lda #<(intro_car5)
sta GBASL
lda #$10 ; load to $1000
jsr load_rle_gr
jsr gr_overlay
jsr page_flip
building_loop6:
lda KEYPRESS
bpl building_loop6
bit KEYRESET
lda #>(intro_car6)
sta GBASH
lda #<(intro_car6)
sta GBASL
lda #$10 ; load to $1000
jsr load_rle_gr
jsr gr_overlay
jsr page_flip
building_loop7:
lda KEYPRESS
bpl building_loop7
bit KEYRESET
lda #>(intro_car7)
sta GBASH
lda #<(intro_car7)
sta GBASL
lda #$10 ; load to $1000
jsr load_rle_gr
jsr gr_overlay
jsr page_flip
building_loop8:
lda KEYPRESS
bpl building_loop8
bit KEYRESET
lda #>(intro_car8)
sta GBASH
lda #<(intro_car8)
sta GBASL
lda #$10 ; load to $1000
jsr load_rle_gr
jsr gr_overlay
jsr page_flip
building_loop9:
lda KEYPRESS
bpl building_loop9
bit KEYRESET
lda #>(intro_car9)
sta GBASH
lda #<(intro_car9)
sta GBASL
lda #$10 ; load to $1000
jsr load_rle_gr
jsr gr_overlay
jsr page_flip
building_loop10:
lda KEYPRESS
bpl building_loop10
bit KEYRESET
lda #>(intro_car10)
sta GBASH
lda #<(intro_car10)
sta GBASL
lda #$10 ; load to $1000
jsr load_rle_gr
jsr gr_overlay
jsr page_flip
building_loop11:
lda KEYPRESS
bpl building_loop11
bit KEYRESET
;=============================
; Load background to $c00
;==================================
; Load building with car background
lda #>(building_car_rle)
sta GBASH
@ -216,57 +70,17 @@ building_loop11:
jsr gr_copy_to_current
jsr page_flip
building_loop12:
lda KEYPRESS
bpl building_loop12
bit KEYRESET
;==================================
; draw getting out of the car
lda #>(intro_car12)
sta GBASH
lda #<(intro_car12)
sta GBASL
lda #$10 ; load to $1000
jsr load_rle_gr
lda #<outtacar_sequence
sta INTRO_LOOPL
lda #>outtacar_sequence
sta INTRO_LOOPH
jsr gr_overlay
jsr page_flip
jsr run_sequence
building_loop13:
lda KEYPRESS
bpl building_loop13
bit KEYRESET
lda #>(intro_car13)
sta GBASH
lda #<(intro_car13)
sta GBASL
lda #$10 ; load to $1000
jsr load_rle_gr
jsr gr_overlay
jsr page_flip
building_loop14:
lda KEYPRESS
bpl building_loop14
bit KEYRESET
lda #>(intro_car14)
sta GBASH
lda #<(intro_car14)
sta GBASL
lda #$10 ; load to $1000
jsr load_rle_gr
jsr gr_overlay
jsr page_flip
building_loop15:
lda KEYPRESS
bpl building_loop15
bit KEYRESET
@ -653,6 +467,8 @@ gone_loop:
.include "intro_graphics/01_building/intro_building_car.inc"
.include "intro_graphics/01_building/intro_car.inc"
.include "intro_graphics/02_outer_door/outer_door.inc"
.include "intro_elevator.inc"
.include "intro_off_elevator.inc"
@ -667,3 +483,80 @@ gone_loop:
.include "intro_gone.inc"
;=================================
; Display a sequence of images
run_sequence:
ldy #0
run_sequence_loop:
lda (INTRO_LOOPL),Y ; get time
beq run_sequence_done
tax
run_sequence_timer:
lda #64
jsr WAIT ; delay
dex
bne run_sequence_timer
iny
lda (INTRO_LOOPL),Y
sta GBASL
iny
lda (INTRO_LOOPL),Y
sta GBASH
iny
sty INTRO_LOOPER ; save for later
lda #$10 ; load to $1000
jsr load_rle_gr
jsr gr_overlay
jsr page_flip
ldy INTRO_LOOPER
jmp run_sequence_loop
run_sequence_done:
rts
;========================
; Car driving up sequence
building_sequence:
.byte 128
.word intro_car1
.byte 2
.word intro_car2
.byte 2
.word intro_car3
.byte 2
.word intro_car4
.byte 2
.word intro_car5
.byte 2
.word intro_car6
.byte 2
.word intro_car7
.byte 2
.word intro_car8
.byte 2
.word intro_car9
.byte 128
.word intro_car10
.byte 0
;========================
; Getting out of car sequence
outtacar_sequence:
.byte 32
.word intro_car12
.byte 32
.word intro_car13
.byte 32
.word intro_car14
.byte 200
.word intro_car14
.byte 0

View File

@ -0,0 +1,18 @@
include ../../../Makefile.inc
PNG2RLE = ../../../gr-utils/png2rle
all: outer_door.inc
#####
outer_door.inc: $(PNG2RLE) outer_door.png
$(PNG2RLE) asm outer_door.png outer_door_rle > outer_door.inc
#####
clean:
rm -f *~ *.inc

View File

@ -0,0 +1,31 @@
outer_door_rle: .byte $28 ; ysize=48
.byte $A4,$22, $A3,$55, $22, $A4,$00, $A5,$22, $55, $A4,$22
.byte $20, $00, $A4,$22, $55,$55, $A3,$66, $22, $A6,$00
.byte $A4,$22, $A3,$55, $22, $A4,$00, $A5,$22, $55, $A5,$22
.byte $00, $A4,$22, $55, $65, $A3,$66, $22, $A6,$00
.byte $A4,$22, $A3,$55, $22, $A4,$00, $A5,$22, $25, $55
.byte $A4,$22, $00, $A4,$22, $55, $A4,$66, $22, $A6,$00
.byte $A4,$22, $A3,$55, $22, $A4,$00, $A6,$22, $25, $55
.byte $22,$22, $00, $20, $A4,$22, $55, $A4,$66, $22
.byte $A6,$00, $A4,$22, $A3,$55, $22, $A5,$00, $A7,$22, $20,$20
.byte $A6,$22, $55, $A4,$66, $62, $22, $A5,$00, $A4,$22
.byte $A3,$55, $22, $A5,$00, $AF,$22, $55, $A5,$66, $22
.byte $A5,$00, $A4,$22, $A3,$55, $22, $A5,$00, $AF,$22, $55
.byte $A5,$66, $22, $A5,$00, $A4,$22, $A3,$55, $22, $A5,$00
.byte $AF,$22, $55, $A5,$66, $22, $A5,$00, $A4,$22, $A3,$55
.byte $22, $A5,$00, $AE,$22, $52, $55, $A5,$66, $22
.byte $20, $A4,$00, $A4,$22, $A3,$55, $22, $A5,$00, $AE,$22
.byte $55,$55, $A6,$66, $22, $A4,$00, $A4,$22, $A3,$55, $22
.byte $A5,$00, $A5,$22, $A4,$02, $A5,$22, $55,$55, $A6,$66, $22
.byte $A4,$00, $A4,$22, $A3,$55, $22, $A5,$00, $A4,$22, $A4,$20
.byte $A6,$22, $55,$55, $A6,$66, $22, $A4,$00, $A4,$22, $A3,$55
.byte $22, $A5,$00, $AE,$22, $55,$55, $A5,$66, $26, $22
.byte $A4,$00, $A4,$22, $A3,$55, $22, $A5,$00, $AE,$22, $55,$55
.byte $A3,$26, $22,$22, $02,$02, $A4,$00, $A4,$22, $A3,$55, $22
.byte $A6,$00, $AD,$22, $25,$25, $22, $02, $A9,$00, $A4,$22
.byte $A3,$55, $22, $A6,$00, $02, $AA,$22, $02, $AE,$00
.byte $A4,$22, $A3,$55, $22, $A7,$00, $02, $A4,$22, $02,$02
.byte $A0,$12,$00, $A4,$22, $A3,$55, $22, $A0,$20,$00, $A4,$22, $25,$25
.byte $02,$02, $A0,$20,$00, $A3,$22, $02, $A0,$24,$00, $22, $02
.byte $A0,$9E,$00
.byte $A1

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

View File

@ -147,6 +147,10 @@ DISP_PAGE = $ED
DRAW_PAGE = $EE
OFFSET = $EF
INTRO_LOOPL = $F0
INTRO_LOOPH = $F1
INTRO_LOOPER = $F7
PHYSICIST_X = $F0
PHYSICIST_Y = $F1
SPRITETEMP = $F2