From b47adecc617aff64c0c620b8102f9c36e872c2b1 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sun, 12 Jul 2020 14:56:56 -0400 Subject: [PATCH] mist: ship: split off from stoneship level this givs some more room to stoneship for future expansion --- mist/Makefile | 26 +- mist/common_defines.inc | 108 ++++----- .../book_chair_closed_s.png | Bin .../book_chair_n.png | Bin .../book_chair_open_s.png | Bin .../book_chair_s.png | Bin .../ship_bow_go_n.png | Bin .../ship_bow_s.png | Bin .../ship_door_closed_s.png | Bin .../ship_door_open_s.png | Bin .../ship_entry_n.png | Bin .../ship_entry_s.png | Bin mist/leveldata_ship.inc | 141 +++++++++++ mist/leveldata_stoney.inc | 224 ++++-------------- mist/link_book_stoney.s | 9 +- mist/mist.s | 4 +- mist/{ => old}/graphics_dun/atrus_book.png | Bin .../graphics_dun/behind_fireplace.png | Bin mist/{ => old}/graphics_dun/green_book.png | Bin mist/ship.s | 191 +++++++++++++++ mist/stoney.s | 81 ------- 21 files changed, 467 insertions(+), 317 deletions(-) rename mist/{graphics_stoney => graphics_ship}/book_chair_closed_s.png (100%) rename mist/{graphics_stoney => graphics_ship}/book_chair_n.png (100%) rename mist/{graphics_stoney => graphics_ship}/book_chair_open_s.png (100%) rename mist/{graphics_stoney => graphics_ship}/book_chair_s.png (100%) rename mist/{graphics_stoney => graphics_ship}/ship_bow_go_n.png (100%) rename mist/{graphics_stoney => graphics_ship}/ship_bow_s.png (100%) rename mist/{graphics_stoney => graphics_ship}/ship_door_closed_s.png (100%) rename mist/{graphics_stoney => graphics_ship}/ship_door_open_s.png (100%) rename mist/{graphics_stoney => graphics_ship}/ship_entry_n.png (100%) rename mist/{graphics_stoney => graphics_ship}/ship_entry_s.png (100%) create mode 100644 mist/leveldata_ship.inc rename mist/{ => old}/graphics_dun/atrus_book.png (100%) rename mist/{ => old}/graphics_dun/behind_fireplace.png (100%) rename mist/{ => old}/graphics_dun/green_book.png (100%) create mode 100644 mist/ship.s diff --git a/mist/Makefile b/mist/Makefile index c3406e3f..e9737a6c 100644 --- a/mist/Makefile +++ b/mist/Makefile @@ -37,12 +37,13 @@ mist_side2.dsk: HELLO_DISK2 CHANNEL VIEWER ARBOR NIBEL # $(DOS33) -y mist_side2.dsk BSAVE -a 0x9000 ./audio/link_noise.btc LINK_NOISE.BTC -mist_side3.dsk: HELLO_DISK2 MECHE SELENA STONEY +mist_side3.dsk: HELLO_DISK2 MECHE SELENA STONEY SHIP cp empty.dsk mist_side3.dsk $(DOS33) -y mist_side3.dsk SAVE A HELLO_DISK2 HELLO $(DOS33) -y mist_side3.dsk BSAVE -a 0x2000 MECHE $(DOS33) -y mist_side3.dsk BSAVE -a 0x2000 SELENA $(DOS33) -y mist_side3.dsk BSAVE -a 0x2000 STONEY + $(DOS33) -y mist_side3.dsk BSAVE -a 0x2000 SHIP @@ -241,6 +242,24 @@ stoney.o: stoney.s zp.inc hardware.inc common_defines.inc \ gr_copy.s audio.s text_print.s decompress_fast_v2.s ca65 -o stoney.o stoney.s -l stoney.lst +#### + +SHIP: ship.o + ld65 -o SHIP ship.o -C ../linker_scripts/apple2_2000.inc + +ship.o: ship.s zp.inc hardware.inc common_defines.inc \ + graphics_ship/ship_graphics.inc \ + common_routines.inc \ + common_sprites.inc \ + page_sprites.inc \ + leveldata_ship.inc \ + keyboard.s \ + draw_pointer.s \ + link_book_stoney.s \ + link_book_mist.s \ + handle_pages.s \ + gr_copy.s audio.s text_print.s decompress_fast_v2.s + ca65 -o ship.o ship.s -l ship.lst #### @@ -364,6 +383,9 @@ graphics_nibel/nibel_graphics.inc: graphics_dni/dni_graphics.inc: cd graphics_dni && make +graphics_ship/ship_graphics.inc: + cd graphics_ship && make + #### @@ -371,5 +393,5 @@ clean: rm -f *~ *.o *.lst HELLO HELLO_DISK2 \ LOADER MIST_TITLE \ MIST OCTAGON VIEWER DENTIST \ - MECHE SELENA STONEY CHANNEL ARBOR NIBEL \ + MECHE SELENA SHIP STONEY CHANNEL ARBOR NIBEL \ GENERATOR diff --git a/mist/common_defines.inc b/mist/common_defines.inc index b41fd6aa..7315c6e7 100644 --- a/mist/common_defines.inc +++ b/mist/common_defines.inc @@ -262,59 +262,61 @@ VIEWER_POOL = 1 VIEWER_POOL_CLOSE = 2 VIEWER_CONTROL_PANEL = 3 -; Stoney Ship -STONEY_SHIP_STERN = 0 -STONEY_SHIP_BOW = 1 -STONEY_SHIP_DOOR_CLOSED = 2 -STONEY_SHIP_DOOR_OPEN = 3 -STONEY_SHIP_CHAIR = 4 -STONEY_SHIP_BOOK_CLOSED = 5 -STONEY_SHIP_BOOK_OPEN = 6 -STONEY_ARRIVAL = 7 -STONEY_UMBRELLA_PATH = 8 -STONEY_UMBRELLA = 9 -STONEY_LIGHTHOUSE_PATH = 10 -STONEY_LIGHTHOUSE_DOOR = 11 -STONEY_LIGHTHOUSE_INSIDE= 12 -STONEY_LIGHTHOUSE_UPSTAIRS= 13 -STONEY_LIGHTHOUSE_BATTERY= 14 -STONEY_LIGHTHOUSE_DOWNLADDER= 15 -STONEY_DOORWAY1 = 16 -STONEY_BRIDGE = 17 -STONEY_EXIT = 18 -STONEY_EXIT_AIRLOCK = 19 -STONEY_EXIT_AIRLOCK_OPEN= 20 -STONEY_BOOK_STAIRS1 = 21 -STONEY_BOOK_STAIRS2 = 22 -STONEY_BOOK_ROOM = 23 -STONEY_BOOK_TABLE = 24 -STONEY_BOOK_TABLE_CLOSED= 25 -STONEY_BOOK_TABLE_OPEN = 26 -STONEY_DOORWAY2 = 27 -STONEY_TELESCOPE_PATH1 = 28 -STONEY_TELESCOPE_PATH2 = 29 -STONEY_TELESCOPE_PATH3 = 30 -STONEY_TELESCOPE = 31 -STONEY_TELESCOPE_VIEW = 32 -STONEY_LEFT_TUNNEL1 = 33 -STONEY_LEFT_TUNNEL2 = 34 -STONEY_LEFT_AIRLOCK = 35 -STONEY_LEFT_AIRLOCK_OPEN= 36 -STONEY_RED_ROOM = 37 -STONEY_RED_ROOM_DRESSER = 38 -STONEY_RED_DRESSER_OPEN = 39 -STONEY_CRAWLWAY_LEFT = 40 -STONEY_COMPASS_ROOM = 41 -STONEY_COMPASS_ROSE = 42 -STONEY_RIGHT_TUNNEL1 = 43 -STONEY_RIGHT_TUNNEL2 = 44 -STONEY_RIGHT_AIRLOCK = 45 -STONEY_RIGHT_AIRLOCK_OPEN= 46 -STONEY_BLUE_ROOM = 47 -STONEY_BLUE_MAPCASE = 48 -STONEY_BLUE_MAPCASE_OPEN= 49 -STONEY_BLUE_HALFMESSAGE = 50 -STONEY_CRAWLWAY_RIGHT = 51 +; Ship +SHIP_STERN = 0 +SHIP_BOW = 1 +SHIP_DOOR_CLOSED = 2 +SHIP_DOOR_OPEN = 3 +SHIP_CHAIR = 4 +SHIP_BOOK_CLOSED = 5 +SHIP_BOOK_OPEN = 6 + +; Stoney Ship Age +STONEY_ARRIVAL = 0 +STONEY_UMBRELLA_PATH = 1 +STONEY_UMBRELLA = 2 +STONEY_LIGHTHOUSE_PATH = 3 +STONEY_LIGHTHOUSE_DOOR = 4 +STONEY_LIGHTHOUSE_INSIDE= 5 +STONEY_LIGHTHOUSE_UPSTAIRS= 6 +STONEY_LIGHTHOUSE_BATTERY= 7 +STONEY_LIGHTHOUSE_DOWNLADDER= 8 +STONEY_DOORWAY1 = 9 +STONEY_BRIDGE = 10 +STONEY_EXIT = 11 +STONEY_EXIT_AIRLOCK = 12 +STONEY_EXIT_AIRLOCK_OPEN= 13 +STONEY_BOOK_STAIRS1 = 14 +STONEY_BOOK_STAIRS2 = 15 +STONEY_BOOK_ROOM = 16 +STONEY_BOOK_TABLE = 17 +STONEY_BOOK_TABLE_CLOSED= 18 +STONEY_BOOK_TABLE_OPEN = 19 +STONEY_DOORWAY2 = 20 +STONEY_TELESCOPE_PATH1 = 21 +STONEY_TELESCOPE_PATH2 = 22 +STONEY_TELESCOPE_PATH3 = 23 +STONEY_TELESCOPE = 24 +STONEY_TELESCOPE_VIEW = 25 +STONEY_LEFT_TUNNEL1 = 26 +STONEY_LEFT_TUNNEL2 = 27 +STONEY_LEFT_AIRLOCK = 28 +STONEY_LEFT_AIRLOCK_OPEN= 29 +STONEY_RED_ROOM = 30 +STONEY_RED_ROOM_DRESSER = 31 +STONEY_RED_DRESSER_OPEN = 32 +STONEY_CRAWLWAY_LEFT = 33 +STONEY_COMPASS_ROOM = 34 +STONEY_COMPASS_ROSE = 35 +STONEY_RIGHT_TUNNEL1 = 36 +STONEY_RIGHT_TUNNEL2 = 37 +STONEY_RIGHT_AIRLOCK = 38 +STONEY_RIGHT_AIRLOCK_OPEN= 39 +STONEY_BLUE_ROOM = 40 +STONEY_BLUE_MAPCASE = 41 +STONEY_BLUE_MAPCASE_OPEN= 42 +STONEY_BLUE_HALFMESSAGE = 43 +STONEY_CRAWLWAY_RIGHT = 44 ; Channely Wood CHANNEL_ARRIVAL = 0 diff --git a/mist/graphics_stoney/book_chair_closed_s.png b/mist/graphics_ship/book_chair_closed_s.png similarity index 100% rename from mist/graphics_stoney/book_chair_closed_s.png rename to mist/graphics_ship/book_chair_closed_s.png diff --git a/mist/graphics_stoney/book_chair_n.png b/mist/graphics_ship/book_chair_n.png similarity index 100% rename from mist/graphics_stoney/book_chair_n.png rename to mist/graphics_ship/book_chair_n.png diff --git a/mist/graphics_stoney/book_chair_open_s.png b/mist/graphics_ship/book_chair_open_s.png similarity index 100% rename from mist/graphics_stoney/book_chair_open_s.png rename to mist/graphics_ship/book_chair_open_s.png diff --git a/mist/graphics_stoney/book_chair_s.png b/mist/graphics_ship/book_chair_s.png similarity index 100% rename from mist/graphics_stoney/book_chair_s.png rename to mist/graphics_ship/book_chair_s.png diff --git a/mist/graphics_stoney/ship_bow_go_n.png b/mist/graphics_ship/ship_bow_go_n.png similarity index 100% rename from mist/graphics_stoney/ship_bow_go_n.png rename to mist/graphics_ship/ship_bow_go_n.png diff --git a/mist/graphics_stoney/ship_bow_s.png b/mist/graphics_ship/ship_bow_s.png similarity index 100% rename from mist/graphics_stoney/ship_bow_s.png rename to mist/graphics_ship/ship_bow_s.png diff --git a/mist/graphics_stoney/ship_door_closed_s.png b/mist/graphics_ship/ship_door_closed_s.png similarity index 100% rename from mist/graphics_stoney/ship_door_closed_s.png rename to mist/graphics_ship/ship_door_closed_s.png diff --git a/mist/graphics_stoney/ship_door_open_s.png b/mist/graphics_ship/ship_door_open_s.png similarity index 100% rename from mist/graphics_stoney/ship_door_open_s.png rename to mist/graphics_ship/ship_door_open_s.png diff --git a/mist/graphics_stoney/ship_entry_n.png b/mist/graphics_ship/ship_entry_n.png similarity index 100% rename from mist/graphics_stoney/ship_entry_n.png rename to mist/graphics_ship/ship_entry_n.png diff --git a/mist/graphics_stoney/ship_entry_s.png b/mist/graphics_ship/ship_entry_s.png similarity index 100% rename from mist/graphics_stoney/ship_entry_s.png rename to mist/graphics_ship/ship_entry_s.png diff --git a/mist/leveldata_ship.inc b/mist/leveldata_ship.inc new file mode 100644 index 00000000..f9a377b8 --- /dev/null +++ b/mist/leveldata_ship.inc @@ -0,0 +1,141 @@ + +;=============================================== +; level data for the ship on Mist Island +;=============================================== + +locations: + .word location0, location1, location2, location3 + .word location4, location5, location6 + + +; SHIP_STERN -- back of the ship +location0: + .byte SHIP_BOW ; north exit + .byte SHIP_DOOR_CLOSED ; south exit + .byte $ff ; east exit + .byte $ff ; west exit + .byte DIRECTION_N ; north exit_dir + .byte DIRECTION_S ; south exit_dir + .byte $ff ; east exit_dir + .byte $ff ; west exit_dir + .word ship_entry_n_lzsa ; north bg + .word ship_entry_s_lzsa ; south bg + .word $0000 ; east bg + .word $0000 ; west bg + .byte BG_NORTH|BG_SOUTH + .byte $ff +; .byte DIRECTION_E ; special exit +; .byte 12,25 ; special x +; .byte 26,46 ; special y +; .word controls_pressed-1 ; special function + +; SHIP_BOW -- bow of the ship +location1: + .byte $ff ; north exit + .byte SHIP_STERN ; 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 ship_bow_go_n_lzsa ; north bg + .word ship_bow_s_lzsa ; south bg + .word $0000 ; east bg + .word $0000 ; west bg + .byte BG_NORTH | BG_SOUTH + .byte DIRECTION_N ; special exit + .byte 9,29 ; special x + .byte 2,46 ; special y + .word back_to_mist-1 ; special function + +; SHIP_DOOR_CLOSED -- ship cabin door +location2: + .byte SHIP_BOW ; north exit + .byte SHIP_DOOR_OPEN ; south exit + .byte $ff ; east exit + .byte $ff ; west exit + .byte DIRECTION_N ; north exit_dir + .byte DIRECTION_S ; south exit_dir + .byte $ff ; east exit_dir + .byte $ff ; west exit_dir + .word ship_entry_n_lzsa ; north bg + .word ship_door_closed_s_lzsa ; south bg + .word $0000 ; east bg + .word $0000 ; west bg + .byte BG_SOUTH|BG_NORTH + .byte $ff ; special exit + +; SHIP_DOOR_OPEN -- ship cabin door open +location3: + .byte SHIP_BOW ; north exit + .byte SHIP_CHAIR ; south exit + .byte $ff ; east exit + .byte $ff ; west exit + .byte DIRECTION_N ; north exit_dir + .byte DIRECTION_S ; south exit_dir + .byte $ff ; east exit_dir + .byte $ff ; west exit_dir + .word ship_entry_n_lzsa ; north bg + .word ship_door_open_s_lzsa ; south bg + .word $0000 ; east bg + .word $0000 ; west bg + .byte BG_SOUTH|BG_NORTH + .byte $ff ; special exit + +; SHIP_CHAIR -- chair in the cabin +location4: + .byte SHIP_STERN ; north exit + .byte SHIP_BOOK_CLOSED ; south exit + .byte $ff ; east exit + .byte $ff ; west exit + .byte DIRECTION_N ; north exit_dir + .byte DIRECTION_S ; south exit_dir + .byte $ff ; east exit_dir + .byte $ff ; west exit_dir + .word book_chair_n_lzsa ; north bg + .word book_chair_s_lzsa ; south bg + .word $0000 ; east bg + .word $0000 ; west bg + .byte BG_SOUTH|BG_NORTH + .byte $ff ; special exit + +; SHIP_BOOK_CLOSED -- stoney linking book, closed +location5: + .byte $ff ; north exit + .byte SHIP_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 book_chair_closed_s_lzsa ; south bg + .word $0000 ; east bg + .word $0000 ; west bg + .byte BG_SOUTH + .byte $ff ; special exit + +; SHIP_BOOK_OPEN -- stoney linking book, open +location6: + .byte $ff ; north exit + .byte SHIP_CHAIR ; 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 book_chair_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 stoney_link_book-1 + + + diff --git a/mist/leveldata_stoney.inc b/mist/leveldata_stoney.inc index 7f40aede..22dc4327 100644 --- a/mist/leveldata_stoney.inc +++ b/mist/leveldata_stoney.inc @@ -15,142 +15,10 @@ locations: .word location32,location33,location34,location35 .word location36,location37,location38,location39 .word location40,location41,location42,location43 - .word location44,location45,location46,location47 - .word location48,location49,location50,location51 - - - -; STONEY_SHIP_STERN -- back of the ship -location0: - .byte STONEY_SHIP_BOW ; north exit - .byte STONEY_SHIP_DOOR_CLOSED ; south exit - .byte $ff ; east exit - .byte $ff ; west exit - .byte DIRECTION_N ; north exit_dir - .byte DIRECTION_S ; south exit_dir - .byte $ff ; east exit_dir - .byte $ff ; west exit_dir - .word ship_entry_n_lzsa ; north bg - .word ship_entry_s_lzsa ; south bg - .word $0000 ; east bg - .word $0000 ; west bg - .byte BG_NORTH|BG_SOUTH - .byte $ff -; .byte DIRECTION_E ; special exit -; .byte 12,25 ; special x -; .byte 26,46 ; special y -; .word controls_pressed-1 ; special function - -; STONY_SHIP_BOW -- bow of the ship -location1: - .byte $ff ; north exit - .byte STONEY_SHIP_STERN ; 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 ship_bow_go_n_lzsa ; north bg - .word ship_bow_s_lzsa ; south bg - .word $0000 ; east bg - .word $0000 ; west bg - .byte BG_NORTH | BG_SOUTH - .byte DIRECTION_N ; special exit - .byte 9,29 ; special x - .byte 2,46 ; special y - .word back_to_mist-1 ; special function - -; STONEY_SHIP_DOOR_CLOSED -- ship cabin door -location2: - .byte STONEY_SHIP_BOW ; north exit - .byte STONEY_SHIP_DOOR_OPEN ; south exit - .byte $ff ; east exit - .byte $ff ; west exit - .byte DIRECTION_N ; north exit_dir - .byte DIRECTION_S ; south exit_dir - .byte $ff ; east exit_dir - .byte $ff ; west exit_dir - .word ship_entry_n_lzsa ; north bg - .word ship_door_closed_s_lzsa ; south bg - .word $0000 ; east bg - .word $0000 ; west bg - .byte BG_SOUTH|BG_NORTH - .byte $ff ; special exit - -; STONEY_SHIP_DOOR_OPEN -- ship cabin door open -location3: - .byte STONEY_SHIP_BOW ; north exit - .byte STONEY_SHIP_CHAIR ; south exit - .byte $ff ; east exit - .byte $ff ; west exit - .byte DIRECTION_N ; north exit_dir - .byte DIRECTION_S ; south exit_dir - .byte $ff ; east exit_dir - .byte $ff ; west exit_dir - .word ship_entry_n_lzsa ; north bg - .word ship_door_open_s_lzsa ; south bg - .word $0000 ; east bg - .word $0000 ; west bg - .byte BG_SOUTH|BG_NORTH - .byte $ff ; special exit - -; STONEY_SHIP_CHAIR -- chair in the cabin -location4: - .byte STONEY_SHIP_STERN ; north exit - .byte STONEY_SHIP_BOOK_CLOSED ; south exit - .byte $ff ; east exit - .byte $ff ; west exit - .byte DIRECTION_N ; north exit_dir - .byte DIRECTION_S ; south exit_dir - .byte $ff ; east exit_dir - .byte $ff ; west exit_dir - .word book_chair_n_lzsa ; north bg - .word book_chair_s_lzsa ; south bg - .word $0000 ; east bg - .word $0000 ; west bg - .byte BG_SOUTH|BG_NORTH - .byte $ff ; special exit - -; STONEY_SHIP_BOOK_CLOSED -- stoney linking book, closed -location5: - .byte $ff ; north exit - .byte STONEY_SHIP_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 book_chair_closed_s_lzsa ; south bg - .word $0000 ; east bg - .word $0000 ; west bg - .byte BG_SOUTH - .byte $ff ; special exit - -; STONEY_SHIP_BOOK_OPEN -- stoney linking book, open -location6: - .byte $ff ; north exit - .byte STONEY_SHIP_CHAIR ; 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 book_chair_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 stoney_link_book-1 + .word location44 ; STONEY_ARRIVAL -- arrival at stoneship -location7: +location0: .byte STONEY_DOORWAY1 ; north exit .byte STONEY_EXIT ; south exit .byte STONEY_LIGHTHOUSE_PATH ; east exit @@ -167,7 +35,7 @@ location7: .byte $ff ; STONEY_UMBRELLA_PATH -- umbrella path -location8: +location1: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_ARRIVAL ; east exit @@ -184,7 +52,7 @@ location8: .byte $ff ; STONEY_UMBRELLA -- umbrella switch -location9: +location2: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_UMBRELLA_PATH ; east exit @@ -205,7 +73,7 @@ location9: ; STONEY_LIGHTHOUSE_PATH -- lighthouse path -location10: +location3: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_LIGHTHOUSE_DOOR ; east exit @@ -222,7 +90,7 @@ location10: .byte $ff ; STONEY_LIGHTHOUSE_DOOR -- lighthouse door -location11: +location4: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_LIGHTHOUSE_INSIDE; east exit @@ -239,7 +107,7 @@ location11: .byte $ff ; STONEY_LIGHTHOUSE_INSIDE -- lighthouse inside -location12: +location5: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_LIGHTHOUSE_UPSTAIRS; east exit @@ -256,7 +124,7 @@ location12: .byte $ff ; STONEY_LIGHTHOUSE_UPSTAIRS -- lighthouse upstairs -location13: +location6: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_LIGHTHOUSE_DOWNLADDER ; east exit @@ -277,7 +145,7 @@ location13: ; STONEY_LIGHTHOUSE_BATTERY -- lighthouse battery -location14: +location7: .byte $ff ; north exit .byte $ff ; south exit .byte $ff ; east exit @@ -294,7 +162,7 @@ location14: .byte $ff ; STONEY_LIGHTHOUSE_DOWNLADDER -- lighthouse down the ladder -location15: +location8: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_LIGHTHOUSE_INSIDE ; east exit @@ -311,7 +179,7 @@ location15: .byte $ff ; STONEY_DOORWAY1 -- doorway1 -location16: +location9: .byte STONEY_LEFT_TUNNEL1 ; north exit .byte STONEY_ARRIVAL ; south exit .byte STONEY_BRIDGE ; east exit @@ -328,7 +196,7 @@ location16: .byte $ff ; STONEY_BRIDGE -- bridge between sections -location17: +location10: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_DOORWAY2 ; east exit @@ -345,7 +213,7 @@ location17: .byte $ff ; STONEY_EXIT -- exit door -location18: +location11: .byte STONEY_ARRIVAL ; north exit .byte STONEY_EXIT_AIRLOCK ; south exit .byte $ff ; east exit @@ -362,7 +230,7 @@ location18: .byte $ff ; STONEY_EXIT_AIRLOCK -- exit door airlock -location19: +location12: .byte STONEY_EXIT ; north exit .byte STONEY_EXIT_AIRLOCK_OPEN ; south exit .byte $ff ; east exit @@ -379,7 +247,7 @@ location19: .byte $ff ; STONEY_EXIT_AIRLOCK_OPEN -- exit door airlock open -location20: +location13: .byte $ff ; north exit .byte STONEY_BOOK_STAIRS1 ; south exit .byte $ff ; east exit @@ -396,7 +264,7 @@ location20: .byte $ff ; STONEY_BOOK_STAIRS1 -- exit door top of stairs -location21: +location14: .byte STONEY_EXIT_AIRLOCK ; north exit .byte STONEY_BOOK_STAIRS2 ; south exit .byte $ff ; east exit @@ -413,7 +281,7 @@ location21: .byte $ff ; STONEY_BOOK_STAIRS2 -- stairs landing -location22: +location15: .byte STONEY_BOOK_ROOM ; north exit .byte STONEY_BOOK_STAIRS1 ; south exit .byte $ff ; east exit @@ -430,7 +298,7 @@ location22: .byte $ff ; STONEY_BOOK_ROOM -- table book room -location23: +location16: .byte STONEY_BOOK_TABLE ; north exit .byte STONEY_BOOK_STAIRS2 ; south exit .byte $ff ; east exit @@ -447,7 +315,7 @@ location23: .byte $ff ; STONEY_BOOK_TABLE -- table book -location24: +location17: .byte STONEY_BOOK_TABLE_CLOSED ; north exit .byte $ff ; south exit .byte $ff ; east exit @@ -465,7 +333,7 @@ location24: ; STONEY_BOOK_TABLE_CLOSED -- table book closed -location25: +location18: .byte STONEY_BOOK_TABLE_OPEN ; north exit .byte $ff ; south exit .byte $ff ; east exit @@ -482,7 +350,7 @@ location25: .byte $ff ; STONEY_BOOK_TABLE_OPEN -- table book open -location26: +location19: .byte STONEY_BOOK_ROOM ; north exit .byte $ff ; south exit .byte $ff ; east exit @@ -502,7 +370,7 @@ location26: .word mist_link_book-1 ; special function ; STONEY_DOORWAY2 -- doorway on other half of ship -location27: +location20: .byte STONEY_RIGHT_TUNNEL1 ; north exit .byte $ff ; south exit .byte STONEY_TELESCOPE_PATH1 ; east exit @@ -519,7 +387,7 @@ location27: .byte $ff ; STONEY_TELSCOPE_PATH1 -- path to telescope -location28: +location21: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_TELESCOPE_PATH2 ; east exit @@ -536,7 +404,7 @@ location28: .byte $ff ; STONEY_TELESCOPE_PATH2 -- path to telescope -location29: +location22: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_TELESCOPE_PATH3 ; east exit @@ -553,7 +421,7 @@ location29: .byte $ff ; STONEY_TELESCOPE_PATH3 -- path to telescope -location30: +location23: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_TELESCOPE ; east exit @@ -570,7 +438,7 @@ location30: .byte $ff ; STONEY_TELESCOPE -- telescope -location31: +location24: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_TELESCOPE_VIEW ; east exit @@ -587,7 +455,7 @@ location31: .byte $ff ; STONEY_TELESCOPE_VIEW -- telescope -location32: +location25: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_TELESCOPE ; east exit @@ -604,7 +472,7 @@ location32: .byte $ff ; STONEY_LEFT_TUNNEL1 -- left tunnel to red room -location33: +location26: .byte STONEY_LEFT_TUNNEL2 ; north exit .byte STONEY_DOORWAY1 ; south exit .byte $ff ; east exit @@ -621,7 +489,7 @@ location33: .byte $ff ; STONEY_LEFT_TUNNEL2 -- left tunnel to red room, with side -location34: +location27: .byte STONEY_LEFT_AIRLOCK ; north exit .byte STONEY_LEFT_TUNNEL1 ; south exit .byte $ff ; east exit @@ -638,7 +506,7 @@ location34: .byte $ff ; STONEY_LEFT_AIRLOCK -- airlock to red room -location35: +location28: .byte STONEY_LEFT_AIRLOCK_OPEN ; north exit .byte STONEY_LEFT_TUNNEL2 ; south exit .byte $ff ; east exit @@ -655,7 +523,7 @@ location35: .byte $ff ; STONEY_LEFT_AIRLOCK_OPEN -- airlock to red room, open -location36: +location29: .byte STONEY_RED_ROOM ; north exit .byte STONEY_LEFT_TUNNEL2 ; south exit .byte $ff ; east exit @@ -672,7 +540,7 @@ location36: .byte $ff ; STONEY_RED_ROOM -- red room -location37: +location30: .byte $ff ; north exit .byte STONEY_LEFT_AIRLOCK ; south exit .byte $ff ; east exit @@ -689,7 +557,7 @@ location37: .byte $ff ; STONEY_RED_ROOM_DRESSER -- red room dresser -location38: +location31: .byte $ff ; north exit .byte $ff ; south exit .byte $ff ; east exit @@ -706,7 +574,7 @@ location38: .byte $ff ; STONEY_RED_DRESSER_OPEN -- red room dresser open -location39: +location32: .byte $ff ; north exit .byte $ff ; south exit .byte $ff ; east exit @@ -726,7 +594,7 @@ location39: .word stoney_take_red_page-1 ; special function ; STONEY_CRAWLWAY_LEFT -- left crawlway -location40: +location33: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_LEFT_TUNNEL2 ; east exit @@ -743,7 +611,7 @@ location40: .byte $ff ; STONEY_COMPASS_ROOM -- compass room -location41: +location34: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_CRAWLWAY_LEFT ; east exit @@ -760,7 +628,7 @@ location41: .byte $ff ; STONEY_COMPASS_ROSE -- compass rose -location42: +location35: .byte $ff ; north exit .byte $ff ; south exit .byte $ff ; east exit @@ -777,7 +645,7 @@ location42: .byte $ff ; STONEY_RIGHT_TUNNEL1 -- right tunnel to blue room -location43: +location36: .byte STONEY_RIGHT_TUNNEL2 ; north exit .byte STONEY_DOORWAY2 ; south exit .byte $ff ; east exit @@ -794,7 +662,7 @@ location43: .byte $ff ; STONEY_RIGHT_TUNNEL2 -- right tunnel to blue room, with side -location44: +location37: .byte STONEY_RIGHT_AIRLOCK ; north exit .byte STONEY_RIGHT_TUNNEL1 ; south exit .byte STONEY_CRAWLWAY_RIGHT ; east exit @@ -811,7 +679,7 @@ location44: .byte $ff ; STONEY_RIGHT_AIRLOCK -- airlock to blue room -location45: +location38: .byte STONEY_RIGHT_AIRLOCK_OPEN ; north exit .byte STONEY_RIGHT_TUNNEL2 ; south exit .byte $ff ; east exit @@ -828,7 +696,7 @@ location45: .byte $ff ; STONEY_RIGHT_AIRLOCK_OPEN -- airlock to blue room, open -location46: +location39: .byte STONEY_BLUE_ROOM ; north exit .byte STONEY_RIGHT_TUNNEL2 ; south exit .byte $ff ; east exit @@ -845,7 +713,7 @@ location46: .byte $ff ; STONEY_BLUE_ROOM -- blue room -location47: +location40: .byte $ff ; north exit .byte STONEY_RIGHT_AIRLOCK ; south exit .byte STONEY_BLUE_MAPCASE ; east exit @@ -865,7 +733,7 @@ location47: .word stoney_take_blue_page-1 ; special function ; STONEY_BLUE_MAPCASE -- blue room mapcase -location48: +location41: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_BLUE_MAPCASE_OPEN ; east exit @@ -882,7 +750,7 @@ location48: .byte $ff ; STONEY_BLUE_MAPCASE_OPEN -- blue room mapcase open -location49: +location42: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_BLUE_ROOM ; east exit @@ -902,7 +770,7 @@ location49: .word stoney_half_message-1 ; special function ; STONEY_BLUE_HALFMESSAGE -- blue room halfmessag -location50: +location43: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_BLUE_MAPCASE_OPEN ; east exit @@ -919,7 +787,7 @@ location50: .byte $ff ; STONEY_CRAWLWAY_RIGHT -- right crawlway -location51: +location44: .byte $ff ; north exit .byte $ff ; south exit .byte STONEY_COMPASS_ROOM ; east exit diff --git a/mist/link_book_stoney.s b/mist/link_book_stoney.s index 384dfda6..1cb4d24f 100644 --- a/mist/link_book_stoney.s +++ b/mist/link_book_stoney.s @@ -37,10 +37,17 @@ stoney_link_book: lda #STONEY_ARRIVAL sta LOCATION + + lda #LOAD_STONEY + sta WHICH_LOAD + lda #DIRECTION_N sta DIRECTION - jsr change_location + lda #$ff + sta LEVEL_OVER + +; jsr change_location rts diff --git a/mist/mist.s b/mist/mist.s index b63343e9..3e7af76a 100644 --- a/mist/mist.s +++ b/mist/mist.s @@ -279,13 +279,13 @@ enter_channel_clock: jmp set_level_over enter_stoneyship: - lda #STONEY_SHIP_STERN + lda #SHIP_STERN sta LOCATION lda #DIRECTION_N sta DIRECTION - lda #LOAD_STONEY + lda #LOAD_SHIP sta WHICH_LOAD set_level_over: diff --git a/mist/graphics_dun/atrus_book.png b/mist/old/graphics_dun/atrus_book.png similarity index 100% rename from mist/graphics_dun/atrus_book.png rename to mist/old/graphics_dun/atrus_book.png diff --git a/mist/graphics_dun/behind_fireplace.png b/mist/old/graphics_dun/behind_fireplace.png similarity index 100% rename from mist/graphics_dun/behind_fireplace.png rename to mist/old/graphics_dun/behind_fireplace.png diff --git a/mist/graphics_dun/green_book.png b/mist/old/graphics_dun/green_book.png similarity index 100% rename from mist/graphics_dun/green_book.png rename to mist/old/graphics_dun/green_book.png diff --git a/mist/ship.s b/mist/ship.s new file mode 100644 index 00000000..165d52f3 --- /dev/null +++ b/mist/ship.s @@ -0,0 +1,191 @@ +; The Ship on Mist Island + +; by deater (Vince Weaver) + +; Zero Page + .include "zp.inc" + .include "hardware.inc" + .include "common_defines.inc" + .include "common_routines.inc" + +ship_start: + ;=================== + ; init screen + jsr TEXT + jsr HOME + bit KEYRESET + + bit SET_GR + bit PAGE0 + bit LORES + bit FULLGR + + ;================= + ; set up location + ;================= + + lda #locations + sta LOCATIONS_H + + lda #0 + sta DRAW_PAGE + sta LEVEL_OVER + + ; init cursor + + lda #20 + sta CURSOR_X + sta CURSOR_Y + + ; set up initial location + + jsr change_location + + lda #1 + sta CURSOR_VISIBLE ; visible at first + + lda #0 + sta ANIMATE_FRAME + +game_loop: + ;================= + ; reset things + ;================= + + lda #0 + sta IN_SPECIAL + sta IN_RIGHT + sta IN_LEFT + + ;==================================== + ; copy background to current page + ;==================================== + + jsr gr_copy_to_current + + ;==================================== + ; handle special-case forground logic + ;==================================== + + ; FIXME: fix gear being open/closed as viewed from ship + + lda LOCATION + cmp #SHIP_BOOK_OPEN + beq animate_stoney_book + + jmp nothing_special + +animate_stoney_book: + + jsr do_animate_stoney_book + jmp nothing_special + +nothing_special: + + ;==================================== + ; draw pointer + ;==================================== + + jsr draw_pointer + + ;==================================== + ; page flip + ;==================================== + + jsr page_flip + + ;==================================== + ; handle keypress/joystick + ;==================================== + + jsr handle_keypress + + + ;==================================== + ; inc frame count + ;==================================== + + inc FRAMEL + bne room_frame_no_oflo + inc FRAMEH +room_frame_no_oflo: + + ;==================================== + ; check level over + ;==================================== + + lda LEVEL_OVER + bne really_exit + jmp game_loop + +really_exit: + jmp end_level + + +do_animate_stoney_book: + + ; handle animated linking book + + lda ANIMATE_FRAME + asl + tay + lda stoney_movie,Y + sta INL + lda stoney_movie+1,Y + sta INH + + lda #22 + sta XPOS + lda #12 + sta YPOS + + jsr put_sprite_crop + + lda FRAMEL + and #$f + bne done_animate_book + + inc ANIMATE_FRAME + lda ANIMATE_FRAME + cmp #16 + bne done_animate_book + lda #0 + sta ANIMATE_FRAME +done_animate_book: + rts + + +back_to_mist: + + lda #$ff + sta LEVEL_OVER + + lda #MIST_ARRIVAL_DOCK ; the dock + sta LOCATION + lda #DIRECTION_N + sta DIRECTION + + lda #LOAD_MIST + sta WHICH_LOAD + + rts + + + + ;========================== + ; includes + ;========================== + + ; level graphics + .include "graphics_ship/ship_graphics.inc" + + ; linking books + .include "link_book_stoney.s" + + ; puzzles +; .include "handle_pages.s" + + ; level data + .include "leveldata_ship.inc" diff --git a/mist/stoney.s b/mist/stoney.s index c7d36500..0b6d3d44 100644 --- a/mist/stoney.s +++ b/mist/stoney.s @@ -29,7 +29,6 @@ stoney_start: lda #>locations sta LOCATIONS_H - lda #0 sta DRAW_PAGE sta LEVEL_OVER @@ -53,9 +52,6 @@ stoney_start: lda #0 sta ANIMATE_FRAME - ; FIXME - ; handle gear visibility - game_loop: ;================= ; reset things @@ -77,8 +73,6 @@ game_loop: ;==================================== lda LOCATION - cmp #STONEY_SHIP_BOOK_OPEN - beq animate_stoney_book cmp #STONEY_BOOK_TABLE_OPEN beq animate_mist_book cmp #STONEY_RED_DRESSER_OPEN @@ -96,11 +90,6 @@ game_loop: jmp nothing_special -animate_stoney_book: - - jsr do_animate_stoney_book - jmp nothing_special - animate_magic_table: jsr do_animate_magic_table @@ -201,24 +190,6 @@ room_frame_no_oflo: really_exit: jmp end_level - - -back_to_mist: - - lda #$ff - sta LEVEL_OVER - - lda #MIST_ARRIVAL_DOCK ; the dock - sta LOCATION - lda #DIRECTION_N - sta DIRECTION - - lda #LOAD_MIST - sta WHICH_LOAD - - rts - - stoney_take_red_page: lda #STONEY_PAGE jmp take_red_page @@ -396,41 +367,6 @@ draw_it: done_draw_it: rts - -do_animate_stoney_book: - - ; handle animated linking book - - lda ANIMATE_FRAME - asl - tay - lda stoney_movie,Y - sta INL - lda stoney_movie+1,Y - sta INH - - lda #22 - sta XPOS - lda #12 - sta YPOS - - jsr put_sprite_crop - - lda FRAMEL - and #$f - bne done_animate_book - - inc ANIMATE_FRAME - lda ANIMATE_FRAME - cmp #16 - bne done_animate_book - lda #0 - sta ANIMATE_FRAME -done_animate_book: - rts - - - do_animate_magic_table: ; handle book rising from table @@ -587,28 +523,11 @@ battery_sprite7: ;========================== ; includes ;========================== -.if 0 - .include "gr_copy.s" - .include "gr_offsets.s" - .include "gr_pageflip.s" - .include "gr_putsprite_crop.s" - .include "text_print.s" - .include "gr_fast_clear.s" - .include "decompress_fast_v2.s" - .include "keyboard.s" - .include "draw_pointer.s" - .include "end_level.s" - .include "audio.s" - .include "common_sprites.inc" - .include "page_sprites.inc" - -.endif ; level graphics .include "graphics_stoney/stoney_graphics.inc" ; linking books - .include "link_book_stoney.s" .include "link_book_mist.s" ; puzzles