diff --git a/mist/Makefile b/mist/Makefile index fe6e4b82..8eee2a14 100644 --- a/mist/Makefile +++ b/mist/Makefile @@ -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 diff --git a/mist/common_defines.inc b/mist/common_defines.inc index e645a8c1..6c809107 100644 --- a/mist/common_defines.inc +++ b/mist/common_defines.inc @@ -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 diff --git a/mist/leveldata_octagon.inc b/mist/leveldata_octagon.inc index 735dac4f..56397d33 100644 --- a/mist/leveldata_octagon.inc +++ b/mist/leveldata_octagon.inc @@ -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 + diff --git a/mist/octagon.s b/mist/octagon.s index e6e5fd68..e7da592d 100644 --- a/mist/octagon.s +++ b/mist/octagon.s @@ -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" diff --git a/mist/octagon_fireplace.s b/mist/octagon_fireplace.s new file mode 100644 index 00000000..5b708d98 --- /dev/null +++ b/mist/octagon_fireplace.s @@ -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 +