mist: title: have animation

This commit is contained in:
Vince Weaver 2020-07-17 13:50:30 -04:00
parent 457d1a95cb
commit e938fbeea1
6 changed files with 160 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 728 B

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -29,3 +29,99 @@ mist_link_book:
rts
dock_animation_sprites:
.word dock_animate_sprite3 ; 26
.word dock_animate_sprite4 ; 27
.word dock_animate_sprite5 ; 28
.word dock_animate_sprite6 ; 29
.word dock_animate_sprite7 ; 30
.word dock_animate_sprite8 ; 31
; water1
dock_animate_sprite1:
.byte 9,6
.byte $22,$22,$22,$22,$22,$66,$66,$22,$22
.byte $26,$62,$26,$62,$26,$62,$66,$26,$62
.byte $26,$62,$26,$62,$26,$62,$66,$26,$62
.byte $26,$62,$26,$62,$26,$62,$66,$26,$62
.byte $26,$62,$26,$62,$26,$62,$66,$26,$62
.byte $26,$62,$26,$62,$26,$62,$66,$26,$22
; water2
dock_animate_sprite2:
.byte 9,6
.byte $22,$22,$22,$22,$22,$66,$66,$22,$22
.byte $62,$26,$62,$26,$62,$26,$66,$62,$26
.byte $62,$26,$62,$26,$62,$26,$66,$62,$26
.byte $62,$26,$62,$26,$62,$26,$66,$62,$26
.byte $62,$26,$62,$26,$62,$26,$66,$62,$26
.byte $62,$26,$62,$26,$62,$26,$66,$22,$22
; water tilt
dock_animate_sprite3:
.byte 9,6
.byte $77,$77,$77,$77,$77,$77,$77,$77,$77
.byte $77,$77,$77,$77,$77,$77,$77,$77,$77
.byte $22,$22,$22,$27,$27,$77,$77,$77,$77
.byte $22,$22,$22,$22,$22,$22,$22,$22,$22
.byte $22,$22,$22,$22,$22,$22,$22,$22,$22
.byte $22,$22,$22,$22,$22,$22,$22,$22,$22
; water tilt_island
dock_animate_sprite4:
.byte 9,6
.byte $77,$77,$77,$77,$77,$77,$77,$77,$77
.byte $77,$77,$77,$77,$77,$77,$77,$77,$77
.byte $77,$77,$57,$55,$77,$77,$77,$77,$27
.byte $77,$57,$55,$55,$25,$2f,$22,$22,$22
.byte $77,$25,$22,$22,$22,$22,$22,$22,$22
.byte $22,$22,$22,$22,$22,$22,$22,$22,$22
; island1
dock_animate_sprite5:
.byte 9,6
.byte $66,$66,$66,$66,$44,$66,$66,$66,$66
.byte $66,$66,$46,$66,$44,$46,$55,$66,$56
.byte $66,$44,$44,$44,$44,$44,$75,$77,$99
.byte $44,$44,$44,$44,$44,$44,$d7,$2d,$29
.byte $54,$44,$55,$55,$55,$55,$55,$22,$22
.byte $25,$22,$22,$22,$25,$25,$22,$22,$22
; island2
dock_animate_sprite6:
.byte 9,6
.byte $44,$66,$44,$66,$44,$99,$99,$66,$66
.byte $44,$44,$54,$55,$44,$5e,$89,$56,$56
.byte $44,$44,$44,$55,$44,$55,$58,$85,$88
.byte $54,$45,$44,$44,$44,$54,$55,$88,$88
.byte $44,$44,$44,$44,$44,$45,$dd,$28,$88
.byte $44,$44,$44,$44,$44,$22,$22,$22,$22
; island3
dock_animate_sprite7:
.byte 9,6
.byte $22,$42,$42,$72,$55,$77,$99,$66,$66
.byte $22,$44,$44,$d7,$77,$e9,$99,$86,$55
.byte $44,$44,$5d,$44,$77,$7e,$77,$58,$55
.byte $44,$d4,$45,$44,$88,$57,$45,$85,$88
.byte $dd,$44,$44,$44,$55,$45,$dd,$22,$28
.byte $44,$dd,$d4,$44,$88,$2d,$82,$22,$22
; island4
dock_animate_sprite8:
.byte 9,6
.byte $55,$88,$e8,$66,$56,$55,$56,$66,$66
.byte $55,$77,$5e,$77,$d8,$8d,$88,$22,$26
.byte $cc,$77,$55,$77,$dd,$88,$88,$22,$22
.byte $44,$45,$c7,$55,$d5,$22,$22,$22,$22
.byte $44,$44,$4c,$55,$dd,$22,$22,$22,$22
.byte $44,$44,$44,$55,$dd,$22,$28,$22,$22

View File

@ -281,8 +281,64 @@ game_loop:
;====================================
; handle animated linking book
lda LOCATION
cmp #TITLE_BOOK_OPEN
bne nothing_special
; note: the linking book to the dock doesn't have much action
lda ANIMATE_FRAME
cmp #32 ; if done animating, skip
bcs nothing_special
animate_ocean:
cmp #26
bcs animate_actual
and #1
beq even_ocean
odd_ocean:
lda #<dock_animate_sprite1
sta INL
lda #>dock_animate_sprite1
jmp draw_animation
even_ocean:
lda #<dock_animate_sprite2
sta INL
lda #>dock_animate_sprite2
jmp draw_animation
animate_actual:
sec
sbc #26
asl
tay
; slow down animation
lda #$3f
sta if_smc+1
lda dock_animation_sprites,Y
sta INL
lda dock_animation_sprites+1,Y
draw_animation:
sta INH
lda #24
sta XPOS
lda #12
sta YPOS
jsr put_sprite_crop
inc_frame:
lda FRAMEL
if_smc:
and #$f
bne done_inc_frame
inc ANIMATE_FRAME
done_inc_frame:
nothing_special:
@ -326,8 +382,6 @@ really_exit:
jmp end_level
;==========================
; includes
;==========================
@ -356,10 +410,6 @@ file:
linking_noise_compressed:
.incbin "audio/link_noise.btc.lzsa"
.align $100
theme_music:
.incbin "audio/theme.pt3"
;====================================
; draw a screen and wait
@ -415,6 +465,13 @@ get_mist_book:
.align $100
theme_music:
.incbin "audio/theme.pt3"
.if 0