mist: octagon: can pick up pages in the fireplace

this means you can in theory lose the game now
This commit is contained in:
Vince Weaver 2020-07-06 17:27:27 -04:00
parent ee7cd987ee
commit f4797184b3
9 changed files with 224 additions and 5 deletions

View File

@ -21,7 +21,13 @@ For release 1.0
-- up/down in tree
+ OCTAGON
-- code book
-- ending
-- red book seen when in fireplace
-- pages in fireplace
-- green book Atrus animation (first)
-- link to DNI
-- DNI
-- books destroyed at end
+ SELENA
-- sounds/door puzzle
-- have sub background change

View File

@ -142,6 +142,12 @@ OCTAGON_RED_END = 31
OCTAGON_BLUE_END = 32
OCTAGON_GRID_BOOK = 33
OCTAGON_IN_FIREPLACE_CLOSED = 34
OCTAGON_FIREPLACE_SHELF = 35
OCTAGON_GREEN_BOOK = 36
OCTAGON_GREEN_BOOK_OPEN = 37
OCTAGON_DNI = 38
OCTAGON_DNI_DESK = 39
; Mechanical Engineering

View File

@ -49,7 +49,9 @@ octagon_graphics.inc: \
tower_key_view_gears_hint_n.lzsa tower_key_view_tree_hint_n.lzsa \
elevator_door_closed_s.lzsa \
elevator_dark_s.lzsa \
red_book_ending.lzsa blue_book_ending.lzsa
red_book_ending.lzsa blue_book_ending.lzsa \
fireplace_shelf.lzsa \
green_book.lzsa green_book_open.lzsa
echo "temple_door_n_lzsa: .incbin \"temple_door_n.lzsa\"" > octagon_graphics.inc
echo "temple_door_s_lzsa: .incbin \"temple_door_s.lzsa\"" >> octagon_graphics.inc
echo "temple_door_closed_s_lzsa: .incbin \"temple_door_closed_s.lzsa\"" >> octagon_graphics.inc
@ -121,6 +123,11 @@ octagon_graphics.inc: \
echo "elevator_dark_s_lzsa: .incbin \"elevator_dark_s.lzsa\"" >> octagon_graphics.inc
echo "red_book_ending_lzsa: .incbin \"red_book_ending.lzsa\"" >> octagon_graphics.inc
echo "blue_book_ending_lzsa: .incbin \"blue_book_ending.lzsa\"" >> octagon_graphics.inc
echo "fireplace_shelf_lzsa: .incbin \"fireplace_shelf.lzsa\"" >> octagon_graphics.inc
echo "green_book_lzsa: .incbin \"green_book.lzsa\"" >> octagon_graphics.inc
echo "green_book_open_lzsa: .incbin \"green_book_open.lzsa\"" >> octagon_graphics.inc
%.gr: %.png
$(PNG2GR) $< $@

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -12,7 +12,8 @@ locations:
.word location20,location21,location22,location23
.word location24,location25,location26,location27
.word location28,location29,location30,location31
.word location32,location33,location34
.word location32,location33,location34,location35
.word location36,location37
; OCTAGON_TEMPLE_DOORWAY -- temple doorway
location0:
@ -641,11 +642,11 @@ location34:
.byte $ff ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte OCTAGON_FIREPLACE_SHELF ; 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
.byte DIRECTION_E ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word $0000 ; east bg
@ -656,3 +657,62 @@ location34:
.byte 22,32 ; special y
.word open_fireplace-1 ; special function
; OCTAGON_FIREPLACE_SHELF -- in fireplace, rotated shelf
location35:
.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 $ff ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word fireplace_shelf_lzsa ; east bg
.word $0000 ; west bg
.byte BG_EAST
.byte DIRECTION_E ; special exit
.byte 3,30 ; special x
.byte 6,44 ; special y
.word fireplace_shelf_action-1 ; special function
; OCTAGON_GREEN_BOOK -- looking at green book
location36:
.byte $ff ; north exit
.byte $ff ; south exit
.byte OCTAGON_GREEN_BOOK_OPEN ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_E ; east exit_dir
.byte $ff ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word green_book_lzsa ; east bg
.word $0000 ; west bg
.byte BG_EAST
.byte $ff ; special exit
; OCTAGON_GREEN_BOOK_OPEN -- green book is open
location37:
.byte $ff ; north exit
.byte $ff ; south exit
.byte OCTAGON_FIREPLACE_SHELF ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_E ; east exit_dir
.byte $ff ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word green_book_open_lzsa ; east bg
.word $0000 ; west bg
.byte BG_EAST
.byte $ff ; special exit
.byte 3,8 ; special x
.byte 22,32 ; special y
.word return_fireplace-1 ; special function

View File

@ -78,6 +78,13 @@ game_loop:
cmp #OCTAGON_GRID_BOOK
beq looking_at_grid_book
cmp #OCTAGON_FIREPLACE_SHELF
bne check_temple_center
jsr draw_fireplace_shelf_pages
jmp done_foreground
check_temple_center:
cmp #OCTAGON_TEMPLE_CENTER
bne check_page_close_red
jsr draw_octagon_page_far
@ -401,6 +408,54 @@ draw_page_close:
;======================================
; draw pages on fireplace shelf
draw_fireplace_shelf_pages:
draw_fireplace_red:
lda RED_PAGES_TAKEN
and #FINAL_PAGE
bne draw_fireplace_blue
lda #<red_page_sprite
sta INL
lda #>red_page_sprite
sta INH
lda #21
sta XPOS
lda #30
sta YPOS
jsr put_sprite_crop ; tail call
draw_fireplace_blue:
lda BLUE_PAGES_TAKEN
and #FINAL_PAGE
bne done_fireplace_page
lda #<blue_page_sprite
sta INL
lda #>blue_page_sprite
sta INH
lda #15
sta XPOS
lda #30
sta YPOS
jsr put_sprite_crop ; tail call
done_fireplace_page:
rts
;==========================
; includes

View File

@ -1,4 +1,13 @@
; button closes/opens fireplace
; code is erased if wrong
; press it when right code, rotates to books
; atrus writing, looks up says something, back down to writing
open_fireplace:
lda #OCTAGON_IN_FIREPLACE
@ -13,3 +22,79 @@ close_fireplace:
jmp change_location
fireplace_shelf_action:
; see if button
fireplace_check_button:
lda CURSOR_X
cmp #9
bcs fireplace_check_book
lda CURSOR_Y
cmp #32
bcs fireplace_nil
cmp #20
bcc fireplace_nil
bcs return_fireplace
; see if green book
fireplace_check_book:
lda CURSOR_Y
cmp #26
bcs fireplace_check_blue_page
lda CURSOR_X
cmp #17
bcc fireplace_nil
bcs open_green_book
; see if blue page
fireplace_check_blue_page:
lda CURSOR_X
cmp #14
bcc fireplace_nil
cmp #20
bcs fireplace_check_red_page
bcc fireplace_grab_blue_page
; see if red page
fireplace_check_red_page:
jmp fireplace_grab_red_page
; otherwise, do nothing
fireplace_nil:
rts
return_fireplace:
lda #OCTAGON_IN_FIREPLACE
sta LOCATION
lda #DIRECTION_W
sta DIRECTION
jmp change_location
open_green_book:
lda #OCTAGON_GREEN_BOOK
sta LOCATION
jmp change_location
fireplace_grab_red_page:
lda RED_PAGES_TAKEN
and #FINAL_PAGE
bne missing_page
lda #FINAL_PAGE
jmp take_red_page
missing_page:
rts
fireplace_grab_blue_page:
lda BLUE_PAGES_TAKEN
and #FINAL_PAGE
bne missing_page
lda #FINAL_PAGE
jmp take_blue_page