mist: dentist: can turn off the lights
|
@ -61,3 +61,10 @@
|
|||
.byte $00 ; CHANNEL_SWITCHES = $B5
|
||||
.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_Y
|
||||
|
||||
; handle light switch
|
||||
|
||||
jsr setup_backgrounds
|
||||
|
||||
; set up initial 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
|
||||
|
|
|
@ -10,22 +10,29 @@ all: dentist_graphics.inc
|
|||
dentist_graphics.inc: \
|
||||
dentist_door_n.lzsa dentist_door_s.lzsa \
|
||||
dentist_door_open_n.lzsa \
|
||||
dentist_door_open_dark_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 \
|
||||
panel_up.lzsa \
|
||||
chair_close_dark_s.lzsa chair_close_dark_n.lzsa \
|
||||
panel_up.lzsa panel_up_dark.lzsa \
|
||||
panel.lzsa
|
||||
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_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 "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_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_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_dark_lzsa: .incbin \"panel_up_dark.lzsa\"" >> dentist_graphics.inc
|
||||
echo "panel_lzsa: .incbin \"panel.lzsa\"" >> dentist_graphics.inc
|
||||
|
||||
|
||||
|
||||
%.gr: %.png
|
||||
$(PNG2GR) $< $@
|
||||
|
||||
|
|
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 12 KiB |
|
@ -61,7 +61,10 @@ location2:
|
|||
.word $0000 ; east bg
|
||||
.word $0000 ; west bg
|
||||
.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
|
||||
location3:
|
||||
|
|