ootw: intro: initial DNA support

This commit is contained in:
Vince Weaver 2019-02-17 13:37:24 -05:00
parent 8af006c938
commit b9fc2e310b
3 changed files with 133 additions and 15 deletions

View File

@ -87,7 +87,7 @@ gr_overlay_bottom:
lda COLOR ; re-load color ; 3
and #$0f ; check if bottom nibble zero ; 2
cmp #$0a
bne put_sprite_all ; if not, skip ahead ; 2nt/3
bne overlay_put_sprite_all ; if not, skip ahead ; 2nt/3
;=============
; 7/8
@ -107,7 +107,7 @@ gr_overlay_mask:
jmp gr_overlay_done_draw ; we are done ; 3
put_sprite_all:
overlay_put_sprite_all:
lda COLOR ; load color ; 3
sta (OUTL),Y ; and write it out ; 6

View File

@ -679,8 +679,13 @@ scanner:
jsr clear_bottom
;=============================
; Identification (nothing)
;=============================
lda #0
sta DNA_OUT
sta DNA_PROGRESS
lda #<ai_sequence
sta INTRO_LOOPL
@ -689,11 +694,19 @@ scanner:
jsr run_sequence_static
; slices / | - / nothing (pause)
; more slices / | - / nothing (pause)
; small circle / | - / nothing (pause)
; big circle / | - / nothing (pause)
jsr gr_copy_to_current_40x40
jsr draw_dna
jsr page_flip
; approx one rotation until "Good evening"
; two rotation, then switch to key + Ferrari
; three rotations, then done
; - !!! DNA START 1 line
; / !!! DNA start 1 line
; !!! DNA 2 lines
@ -701,6 +714,12 @@ scanner:
; Good evening professor.
; DNA all lines
; Triggers:
; + DNA starts midway through big circle
; + Good evening printed at DNA_OUT=5
; + Switch to key, print ferrari
; Key |
; I see you have driven here in your \ Ferrari.
; Key - / nothing (pause)
@ -1129,6 +1148,7 @@ gone_loop:
.include "gr_vlin.s"
.include "gr_plot.s"
.include "gr_fast_clear.s"
.include "gr_putsprite.s"
.include "text_print.s"
; background graphics
@ -1554,19 +1574,20 @@ scanning_sequence:
ai_sequence:
.byte 50
.word ai01_rle
.word ai01_rle ; slices
.byte 50
.word ai02_rle
.word ai02_rle ; slices_zoom
.byte 50
.word ai03_rle
.word ai03_rle ; little circle
.byte 50
.word ai04_rle
.byte 50
.word ai05_rle
.byte 50
.word ai05_rle
.word ai04_rle ; big circle
.byte 0
; .word ai05_rle ; key
; .byte 50
; .word ai05_rle ; key
; .byte 0
static_pattern:
.word blank_rle ; 0
.word static01_rle ; 2
@ -1666,3 +1687,99 @@ soda_sequence:
.byte 20
.word soda09_rle
.byte 0
; Scanning text
good_evening:
.byte 2,21,"GOOD EVENING PROFESSOR.",0
ferrari:
.byte 2,21,"I SEE YOU HAVE DRIVEN HERE IN YOUR",0
.byte 2,22,"FERRARI.",0
;====================================
; Draw DNA
;====================================
draw_dna:
lda #0 ; count
sta DNA_COUNT
draw_dna_loop:
clc
lda DNA_COUNT
adc #10
sta YPOS
lda #26
sta XPOS
lda DNA_PROGRESS
; lsr
and #$e
tax
lda dna_list,X
sta INL
lda dna_list+1,X
sta INH
jsr put_sprite
lda DNA_COUNT
clc
adc #4
sta DNA_COUNT
cmp #28
bne draw_dna_loop
rts
dna_list:
.word dna0_sprite
.word dna1_sprite
.word dna2_sprite
.word dna3_sprite
.word dna4_sprite
.word dna5_sprite
.word dna6_sprite
dna0_sprite:
.byte $7,$2
.byte $66,$40,$40,$40,$40,$40,$cc
.byte $06,$00,$00,$00,$00,$00,$0c
dna1_sprite:
.byte $7,$2
.byte $00,$66,$40,$40,$40,$cc,$00
.byte $00,$06,$00,$00,$00,$0c,$00
dna2_sprite:
.byte $7,$2
.byte $00,$00,$66,$40,$cc,$00,$00
.byte $00,$00,$06,$00,$0c,$00,$00
dna3_sprite:
.byte $7,$2
.byte $00,$00,$00,$66,$00,$00,$00
.byte $00,$00,$00,$06,$00,$00,$00
dna4_sprite:
.byte $7,$2
.byte $00,$00,$CC,$40,$66,$00,$00
.byte $00,$00,$0C,$00,$06,$00,$00
dna5_sprite:
.byte $7,$2
.byte $00,$CC,$40,$40,$40,$66,$00
.byte $00,$0C,$00,$00,$00,$06,$00
dna6_sprite:
.byte $7,$2
.byte $CC,$40,$40,$40,$40,$40,$66
.byte $0C,$00,$00,$00,$00,$00,$06

View File

@ -140,6 +140,11 @@ BEAST_OUT = $E4
GAME_OVER = $E5
EQUAKE_PROGRESS = $E6
EARTH_OFFSET = $E7
DNA_OUT = $E5
DNA_PROGRESS = $E6
DNA_COUNT = $E7
BOULDER_X = $E8
BOULDER_Y = $E9
CROUCHING = $EA
@ -175,7 +180,3 @@ INH = $FD
OUTL = $FE
OUTH = $FF