mist: add arbor, the start of the upper levels of channelwood

This commit is contained in:
Vince Weaver 2020-06-17 01:13:10 -04:00
parent 92327600de
commit 1654a68f7d
12 changed files with 262 additions and 15 deletions

View File

@ -26,14 +26,15 @@ mist.dsk: HELLO LOADER MIST_TITLE MIST OCTAGON VIEWER \
$(DOS33) -y mist.dsk BSAVE -a 0x2000 STONEY
$(DOS33) -y mist.dsk BSAVE -a 0x9000 ./audio/link_noise.btc LINK_NOISE.BTC
mist_side2.dsk: HELLO_DISK2 MECHE SELENA CHANNEL VIEWER
mist_side2.dsk: HELLO_DISK2 MECHE SELENA CHANNEL VIEWER ARBOR
cp empty.dsk mist_side2.dsk
$(DOS33) -y mist_side2.dsk SAVE A HELLO_DISK2 HELLO
$(DOS33) -y mist_side2.dsk BSAVE -a 0x2000 MECHE
$(DOS33) -y mist_side2.dsk BSAVE -a 0x2000 SELENA
$(DOS33) -y mist_side2.dsk BSAVE -a 0x2000 CHANNEL
$(DOS33) -y mist_side2.dsk BSAVE -a 0x2000 ARBOR
$(DOS33) -y mist_side2.dsk BSAVE -a 0x2000 VIEWER
$(DOS33) -y mist_side2.dsk BSAVE -a 0x9000 ./audio/link_noise.btc LINK_NOISE.BTC
# $(DOS33) -y mist_side2.dsk BSAVE -a 0x9000 ./audio/link_noise.btc LINK_NOISE.BTC
###
@ -238,9 +239,17 @@ channel.o: channel.s zp.inc hardware.inc common_defines.inc \
gr_copy.s audio.s text_print.s decompress_fast_v2.s
ca65 -o channel.o channel.s -l channel.lst
####
ARBOR: arbor.o
ld65 -o ARBOR arbor.o -C ../linker_scripts/apple2_2000.inc
arbor.o: arbor.s zp.inc hardware.inc common_defines.inc \
common_routines.inc \
graphics_arbor/arbor_graphics.inc \
leveldata_arbor.inc \
channel_switches.s
ca65 -o arbor.o arbor.s -l arbor.lst
####
graphics_island/mist_graphics.inc:
@ -253,4 +262,4 @@ clean:
rm -f *~ *.o *.lst HELLO HELLO_DISK2 \
LOADER MIST_TITLE \
MIST OCTAGON \
MECHE SELENA STONEY CHANNEL
MECHE SELENA STONEY CHANNEL ARBOR

137
mist/arbor.s Normal file
View File

@ -0,0 +1,137 @@
; The second level of Channely Wood
; The ardor of arboreality is an adventure we've spurned, we've spurned
; It's a new leaf overturned -- TMBG
; by deater (Vince Weaver) <vince@deater.net>
; Zero Page
.include "zp.inc"
.include "hardware.inc"
.include "common_defines.inc"
.include "common_routines.inc"
arbor_start:
;===================
; init screen
jsr TEXT
jsr HOME
bit KEYRESET
bit SET_GR
bit PAGE0
bit LORES
bit FULLGR
;=================
; set up location
;=================
lda #<locations
sta LOCATIONS_L
lda #>locations
sta LOCATIONS_H
lda #0
sta DRAW_PAGE
sta LEVEL_OVER
; init cursor
lda #20
sta CURSOR_X
sta CURSOR_Y
; set up initial location
jsr change_location
lda #1
sta CURSOR_VISIBLE ; visible at first
lda #0
sta ANIMATE_FRAME
game_loop:
;=================
; reset things
;=================
lda #0
sta IN_SPECIAL
sta IN_RIGHT
sta IN_LEFT
;====================================
; copy background to current page
;====================================
jsr gr_copy_to_current
;====================================
; handle special-case forground logic
;====================================
; lda LOCATION
; cmp #CHANNEL_BOOK_OPEN
; beq animate_mist_book
; jmp nothing_special
nothing_special:
;====================================
; draw pointer
;====================================
jsr draw_pointer
;====================================
; page flip
;====================================
jsr page_flip
;====================================
; handle keypress/joystick
;====================================
jsr handle_keypress
;====================================
; inc frame count
;====================================
inc FRAMEL
bne room_frame_no_oflo
inc FRAMEH
room_frame_no_oflo:
;====================================
; check level over
;====================================
lda LEVEL_OVER
bne really_exit
jmp game_loop
really_exit:
jmp end_level
;==========================
; includes
;==========================
; level graphics
.include "graphics_arbor/arbor_graphics.inc"
; puzzles
; level data
.include "leveldata_arbor.inc"

View File

@ -154,16 +154,6 @@ really_exit:
jmp end_level
back_to_mist:
lda #DIRECTION_N
sta DIRECTION
lda #MIST_ARRIVAL_DOCK ; the dock
jmp exit_to_mist
enter_clock:

View File

@ -219,5 +219,5 @@ toggle_faucet:
; linking books
.include "link_book_mist.s"
.include "link_book_channel.s"
; .include "link_book_channel.s"

View File

@ -355,3 +355,9 @@ CABIN_TREE_BOOK = 10
CABIN_TREE_BOOK_CLOSED = 11
CABIN_TREE_BOOK_OPEN = 12
; Arbor, up in the trees
ARBOR_INSIDE_ELEV1 = 0
ARBOR_INSIDE_ELEV1_OPEN = 1
ARBOR_ARRIVAL_CLOSED = 2
ARBOR_ARRIVAL_OPEN = 3

View File

@ -0,0 +1,29 @@
#include ../Makefile.inc
PNG2RLE = ../../gr-utils/png2rle
PNG2GR = ../../gr-utils/png2gr
LZSA = ~/research/lzsa/lzsa/lzsa
all: arbor_graphics.inc
####
arbor_graphics.inc: \
arrival_e.lzsa arrival_w.lzsa arrival_open_e.lzsa \
inside_elevator1_closed_w.lzsa inside_elevator1_open_w.lzsa
echo "arrival_e_lzsa: .incbin \"arrival_e.lzsa\"" > arbor_graphics.inc
echo "arrival_open_e_lzsa: .incbin \"arrival_open_e.lzsa\"" >> arbor_graphics.inc
echo "arrival_w_lzsa: .incbin \"arrival_w.lzsa\"" >> arbor_graphics.inc
echo "inside_elevator1_open_w_lzsa: .incbin \"inside_elevator1_open_w.lzsa\"" >> arbor_graphics.inc
echo "inside_elevator1_closed_w_lzsa: .incbin \"inside_elevator1_closed_w.lzsa\"" >> arbor_graphics.inc
%.gr: %.png
$(PNG2GR) $< $@
%.lzsa: %.gr
$(LZSA) -r -f2 $< $@
####
clean:
rm -f *~ *.o *.lst *.gr *.lzsa channel_graphics.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 857 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

76
mist/leveldata_arbor.inc Normal file
View File

@ -0,0 +1,76 @@
;===============================================
; level data for Arbor trees
;===============================================
locations:
.word location0, location1
; ARBOR_INSIDE_ELEV1 -- arrival in elevator1
location0:
.byte $ff ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte ARBOR_INSIDE_ELEV1_OPEN ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte DIRECTION_W ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word $0000 ; east bg
.word inside_elevator1_closed_w_lzsa ; west bg
.byte BG_WEST
.byte $ff
; ARBOR_INSIDE_ELEV1_OPEN -- arrival in elevator1, door open
location1:
.byte $ff ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte ARBOR_ARRIVAL_CLOSED ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte DIRECTION_W ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word $0000 ; east bg
.word inside_elevator1_open_w_lzsa ; west bg
.byte BG_WEST
.byte $ff
; ARBOR_ARRIVAL_CLOSED -- just outside elevator, closed
location2:
.byte $ff ; north exit
.byte $ff ; south exit
.byte ARBOR_ARRIVAL_OPEN ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_E ; east exit_dir
.byte DIRECTION_W ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word arrival_e_lzsa ; east bg
.word arrival_w_lzsa ; west bg
.byte BG_WEST|BG_EAST
.byte $ff
; ARBOR_ARRIVAL_OPEN -- just outside elevator, open
location3:
.byte $ff ; north exit
.byte $ff ; south exit
.byte ARBOR_INSIDE_ELEV1_OPEN ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_W ; east exit_dir
.byte DIRECTION_W ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word arrival_open_e_lzsa ; east bg
.word arrival_w_lzsa ; west bg
.byte BG_WEST|BG_EAST
.byte $ff