mist_hgr: some more intro animated

This commit is contained in:
Vince Weaver 2021-07-14 11:55:12 -04:00
parent 46b2964348
commit 4f5f75a4b7
5 changed files with 97 additions and 12 deletions

View File

@ -14,7 +14,7 @@ title_graphics.inc: \
m_title_m.lzsa m_title_y.lzsa m_title_s.lzsa m_title_t.lzsa \
fissure_stars.lzsa fissure_crescent.lzsa fissure.lzsa fissure2.lzsa \
fissure_book_small.lzsa fissure_book_big.lzsa \
m_link_book.lzsa book_closed_n.lzsa
m_link_book.lzsa book_closed_n.lzsa book_ground_n.lzsa
echo "cyan1_lzsa: .incbin \"cyan1.lzsa\"" > title_graphics.inc
echo "cyan2_lzsa: .incbin \"cyan2.lzsa\"" >> title_graphics.inc
echo "m_link_book_lzsa: .incbin \"m_link_book.lzsa\"" >> title_graphics.inc
@ -34,7 +34,7 @@ title_graphics.inc: \
echo "book_sparks_lzsa: .incbin \"fissure_stars.lzsa\"" >> title_graphics.inc
echo "book_glow_lzsa: .incbin \"fissure_stars.lzsa\"" >> title_graphics.inc
echo "book_ground_lzsa: .incbin \"fissure_stars.lzsa\"" >> title_graphics.inc
echo "book_ground_n_lzsa: .incbin \"fissure_stars.lzsa\"" >> title_graphics.inc
echo "book_ground_n_lzsa: .incbin \"book_ground_n.lzsa\"" >> title_graphics.inc
echo "book_closed_n_lzsa: .incbin \"book_closed_n.lzsa\"" >> title_graphics.inc
####

View File

@ -0,0 +1,34 @@
; MYST Book on the Floor
CLS 0x80
; stars
POINT 7 16 12
POINT 7 23 37
POINT 7 7 63
POINT 7 55 34
POINT 7 71 51
POINT 7 87 13
POINT 7 114 27
POINT 7 117 44
POINT 7 164 21
POINT 7 170 32
POINT 7 213 3
POINT 7 228 2
POINT 7 210 13
POINT 7 220 31
POINT 7 240 31
POINT 7 258 43
POINT 7 256 48
POINT 7 266 61
POINT 7 279 59
; book
DRECT 0xa3 0xae 132 119 154 135 ; cover
VTRI 4 155 135 151 156 119 ; make isometric
RECT 4 7 132 137 154 143 ; pages
VTRI 4 132 118 132 136 137 ; left edge
VTRI 4 131 137 127 132 18 ; upper spine
VTRI 4 154 131 148 155 136 ; lower triangle
LINE 4 135 136 155 136 ; cover edge
; hilight
LINE 7 127 123 129 145
LINE 7 129 145 154 144
END

View File

@ -17,5 +17,5 @@ LINE 5 50 7 142 10
LINE 5 40 181 42 10 ; page edge
DRECT 0xAB 0xAE 139 10 149 183 ; crease
; link area
RECT 4 4 161 41 224 90
RECT 4 4 160 39 225 89
END

View File

@ -21,8 +21,8 @@ location0:
.word $0000 ; west bg
.byte BG_NORTH ; only north bg
.byte DIRECTION_N ; special exit
.byte 16,24 ; special x
.byte 104,144 ; special y
.byte 17,23 ; special x
.byte 116,144 ; special y
.word get_mist_book-1 ; special function
; TITLE_BOOK_CLOSED -- myst linking book closed

View File

@ -516,7 +516,6 @@ game_loop:
cmp #32 ; if done animating, skip
bcs nothing_special
.if 0
animate_ocean:
cmp #26
bcs animate_actual
@ -552,11 +551,7 @@ animate_actual:
draw_animation:
sta INH
lda #24
sta XPOS
lda #12
sta YPOS
jsr put_sprite_crop
jsr animate_book
inc_frame:
lda FRAMEL
@ -567,7 +562,7 @@ if_smc:
inc ANIMATE_FRAME
done_inc_frame:
.endif
nothing_special:
@ -770,3 +765,59 @@ config_string:
.byte 0,23,"APPLE II?, 48K RAM, MOCKINGBOARD: SLOT ?",0
; MOCKINGBOARD: NONE
;==============================
; animate book
;==============================
; animate a 9x12 animation at fixed location 161,41 (161/7=23)
; sprite is in INL:INH
animate_book:
lda #40
sta YPOS
animate_book_yloop:
ldy #0
ldx #0
lda YPOS
jsr HPOSN ; (Y,X),(A) (values stores in HGRX,XH,Y)
clc
lda GBASL
adc #23
sta GBASL
ldy #0
animate_xloop:
lda (INL),Y
sta (GBASL),Y
iny
cpy #9
bne animate_xloop
inc YPOS
lda YPOS
cmp #88
beq done_animate_book
and #$3
bne animate_book_yloop
; only move to next line every 4 lines
clc
lda INL
adc #9
sta INL
lda INH
adc #0
sta INH
jmp animate_book_yloop
done_animate_book:
rts