mist: dentist: can turn off the lights
|
@ -61,3 +61,10 @@
|
||||||
.byte $00 ; CHANNEL_SWITCHES = $B5
|
.byte $00 ; CHANNEL_SWITCHES = $B5
|
||||||
.byte $00 ; CHANNEL_VALVES = $B6
|
.byte $00 ; CHANNEL_VALVES = $B6
|
||||||
|
|
||||||
|
.byte $00 ; DENTIST_LIGHT = $B7
|
||||||
|
.byte $00 ; DENTIST_MONTH = $B8
|
||||||
|
.byte $00 ; DENTIST_DAY = $B9
|
||||||
|
.byte $00 ; DENTIST_CENTURY = $BA
|
||||||
|
.byte $00 ; DENTIST_YEAR = $BB
|
||||||
|
.byte $00 ; DENTIST_HOURS = $BC
|
||||||
|
.byte $00 ; DENTIST_MINUTES = $BD
|
||||||
|
|
|
@ -40,6 +40,10 @@ dentist_start:
|
||||||
sta CURSOR_X
|
sta CURSOR_X
|
||||||
sta CURSOR_Y
|
sta CURSOR_Y
|
||||||
|
|
||||||
|
; handle light switch
|
||||||
|
|
||||||
|
jsr setup_backgrounds
|
||||||
|
|
||||||
; set up initial location
|
; set up initial location
|
||||||
|
|
||||||
jsr change_location
|
jsr change_location
|
||||||
|
@ -166,6 +170,98 @@ pull_down_panel:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
light_switch:
|
||||||
|
|
||||||
|
lda DENTIST_LIGHT
|
||||||
|
eor #$1
|
||||||
|
sta DENTIST_LIGHT
|
||||||
|
|
||||||
|
jsr setup_backgrounds
|
||||||
|
|
||||||
|
jmp change_location
|
||||||
|
|
||||||
|
|
||||||
|
; setup backgrounds based on light switch being on or off
|
||||||
|
setup_backgrounds:
|
||||||
|
|
||||||
|
lda DENTIST_LIGHT
|
||||||
|
bne lights_are_off
|
||||||
|
|
||||||
|
; lights are on
|
||||||
|
lights_are_on:
|
||||||
|
ldy #LOCATION_NORTH_BG
|
||||||
|
lda #<dentist_door_open_n_lzsa
|
||||||
|
sta location1,Y
|
||||||
|
lda #>dentist_door_open_n_lzsa
|
||||||
|
sta location1+1,Y ; DENTIST_OUTSIDE_OPEN
|
||||||
|
|
||||||
|
lda #<chair_view_n_lzsa
|
||||||
|
sta location2,Y
|
||||||
|
lda #>chair_view_n_lzsa
|
||||||
|
sta location2+1,Y ; DENTIST_INSIDE_DOOR
|
||||||
|
|
||||||
|
lda #<chair_close_n_lzsa
|
||||||
|
sta location3,Y
|
||||||
|
lda #>chair_close_n_lzsa
|
||||||
|
sta location3+1,Y ; DENTIST_CHAIR_CLOSE
|
||||||
|
|
||||||
|
lda #<panel_up_lzsa
|
||||||
|
sta location4,Y
|
||||||
|
lda #>panel_up_lzsa
|
||||||
|
sta location4+1,Y ; DENTIST_PANEL_UP
|
||||||
|
|
||||||
|
|
||||||
|
ldy #LOCATION_SOUTH_BG
|
||||||
|
lda #<chair_view_s_lzsa
|
||||||
|
sta location2,Y
|
||||||
|
lda #>chair_view_s_lzsa
|
||||||
|
sta location2+1,Y ; DENTIST_INSIDE_DOOR
|
||||||
|
|
||||||
|
lda #<chair_close_s_lzsa
|
||||||
|
sta location3,Y
|
||||||
|
lda #>chair_close_s_lzsa
|
||||||
|
sta location3+1,Y ; DENTIST_CHAIR_CLOSE
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
; lights are off
|
||||||
|
lights_are_off:
|
||||||
|
ldy #LOCATION_NORTH_BG
|
||||||
|
lda #<dentist_door_open_dark_n_lzsa
|
||||||
|
sta location1,Y
|
||||||
|
lda #>dentist_door_open_dark_n_lzsa
|
||||||
|
sta location1+1,Y ; DENTIST_OUTSIDE_OPEN
|
||||||
|
|
||||||
|
lda #<chair_view_dark_n_lzsa
|
||||||
|
sta location2,Y
|
||||||
|
lda #>chair_view_dark_n_lzsa
|
||||||
|
sta location2+1,Y ; DENTIST_INSIDE_DOOR
|
||||||
|
|
||||||
|
lda #<chair_close_dark_n_lzsa
|
||||||
|
sta location3,Y
|
||||||
|
lda #>chair_close_dark_n_lzsa
|
||||||
|
sta location3+1,Y ; DENTIST_CHAIR_CLOSE
|
||||||
|
|
||||||
|
lda #<panel_up_dark_lzsa
|
||||||
|
sta location4,Y
|
||||||
|
lda #>panel_up_dark_lzsa
|
||||||
|
sta location4+1,Y ; DENTIST_PANEL_UP
|
||||||
|
|
||||||
|
|
||||||
|
ldy #LOCATION_SOUTH_BG
|
||||||
|
lda #<chair_view_dark_s_lzsa
|
||||||
|
sta location2,Y
|
||||||
|
lda #>chair_view_dark_s_lzsa
|
||||||
|
sta location2+1,Y ; DENTIST_INSIDE_DOOR
|
||||||
|
|
||||||
|
lda #<chair_close_dark_s_lzsa
|
||||||
|
sta location3,Y
|
||||||
|
lda #>chair_close_dark_s_lzsa
|
||||||
|
sta location3+1,Y ; DENTIST_CHAIR_CLOSE
|
||||||
|
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
;==========================
|
;==========================
|
||||||
; includes
|
; includes
|
||||||
|
|
|
@ -10,22 +10,29 @@ all: dentist_graphics.inc
|
||||||
dentist_graphics.inc: \
|
dentist_graphics.inc: \
|
||||||
dentist_door_n.lzsa dentist_door_s.lzsa \
|
dentist_door_n.lzsa dentist_door_s.lzsa \
|
||||||
dentist_door_open_n.lzsa \
|
dentist_door_open_n.lzsa \
|
||||||
|
dentist_door_open_dark_n.lzsa \
|
||||||
chair_view_s.lzsa chair_view_n.lzsa \
|
chair_view_s.lzsa chair_view_n.lzsa \
|
||||||
|
chair_view_dark_s.lzsa chair_view_dark_n.lzsa \
|
||||||
chair_close_s.lzsa chair_close_n.lzsa \
|
chair_close_s.lzsa chair_close_n.lzsa \
|
||||||
panel_up.lzsa \
|
chair_close_dark_s.lzsa chair_close_dark_n.lzsa \
|
||||||
|
panel_up.lzsa panel_up_dark.lzsa \
|
||||||
panel.lzsa
|
panel.lzsa
|
||||||
echo "dentist_door_n_lzsa: .incbin \"dentist_door_n.lzsa\"" > dentist_graphics.inc
|
echo "dentist_door_n_lzsa: .incbin \"dentist_door_n.lzsa\"" > dentist_graphics.inc
|
||||||
echo "dentist_door_open_n_lzsa: .incbin \"dentist_door_open_n.lzsa\"" >> dentist_graphics.inc
|
echo "dentist_door_open_n_lzsa: .incbin \"dentist_door_open_n.lzsa\"" >> dentist_graphics.inc
|
||||||
|
echo "dentist_door_open_dark_n_lzsa: .incbin \"dentist_door_open_dark_n.lzsa\"" >> dentist_graphics.inc
|
||||||
echo "dentist_door_s_lzsa: .incbin \"dentist_door_s.lzsa\"" >> dentist_graphics.inc
|
echo "dentist_door_s_lzsa: .incbin \"dentist_door_s.lzsa\"" >> dentist_graphics.inc
|
||||||
echo "chair_view_s_lzsa: .incbin \"chair_view_s.lzsa\"" >> dentist_graphics.inc
|
echo "chair_view_s_lzsa: .incbin \"chair_view_s.lzsa\"" >> dentist_graphics.inc
|
||||||
echo "chair_view_n_lzsa: .incbin \"chair_view_n.lzsa\"" >> dentist_graphics.inc
|
echo "chair_view_n_lzsa: .incbin \"chair_view_n.lzsa\"" >> dentist_graphics.inc
|
||||||
|
echo "chair_view_dark_s_lzsa: .incbin \"chair_view_dark_s.lzsa\"" >> dentist_graphics.inc
|
||||||
|
echo "chair_view_dark_n_lzsa: .incbin \"chair_view_dark_n.lzsa\"" >> dentist_graphics.inc
|
||||||
echo "chair_close_s_lzsa: .incbin \"chair_close_s.lzsa\"" >> dentist_graphics.inc
|
echo "chair_close_s_lzsa: .incbin \"chair_close_s.lzsa\"" >> dentist_graphics.inc
|
||||||
echo "chair_close_n_lzsa: .incbin \"chair_close_n.lzsa\"" >> dentist_graphics.inc
|
echo "chair_close_n_lzsa: .incbin \"chair_close_n.lzsa\"" >> dentist_graphics.inc
|
||||||
|
echo "chair_close_dark_s_lzsa: .incbin \"chair_close_dark_s.lzsa\"" >> dentist_graphics.inc
|
||||||
|
echo "chair_close_dark_n_lzsa: .incbin \"chair_close_dark_n.lzsa\"" >> dentist_graphics.inc
|
||||||
echo "panel_up_lzsa: .incbin \"panel_up.lzsa\"" >> dentist_graphics.inc
|
echo "panel_up_lzsa: .incbin \"panel_up.lzsa\"" >> dentist_graphics.inc
|
||||||
|
echo "panel_up_dark_lzsa: .incbin \"panel_up_dark.lzsa\"" >> dentist_graphics.inc
|
||||||
echo "panel_lzsa: .incbin \"panel.lzsa\"" >> dentist_graphics.inc
|
echo "panel_lzsa: .incbin \"panel.lzsa\"" >> dentist_graphics.inc
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%.gr: %.png
|
%.gr: %.png
|
||||||
$(PNG2GR) $< $@
|
$(PNG2GR) $< $@
|
||||||
|
|
||||||
|
|
BIN
mist/graphics_dentist/chair_close_dark_n.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
mist/graphics_dentist/chair_close_dark_s.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
mist/graphics_dentist/chair_view_dark_n.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
mist/graphics_dentist/chair_view_dark_s.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
mist/graphics_dentist/dentist_door_open_dark_n.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
mist/graphics_dentist/panel.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
mist/graphics_dentist/panel_up_dark.png
Normal file
After Width: | Height: | Size: 12 KiB |
|
@ -61,7 +61,10 @@ location2:
|
||||||
.word $0000 ; east bg
|
.word $0000 ; east bg
|
||||||
.word $0000 ; west bg
|
.word $0000 ; west bg
|
||||||
.byte BG_NORTH | BG_SOUTH
|
.byte BG_NORTH | BG_SOUTH
|
||||||
.byte $ff ; TODO: lightswitch
|
.byte DIRECTION_S ; special exit
|
||||||
|
.byte 29,34 ; special x
|
||||||
|
.byte 18,30 ; special y
|
||||||
|
.word light_switch-1
|
||||||
|
|
||||||
; DENTIST_CHAIR_CLOSE -- chair view
|
; DENTIST_CHAIR_CLOSE -- chair view
|
||||||
location3:
|
location3:
|
||||||
|
|