mist: break off dentist code

This commit is contained in:
Vince Weaver 2020-07-02 15:27:41 -04:00
parent f0d5db68cb
commit 839ec94f10
12 changed files with 352 additions and 22 deletions

View File

@ -12,7 +12,7 @@ zip: mist.dsk mist_side2.dsk mist_side3.dsk
zip mist.zip mist.dsk mist_side2.dsk mist_side3.dsk
mist.dsk: HELLO LOADER MIST_TITLE MIST OCTAGON VIEWER \
MECHE SELENA CABIN CHANNEL STONEY SAVE0
MECHE SELENA CABIN CHANNEL STONEY DENTIST SAVE0
cp empty.dsk mist.dsk
$(DOS33) -y mist.dsk SAVE A HELLO
$(DOS33) -y mist.dsk BSAVE -a 0x1000 LOADER
@ -24,6 +24,7 @@ mist.dsk: HELLO LOADER MIST_TITLE MIST OCTAGON VIEWER \
$(DOS33) -y mist.dsk BSAVE -a 0x2000 CABIN
# $(DOS33) -y mist.dsk BSAVE -a 0x2000 VIEWER
$(DOS33) -y mist.dsk BSAVE -a 0x2000 STONEY
$(DOS33) -y mist.dsk BSAVE -a 0x2000 DENTIST
$(DOS33) -y mist.dsk BSAVE -a 0xe00 SAVE0
$(DOS33) -y mist.dsk BSAVE -a 0x9000 ./audio/link_noise.btc LINK_NOISE.BTC
@ -287,6 +288,19 @@ nibel.o: nibel.s zp.inc hardware.inc common_defines.inc \
####
DENTIST: dentist.o
ld65 -o DENTIST dentist.o -C ../linker_scripts/apple2_2000.inc
dentist.o: dentist.s zp.inc hardware.inc common_defines.inc \
common_routines.inc \
graphics_dentist/dentist_graphics.inc \
leveldata_dentist.inc \
dentist_panel.s
ca65 -o dentist.o dentist.s -l dentist.lst
####
graphics_island/mist_graphics.inc:
cd graphics_island && make
@ -296,5 +310,5 @@ graphics_island/mist_graphics.inc:
clean:
rm -f *~ *.o *.lst HELLO HELLO_DISK2 \
LOADER MIST_TITLE \
MIST OCTAGON \
MIST OCTAGON VIEWER DENTIST \
MECHE SELENA STONEY CHANNEL ARBOR NIBEL

View File

@ -1,3 +1,10 @@
; MIST alt backgrounds
; + due to gears being open:
; + due to bridge being up:
; + due to ship being up:
; + due to light switch on: 1
For release 1.0
+ split rocket puzzle off of selenetic?
@ -34,13 +41,15 @@ For release 1.0
-- show water in pipe (because no sound clue for water running?)
-- from path can still see down elev1 even if up
+ NIBEL
-- turn on sprite crop in the viewer part
Done:
+ MECHE
+ MIST_TITLE
+ VIEWER
+ ARBOR
+ NIBEL
================================

View File

@ -79,7 +79,7 @@ MIST_TREE_CORRIDOR_2 = 13
MIST_TREE_CORRIDOR_5 = 14
MIST_GEAR = 15
MIST_GEAR_BASE = 16
MIST_DENTIST_DOOR = 17
;MIST_DENTIST_DOOR = 17
MIST_SPACESHIP_SWITCH = 18
MIST_TREE_CORRIDOR_4 = 19
MIST_UNUSED = 20
@ -87,7 +87,7 @@ MIST_CLOCK_PUZZLE = 21
MIST_CLOCK_ISLAND = 22
MIST_CLOCK_INSIDE = 23
MIST_OPEN_GEAR = 24
MIST_CHAIR_VIEW = 25
;MIST_CHAIR_VIEW = 25
MIST_GREEN_SHACK = 26
MIST_GREEN_STEPS1 = 27
MIST_GREEN_STEPS6 = 28
@ -103,7 +103,7 @@ MIST_TOWER1_TRAIL2 = 37
MIST_TOWER1_BOTTOM = 38
MIST_TOWER1_TOP = 39
MIST_VIEWER_DOOR = 40
; re-use 20
; re-use 17,20,25
; Mist Octagon Building
@ -412,4 +412,10 @@ NIBEL_RED_BED = 15
NIBEL_RED_BED_OPEN = 16
NIBEL_HALF_LETTER = 17
DENTIST_OUTSIDE = 0
DENTIST_OUTSIDE_OPEN = 1
DENTIST_INSIDE_DOOR = 2
DENTIST_CHAIR_CLOSE = 3
DENTIST_PANEL_UP = 4
DENTIST_PANEL = 5

138
mist/dentist.s Normal file
View File

@ -0,0 +1,138 @@
; The Planetarium / Dentist Office
; by deater (Vince Weaver) <vince@deater.net>
; Zero Page
.include "zp.inc"
.include "hardware.inc"
.include "common_defines.inc"
.include "common_routines.inc"
dentist_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 #NIBEL_BLUE_ROOM
; beq fg_draw_blue_page
; cmp #NIBEL_RED_TABLE_OPEN
; beq fg_draw_red_page
; cmp #NIBEL_BLUE_HOUSE_VIEWER
; beq animate_viewer
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_dentist/dentist_graphics.inc"
; puzzles
.include "dentist_panel.s"
; level data
.include "leveldata_dentist.inc"

35
mist/dentist_panel.s Normal file
View File

@ -0,0 +1,35 @@
; Power up, blinks switches yellow
; Change state, change button blinks
; animates to screen
; remembers light switch and date settings even when leave room
; day of month is 1-31 (even on months w/o)
; year 0-9999, leading 0 suppression
; time 1200AM - 1159PM
; 012345678901234567890
; _
; : : : : :
; : :-: :\:
;:_: : : : :
; __ _ __
;: : : /
;:-- :- :-
;: :_ :_/
; _ _
;: : : : : :
;:V: :-: :_/
;: : : : : \
; 1 2 3
;012345678901234567890123456789013456789
; _ _ ___ __ __
;: : : : : : 1984
;: : : : -- --
;:_: :_ : :__ :__ 10 04 AM
; _ _ __ _ _
; | | | : : : | | | | | | |
; | | | : : : | -| |-| |_|
; - - : . : : | _| |_| |

View File

Before

Width:  |  Height:  |  Size: 568 B

After

Width:  |  Height:  |  Size: 568 B

View File

Before

Width:  |  Height:  |  Size: 451 B

After

Width:  |  Height:  |  Size: 451 B

View File

Before

Width:  |  Height:  |  Size: 446 B

After

Width:  |  Height:  |  Size: 446 B

View File

Before

Width:  |  Height:  |  Size: 652 B

After

Width:  |  Height:  |  Size: 652 B

113
mist/leveldata_dentist.inc Normal file
View File

@ -0,0 +1,113 @@
;===============================================
; level data for Dentist/Planetarium level
;===============================================
locations:
.word location0, location1, location2, location3
.word location4, location5
; DENTIST_OUTSIDE -- outside dentist door
location0:
.byte DENTIST_OUTSIDE_OPEN ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte DIRECTION_N ; north exit_dir
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word dentist_door_n_lzsa ; north bg
.word dentist_door_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH | BG_SOUTH
.byte $ff ; special exit
; DENTIST_OUTSIDE_OPEN -- outside dentist door, which is open
location1:
.byte DENTIST_INSIDE_DOOR ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte DIRECTION_N ; north exit_dir
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word dentist_door_n_lzsa ; north bg
.word dentist_door_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH | BG_SOUTH
.byte $ff ; special exit
; DENTIST_INSIDE_DOOR -- chair view
location2:
.byte DENTIST_CHAIR_CLOSE ; north exit
.byte DENTIST_OUTSIDE ; 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 chair_view_n_lzsa ; north bg
.word chair_view_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH | BG_SOUTH
.byte $ff ; TODO: lightswitch
; DENTIST_CHAIR_CLOSE -- chair view
location3:
.byte DENTIST_PANEL_UP ; north exit
.byte DENTIST_INSIDE_DOOR ; 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 chair_view_n_lzsa ; north bg
.word chair_view_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH | BG_SOUTH
.byte $ff ; TODO: lightswitch
; DENTIST_PANEL_UP -- sitting in chair
location4:
.byte DENTIST_PANEL ; north exit
.byte $ff ; 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 chair_view_n_lzsa ; north bg
.word chair_view_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH | BG_SOUTH
.byte $ff ; TODO: lightswitch
; DENTIST_PANEL -- looking at panel
location5:
.byte DENTIST_PANEL_UP ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte DIRECTION_N ; north exit_dir
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word panel_lzsa ; north bg
.word $0000 ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH
.byte $ff ; special

View File

@ -150,11 +150,11 @@ location6:
; MIST_STEPS_DENTIST -- steps outside dentist chair branch
location7:
.byte MIST_DENTIST_DOOR ; north exit
.byte $ff ; north exit
.byte $ff ; south exit
.byte MIST_STEPS_2ND_LANDING ; east exit
.byte 8 ; west exit
.byte DIRECTION_N ; north exit_dir
.byte MIST_STEPS_4TH_LANDING ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_E ; east exit_dir
.byte DIRECTION_W ; west exit_dir
@ -163,7 +163,11 @@ location7:
.word step_dentist_e_lzsa ; east bg
.word step_dentist_w_lzsa ; west bg
.byte BG_EAST|BG_WEST|BG_NORTH
.byte $ff ; special exit
.byte DIRECTION_N ; special exit (letter)
.byte 10,30 ; special x
.byte 0,46 ; special y
.word goto_dentist-1
; MIST_STEPS_4TH_LANDING -- steps one more time up
location8:
@ -335,9 +339,9 @@ location16:
.byte BG_NORTH | BG_EAST
.byte $ff ; special exit
; MIST_DENTIST_DOOR -- dentist door
; MIST_DENTIST_DOOR (unused) -- dentist door
location17:
.byte MIST_CHAIR_VIEW ; north exit
.byte $ff ; north exit
.byte MIST_STEPS_4TH_LANDING ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
@ -345,8 +349,8 @@ location17:
.byte DIRECTION_W ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word dentist_door_n_lzsa ; north bg
.word dentist_door_s_lzsa ; south bg
.word $0000 ; north bg
.word $0000 ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH | BG_SOUTH
@ -484,19 +488,19 @@ location24:
.byte 14,24 ; special y
.word go_to_meche-1 ; special function
; MIST_CHAIR_VIEW -- chair view
; MIST_CHAIR_VIEW (unused) -- chair view
location25:
.byte MIST_CHAIR_VIEW ; north exit
.byte MIST_DENTIST_DOOR ; south exit
.byte $ff ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte DIRECTION_S ; north exit_dir
.byte DIRECTION_S ; south exit_dir
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word chair_view_n_lzsa ; north bg
.word chair_view_s_lzsa ; south bg
.word gear_open_e_lzsa ; east bg
.word $0000 ; north bg
.word $0000 ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH | BG_SOUTH
.byte $ff ; TODO: lightswitch

View File

@ -223,6 +223,17 @@ enter_octagon:
jmp set_level_over
goto_dentist:
lda #DENTIST_OUTSIDE
sta LOCATION
lda #LOAD_DENTIST
sta WHICH_LOAD
jmp set_level_over
enter_viewer:
lda #VIEWER_STEPS