mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-27 17:29:49 +00:00
mist: add initial stoneship access
This commit is contained in:
parent
46dc8b5e4d
commit
282ebdd475
@ -8,7 +8,7 @@ B2D = ../bmp2dhr/b2d
|
||||
|
||||
all: mist.dsk
|
||||
|
||||
mist.dsk: HELLO LOADER MIST_TITLE MIST OCTAGON MECHE SELENA VIEWER
|
||||
mist.dsk: HELLO LOADER MIST_TITLE MIST OCTAGON MECHE SELENA VIEWER STONEY
|
||||
cp empty.dsk mist.dsk
|
||||
$(DOS33) -y mist.dsk SAVE A HELLO
|
||||
$(DOS33) -y mist.dsk BSAVE -a 0x1000 LOADER
|
||||
@ -18,6 +18,7 @@ mist.dsk: HELLO LOADER MIST_TITLE MIST OCTAGON MECHE SELENA VIEWER
|
||||
$(DOS33) -y mist.dsk BSAVE -a 0x1400 MECHE
|
||||
$(DOS33) -y mist.dsk BSAVE -a 0x1400 SELENA
|
||||
$(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
|
||||
|
||||
###
|
||||
@ -137,6 +138,22 @@ viewer.o: viewer.s zp.inc hardware.inc common_defines.inc \
|
||||
gr_copy.s audio.s text_print.s decompress_fast_v2.s
|
||||
ca65 -o viewer.o viewer.s -l viewer.lst
|
||||
|
||||
####
|
||||
|
||||
STONEY: stoney.o
|
||||
ld65 -o STONEY stoney.o -C ../linker_scripts/apple2_1400.inc
|
||||
|
||||
stoney.o: stoney.s zp.inc hardware.inc common_defines.inc \
|
||||
graphics_stoney/stoney_graphics.inc \
|
||||
common_sprites.inc \
|
||||
page_sprites.inc \
|
||||
leveldata_stoney.inc \
|
||||
keyboard.s \
|
||||
draw_pointer.s \
|
||||
gr_copy.s audio.s text_print.s decompress_fast_v2.s
|
||||
ca65 -o stoney.o stoney.s -l stoney.lst
|
||||
|
||||
|
||||
|
||||
####
|
||||
|
||||
|
@ -52,7 +52,7 @@ LOAD_MECHE = $2
|
||||
LOAD_SELENA = $3
|
||||
LOAD_OCTAGON = $4
|
||||
LOAD_VIEWER = $5
|
||||
LOAD_STONEDSHIP = $6
|
||||
LOAD_STONEY = $6
|
||||
LOAD_CHANNEL = $7
|
||||
LOAD_ENDING = $8
|
||||
|
||||
@ -186,3 +186,12 @@ SELENA_BOOK_OPEN = 10
|
||||
VIEWER_STEPS = 0
|
||||
VIEWER_POOL = 1
|
||||
|
||||
; Stoney Ship
|
||||
STONEY_SHIP_STERN = 0
|
||||
STONEY_SHIP_BOW = 1
|
||||
STONEY_SHIP_DOOR_OPEN = 2
|
||||
STONEY_SHIP_CHAIR = 3
|
||||
STONEY_SHIP_BOOK_CLOSED = 4
|
||||
STONEY_SHIP_BOOK_OPEN = 5
|
||||
|
||||
|
||||
|
33
mist/graphics_stoney/Makefile
Normal file
33
mist/graphics_stoney/Makefile
Normal file
@ -0,0 +1,33 @@
|
||||
#include ../Makefile.inc
|
||||
|
||||
PNG2RLE = ../../gr-utils/png2rle
|
||||
PNG2GR = ../../gr-utils/png2gr
|
||||
LZSA = ~/research/lzsa/lzsa/lzsa
|
||||
|
||||
all: stoney_graphics.inc
|
||||
|
||||
####
|
||||
|
||||
stoney_graphics.inc: \
|
||||
ship_entry_n.lzsa ship_entry_s.lzsa \
|
||||
ship_bow_s.lzsa ship_bow_go_n.lzsa \
|
||||
book_chair_s.lzsa
|
||||
echo "ship_entry_n_lzsa: .incbin \"ship_entry_n.lzsa\"" > stoney_graphics.inc
|
||||
echo "ship_entry_s_lzsa: .incbin \"ship_entry_s.lzsa\"" >> stoney_graphics.inc
|
||||
echo "ship_bow_s_lzsa: .incbin \"ship_bow_s.lzsa\"" >> stoney_graphics.inc
|
||||
echo "ship_bow_go_n_lzsa: .incbin \"ship_bow_go_n.lzsa\"" >> stoney_graphics.inc
|
||||
echo "book_chair_s_lzsa: .incbin \"book_chair_s.lzsa\"" >> stoney_graphics.inc
|
||||
|
||||
|
||||
|
||||
|
||||
%.gr: %.png
|
||||
$(PNG2GR) $< $@
|
||||
|
||||
%.lzsa: %.gr
|
||||
$(LZSA) -r -f2 $< $@
|
||||
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst *.gr *.lzsa viewer_graphics.inc
|
BIN
mist/graphics_stoney/book_chair_s.png
Normal file
BIN
mist/graphics_stoney/book_chair_s.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
BIN
mist/graphics_stoney/ship_bow_go_n.png
Normal file
BIN
mist/graphics_stoney/ship_bow_go_n.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
mist/graphics_stoney/ship_bow_s.png
Normal file
BIN
mist/graphics_stoney/ship_bow_s.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
BIN
mist/graphics_stoney/ship_entry_n.png
Normal file
BIN
mist/graphics_stoney/ship_entry_n.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
mist/graphics_stoney/ship_entry_s.png
Normal file
BIN
mist/graphics_stoney/ship_entry_s.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
@ -31,7 +31,11 @@ location0:
|
||||
.word dock_e_lzsa ; east bg
|
||||
.word dock_w_lzsa ; west bg
|
||||
.byte BG_EAST|BG_NORTH|BG_SOUTH|BG_WEST ; all bgs
|
||||
.byte $ff ; special exit
|
||||
.byte DIRECTION_E ; special exit
|
||||
.byte 9,29 ; special x
|
||||
.byte 2,46 ; special y
|
||||
.word enter_stoneyship-1 ; special function
|
||||
|
||||
|
||||
; MIST_DOCK_SWITCH -- by dock switch
|
||||
location1:
|
||||
|
49
mist/leveldata_stoney.inc
Normal file
49
mist/leveldata_stoney.inc
Normal file
@ -0,0 +1,49 @@
|
||||
|
||||
;===============================================
|
||||
; level data for Viewer Room
|
||||
;===============================================
|
||||
|
||||
locations:
|
||||
.word location0, location1
|
||||
|
||||
|
||||
; STONEY_SHIP_STERN -- back of the ship
|
||||
location0:
|
||||
.byte STONEY_SHIP_BOW ; north exit
|
||||
.byte STONEY_SHIP_DOOR_OPEN ; south exit
|
||||
.byte $ff ; east exit
|
||||
.byte $ff ; west exit
|
||||
.byte DIRECTION_N ; north exit_dir
|
||||
.byte DIRECTION_S ; south exit_dir
|
||||
.byte $ff ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
.word ship_entry_n_lzsa ; north bg
|
||||
.word ship_entry_s_lzsa ; 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
|
||||
|
||||
; Ship Bow -- bow of the ship
|
||||
location1:
|
||||
.byte $ff ; north exit
|
||||
.byte STONEY_SHIP_STERN ; south exit
|
||||
.byte $ff ; east exit
|
||||
.byte $ff ; west exit
|
||||
.byte $ff ; north exit_dir
|
||||
.byte DIRECTION_S ; south exit_dir
|
||||
.byte $ff ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
.word ship_bow_go_n_lzsa ; north bg
|
||||
.word ship_bow_s_lzsa ; south bg
|
||||
.word $0000 ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_NORTH | BG_SOUTH
|
||||
.byte DIRECTION_N ; special exit
|
||||
.byte 9,29 ; special x
|
||||
.byte 2,46 ; special y
|
||||
.word back_to_mist-1 ; special function
|
@ -41,6 +41,7 @@ location1:
|
||||
.word viewer_e_lzsa ; east bg
|
||||
.word viewer_w_lzsa ; west bg
|
||||
.byte BG_EAST|BG_WEST
|
||||
.byte $ff
|
||||
; .byte DIRECTION_E ; special exit
|
||||
; .byte 12,25 ; special x
|
||||
; .byte 26,46 ; special y
|
||||
|
@ -157,7 +157,7 @@ copy_filename_done:
|
||||
filenames:
|
||||
.word intro_filename
|
||||
.word mist_filename,meche_filename,selena_filename,octagon_filename
|
||||
.word viewer_filename,ending_filename
|
||||
.word viewer_filename,stoney_filename,channel_filename,ending_filename
|
||||
|
||||
intro_filename:
|
||||
.byte "MIST_TITLE",0
|
||||
@ -171,6 +171,10 @@ octagon_filename:
|
||||
.byte "OCTAGON",0
|
||||
viewer_filename:
|
||||
.byte "VIEWER",0
|
||||
stoney_filename:
|
||||
.byte "STONEY",0
|
||||
channel_filename:
|
||||
.byte "CHANNEL",0
|
||||
ending_filename:
|
||||
.byte "ENDING",0
|
||||
|
||||
|
27
mist/mist.s
27
mist/mist.s
@ -157,12 +157,7 @@ go_to_meche:
|
||||
lda #DIRECTION_E
|
||||
sta DIRECTION
|
||||
|
||||
|
||||
lda #$ff
|
||||
sta LEVEL_OVER
|
||||
|
||||
rts
|
||||
|
||||
jmp set_level_over
|
||||
|
||||
pad_special:
|
||||
lda #MIST_TOWER2_PATH
|
||||
@ -214,10 +209,7 @@ enter_octagon:
|
||||
lda #LOAD_OCTAGON
|
||||
sta WHICH_LOAD
|
||||
|
||||
lda #$ff
|
||||
sta LEVEL_OVER
|
||||
|
||||
rts
|
||||
jmp set_level_over
|
||||
|
||||
enter_viewer:
|
||||
|
||||
@ -227,14 +219,25 @@ enter_viewer:
|
||||
lda #LOAD_VIEWER
|
||||
sta WHICH_LOAD
|
||||
|
||||
jmp set_level_over
|
||||
|
||||
enter_stoneyship:
|
||||
lda #STONEY_SHIP_STERN
|
||||
sta LOCATION
|
||||
|
||||
lda #DIRECTION_N
|
||||
sta DIRECTION
|
||||
|
||||
lda #LOAD_STONEY
|
||||
sta WHICH_LOAD
|
||||
|
||||
set_level_over:
|
||||
lda #$ff
|
||||
sta LEVEL_OVER
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
;==========================
|
||||
; includes
|
||||
;==========================
|
||||
|
152
mist/stoney.s
Normal file
152
mist/stoney.s
Normal file
@ -0,0 +1,152 @@
|
||||
; The Stone Ship level
|
||||
|
||||
; by deater (Vince Weaver) <vince@deater.net>
|
||||
|
||||
; Zero Page
|
||||
.include "zp.inc"
|
||||
.include "hardware.inc"
|
||||
.include "common_defines.inc"
|
||||
|
||||
viewer_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_stoney/stoney_graphics.inc"
|
||||
|
||||
|
||||
; puzzles
|
||||
|
||||
.include "common_sprites.inc"
|
||||
|
||||
.include "page_sprites.inc"
|
||||
|
||||
.include "leveldata_stoney.inc"
|
Loading…
Reference in New Issue
Block a user