mist: start adding channel age

This commit is contained in:
Vince Weaver 2020-04-09 01:23:32 -04:00
parent be14e9c1bc
commit 7a3700b798
14 changed files with 248 additions and 6 deletions

View File

@ -11,7 +11,8 @@ all: mist.dsk mist_side2.dsk
zip: mist.dsk mist_side2.dsk
zip mist.zip mist.dsk mist_side2.dsk
mist.dsk: HELLO LOADER MIST_TITLE MIST OCTAGON MECHE SELENA VIEWER STONEY
mist.dsk: HELLO LOADER MIST_TITLE MIST OCTAGON VIEWER \
MECHE SELENA CHANNEL STONEY
cp empty.dsk mist.dsk
$(DOS33) -y mist.dsk SAVE A HELLO
$(DOS33) -y mist.dsk BSAVE -a 0x1000 LOADER
@ -20,6 +21,7 @@ mist.dsk: HELLO LOADER MIST_TITLE MIST OCTAGON MECHE SELENA VIEWER STONEY
$(DOS33) -y mist.dsk BSAVE -a 0x1400 OCTAGON
# $(DOS33) -y mist.dsk BSAVE -a 0x1400 MECHE
$(DOS33) -y mist.dsk BSAVE -a 0x1400 SELENA
$(DOS33) -y mist.dsk BSAVE -a 0x1400 CHANNEL
$(DOS33) -y mist.dsk BSAVE -a 0x1400 VIEWER
$(DOS33) -y mist.dsk BSAVE -a 0x1400 STONEY
$(DOS33) -y mist.dsk BSAVE -a 0x9000 ./audio/link_noise.btc LINK_NOISE.BTC
@ -166,6 +168,22 @@ stoney.o: stoney.s zp.inc hardware.inc common_defines.inc \
gr_copy.s audio.s text_print.s decompress_fast_v2.s
ca65 -o stoney.o stoney.s -l stoney.lst
####
CHANNEL: channel.o
ld65 -o CHANNEL channel.o -C ../linker_scripts/apple2_1400.inc
channel.o: channel.s zp.inc hardware.inc common_defines.inc \
graphics_channel/channel_graphics.inc \
common_sprites.inc \
page_sprites.inc \
leveldata_channel.inc \
keyboard.s \
draw_pointer.s \
gr_copy.s audio.s text_print.s decompress_fast_v2.s
ca65 -o channel.o channel.s -l channel.lst
####
@ -177,4 +195,6 @@ graphics_island/mist_graphics.inc:
####
clean:
rm -f *~ *.o *.lst HELLO LOADER MIST_TITLE MIST OCTAGON MECHE SELENA
rm -f *~ *.o *.lst HELLO LOADER MIST_TITLE \
MIST OCTAGON \
MECHE SELENA STONEY CHANNEL

152
mist/channel.s Normal file
View File

@ -0,0 +1,152 @@
; The Channely Wood level
; by deater (Vince Weaver) <vince@deater.net>
; Zero Page
.include "zp.inc"
.include "hardware.inc"
.include "common_defines.inc"
channel_start:
;===================
; init screen
jsr TEXT
jsr HOME
bit KEYRESET
bit SET_GR
bit PAGE0
bit LORES
bit FULLGR
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
; FIXME
; handle gear visibility
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 #MECHE_OPEN_BOOK
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
back_to_mist:
lda #$ff
sta LEVEL_OVER
lda #MIST_ARRIVAL_DOCK ; the dock
sta LOCATION
lda #DIRECTION_N
sta DIRECTION
lda #LOAD_MIST
sta WHICH_LOAD
rts
;==========================
; includes
;==========================
.include "gr_copy.s"
.include "gr_offsets.s"
.include "gr_pageflip.s"
.include "gr_putsprite_crop.s"
.include "text_print.s"
.include "gr_fast_clear.s"
.include "decompress_fast_v2.s"
.include "keyboard.s"
.include "draw_pointer.s"
.include "end_level.s"
.include "graphics_channel/channel_graphics.inc"
; puzzles
.include "common_sprites.inc"
.include "page_sprites.inc"
.include "leveldata_channel.inc"

View File

@ -218,4 +218,13 @@ STONEY_SHIP_CHAIR = 4
STONEY_SHIP_BOOK_CLOSED = 5
STONEY_SHIP_BOOK_OPEN = 6
; Channely Wood
CHANNEL_OUTSIDE_DOOR = 0
CHANNEL_INSIDE_HOUSE = 1
CHANNEL_SAFE = 2
CHANNEL_TREE_ELEVATOR = 3
CHANNEL_TREE_BASEMENT = 4
CHANNEL_TREE_BOOK = 5
CHANNEL_TREE_BOOK_CLOSED= 6
CHANNEL_TREE_BOOK_OPEN = 7
CHANNEL_ARRIVAL = 8

View File

@ -0,0 +1,32 @@
#include ../Makefile.inc
PNG2RLE = ../../gr-utils/png2rle
PNG2GR = ../../gr-utils/png2gr
LZSA = ~/research/lzsa/lzsa/lzsa
all: channel_graphics.inc
####
channel_graphics.inc: \
arrival_n.lzsa arrival_s.lzsa \
tree_basement_n.lzsa tree_basement_s.lzsa \
tree_basement_book_s.lzsa \
tree_elevator_basement_s.lzsa
echo "arrival_n_lzsa: .incbin \"arrival_n.lzsa\"" > channel_graphics.inc
echo "arrival_s_lzsa: .incbin \"arrival_s.lzsa\"" >> channel_graphics.inc
echo "tree_basement_s_lzsa: .incbin \"tree_basement_s.lzsa\"" >> channel_graphics.inc
echo "tree_basement_n_lzsa: .incbin \"tree_basement_n.lzsa\"" >> channel_graphics.inc
echo "tree_basement_book_s_lzsa: .incbin \"tree_basement_book_s.lzsa\"" >> channel_graphics.inc
echo "tree_elevator_basement_s_lzsa: .incbin \"tree_elevator_basement_s.lzsa\"" >> channel_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: 986 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 B

View File

@ -31,4 +31,4 @@ stoney_graphics.inc: \
####
clean:
rm -f *~ *.o *.lst *.gr *.lzsa viewer_graphics.inc
rm -f *~ *.o *.lst *.gr *.lzsa stoney_graphics.inc

View File

@ -0,0 +1,29 @@
;===============================================
; level data for Channely Wood
;===============================================
locations:
.word location0
; CHANNEL_OUTSIDE_DOOR -- outside
location0:
.byte $ff ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH|BG_SOUTH
.byte $ff
; .byte DIRECTION_E ; special exit
; .byte 12,25 ; special x
; .byte 26,46 ; special y
; .word controls_pressed-1 ; special function

View File

@ -1,6 +1,6 @@
;===============================================
; level data for Viewer Room
; level data for Stoney Ship
;===============================================
locations:

View File

@ -7,7 +7,7 @@
.include "hardware.inc"
.include "common_defines.inc"
viewer_start:
stoney_start:
;===================
; init screen
jsr TEXT