mist: properly have channelwood/cabin separated

also auto-generate common_routines.inc
This commit is contained in:
Vince Weaver 2020-06-16 14:55:45 -04:00
parent 2da8748aac
commit 4b1ef860b4
14 changed files with 264 additions and 523 deletions

View File

@ -40,10 +40,12 @@ mist_side2.dsk: HELLO_DISK2 MECHE SELENA CHANNEL VIEWER
LOADER: loader.o LOADER: loader.o
ld65 -o LOADER loader.o -C ../linker_scripts/apple2_1000.inc ld65 -o LOADER loader.o -C ../linker_scripts/apple2_1000.inc
loader.o: loader.s loader.o: loader.s \
gr_copy.s gr_offsets.s gr_pageflip.s gr_putsprite_crop.s \
text_print.s gr_fast_clear.s decompress_fast_v2.s \
keyboard.s draw_pointer.s end_level.s audio.s
ca65 -o loader.o loader.s -l loader.lst ca65 -o loader.o loader.s -l loader.lst
### ###
HELLO: hello.bas HELLO: hello.bas
@ -52,6 +54,17 @@ HELLO: hello.bas
HELLO_DISK2: hello_disk2.bas HELLO_DISK2: hello_disk2.bas
../asoft_basic-utils/tokenize_asoft < hello_disk2.bas > HELLO_DISK2 ../asoft_basic-utils/tokenize_asoft < hello_disk2.bas > HELLO_DISK2
####
generate_common: generate_common.o
$(CC) $(LFLAGS) -o generate_common generate_common.o
generate_common.o: generate_common.c
$(CC) $(CFLAGS) -c generate_common.c
####
common_routines.inc: loader.lst generate_common
./generate_common > common_routines.inc
#### ####

View File

@ -192,7 +192,7 @@ enter_tree_path:
lda #DIRECTION_E lda #DIRECTION_E
sta DIRECTION sta DIRECTION
lda #CHANNEL_TREE_PATH lda #CABIN_TREE_PATH
sta LOCATION sta LOCATION
jmp change_location jmp change_location
@ -201,7 +201,7 @@ enter_tree_path:
enter_cabin: enter_cabin:
lda #DIRECTION_E lda #DIRECTION_E
sta DIRECTION sta DIRECTION
lda #CHANNEL_CABIN_OPEN lda #CABIN_OPEN
sta LOCATION sta LOCATION
jmp change_location jmp change_location

View File

@ -83,36 +83,11 @@ game_loop:
;==================================== ;====================================
lda LOCATION lda LOCATION
cmp #CHANNEL_TREE_BOOK_OPEN
beq animate_channel_book
cmp #CHANNEL_BOOK_OPEN cmp #CHANNEL_BOOK_OPEN
beq animate_mist_book beq animate_mist_book
jmp nothing_special jmp nothing_special
animate_channel_book:
lda ANIMATE_FRAME
cmp #11
bcc channel_book_good
lda #0
sta ANIMATE_FRAME
channel_book_good:
; handle animated linking book
lda ANIMATE_FRAME
asl
tay
lda channel_movie,Y
sta INL
lda channel_movie+1,Y
sta INH
lda #22
jmp draw_book
animate_mist_book: animate_mist_book:
lda DIRECTION lda DIRECTION
cmp #DIRECTION_S cmp #DIRECTION_S
@ -135,7 +110,6 @@ mist_book_good:
sta INH sta INH
lda #24 lda #24
draw_book:
sta XPOS sta XPOS
lda #12 lda #12
@ -212,79 +186,6 @@ toggle_faucet:
rts rts
back_to_mist:
lda #DIRECTION_N
sta DIRECTION
lda #MIST_ARRIVAL_DOCK ; the dock
jmp exit_to_mist
enter_clock:
lda #DIRECTION_S
sta DIRECTION
lda #MIST_CLOCK
jmp exit_to_mist
handle_clearing:
lda DIRECTION
cmp #DIRECTION_W
beq enter_path
; else going east
lda CURSOR_X
cmp #23
bcc enter_cabin
enter_tree_path:
lda #DIRECTION_E
sta DIRECTION
lda #CHANNEL_TREE_PATH
sta LOCATION
jmp change_location
enter_cabin:
lda #DIRECTION_E
sta DIRECTION
lda #CHANNEL_CABIN_OPEN
sta LOCATION
jmp change_location
enter_path:
lda #DIRECTION_N
sta DIRECTION
lda #MIST_TREE_CORRIDOR_5
jmp exit_to_mist
exit_to_mist:
sta LOCATION
lda #$ff
sta LEVEL_OVER
lda #LOAD_MIST
sta WHICH_LOAD
rts
;========================== ;==========================
; includes ; includes
;========================== ;==========================

View File

@ -35,14 +35,14 @@ book_elevator_floor1:
ldy #LOCATION_SOUTH_BG ldy #LOCATION_SOUTH_BG
lda #<book_elevator_inside_gnd_closed_lzsa lda #<book_elevator_inside_gnd_closed_lzsa
sta location44,Y ; CHANNEL_BOOK_E_IN_CLOSED sta location31,Y ; CHANNEL_BOOK_E_IN_CLOSED
lda #>book_elevator_inside_gnd_closed_lzsa lda #>book_elevator_inside_gnd_closed_lzsa
sta location44+1,Y ; CHANNEL_BOOK_E_IN_CLOSED sta location31+1,Y ; CHANNEL_BOOK_E_IN_CLOSED
; change exit ; change exit
ldy #LOCATION_SOUTH_EXIT ldy #LOCATION_SOUTH_EXIT
lda #CHANNEL_BOOK_E_INSIDE_GND lda #CHANNEL_BOOK_E_INSIDE_GND
sta location44,Y ; CHANNEL_BOOK_E_IN_CLOSED sta location31,Y ; CHANNEL_BOOK_E_IN_CLOSED
jmp book_elevator_handle_done jmp book_elevator_handle_done
book_elevator_floor2: book_elevator_floor2:
@ -51,14 +51,14 @@ book_elevator_floor2:
ldy #LOCATION_SOUTH_BG ldy #LOCATION_SOUTH_BG
lda #<book_elevator_inside_top_closed_lzsa lda #<book_elevator_inside_top_closed_lzsa
sta location44,Y ; CHANNEL_BOOK_E_IN_CLOSED sta location31,Y ; CHANNEL_BOOK_E_IN_CLOSED
lda #>book_elevator_inside_top_closed_lzsa lda #>book_elevator_inside_top_closed_lzsa
sta location44+1,Y ; CHANNEL_BOOK_E_IN_CLOSED sta location31+1,Y ; CHANNEL_BOOK_E_IN_CLOSED
; change exit ; change exit
ldy #LOCATION_SOUTH_EXIT ldy #LOCATION_SOUTH_EXIT
lda #CHANNEL_BOOK_E_INSIDE_TOP lda #CHANNEL_BOOK_E_INSIDE_TOP
sta location44,Y ; CHANNEL_BOOK_E_IN_CLOSED sta location31,Y ; CHANNEL_BOOK_E_IN_CLOSED
book_elevator_handle_done: book_elevator_handle_done:
@ -156,14 +156,14 @@ bridge_is_up:
ldy #LOCATION_EAST_BG ldy #LOCATION_EAST_BG
lda #<bridge_up_e_lzsa lda #<bridge_up_e_lzsa
sta location16,Y ; CHANNEL_BRIDGE sta location3,Y ; CHANNEL_BRIDGE
lda #>bridge_up_e_lzsa lda #>bridge_up_e_lzsa
sta location16+1,Y ; CHANNEL_BRIDGE sta location3+1,Y ; CHANNEL_BRIDGE
; change to allow crossing bridge ; change to allow crossing bridge
ldy #LOCATION_EAST_EXIT ldy #LOCATION_EAST_EXIT
lda #CHANNEL_AFTER_BRIDGE1 lda #CHANNEL_AFTER_BRIDGE1
sta location16,Y ; CHANNEL_BRIDGE sta location3,Y ; CHANNEL_BRIDGE
jmp adjust_pipe jmp adjust_pipe
bridge_is_down: bridge_is_down:
@ -172,14 +172,14 @@ bridge_is_down:
ldy #LOCATION_EAST_BG ldy #LOCATION_EAST_BG
lda #<bridge_down_e_lzsa lda #<bridge_down_e_lzsa
sta location16,Y ; CHANNEL_BRIDGE sta location3,Y ; CHANNEL_BRIDGE
lda #>bridge_down_e_lzsa lda #>bridge_down_e_lzsa
sta location16+1,Y ; CHANNEL_BRIDGE sta location3+1,Y ; CHANNEL_BRIDGE
; change to allow crossing bridge ; change to allow crossing bridge
ldy #LOCATION_EAST_EXIT ldy #LOCATION_EAST_EXIT
lda #$ff lda #$ff
sta location16,Y ; CHANNEL_BRIDGE sta location3,Y ; CHANNEL_BRIDGE
adjust_pipe: adjust_pipe:
@ -195,18 +195,18 @@ pipe_extended:
ldy #LOCATION_SOUTH_BG ldy #LOCATION_SOUTH_BG
lda #<pipe_extend_up_s_lzsa lda #<pipe_extend_up_s_lzsa
sta location40,Y ; CHANNEL_PIPE_EXTEND sta location27,Y ; CHANNEL_PIPE_EXTEND
lda #>pipe_extend_up_s_lzsa lda #>pipe_extend_up_s_lzsa
sta location40+1,Y ; CHANNEL_PIPE_EXTEND sta location27+1,Y ; CHANNEL_PIPE_EXTEND
; also change for other side of bridge ; also change for other side of bridge
ldy #LOCATION_WEST_BG ldy #LOCATION_WEST_BG
lda #<pipe_bridge2_up_w_lzsa lda #<pipe_bridge2_up_w_lzsa
sta location23,Y ; CHANNEL_PIPE_BRIDGE2 sta location10,Y ; CHANNEL_PIPE_BRIDGE2
lda #>pipe_bridge2_up_w_lzsa lda #>pipe_bridge2_up_w_lzsa
sta location23+1,Y ; CHANNEL_PIPE_BRIDGE2 sta location10+1,Y ; CHANNEL_PIPE_BRIDGE2
jmp done_adjust_changes jmp done_adjust_changes
@ -216,18 +216,18 @@ pipe_stowed:
ldy #LOCATION_SOUTH_BG ldy #LOCATION_SOUTH_BG
lda #<pipe_extend_down_s_lzsa lda #<pipe_extend_down_s_lzsa
sta location40,Y ; CHANNEL_PIPE_EXTEND sta location27,Y ; CHANNEL_PIPE_EXTEND
lda #>pipe_extend_down_s_lzsa lda #>pipe_extend_down_s_lzsa
sta location40+1,Y ; CHANNEL_PIPE_EXTEND sta location27+1,Y ; CHANNEL_PIPE_EXTEND
; also change for other side of bridge ; also change for other side of bridge
ldy #LOCATION_WEST_BG ldy #LOCATION_WEST_BG
lda #<pipe_bridge2_w_lzsa lda #<pipe_bridge2_w_lzsa
sta location23,Y ; CHANNEL_PIPE_BRIDGE2 sta location10,Y ; CHANNEL_PIPE_BRIDGE2
lda #>pipe_bridge2_w_lzsa lda #>pipe_bridge2_w_lzsa
sta location23+1,Y ; CHANNEL_PIPE_BRIDGE2 sta location10+1,Y ; CHANNEL_PIPE_BRIDGE2
done_adjust_changes: done_adjust_changes:

View File

@ -303,55 +303,42 @@ STONEY_BLUE_HALFMESSAGE = 50
STONEY_CRAWLWAY_RIGHT = 51 STONEY_CRAWLWAY_RIGHT = 51
; Channely Wood ; Channely Wood
CHANNEL_OUTSIDE_CABIN = 0 CHANNEL_ARRIVAL = 0
CHANNEL_CABIN_OPEN = 1 CHANNEL_PATH2 = 1
CHANNEL_CABIN_ENTRANCE = 2 CHANNEL_PATH3 = 2
CHANNEL_INSIDE_CABIN = 3 CHANNEL_BRIDGE = 3
CHANNEL_SAFE = 4 CHANNEL_PATH4 = 4
CHANNEL_CLOCK_PATH = 5 CHANNEL_PATH5 = 5
CHANNEL_TREE_PATH = 6 CHANNEL_PATH6 = 6
CHANNEL_BIG_TREE = 7 CHANNEL_FORK = 7
CHANNEL_TREE_ELEVATOR = 8 CHANNEL_BEFORE_ELEV1 = 8
CHANNEL_TREE_BASEMENT = 9 CHANNEL_IN_ELEVATOR1 = 9
CHANNEL_TREE_BOOK = 10 CHANNEL_PIPE_BRIDGE2 = 10
CHANNEL_TREE_BOOK_CLOSED= 11 CHANNEL_STEPS_FORK = 11
CHANNEL_TREE_BOOK_OPEN = 12 CHANNEL_STEPS_PATH = 12
CHANNEL_ARRIVAL = 13 CHANNEL_STEPS_DOOR = 13
CHANNEL_PATH2 = 14 CHANNEL_WIND_PATH = 14
CHANNEL_PATH3 = 15 CHANNEL_WIND_PATH2 = 15
CHANNEL_BRIDGE = 16 CHANNEL_ISLAND1 = 16
CHANNEL_PATH4 = 17 CHANNEL_ISLAND2 = 17
CHANNEL_PATH5 = 18 CHANNEL_ISLAND3 = 18
CHANNEL_PATH6 = 19 CHANNEL_SHACK = 19
CHANNEL_FORK = 20 CHANNEL_TANK = 20
CHANNEL_BEFORE_ELEV1 = 21 CHANNEL_TANK_CLOSE = 21
CHANNEL_IN_ELEVATOR1 = 22 CHANNEL_WINDMILL = 22
CHANNEL_PIPE_BRIDGE2 = 23 CHANNEL_OUT_BACK = 23
CHANNEL_STEPS_FORK = 24 CHANNEL_AFTER_BRIDGE1 = 24
CHANNEL_STEPS_PATH = 25 CHANNEL_AFTER_BRIDGE2 = 25
CHANNEL_STEPS_DOOR = 26 CHANNEL_BOOK_FORK = 26
CHANNEL_WIND_PATH = 27 CHANNEL_PIPE_EXTEND = 27
CHANNEL_WIND_PATH2 = 28 CHANNEL_BOOK_ELEVATOR = 28
CHANNEL_ISLAND1 = 29 CHANNEL_BOOK_E_OPEN = 29
CHANNEL_ISLAND2 = 30 CHANNEL_BOOK_E_INSIDE_GND= 30
CHANNEL_ISLAND3 = 31 CHANNEL_BOOK_E_IN_CLOSED= 31
CHANNEL_SHACK = 32 CHANNEL_BOOK_E_INSIDE_TOP= 32
CHANNEL_TANK = 33 CHANNEL_BOOK_ROOM = 33
CHANNEL_TANK_CLOSE = 34 CHANNEL_BOOK_CLOSED = 34
CHANNEL_WINDMILL = 35 CHANNEL_BOOK_OPEN = 35
CHANNEL_OUT_BACK = 36
CHANNEL_AFTER_BRIDGE1 = 37
CHANNEL_AFTER_BRIDGE2 = 38
CHANNEL_BOOK_FORK = 39
CHANNEL_PIPE_EXTEND = 40
CHANNEL_BOOK_ELEVATOR = 41
CHANNEL_BOOK_E_OPEN = 42
CHANNEL_BOOK_E_INSIDE_GND= 43
CHANNEL_BOOK_E_IN_CLOSED= 44
CHANNEL_BOOK_E_INSIDE_TOP= 45
CHANNEL_BOOK_ROOM = 46
CHANNEL_BOOK_CLOSED = 47
CHANNEL_BOOK_OPEN = 48
; Cabin lost in woods ; Cabin lost in woods
CABIN_OUTSIDE = 0 CABIN_OUTSIDE = 0

View File

@ -2,54 +2,51 @@
; external routines ; external routines
; loader.s ; loader.s
opendir_filename = $1039 opendir_filename =$1039
; audio.c ; audio.c
play_audio = $131b play_audio =$133e
; decompress_fast_v2.s ; decompress_fast_v2.s
decompress_lzsa2_fast = $142c decompress_lzsa2_fast =$144f
getsrc_smc = $1522 getsrc_smc =$1545
; draw_pointer.s ; draw_pointer.s
draw_pointer = $152f draw_pointer =$1552
; end_level.s ; end_level.s
end_level = $1672 end_level =$1695
; gr_copy.s ; gr_copy.s
gr_copy_to_current = $1694 gr_copy_to_current =$16b7
; gr_fast_clear.s ; gr_fast_clear.s
clear_all = $17f8 clear_all =$181b
clear_all_color = $181d clear_all_color =$1840
; gr_offsets.s ; gr_offsets.s
gr_offsets = $183b gr_offsets =$185e
; gr_page_flip.s ; gr_page_flip.s
page_flip = $186b page_flip =$188e
; gr_putsprite_crop.s ; gr_putsprite_crop.s
put_sprite_crop = $1885 put_sprite_crop =$18a8
; keyboard.s ; keyboard.s
handle_keypress = $19c1 handle_keypress =$19e4
change_location = $1a8e change_location =$1ab1
; text_print.s ; text_print.s
move_and_print = $1b26 move_and_print =$1b49
; common_sprites.inc
; page_sprites.inc ; page_sprites.inc
blue_page_sprite = $1c57 blue_page_sprite =$1c44
red_page_sprite = $1c6d red_page_sprite =$1c90
white_page_sprite = $1c83 white_page_sprite =$1ca6
blue_page_small_sprite = $1c99 blue_page_small_sprite =$1cbc
red_page_small_sprite = $1ca1 red_page_small_sprite =$1cc4
; audio files ; audio files
linking_noise = $9000 linking_noise = $9000
LINKING_NOISE_LENGTH = 43 LINKING_NOISE_LENGTH = 43

View File

@ -313,7 +313,6 @@ getlargesrc:
; fall through grab high 8 bits ; fall through grab high 8 bits
getsrc: getsrc:
getsrc_smc:
LZSA_SRC_LO = *+1 LZSA_SRC_LO = *+1
LZSA_SRC_HI = *+2 LZSA_SRC_HI = *+2
lda $AAAA lda $AAAA

111
mist/generate_common.c Normal file
View File

@ -0,0 +1,111 @@
#include <stdio.h>
#include <string.h>
static FILE *fff;
static void find_address(char *symbol_name) {
unsigned int addr=0;
char string[BUFSIZ],*result;
char temp_name[BUFSIZ];
sprintf(temp_name,"%s:",symbol_name);
while(1) {
result=fgets(string,BUFSIZ,fff);
if (result==NULL) break;
result=strstr(string,temp_name);
if (result!=NULL) {
string[6]=0;
sscanf(string,"%x",&addr);
break;
}
}
printf("%s\t=$%04x\n",symbol_name,addr+0x1000);
}
int main(int argc, char **argv) {
fff=fopen("loader.lst","r");
if (fff==NULL) {
fprintf(stderr,"ERROR! could not open loader.lst\n");
return -1;
}
printf(";=============================\n");
printf("; external routines\n");
printf("\n");
printf("; loader.s\n");
find_address("opendir_filename");
printf("\n");
printf("; audio.c\n");
find_address("play_audio");
printf("\n");
printf("; decompress_fast_v2.s\n");
find_address("decompress_lzsa2_fast");
find_address("getsrc_smc");
printf("\n");
printf("; draw_pointer.s\n");
find_address("draw_pointer");
printf("\n");
printf("; end_level.s\n");
find_address("end_level");
printf("\n");
printf("; gr_copy.s\n");
find_address("gr_copy_to_current");
printf("\n");
printf("; gr_fast_clear.s\n");
find_address("clear_all");
find_address("clear_all_color");
printf("\n");
printf("; gr_offsets.s\n");
find_address("gr_offsets");
printf("\n");
printf("; gr_page_flip.s\n");
find_address("page_flip");
printf("\n");
printf("; gr_putsprite_crop.s\n");
find_address("put_sprite_crop");
printf("\n");
printf("; keyboard.s\n");
find_address("handle_keypress");
find_address("change_location");
printf("\n");
printf("; text_print.s\n");
find_address("move_and_print");
printf("\n");
printf("; page_sprites.inc\n");
find_address("blue_page_sprite");
find_address("red_page_sprite");
find_address("white_page_sprite");
find_address("blue_page_small_sprite");
find_address("red_page_small_sprite");
printf("\n");
printf("; audio files\n");
printf("linking_noise = $9000\n");
printf("LINKING_NOISE_LENGTH = 43\n");
fclose(fff);
return 0;
}

View File

@ -10,19 +10,6 @@ all: channel_graphics.inc
channel_graphics.inc: \ channel_graphics.inc: \
arrival_n.lzsa arrival_s.lzsa \ arrival_n.lzsa arrival_s.lzsa \
clearing_e.lzsa clearing_s.lzsa clearing_w.lzsa \
clearing_e_open.lzsa \
boiler_room_e.lzsa \
boiler_e.lzsa boiler_w.lzsa \
safe_w.lzsa safe_open_w.lzsa \
clock_path_n.lzsa clock_path_s.lzsa \
tree_path_e.lzsa tree_path_w.lzsa \
tree_base_n.lzsa tree_base_s.lzsa \
tree_basement_n.lzsa tree_basement_s.lzsa \
tree_basement_book_s.lzsa \
tree_basement_book_open_s.lzsa \
tree_basement_book_closed_s.lzsa \
tree_elevator_basement_s.lzsa \
bridge_w.lzsa bridge_down_e.lzsa bridge_up_e.lzsa \ bridge_w.lzsa bridge_down_e.lzsa bridge_up_e.lzsa \
path2_e.lzsa path2_s.lzsa path2_n.lzsa \ path2_e.lzsa path2_s.lzsa path2_n.lzsa \
path3_w.lzsa path3_e.lzsa path3_n.lzsa \ path3_w.lzsa path3_e.lzsa path3_n.lzsa \
@ -57,27 +44,6 @@ channel_graphics.inc: \
book_mist_closed_s.lzsa book_mist_open_s.lzsa book_mist_closed_s.lzsa book_mist_open_s.lzsa
echo "arrival_n_lzsa: .incbin \"arrival_n.lzsa\"" > channel_graphics.inc echo "arrival_n_lzsa: .incbin \"arrival_n.lzsa\"" > channel_graphics.inc
echo "arrival_s_lzsa: .incbin \"arrival_s.lzsa\"" >> channel_graphics.inc echo "arrival_s_lzsa: .incbin \"arrival_s.lzsa\"" >> channel_graphics.inc
echo "clearing_e_lzsa: .incbin \"clearing_e.lzsa\"" >> channel_graphics.inc
echo "clearing_s_lzsa: .incbin \"clearing_s.lzsa\"" >> channel_graphics.inc
echo "clearing_w_lzsa: .incbin \"clearing_w.lzsa\"" >> channel_graphics.inc
echo "clearing_e_open_lzsa: .incbin \"clearing_e_open.lzsa\"" >> channel_graphics.inc
echo "boiler_room_e_lzsa: .incbin \"boiler_room_e.lzsa\"" >> channel_graphics.inc
echo "boiler_e_lzsa: .incbin \"boiler_e.lzsa\"" >> channel_graphics.inc
echo "boiler_w_lzsa: .incbin \"boiler_w.lzsa\"" >> channel_graphics.inc
echo "safe_w_lzsa: .incbin \"safe_w.lzsa\"" >> channel_graphics.inc
echo "safe_open_w_lzsa: .incbin \"safe_open_w.lzsa\"" >> channel_graphics.inc
echo "clock_path_n_lzsa: .incbin \"clock_path_n.lzsa\"" >> channel_graphics.inc
echo "clock_path_s_lzsa: .incbin \"clock_path_s.lzsa\"" >> channel_graphics.inc
echo "tree_path_e_lzsa: .incbin \"tree_path_e.lzsa\"" >> channel_graphics.inc
echo "tree_path_w_lzsa: .incbin \"tree_path_w.lzsa\"" >> channel_graphics.inc
echo "tree_base_n_lzsa: .incbin \"tree_base_n.lzsa\"" >> channel_graphics.inc
echo "tree_base_s_lzsa: .incbin \"tree_base_s.lzsa\"" >> channel_graphics.inc
echo "tree_basement_s_lzsa: .incbin \"tree_basement_s.lzsa\"" >> channel_graphics.inc
echo "tree_basement_n_lzsa: .incbin \"tree_basement_n.lzsa\"" >> channel_graphics.inc
echo "tree_basement_book_s_lzsa: .incbin \"tree_basement_book_s.lzsa\"" >> channel_graphics.inc
echo "tree_basement_book_open_s_lzsa: .incbin \"tree_basement_book_open_s.lzsa\"" >> channel_graphics.inc
echo "tree_basement_book_closed_s_lzsa: .incbin \"tree_basement_book_closed_s.lzsa\"" >> channel_graphics.inc
echo "tree_elevator_basement_s_lzsa: .incbin \"tree_elevator_basement_s.lzsa\"" >> channel_graphics.inc
echo "bridge_w_lzsa: .incbin \"bridge_w.lzsa\"" >> channel_graphics.inc echo "bridge_w_lzsa: .incbin \"bridge_w.lzsa\"" >> channel_graphics.inc
echo "bridge_down_e_lzsa: .incbin \"bridge_down_e.lzsa\"" >> channel_graphics.inc echo "bridge_down_e_lzsa: .incbin \"bridge_down_e.lzsa\"" >> channel_graphics.inc
echo "bridge_up_e_lzsa: .incbin \"bridge_up_e.lzsa\"" >> channel_graphics.inc echo "bridge_up_e_lzsa: .incbin \"bridge_up_e.lzsa\"" >> channel_graphics.inc

View File

@ -194,7 +194,7 @@ change_location:
lda (LOCATIONS_L),Y lda (LOCATIONS_L),Y
sta LOCATION_STRUCT_L sta LOCATION_STRUCT_L
iny iny
lda (LOCATIONS_H),Y lda (LOCATIONS_L),Y
sta LOCATION_STRUCT_H sta LOCATION_STRUCT_H
jsr change_direction jsr change_direction

View File

@ -12,249 +12,10 @@ locations:
.word location24,location25,location26,location27 .word location24,location25,location26,location27
.word location28,location29,location30,location31 .word location28,location29,location30,location31
.word location32,location33,location34,location35 .word location32,location33,location34,location35
.word location36,location37,location38,location39
.word location40,location41,location42,location43
.word location44,location45,location46,location47
.word location48
; CHANNEL_OUTSIDE_CABIN -- outside in clearing
location0:
.byte $ff ; north exit
.byte CHANNEL_CLOCK_PATH ; south exit
.byte CHANNEL_CABIN_OPEN ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte DIRECTION_S ; south exit_dir
.byte DIRECTION_E ; east exit_dir
.byte $ff ; west exit_dir
.word $0000 ; north bg
.word clearing_s_lzsa ; south bg
.word clearing_e_lzsa ; east bg
.word clearing_w_lzsa ; west bg
.byte BG_SOUTH|BG_EAST|BG_WEST
.byte DIRECTION_E|DIRECTION_W ; special exit
.byte 7,33 ; special x
.byte 2,46 ; special y
.word handle_clearing-1 ; special function
; CHANNEL_CABIN_OPEN -- outside, door open
location1:
.byte $ff ; north exit
.byte $ff ; south exit
.byte CHANNEL_CABIN_ENTRANCE ; 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 clearing_s_lzsa ; south bg
.word clearing_e_open_lzsa ; east bg
.word clearing_w_lzsa ; west bg
.byte BG_SOUTH|BG_EAST|BG_WEST
.byte DIRECTION_E|DIRECTION_W ; special exit
.byte 7,33 ; special x
.byte 2,46 ; special y
.word handle_clearing-1 ; special function
; CHANNEL_CABIN_ENTRANCE -- entering the cabin
location2:
.byte $ff ; north exit
.byte $ff ; south exit
.byte CHANNEL_INSIDE_CABIN ; 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 boiler_room_e_lzsa ; east bg
.word $0000 ; west bg
.byte BG_EAST
.byte $ff
; CHANNEL_INSIDE_CABIN -- inside the cabin
location3:
.byte $ff ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte CHANNEL_OUTSIDE_CABIN ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte DIRECTION_W ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word boiler_e_lzsa ; east bg
.word boiler_w_lzsa ; west bg
.byte BG_EAST|BG_WEST
.byte $ff
; CHANNEL_SAFE -- looking at safe
location4:
.byte $ff ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte CHANNEL_INSIDE_CABIN ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte DIRECTION_W ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word $000 ; east bg
.word safe_w_lzsa ; west bg
.byte BG_WEST
.byte $ff
; CHANNEL_CLOCK_PATH -- path to clock
location5:
.byte CHANNEL_OUTSIDE_CABIN ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte DIRECTION_E ; north exit_dir
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word clock_path_n_lzsa ; north bg
.word clock_path_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH|BG_SOUTH
.byte DIRECTION_S ; special exit
.byte 9,29 ; special x
.byte 2,46 ; special y
.word enter_clock-1 ; special function
; CHANNEL_TREE_PATH -- path to tree
location6:
.byte $ff ; north exit
.byte $ff ; south exit
.byte CHANNEL_BIG_TREE ; east exit
.byte CHANNEL_OUTSIDE_CABIN ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_N ; east exit_dir
.byte DIRECTION_W ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word tree_path_e_lzsa ; east bg
.word tree_path_w_lzsa ; west bg
.byte BG_EAST|BG_WEST
.byte $ff
; CHANNEL_BIG_TREE -- at the big tree
location7:
.byte CHANNEL_TREE_ELEVATOR ; north exit
.byte CHANNEL_TREE_PATH ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte DIRECTION_S ; north exit_dir
.byte DIRECTION_W ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word tree_base_n_lzsa ; north bg
.word tree_base_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH|BG_SOUTH
.byte $ff
; CHANNEL_TREE_ELEVATOR -- in the tree elevator
location8:
.byte $ff ; north exit
.byte CHANNEL_TREE_BASEMENT ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte DIRECTION_S ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word $0000 ; north bg
.word tree_elevator_basement_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_SOUTH
.byte $ff
; CHANNEL_TREE_BASEMENT -- in the tree basement
location9:
.byte CHANNEL_BIG_TREE ; north exit
.byte CHANNEL_TREE_BOOK ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte DIRECTION_S ; north exit_dir
.byte DIRECTION_S ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word tree_basement_n_lzsa ; north bg
.word tree_basement_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_SOUTH|BG_NORTH
.byte $ff
; CHANNEL_TREE_BOOK -- tree basement book
location10:
.byte $ff ; north exit
.byte CHANNEL_TREE_BOOK_CLOSED; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte DIRECTION_S ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word $0000 ; north bg
.word tree_basement_book_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_SOUTH
.byte $ff
; CHANNEL_TREE_BOOK_CLOSED -- tree basement book closed
location11:
.byte $ff ; north exit
.byte CHANNEL_TREE_BOOK_OPEN ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte DIRECTION_S ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word $0000 ; north bg
.word tree_basement_book_closed_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_SOUTH
.byte $ff
; CHANNEL_TREE_BOOK_OPEN -- tree basement book open
location12:
.byte $ff ; north exit
.byte CHANNEL_TREE_BASEMENT ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte DIRECTION_S ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word $0000 ; north bg
.word tree_basement_book_open_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_SOUTH
.byte DIRECTION_S ; special exit
.byte 21,31 ; special x
.byte 10,24 ; special y
.word channel_link_book-1
; CHANNEL_ARRIVAL -- arrival in channelwood ; CHANNEL_ARRIVAL -- arrival in channelwood
location13: location0:
.byte CHANNEL_PATH2 ; north exit .byte CHANNEL_PATH2 ; north exit
.byte $ff ; south exit .byte $ff ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -271,7 +32,7 @@ location13:
.byte $ff .byte $ff
; CHANNEL_PATH2 -- twisty maze of passages all alike ; CHANNEL_PATH2 -- twisty maze of passages all alike
location14: location1:
.byte CHANNEL_PATH6 ; north exit .byte CHANNEL_PATH6 ; north exit
.byte CHANNEL_ARRIVAL ; south exit .byte CHANNEL_ARRIVAL ; south exit
.byte CHANNEL_PATH3 ; east exit .byte CHANNEL_PATH3 ; east exit
@ -288,7 +49,7 @@ location14:
.byte $ff .byte $ff
; CHANNEL_PATH3 -- twisty maze of passages all alike ; CHANNEL_PATH3 -- twisty maze of passages all alike
location15: location2:
.byte CHANNEL_PATH4 ; north exit .byte CHANNEL_PATH4 ; north exit
.byte $ff ; south exit .byte $ff ; south exit
.byte CHANNEL_BRIDGE ; east exit .byte CHANNEL_BRIDGE ; east exit
@ -305,7 +66,7 @@ location15:
.byte $ff .byte $ff
; CHANNEL_BRIDGE -- raisable bridge ; CHANNEL_BRIDGE -- raisable bridge
location16: location3:
.byte $ff ; north exit .byte $ff ; north exit
.byte $ff ; south exit .byte $ff ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -325,7 +86,7 @@ location16:
.word raise_bridge-1 .word raise_bridge-1
; CHANNEL_PATH4 -- twisty maze of passages all alike ; CHANNEL_PATH4 -- twisty maze of passages all alike
location17: location4:
.byte $ff ; north exit .byte $ff ; north exit
.byte CHANNEL_PATH3 ; south exit .byte CHANNEL_PATH3 ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -342,7 +103,7 @@ location17:
.byte $ff .byte $ff
; CHANNEL_PATH5 -- twisty maze of passages all alike ; CHANNEL_PATH5 -- twisty maze of passages all alike
location18: location5:
.byte CHANNEL_STEPS_FORK ; north exit .byte CHANNEL_STEPS_FORK ; north exit
.byte CHANNEL_PATH6 ; south exit .byte CHANNEL_PATH6 ; south exit
.byte CHANNEL_PATH4 ; east exit .byte CHANNEL_PATH4 ; east exit
@ -359,7 +120,7 @@ location18:
.byte $ff .byte $ff
; CHANNEL_PATH6 -- twisty maze of passages all alike ; CHANNEL_PATH6 -- twisty maze of passages all alike
location19: location6:
.byte CHANNEL_PATH5 ; north exit .byte CHANNEL_PATH5 ; north exit
.byte CHANNEL_PATH2 ; south exit .byte CHANNEL_PATH2 ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -376,7 +137,7 @@ location19:
.byte $ff .byte $ff
; CHANNEL_FORK -- forked path ; CHANNEL_FORK -- forked path
location20: location7:
.byte CHANNEL_PATH6 ; north exit .byte CHANNEL_PATH6 ; north exit
.byte CHANNEL_PIPE_BRIDGE2 ; south exit .byte CHANNEL_PIPE_BRIDGE2 ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -393,7 +154,7 @@ location20:
.byte $ff .byte $ff
; CHANNEL_BEFORE_ELEV1 -- just befor elevator 1 ; CHANNEL_BEFORE_ELEV1 -- just befor elevator 1
location21: location8:
.byte $ff ; north exit .byte $ff ; north exit
.byte $ff ; south exit .byte $ff ; south exit
.byte CHANNEL_FORK ; east exit .byte CHANNEL_FORK ; east exit
@ -410,7 +171,7 @@ location21:
.byte $ff .byte $ff
; CHANNEL_IN_ELEVATOR1 -- inside elevator1 ; CHANNEL_IN_ELEVATOR1 -- inside elevator1
location22: location9:
.byte $ff ; north exit .byte $ff ; north exit
.byte $ff ; south exit .byte $ff ; south exit
.byte CHANNEL_BEFORE_ELEV1 ; east exit .byte CHANNEL_BEFORE_ELEV1 ; east exit
@ -427,7 +188,7 @@ location22:
.byte $ff .byte $ff
; CHANNEL_PIPE_BRIDGE2 -- east side of pipe bridge ; CHANNEL_PIPE_BRIDGE2 -- east side of pipe bridge
location23: location10:
.byte $ff ; north exit .byte $ff ; north exit
.byte $ff ; south exit .byte $ff ; south exit
.byte CHANNEL_FORK ; east exit .byte CHANNEL_FORK ; east exit
@ -444,7 +205,7 @@ location23:
.byte $ff .byte $ff
; CHANNEL_STEPS_FORK -- fork going to steps ; CHANNEL_STEPS_FORK -- fork going to steps
location24: location11:
.byte CHANNEL_WIND_PATH ; north exit .byte CHANNEL_WIND_PATH ; north exit
.byte CHANNEL_PATH5 ; south exit .byte CHANNEL_PATH5 ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -461,7 +222,7 @@ location24:
.byte $ff .byte $ff
; CHANNEL_STEPS_PATH -- path going to steps ; CHANNEL_STEPS_PATH -- path going to steps
location25: location12:
.byte $ff ; north exit .byte $ff ; north exit
.byte $ff ; south exit .byte $ff ; south exit
.byte CHANNEL_STEPS_FORK ; east exit .byte CHANNEL_STEPS_FORK ; east exit
@ -478,7 +239,7 @@ location25:
.byte $ff .byte $ff
; CHANNEL_STEPS_DOOR -- door to the steps ; CHANNEL_STEPS_DOOR -- door to the steps
location26: location13:
.byte $ff ; north exit .byte $ff ; north exit
.byte $ff ; south exit .byte $ff ; south exit
.byte CHANNEL_STEPS_PATH ; east exit .byte CHANNEL_STEPS_PATH ; east exit
@ -495,7 +256,7 @@ location26:
.byte $ff .byte $ff
; CHANNEL_WIND_PATH -- path to windmill ; CHANNEL_WIND_PATH -- path to windmill
location27: location14:
.byte CHANNEL_WIND_PATH2 ; north exit .byte CHANNEL_WIND_PATH2 ; north exit
.byte CHANNEL_STEPS_FORK ; south exit .byte CHANNEL_STEPS_FORK ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -512,7 +273,7 @@ location27:
.byte $ff .byte $ff
; CHANNEL_WIND_PATH2 -- path to windmill too ; CHANNEL_WIND_PATH2 -- path to windmill too
location28: location15:
.byte CHANNEL_ISLAND1 ; north exit .byte CHANNEL_ISLAND1 ; north exit
.byte CHANNEL_WIND_PATH ; south exit .byte CHANNEL_WIND_PATH ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -529,7 +290,7 @@ location28:
.byte $ff .byte $ff
; CHANNEL_ISLAND1 -- island part1 ; CHANNEL_ISLAND1 -- island part1
location29: location16:
.byte CHANNEL_ISLAND2 ; north exit .byte CHANNEL_ISLAND2 ; north exit
.byte CHANNEL_WIND_PATH2 ; south exit .byte CHANNEL_WIND_PATH2 ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -546,7 +307,7 @@ location29:
.byte $ff .byte $ff
; CHANNEL_ISLAND2 -- island part2 ; CHANNEL_ISLAND2 -- island part2
location30: location17:
.byte CHANNEL_ISLAND3 ; north exit .byte CHANNEL_ISLAND3 ; north exit
.byte CHANNEL_ISLAND1 ; south exit .byte CHANNEL_ISLAND1 ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -563,7 +324,7 @@ location30:
.byte $ff .byte $ff
; CHANNEL_ISLAND3 -- island part3 ; CHANNEL_ISLAND3 -- island part3
location31: location18:
.byte CHANNEL_SHACK ; north exit .byte CHANNEL_SHACK ; north exit
.byte CHANNEL_ISLAND2 ; south exit .byte CHANNEL_ISLAND2 ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -580,7 +341,7 @@ location31:
.byte $ff .byte $ff
; CHANNEL_SHACK -- island shack ; CHANNEL_SHACK -- island shack
location32: location19:
.byte CHANNEL_TANK ; north exit .byte CHANNEL_TANK ; north exit
.byte CHANNEL_ISLAND3 ; south exit .byte CHANNEL_ISLAND3 ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -597,7 +358,7 @@ location32:
.byte $ff .byte $ff
; CHANNEL_TANK -- inside shack ; CHANNEL_TANK -- inside shack
location33: location20:
.byte CHANNEL_WINDMILL ; north exit .byte CHANNEL_WINDMILL ; north exit
.byte CHANNEL_SHACK ; south exit .byte CHANNEL_SHACK ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -617,7 +378,7 @@ location33:
.word look_at_faucet-1 ; special function .word look_at_faucet-1 ; special function
; CHANNEL_TANK_CLOSE -- the faucet ; CHANNEL_TANK_CLOSE -- the faucet
location34: location21:
.byte CHANNEL_TANK ; north exit .byte CHANNEL_TANK ; north exit
.byte $ff ; south exit .byte $ff ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -637,7 +398,7 @@ location34:
.word toggle_faucet-1 ; special function .word toggle_faucet-1 ; special function
; CHANNEL_WINDMILL -- windmill machinery ; CHANNEL_WINDMILL -- windmill machinery
location35: location22:
.byte CHANNEL_OUT_BACK ; north exit .byte CHANNEL_OUT_BACK ; north exit
.byte CHANNEL_TANK ; south exit .byte CHANNEL_TANK ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -657,7 +418,7 @@ location35:
.word toggle_windmill-1 ; special function .word toggle_windmill-1 ; special function
; CHANNEL_OUT_BACK -- back door of windmill ; CHANNEL_OUT_BACK -- back door of windmill
location36: location23:
.byte $ff ; north exit .byte $ff ; north exit
.byte CHANNEL_WINDMILL ; south exit .byte CHANNEL_WINDMILL ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -674,7 +435,7 @@ location36:
.byte $ff .byte $ff
; CHANNEL_AFTER_BRIDGE1 -- after lift bridge ; CHANNEL_AFTER_BRIDGE1 -- after lift bridge
location37: location24:
.byte $ff ; north exit .byte $ff ; north exit
.byte $ff ; south exit .byte $ff ; south exit
.byte CHANNEL_AFTER_BRIDGE2 ; east exit .byte CHANNEL_AFTER_BRIDGE2 ; east exit
@ -691,7 +452,7 @@ location37:
.byte $ff .byte $ff
; CHANNEL_AFTER_BRIDGE2 -- next after lift bridge ; CHANNEL_AFTER_BRIDGE2 -- next after lift bridge
location38: location25:
.byte $ff ; north exit .byte $ff ; north exit
.byte $ff ; south exit .byte $ff ; south exit
.byte CHANNEL_BOOK_FORK ; east exit .byte CHANNEL_BOOK_FORK ; east exit
@ -708,7 +469,7 @@ location38:
.byte $ff .byte $ff
; CHANNEL_BOOK_FORK -- fork to book elevator ; CHANNEL_BOOK_FORK -- fork to book elevator
location39: location26:
.byte CHANNEL_BOOK_ELEVATOR ; north exit .byte CHANNEL_BOOK_ELEVATOR ; north exit
.byte CHANNEL_PIPE_EXTEND ; south exit .byte CHANNEL_PIPE_EXTEND ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -725,7 +486,7 @@ location39:
.byte $ff .byte $ff
; CHANNEL_PIPE_EXTEND -- pipe extender ; CHANNEL_PIPE_EXTEND -- pipe extender
location40: location27:
.byte CHANNEL_BOOK_FORK ; north exit .byte CHANNEL_BOOK_FORK ; north exit
.byte $ff ; south exit .byte $ff ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -745,7 +506,7 @@ location40:
.word extend_pipe-1 ; special function .word extend_pipe-1 ; special function
; CHANNEL_BOOK_ELEVATOR -- outside book elevator, door closed ; CHANNEL_BOOK_ELEVATOR -- outside book elevator, door closed
location41: location28:
.byte CHANNEL_BOOK_E_OPEN ; north exit .byte CHANNEL_BOOK_E_OPEN ; north exit
.byte CHANNEL_BOOK_FORK ; south exit .byte CHANNEL_BOOK_FORK ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -762,7 +523,7 @@ location41:
.byte $ff ; special exit .byte $ff ; special exit
; CHANNEL_E_OPEN -- outside book elevator, door open ; CHANNEL_E_OPEN -- outside book elevator, door open
location42: location29:
.byte CHANNEL_BOOK_E_INSIDE_GND ; north exit .byte CHANNEL_BOOK_E_INSIDE_GND ; north exit
.byte CHANNEL_BOOK_FORK ; south exit .byte CHANNEL_BOOK_FORK ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -779,7 +540,7 @@ location42:
.byte $ff ; special exit .byte $ff ; special exit
; CHANNEL_BOOK_E_INSIDE_GND -- inside book elevator, gnd, door open ; CHANNEL_BOOK_E_INSIDE_GND -- inside book elevator, gnd, door open
location43: location30:
.byte $ff ; north exit .byte $ff ; north exit
.byte CHANNEL_BOOK_ELEVATOR ; south exit .byte CHANNEL_BOOK_ELEVATOR ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -799,7 +560,7 @@ location43:
.word book_elevator_close_door-1 ; special function .word book_elevator_close_door-1 ; special function
; CHANNEL_BOOK_E_IN_CLOSED -- inside book elevator, door closed ; CHANNEL_BOOK_E_IN_CLOSED -- inside book elevator, door closed
location44: location31:
.byte $ff ; north exit .byte $ff ; north exit
.byte CHANNEL_BOOK_E_INSIDE_GND ; south exit .byte CHANNEL_BOOK_E_INSIDE_GND ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -819,7 +580,7 @@ location44:
.word book_elevator_handle-1 ; special function .word book_elevator_handle-1 ; special function
; CHANNEL_BOOK_E_INSIDE_TOP -- inside book elevator, top, door open ; CHANNEL_BOOK_E_INSIDE_TOP -- inside book elevator, top, door open
location45: location32:
.byte $ff ; north exit .byte $ff ; north exit
.byte CHANNEL_BOOK_ROOM ; south exit .byte CHANNEL_BOOK_ROOM ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -839,7 +600,7 @@ location45:
.word book_elevator_close_door-1 ; special function .word book_elevator_close_door-1 ; special function
; CHANNEL_BOOK_ROOM -- the room with the myst book ; CHANNEL_BOOK_ROOM -- the room with the myst book
location46: location33:
.byte CHANNEL_BOOK_E_INSIDE_TOP ; north exit .byte CHANNEL_BOOK_E_INSIDE_TOP ; north exit
.byte $ff ; south exit .byte $ff ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -859,7 +620,7 @@ location46:
.word book_room_grab_book-1 ; special function .word book_room_grab_book-1 ; special function
; CHANNEL_BOOK_CLOSED -- myst book closed ; CHANNEL_BOOK_CLOSED -- myst book closed
location47: location34:
.byte CHANNEL_BOOK_E_INSIDE_TOP ; north exit .byte CHANNEL_BOOK_E_INSIDE_TOP ; north exit
.byte CHANNEL_BOOK_OPEN ; south exit .byte CHANNEL_BOOK_OPEN ; south exit
.byte $ff ; east exit .byte $ff ; east exit
@ -876,7 +637,7 @@ location47:
.byte $ff ; special function .byte $ff ; special function
; CHANNEL_BOOK_OPEN -- myst book open ; CHANNEL_BOOK_OPEN -- myst book open
location48: location35:
.byte CHANNEL_BOOK_E_INSIDE_TOP ; north exit .byte CHANNEL_BOOK_E_INSIDE_TOP ; north exit
.byte CHANNEL_BOOK_ROOM ; south exit .byte CHANNEL_BOOK_ROOM ; south exit
.byte $ff ; east exit .byte $ff ; east exit

View File

@ -53,18 +53,6 @@ filbuf = $3D6 ; filbuf: .res 4 ; = bit2tbl+86
;=================================================== ;===================================================
;=================================================== ;===================================================
.if 0
LOAD_TITLE = $0
LOAD_MIST = $1
LOAD_MECHE = $2
LOAD_SELENA = $3
LOAD_OCTAGON = $4
LOAD_VIEWER = $5
LOAD_STONEDSHIP = $6
LOAD_CHANNEL = $7
LOAD_ENDING = $8
.endif
loader_start: loader_start:
lda #LOAD_TITLE lda #LOAD_TITLE
sta WHICH_LOAD sta WHICH_LOAD
@ -160,7 +148,8 @@ copy_filename_done:
filenames: filenames:
.word intro_filename .word intro_filename
.word mist_filename,meche_filename,selena_filename,octagon_filename .word mist_filename,meche_filename,selena_filename,octagon_filename
.word viewer_filename,stoney_filename,channel_filename,ending_filename .word viewer_filename,stoney_filename,channel_filename,cabin_filename
.word dentist_filename,arbor_filename,shipup_filename,ending_filename
intro_filename: intro_filename:
.byte "MIST_TITLE",0 .byte "MIST_TITLE",0
@ -178,6 +167,14 @@ stoney_filename:
.byte "STONEY",0 .byte "STONEY",0
channel_filename: channel_filename:
.byte "CHANNEL",0 .byte "CHANNEL",0
cabin_filename:
.byte "CABIN",0
dentist_filename:
.byte "DENTIST",0
arbor_filename:
.byte "ARBOR",0
shipup_filename:
.byte "SHIPUP",0
ending_filename: ending_filename:
.byte "ENDING",0 .byte "ENDING",0

View File

@ -235,10 +235,10 @@ enter_viewer:
enter_channel_main: enter_channel_main:
lda #CHANNEL_OUTSIDE_CABIN lda #CABIN_OUTSIDE
sta LOCATION sta LOCATION
lda #LOAD_CHANNEL lda #LOAD_CABIN
sta WHICH_LOAD sta WHICH_LOAD
lda #DIRECTION_E lda #DIRECTION_E
@ -248,10 +248,10 @@ enter_channel_main:
enter_channel_clock: enter_channel_clock:
lda #CHANNEL_CLOCK_PATH lda #CABIN_CLOCK_PATH
sta LOCATION sta LOCATION
lda #LOAD_CHANNEL lda #LOAD_CABIN
sta WHICH_LOAD sta WHICH_LOAD
lda #DIRECTION_N lda #DIRECTION_N

View File

@ -95,6 +95,15 @@ done_keyloop:
bit LORES bit LORES
bit FULLGR bit FULLGR
;=================
; set up location
;=================
lda #<locations
sta LOCATIONS_L
lda #>locations
sta LOCATIONS_H
lda #0 lda #0
sta DRAW_PAGE sta DRAW_PAGE