mist: octagon: can close fireplace door

This commit is contained in:
Vince Weaver 2020-07-06 14:07:23 -04:00
parent 73928d0699
commit ee7cd987ee
5 changed files with 45 additions and 2 deletions

View File

@ -137,6 +137,7 @@ octagon.o: octagon.s zp.inc hardware.inc common_defines.inc \
handle_pages.s \
octagon_bookshelf.s \
octagon_rotation.s \
octagon_fireplace.s \
gr_copy.s audio.s text_print.s decompress_fast_v2.s
ca65 -o octagon.o octagon.s -l octagon.lst

View File

@ -141,6 +141,7 @@ OCTAGON_BLUE_BOOK_OPEN = 30
OCTAGON_RED_END = 31
OCTAGON_BLUE_END = 32
OCTAGON_GRID_BOOK = 33
OCTAGON_IN_FIREPLACE_CLOSED = 34
; Mechanical Engineering

View File

@ -12,7 +12,7 @@ locations:
.word location20,location21,location22,location23
.word location24,location25,location26,location27
.word location28,location29,location30,location31
.word location32,location33
.word location32,location33,location34
; OCTAGON_TEMPLE_DOORWAY -- temple doorway
location0:
@ -108,7 +108,11 @@ location4:
.word $0000 ; east bg
.word in_fireplace_w_lzsa ; west bg
.byte BG_WEST ; west
.byte $ff ; special exit
.byte DIRECTION_W ; special exit
.byte 3,8 ; special x
.byte 22,32 ; special y
.word close_fireplace-1 ; special function
; OCTAGON_CEILING -- ceiling of temple
location5:
@ -631,3 +635,24 @@ location33:
.byte 6,34 ; special x
.byte 5,35 ; special y
.word turn_page-1 ; special function
; OCTAGON_IN_FIREPLACE_CLOSED -- in fireplace, closed
location34:
.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 DIRECTION_W|DIRECTION_ONLY_POINT ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word $0000 ; east bg
.word in_fireplace_door_lzsa ; west bg
.byte BG_WEST ; west
.byte DIRECTION_W ; special exit
.byte 3,8 ; special x
.byte 22,32 ; special y
.word open_fireplace-1 ; special function

View File

@ -415,6 +415,7 @@ draw_page_close:
.include "brother_books.s"
.include "octagon_bookshelf.s"
.include "octagon_rotation.s"
.include "octagon_fireplace.s"
; linking books
.include "handle_pages.s"

15
mist/octagon_fireplace.s Normal file
View File

@ -0,0 +1,15 @@
open_fireplace:
lda #OCTAGON_IN_FIREPLACE
sta LOCATION
jmp change_location
close_fireplace:
lda #OCTAGON_IN_FIREPLACE_CLOSED
sta LOCATION
jmp change_location