mist: meche age, imrpove a bit

This commit is contained in:
Vince Weaver 2020-03-08 13:45:05 -04:00
parent 3e9fe63615
commit a0d37340be
10 changed files with 210 additions and 13 deletions

View File

@ -67,6 +67,7 @@ meche.o: meche.s zp.inc hardware.inc \
graphics_meche/meche_graphics.inc \
common_sprites.inc \
leveldata_meche.inc \
link_book_meche.s \
keyboard.s \
draw_pointer.s \
gr_copy.s audio.s text_print.s decompress_fast_v2.s

View File

@ -13,7 +13,8 @@ meche_graphics.inc: \
departure_e.lzsa \
arrival_w.lzsa \
entrance_e.lzsa entrance_s.lzsa entrance_n.lzsa entrance_w.lzsa \
meche_book_closed.lzsa meche_book_open.lzsa
meche_book_closed.lzsa meche_book_open.lzsa \
fort_view_n.lzsa fort_view_s.lzsa
echo "departure_e_lzsa: .incbin \"departure_e.lzsa\"" > meche_graphics.inc
echo "arrival_w_lzsa: .incbin \"arrival_w.lzsa\"" >> meche_graphics.inc
echo "entrance_e_lzsa: .incbin \"entrance_e.lzsa\"" >> meche_graphics.inc
@ -22,6 +23,8 @@ meche_graphics.inc: \
echo "entrance_w_lzsa: .incbin \"entrance_w.lzsa\"" >> meche_graphics.inc
echo "meche_book_closed_lzsa: .incbin \"meche_book_closed.lzsa\"" >> meche_graphics.inc
echo "meche_book_open_lzsa: .incbin \"meche_book_open.lzsa\"" >> meche_graphics.inc
echo "fort_view_n_lzsa: .incbin \"fort_view_n.lzsa\"" >> meche_graphics.inc
echo "fort_view_s_lzsa: .incbin \"fort_view_s.lzsa\"" >> meche_graphics.inc
%.gr: %.png
$(PNG2GR) $< $@

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 823 B

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -6,3 +6,5 @@ entrance_n_lzsa: .incbin "entrance_n.lzsa"
entrance_w_lzsa: .incbin "entrance_w.lzsa"
meche_book_closed_lzsa: .incbin "meche_book_closed.lzsa"
meche_book_open_lzsa: .incbin "meche_book_open.lzsa"
fort_view_n_lzsa: .incbin "fort_view_n.lzsa"
fort_view_s_lzsa: .incbin "fort_view_s.lzsa"

View File

@ -34,7 +34,7 @@ LOCATION_SPECIAL_FUNC=22 ; pointer-1 of function to call on click
locations:
.word location0, location1, location2, location3
.word location4
.word location4, location5
; Inside gear on Mist
location0:
@ -52,9 +52,6 @@ location0:
.word $0000 ; west bg
.byte BG_EAST
.byte $ff ; special exit
; .byte 21,31 ; special x
; .byte 10,24 ; special y
; .word mist_link_book-1 ; special function
; closed book
@ -78,18 +75,22 @@ location1:
location2:
.byte $ff ; north exit
.byte $ff ; south exit
.byte $3 ; east exit
.byte 0 ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_W ; east exit_dir
.byte DIRECTION_E ; east exit_dir
.byte $ff ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word meche_book_open_lzsa ; east bg
.word $0000 ; west bg
.byte BG_EAST
.byte $ff ; special exit
.byte DIRECTION_E ; special exit
.byte 21,31 ; special x
.byte 10,24 ; special y
.word meche_link_book-1 ; special function
; arrival
location3:
@ -110,11 +111,11 @@ location3:
; entrance
location4:
.byte $ff ; north exit
.byte 5 ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte 3 ; west exit
.byte $ff ; north exit_dir
.byte DIRECTION_N ; north exit_dir
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte DIRECTION_W ; west exit_dir
@ -125,3 +126,20 @@ location4:
.byte BG_NORTH|BG_SOUTH|BG_EAST|BG_WEST
.byte $ff ; special exit
; fort view
location5:
.byte 5 ; north exit
.byte 4 ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte DIRECTION_S ; north exit_dir
.byte DIRECTION_S ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word fort_view_n_lzsa ; north bg
.word fort_view_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH|BG_SOUTH
.byte $ff ; special exit

139
mist/link_book_meche.s Normal file
View File

@ -0,0 +1,139 @@
;=============================
; meche_link_book
;=============================
meche_link_book:
; clear screen
lda #0
sta clear_all_color+1
jsr clear_all
jsr page_flip
; play sound effect?
lda #<audio_link_noise
sta BTC_L
lda #>audio_link_noise
sta BTC_H
ldx #43 ; 45 pages long???
jsr play_audio
lda #3
sta LOCATION
lda #DIRECTION_W
sta DIRECTION
jsr change_location
rts
meche_movie:
.word meche_sprite0,meche_sprite1,meche_sprite2
.word meche_sprite3,meche_sprite4,meche_sprite5
.word meche_sprite6,meche_sprite7,meche_sprite8
.word meche_sprite9,meche_sprite10
meche_sprite0:
.byte 9,6
.byte $77,$77,$77,$77,$77,$77,$55,$77,$77
.byte $77,$77,$77,$77,$77,$47,$49,$49,$47
.byte $57,$77,$77,$77,$77,$ff,$55,$88,$88
.byte $05,$67,$00,$60,$60,$00,$67,$86,$60
.byte $00,$00,$06,$06,$68,$66,$66,$68,$66
.byte $00,$00,$00,$00,$00,$06,$66,$66,$66
meche_sprite1:
.byte 9,6
.byte $77,$77,$77,$47,$45,$45,$45,$74,$77
.byte $77,$77,$74,$ff,$8f,$ff,$ff,$77,$77
.byte $07,$07,$07,$ff,$08,$0f,$0f,$07,$07
.byte $77,$77,$00,$67,$67,$60,$66,$66,$66
.byte $66,$66,$86,$66,$66,$88,$66,$66,$66
.byte $88,$66,$68,$66,$66,$66,$66,$66,$66
meche_sprite2:
.byte 9,6
.byte $77,$47,$45,$45,$47,$47,$77,$77,$77
.byte $74,$ff,$8f,$5f,$55,$77,$77,$77,$77
.byte $70,$0f,$08,$f5,$08,$77,$77,$67,$67
.byte $77,$77,$00,$67,$67,$66,$66,$66,$66
.byte $77,$66,$66,$66,$66,$88,$66,$66,$66
.byte $66,$66,$66,$66,$66,$88,$66,$66,$66
meche_sprite3:
.byte 9,6
.byte $55,$55,$55,$57,$77,$77,$77,$77,$77
.byte $f5,$ff,$5f,$5f,$77,$77,$77,$77,$77
.byte $88,$0f,$05,$f5,$77,$77,$77,$57,$57
.byte $08,$70,$00,$57,$57,$55,$55,$65,$65
.byte $57,$55,$55,$65,$65,$88,$66,$66,$66
.byte $65,$66,$66,$66,$88,$88,$00,$66,$66
meche_sprite4:
.byte 9,6
.byte $00,$70,$77,$77,$77,$77,$77,$77,$77
.byte $00,$77,$77,$77,$77,$77,$77,$77,$dd
.byte $00,$77,$77,$77,$77,$77,$77,$55,$dd
.byte $57,$57,$57,$57,$57,$76,$57,$66,$6d
.byte $66,$60,$66,$60,$66,$66,$88,$55,$55
.byte $66,$66,$66,$66,$66,$66,$88,$66,$66
meche_sprite5:
.byte 9,6
.byte $77,$77,$77,$77,$77,$77,$77,$77,$77
.byte $77,$77,$77,$77,$77,$d7,$dd,$dd,$77
.byte $77,$77,$77,$55,$57,$dd,$dd,$dd,$d7
.byte $77,$67,$67,$55,$67,$dd,$dd,$dd,$dd
.byte $66,$66,$66,$65,$66,$6d,$6d,$6d,$66
.byte $56,$56,$56,$56,$56,$56,$66,$66,$66
meche_sprite6:
.byte 9,6
.byte $77,$77,$77,$77,$77,$77,$77,$77,$77
.byte $77,$77,$77,$77,$d7,$77,$77,$77,$77
.byte $77,$77,$77,$77,$dd,$dd,$77,$77,$77
.byte $77,$77,$88,$dd,$dd,$dd,$67,$66,$66
.byte $77,$67,$88,$dd,$dd,$dd,$66,$66,$66
.byte $56,$65,$88,$dd,$dd,$dd,$66,$66,$66
meche_sprite7:
.byte 9,6
.byte $77,$77,$77,$77,$77,$87,$87,$88,$78
.byte $77,$77,$77,$77,$88,$d8,$77,$77,$77
.byte $77,$77,$77,$77,$88,$dd,$77,$88,$87
.byte $77,$77,$77,$67,$88,$dd,$dd,$88,$88
.byte $67,$67,$66,$66,$88,$dd,$dd,$dd,$dd
.byte $66,$62,$22,$22,$88,$dd,$dd,$dd,$dd
meche_sprite8:
.byte 9,6
.byte $77,$77,$77,$77,$77,$77,$77,$77,$87
.byte $77,$77,$77,$77,$77,$88,$77,$88,$77
.byte $77,$77,$77,$77,$87,$88,$87,$88,$87
.byte $77,$77,$77,$77,$88,$88,$88,$88,$88
.byte $67,$67,$26,$26,$88,$88,$88,$88,$88
.byte $62,$62,$62,$62,$68,$88,$88,$88,$88
meche_sprite9:
.byte 9,6
.byte $77,$77,$77,$77,$77,$77,$88,$88,$88
.byte $77,$77,$77,$77,$77,$88,$88,$88,$88
.byte $77,$77,$77,$77,$87,$88,$88,$88,$88
.byte $77,$77,$77,$87,$88,$88,$88,$88,$88
.byte $26,$26,$26,$88,$88,$88,$88,$88,$88
.byte $62,$62,$62,$88,$88,$88,$88,$88,$88
meche_sprite10:
.byte 9,6
.byte $77,$77,$77,$77,$77,$77,$77,$47,$77
.byte $77,$77,$77,$77,$77,$74,$f4,$f4,$88
.byte $77,$77,$77,$77,$57,$57,$ff,$ff,$88
.byte $77,$77,$55,$55,$77,$77,$77,$87,$88
.byte $62,$62,$62,$62,$62,$62,$62,$88,$88
.byte $66,$66,$66,$66,$66,$66,$66,$88,$88

View File

@ -52,6 +52,8 @@ not_first_time:
lda #1
sta CURSOR_VISIBLE ; visible at first
lda #0
sta ANIMATE_FRAME
game_loop:
@ -74,6 +76,39 @@ game_loop:
; handle special-case forground logic
;====================================
lda LOCATION
cmp #2
bne nothing_special
; handle animated linking book
lda ANIMATE_FRAME
asl
tay
lda meche_movie,Y
sta INL
lda meche_movie+1,Y
sta INH
lda #22
sta XPOS
lda #12
sta YPOS
jsr put_sprite_crop
lda FRAMEL
and #$f
bne done_animate_book
inc ANIMATE_FRAME
lda ANIMATE_FRAME
cmp #11
bne done_animate_book
lda #0
sta ANIMATE_FRAME
done_animate_book:
nothing_special:
@ -131,7 +166,7 @@ room_frame_no_oflo:
; linking books
; .include "link_book_mist.s"
.include "link_book_meche.s"
.include "common_sprites.inc"
@ -142,8 +177,6 @@ room_frame_no_oflo:
;.align $100
audio_red_page:
.incbin "audio/red_page.btc"
audio_link_noise:
.incbin "audio/link_noise.btc"

View File

@ -69,6 +69,7 @@ CLOCK_TOP = $8F
CLOCK_MIDDLE = $90
CLOCK_BOTTOM = $91
CLOCK_LAST = $92
ANIMATE_FRAME = $93
DISP_PAGE = $ED ; ALL
DRAW_PAGE = $EE ; ALL