mist: can now look at all corners of the octogon
@ -117,6 +117,12 @@ OCTAGON_RED_BOOKSHELF = 2
|
||||
OCTAGON_FIREPLACE = 3
|
||||
OCTAGON_IN_FIREPLACE = 4
|
||||
OCTAGON_CEILING = 5
|
||||
OCTAGON_MAP = 6
|
||||
OCTAGON_FRAME_SHELF = 7
|
||||
OCTAGON_BOOKSHELF = 8
|
||||
OCTAGON_FRAME_DOOR = 9
|
||||
OCTAGON_BLUE_BOOKSHELF = 10
|
||||
|
||||
|
||||
; Mechanical Engineering
|
||||
|
||||
|
@ -18,11 +18,18 @@ draw_pointer:
|
||||
cmp #$ff
|
||||
beq finger_not_special ; if $ff not special
|
||||
|
||||
lda (LOCATION_STRUCT_L),Y
|
||||
cmp #$4
|
||||
beq was_any
|
||||
|
||||
lda DIRECTION
|
||||
and #$f
|
||||
|
||||
cmp (LOCATION_STRUCT_L),Y
|
||||
bne finger_not_special ; only special if facing right way
|
||||
|
||||
was_any:
|
||||
|
||||
; see if X1 < X < X2
|
||||
lda CURSOR_X
|
||||
ldy #LOCATION_SPECIAL_X1
|
||||
|
@ -17,7 +17,12 @@ octagon_graphics.inc: \
|
||||
red_book_open.lzsa red_book_closed.lzsa \
|
||||
red_book_static.lzsa red_book_static2.lzsa \
|
||||
fireplace_e.lzsa \
|
||||
in_fireplace_w.lzsa in_fireplace_door.lzsa
|
||||
in_fireplace_w.lzsa in_fireplace_door.lzsa \
|
||||
frame_door_open.lzsa \
|
||||
frame_bookcase_open.lzsa \
|
||||
blue_book_shelf.lzsa \
|
||||
bookshelf_n.lzsa \
|
||||
map.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_center_n_lzsa: .incbin \"temple_center_n.lzsa\"" >> octagon_graphics.inc
|
||||
@ -33,8 +38,11 @@ octagon_graphics.inc: \
|
||||
echo "fireplace_e_lzsa: .incbin \"fireplace_e.lzsa\"" >> octagon_graphics.inc
|
||||
echo "in_fireplace_w_lzsa: .incbin \"in_fireplace_w.lzsa\"" >> octagon_graphics.inc
|
||||
echo "in_fireplace_door_lzsa: .incbin \"in_fireplace_door.lzsa\"" >> octagon_graphics.inc
|
||||
|
||||
|
||||
echo "frame_door_open_lzsa: .incbin \"frame_door_open.lzsa\"" >> octagon_graphics.inc
|
||||
echo "frame_bookcase_open_lzsa: .incbin \"frame_bookcase_open.lzsa\"" >> octagon_graphics.inc
|
||||
echo "blue_book_shelf_lzsa: .incbin \"blue_book_shelf.lzsa\"" >> octagon_graphics.inc
|
||||
echo "bookshelf_n_lzsa: .incbin \"bookshelf_n.lzsa\"" >> octagon_graphics.inc
|
||||
echo "map_lzsa: .incbin \"map.lzsa\"" >> octagon_graphics.inc
|
||||
|
||||
%.gr: %.png
|
||||
$(PNG2GR) $< $@
|
||||
|
BIN
mist/graphics_octagon/blue_book_shelf.png
Normal file
After Width: | Height: | Size: 9.9 KiB |
BIN
mist/graphics_octagon/bookshelf_n.png
Normal file
After Width: | Height: | Size: 911 B |
BIN
mist/graphics_octagon/frame_bookcase_open.png
Normal file
After Width: | Height: | Size: 842 B |
BIN
mist/graphics_octagon/frame_door_open.png
Normal file
After Width: | Height: | Size: 887 B |
BIN
mist/graphics_octagon/map.png
Normal file
After Width: | Height: | Size: 890 B |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
@ -5,7 +5,8 @@
|
||||
|
||||
locations:
|
||||
.word location0, location1, location2, location3
|
||||
.word location4, location5
|
||||
.word location4, location5, location6, location7
|
||||
.word location8, location9, location10
|
||||
|
||||
; OCTAGON_TEMPLE_DOORWAY -- temple doorway
|
||||
location0:
|
||||
@ -14,7 +15,7 @@ location0:
|
||||
.byte $ff ; south exit
|
||||
.byte $ff ; east exit
|
||||
.byte $ff ; west exit
|
||||
.byte DIRECTION_N ; north exit_dir
|
||||
.byte DIRECTION_N|DIRECTION_ONLY_POINT ; north exit_dir
|
||||
.byte DIRECTION_S ; south exit_dir
|
||||
.byte $ff ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
@ -44,7 +45,10 @@ location1:
|
||||
.word temple_center_e_lzsa ; east bg
|
||||
.word temple_center_w_lzsa ; west bg
|
||||
.byte BG_NORTH|BG_WEST|BG_SOUTH|BG_EAST ; all directions
|
||||
.byte $ff ; special exit
|
||||
.byte DIRECTION_ANY ; special exit
|
||||
.byte 4,35 ; special x
|
||||
.byte 0,46 ; special y
|
||||
.word handle_octagon-1 ; special function
|
||||
|
||||
; OCTAGON_RED_BOOK_SHELF -- red book shelf
|
||||
location2:
|
||||
@ -55,7 +59,7 @@ location2:
|
||||
.byte $ff ; north exit_dir
|
||||
.byte $ff ; south exit_dir
|
||||
.byte $ff ; east exit_dir
|
||||
.byte DIRECTION_W ; west exit_dir
|
||||
.byte DIRECTION_W|DIRECTION_ONLY_POINT ; west exit_dir
|
||||
.word $0000 ; north bg
|
||||
.word $0000 ; south bg
|
||||
.word $0000 ; east bg
|
||||
@ -92,7 +96,7 @@ location4:
|
||||
.byte $ff ; north exit_dir
|
||||
.byte $ff ; south exit_dir
|
||||
.byte $ff ; east exit_dir
|
||||
.byte DIRECTION_W ; west exit_dir
|
||||
.byte DIRECTION_W|DIRECTION_ONLY_POINT ; west exit_dir
|
||||
.word $0000 ; north bg
|
||||
.word $0000 ; south bg
|
||||
.word $0000 ; east bg
|
||||
@ -106,7 +110,7 @@ location5:
|
||||
.byte $ff ; south exit
|
||||
.byte $ff ; east exit
|
||||
.byte $ff ; west exit
|
||||
.byte DIRECTION_N ; north exit_dir
|
||||
.byte DIRECTION_N|DIRECTION_ONLY_POINT ; north exit_dir
|
||||
.byte $ff ; south exit_dir
|
||||
.byte $ff ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
@ -116,3 +120,91 @@ location5:
|
||||
.word $0000 ; west bg
|
||||
.byte BG_NORTH
|
||||
.byte $ff
|
||||
|
||||
; OCTAGON_MAP -- looking at map
|
||||
location6:
|
||||
.byte $ff ; north exit
|
||||
.byte $ff ; south exit
|
||||
.byte $ff ; east exit
|
||||
.byte OCTAGON_TEMPLE_CENTER ; 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 map_lzsa ; west bg
|
||||
.byte BG_WEST
|
||||
.byte $ff
|
||||
|
||||
; OCTAGON_FRAME_SHELF -- picture that moves the bookcase
|
||||
location7:
|
||||
.byte OCTAGON_TEMPLE_CENTER ; north exit
|
||||
.byte $ff ; south exit
|
||||
.byte $ff ; east exit
|
||||
.byte $ff ; west exit
|
||||
.byte DIRECTION_N|DIRECTION_ONLY_POINT ; north exit_dir
|
||||
.byte $ff ; south exit_dir
|
||||
.byte $ff ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
.word frame_bookcase_open_lzsa ; north bg
|
||||
.word $0000 ; south bg
|
||||
.word $0000 ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_NORTH
|
||||
.byte $ff
|
||||
|
||||
|
||||
; OCTAGON_BOOKSHELF -- the bookcase
|
||||
location8:
|
||||
.byte OCTAGON_TEMPLE_CENTER ; north exit
|
||||
.byte $ff ; south exit
|
||||
.byte $ff ; east exit
|
||||
.byte $ff ; west exit
|
||||
.byte DIRECTION_N|DIRECTION_ONLY_POINT ; north exit_dir
|
||||
.byte $ff ; south exit_dir
|
||||
.byte $ff ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
.word bookshelf_n_lzsa ; north bg
|
||||
.word $0000 ; south bg
|
||||
.word $0000 ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_NORTH
|
||||
.byte $ff
|
||||
|
||||
; OCTAGON_FRAME_DOOR -- picture that opens the door
|
||||
location9:
|
||||
.byte OCTAGON_TEMPLE_CENTER ; north exit
|
||||
.byte $ff ; south exit
|
||||
.byte $ff ; east exit
|
||||
.byte $ff ; west exit
|
||||
.byte DIRECTION_N|DIRECTION_ONLY_POINT ; north exit_dir
|
||||
.byte $ff ; south exit_dir
|
||||
.byte $ff ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
.word frame_door_open_lzsa ; north bg
|
||||
.word $0000 ; south bg
|
||||
.word $0000 ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_NORTH
|
||||
.byte $ff
|
||||
|
||||
; OCTAGON_BLUE_BOOKSHELF -- the blue bookshelf
|
||||
location10:
|
||||
.byte $ff ; north exit
|
||||
.byte $ff ; south exit
|
||||
.byte OCTAGON_TEMPLE_CENTER ; east exit
|
||||
.byte $ff ; west exit
|
||||
.byte $ff ; north exit_dir
|
||||
.byte $ff ; south exit_dir
|
||||
.byte DIRECTION_E|DIRECTION_ONLY_POINT ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
.word $0000 ; north bg
|
||||
.word $0000 ; south bg
|
||||
.word blue_book_shelf_lzsa ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_EAST
|
||||
.byte $ff
|
||||
|
||||
|
||||
|
@ -114,6 +114,97 @@ leave_octagon:
|
||||
|
||||
rts
|
||||
|
||||
handle_octagon:
|
||||
|
||||
ldx CURSOR_X
|
||||
|
||||
lda DIRECTION
|
||||
and #$f
|
||||
|
||||
cmp #DIRECTION_W
|
||||
beq octagon_w
|
||||
|
||||
cmp #DIRECTION_E
|
||||
beq octagon_e
|
||||
|
||||
cmp #DIRECTION_S
|
||||
beq octagon_s
|
||||
|
||||
octagon_n:
|
||||
cpx #10
|
||||
bcc goto_shelf_frame
|
||||
cpx #29
|
||||
bcs goto_door_frame
|
||||
bcc goto_bookshelf
|
||||
|
||||
octagon_e:
|
||||
cpx #10
|
||||
bcc goto_door_frame
|
||||
cpx #29
|
||||
bcs goto_fireplace
|
||||
bcc goto_blue_book
|
||||
|
||||
octagon_w:
|
||||
cpx #10
|
||||
bcc goto_map
|
||||
cpx #29
|
||||
bcs goto_shelf_frame
|
||||
bcc goto_red_book
|
||||
|
||||
octagon_s:
|
||||
cpx #10
|
||||
bcc goto_fireplace
|
||||
cpx #29
|
||||
bcs goto_map
|
||||
bcc goto_door
|
||||
|
||||
goto_map:
|
||||
ldy #OCTAGON_MAP
|
||||
lda #DIRECTION_W
|
||||
jmp done_goto
|
||||
|
||||
goto_red_book:
|
||||
ldy #OCTAGON_RED_BOOKSHELF
|
||||
lda #DIRECTION_W
|
||||
jmp done_goto
|
||||
|
||||
goto_shelf_frame:
|
||||
ldy #OCTAGON_FRAME_SHELF
|
||||
lda #DIRECTION_N
|
||||
jmp done_goto
|
||||
|
||||
goto_bookshelf:
|
||||
ldy #OCTAGON_BOOKSHELF
|
||||
lda #DIRECTION_N
|
||||
jmp done_goto
|
||||
|
||||
goto_door_frame:
|
||||
ldy #OCTAGON_FRAME_DOOR
|
||||
lda #DIRECTION_N
|
||||
jmp done_goto
|
||||
|
||||
goto_blue_book:
|
||||
ldy #OCTAGON_BLUE_BOOKSHELF
|
||||
lda #DIRECTION_E
|
||||
jmp done_goto
|
||||
|
||||
goto_fireplace:
|
||||
ldy #OCTAGON_FIREPLACE
|
||||
lda #DIRECTION_E
|
||||
jmp done_goto
|
||||
|
||||
goto_door:
|
||||
ldy #OCTAGON_TEMPLE_DOORWAY
|
||||
lda #DIRECTION_S
|
||||
jmp done_goto
|
||||
|
||||
done_goto:
|
||||
sty LOCATION
|
||||
sta DIRECTION
|
||||
jmp change_location
|
||||
|
||||
|
||||
|
||||
|
||||
;==========================
|
||||
; includes
|
||||
|
@ -40,6 +40,7 @@ DIRECTION = $66
|
||||
DIRECTION_S = $1
|
||||
DIRECTION_E = $2
|
||||
DIRECTION_W = $3
|
||||
DIRECTION_ANY=$4
|
||||
DIRECTION_ONLY_POINT = $40 ; do not change pointer to grab
|
||||
DIRECTION_SPLIT = $80 ; split text/graphics
|
||||
LOCATION = $67
|
||||
|