mist: working on generator room

This commit is contained in:
Vince Weaver 2020-03-11 00:12:10 -04:00
parent 9ae4f77998
commit 58df88587a
5 changed files with 13 additions and 2 deletions

View File

@ -8,7 +8,7 @@ open_gen_door:
sta location35,Y
ldy #LOCATION_NORTH_EXIT_DIR
lda #DIRECTION_N
lda #(DIRECTION_N | DIRECTION_SPLIT)
sta location35,Y
ldy #LOCATION_NORTH_BG

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1014 B

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -120,6 +120,13 @@ change_direction:
; load background
lda DIRECTION
bpl no_split
bit TEXTGR
jmp done_split
no_split:
bit FULLGR
done_split:
and #$f ; mask off special flags
asl
clc
adc #LOCATION_NORTH_BG
@ -169,6 +176,7 @@ go_forward:
; update new location
lda DIRECTION
and #$f
clc
adc #LOCATION_NORTH_EXIT
tay
@ -182,6 +190,7 @@ go_forward:
; update new direction
lda DIRECTION
and #$f
clc
adc #LOCATION_NORTH_EXIT_DIR
tay

View File

@ -710,7 +710,7 @@ location36:
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH | BG_SOUTH
.byte $ff
.byte $ff ; DIRECTION_N|DIRECTION_SPLIT|DIRECTION_ONLY_POINT

View File

@ -40,6 +40,8 @@ DIRECTION = $66
DIRECTION_S = $1
DIRECTION_E = $2
DIRECTION_W = $3
DIRECTION_ONLY_POINT = $40 ; do not change pointer to grab
DIRECTION_SPLIT = $80 ; split text/graphics
LOCATION = $67
LOCATION_STRUCT_L = $68
LOCATION_STRUCT_H = $69