diff --git a/mist/common_defines.inc b/mist/common_defines.inc index 1b944b6d..dbff69e0 100644 --- a/mist/common_defines.inc +++ b/mist/common_defines.inc @@ -207,7 +207,9 @@ SELENA_SUB_ROOM = 7 SELENA_BOOK_ROOM = 8 SELENA_BOOK_CLOSED = 9 SELENA_BOOK_OPEN = 10 - +SELENA_WATER_TURN = 11 +SELENA_WATER_PATH = 12 +SELENA_WATER = 13 ; Viewer Room diff --git a/mist/graphics_selena/Makefile b/mist/graphics_selena/Makefile index d382b2b1..6205822f 100644 --- a/mist/graphics_selena/Makefile +++ b/mist/graphics_selena/Makefile @@ -20,7 +20,10 @@ selena_graphics.inc: \ bunker_n.lzsa bunker_s.lzsa bunker_e.lzsa \ subroom_s.lzsa \ book_table_s.lzsa \ - book_mist_open_s.lzsa book_mist_closed_s.lzsa + book_mist_open_s.lzsa book_mist_closed_s.lzsa \ + water_turn_n.lzsa water_turn_s.lzsa water_turn_w.lzsa \ + water_path_e.lzsa water_path_w.lzsa \ + water_note_e.lzsa water_note_w.lzsa water_note_s.lzsa echo "controls_e_lzsa: .incbin \"controls_e.lzsa\"" > selena_graphics.inc echo "organ_w_lzsa: .incbin \"organ_w.lzsa\"" >> selena_graphics.inc echo "spaceship_inside_w_lzsa: .incbin \"spaceship_inside_w.lzsa\"" >> selena_graphics.inc @@ -39,7 +42,14 @@ selena_graphics.inc: \ echo "book_table_s_lzsa: .incbin \"book_table_s.lzsa\"" >> selena_graphics.inc echo "book_mist_open_s_lzsa: .incbin \"book_mist_open_s.lzsa\"" >> selena_graphics.inc echo "book_mist_closed_s_lzsa: .incbin \"book_mist_closed_s.lzsa\"" >> selena_graphics.inc - + echo "water_turn_n_lzsa: .incbin \"water_turn_n.lzsa\"" >> selena_graphics.inc + echo "water_turn_s_lzsa: .incbin \"water_turn_s.lzsa\"" >> selena_graphics.inc + echo "water_turn_w_lzsa: .incbin \"water_turn_w.lzsa\"" >> selena_graphics.inc + echo "water_path_w_lzsa: .incbin \"water_path_w.lzsa\"" >> selena_graphics.inc + echo "water_path_e_lzsa: .incbin \"water_path_e.lzsa\"" >> selena_graphics.inc + echo "water_note_e_lzsa: .incbin \"water_note_e.lzsa\"" >> selena_graphics.inc + echo "water_note_w_lzsa: .incbin \"water_note_w.lzsa\"" >> selena_graphics.inc + echo "water_note_s_lzsa: .incbin \"water_note_s.lzsa\"" >> selena_graphics.inc %.gr: %.png $(PNG2GR) $< $@ diff --git a/mist/graphics_selena/water_note_e.png b/mist/graphics_selena/water_note_e.png new file mode 100644 index 00000000..208c2669 Binary files /dev/null and b/mist/graphics_selena/water_note_e.png differ diff --git a/mist/graphics_selena/water_note_s.png b/mist/graphics_selena/water_note_s.png new file mode 100644 index 00000000..8e1698f5 Binary files /dev/null and b/mist/graphics_selena/water_note_s.png differ diff --git a/mist/graphics_selena/water_note_w.png b/mist/graphics_selena/water_note_w.png new file mode 100644 index 00000000..1738e795 Binary files /dev/null and b/mist/graphics_selena/water_note_w.png differ diff --git a/mist/graphics_selena/water_path_e.png b/mist/graphics_selena/water_path_e.png new file mode 100644 index 00000000..19fb4520 Binary files /dev/null and b/mist/graphics_selena/water_path_e.png differ diff --git a/mist/graphics_selena/water_path_w.png b/mist/graphics_selena/water_path_w.png new file mode 100644 index 00000000..1ab0a33f Binary files /dev/null and b/mist/graphics_selena/water_path_w.png differ diff --git a/mist/graphics_selena/water_turn_n.png b/mist/graphics_selena/water_turn_n.png new file mode 100644 index 00000000..0767d18a Binary files /dev/null and b/mist/graphics_selena/water_turn_n.png differ diff --git a/mist/graphics_selena/water_turn_s.png b/mist/graphics_selena/water_turn_s.png new file mode 100644 index 00000000..02474a9b Binary files /dev/null and b/mist/graphics_selena/water_turn_s.png differ diff --git a/mist/graphics_selena/water_turn_w.png b/mist/graphics_selena/water_turn_w.png new file mode 100644 index 00000000..e634574d Binary files /dev/null and b/mist/graphics_selena/water_turn_w.png differ diff --git a/mist/leveldata_selena.inc b/mist/leveldata_selena.inc index 5b1ef6a6..e1cb98ce 100644 --- a/mist/leveldata_selena.inc +++ b/mist/leveldata_selena.inc @@ -6,7 +6,8 @@ locations: .word location0, location1, location2, location3 .word location4, location5, location6, location7 - .word location8, location9, location10 + .word location8, location9, location10,location11 + .word location12,location13 ; SELENA_INSIDE_SHIP -- Inside Ship location0: @@ -123,11 +124,11 @@ location5: ; SELENA_BUNKER -- bunker location6: - .byte $ff ; north exit + .byte SELENA_WATER_TURN ; north exit .byte SELENA_WALKWAY4 ; south exit .byte SELENA_SUB_ROOM ; east exit .byte $ff ; west exit - .byte $ff ; north exit_dir + .byte DIRECTION_N ; north exit_dir .byte DIRECTION_S ; south exit_dir .byte DIRECTION_S ; east exit_dir .byte $ff ; west exit_dir @@ -209,3 +210,59 @@ location10: .byte 12,22 ; special y .word mist_link_book-1 ; special function +; SELENA_WATER_TURN -- turnoff for water +location11: + .byte $ff ; north exit + .byte SELENA_BUNKER ; south exit + .byte $ff ; east exit + .byte SELENA_WATER_PATH ; west exit + .byte $ff ; north exit_dir + .byte DIRECTION_S ; south exit_dir + .byte $ff ; east exit_dir + .byte DIRECTION_W ; west exit_dir + .word water_turn_n_lzsa ; north bg + .word water_turn_s_lzsa ; south bg + .word $0000 ; east bg + .word water_turn_w_lzsa ; west bg + .byte BG_SOUTH|BG_NORTH|BG_WEST + .byte $ff + +; SELENA_WATER_PATH -- path to water +location12: + .byte $ff ; north exit + .byte $ff ; south exit + .byte SELENA_WATER_TURN ; east exit + .byte SELENA_WATER ; west exit + .byte $ff ; north exit_dir + .byte $ff ; south exit_dir + .byte DIRECTION_S ; east exit_dir + .byte DIRECTION_W ; west exit_dir + .word $0000 ; north bg + .word $0000 ; south bg + .word water_path_e_lzsa ; east bg + .word water_path_w_lzsa ; west bg + .byte BG_EAST|BG_WEST + .byte $ff + +; SELENA_WATER -- water +location13: + .byte $ff ; north exit + .byte $ff ; south exit + .byte SELENA_WATER_PATH ; 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 water_note_s_lzsa ; south bg + .word water_note_e_lzsa ; east bg + .word water_note_w_lzsa ; west bg + .byte BG_SOUTH|BG_EAST|BG_WEST + .byte DIRECTION_S ; special exit + .byte 20,27 ; special x + .byte 26,36 ; special y + .word selena_take_blue_page-1 ; special function + + + diff --git a/mist/selena.s b/mist/selena.s index a67d53be..b6dcea9f 100644 --- a/mist/selena.s +++ b/mist/selena.s @@ -53,14 +53,24 @@ selena_start: lda #DIRECTION_N sta location0,Y ; enable mist exit - lda #SELENA_INSIDE_SHIP - sta LOCATION - lda #0 sta LEVEL_OVER +.if 0 + lda #SELENA_INSIDE_SHIP + sta LOCATION + lda #DIRECTION_E sta DIRECTION +.else + + lda #SELENA_WALKWAY1 + sta LOCATION + + lda #DIRECTION_N + sta DIRECTION + +.endif ; set up initial location @@ -98,6 +108,9 @@ game_loop: beq controls_animation cmp #SELENA_BOOK_OPEN beq mist_book_animation + cmp #SELENA_WATER + beq fg_draw_blue_page + jmp nothing_special mist_book_animation: @@ -189,6 +202,11 @@ animate_check_low: sta ANIMATE_FRAME done_animate_book: + jmp nothing_special + +fg_draw_blue_page: + jsr draw_blue_page + jmp nothing_special nothing_special: @@ -262,6 +280,62 @@ save_rocket_state: rts +selena_take_red_page: + lda #SELENA_PAGE + jmp take_red_page + +selena_take_blue_page: + lda #SELENA_PAGE + jmp take_blue_page + + + ;============================= +draw_red_page: + + lda RED_PAGES_TAKEN + and #SELENA_PAGE + bne no_draw_page + + lda #14 + sta XPOS + lda #36 + sta YPOS + + lda #red_page_sprite + sta INH + + jmp put_sprite_crop ; tail call + + +draw_blue_page: + + lda DIRECTION + cmp #DIRECTION_S + bne no_draw_page + + lda BLUE_PAGES_TAKEN + and #SELENA_PAGE + bne no_draw_page + + lda #20 + sta XPOS + lda #26 + sta YPOS + + lda #blue_page_sprite + sta INH + + jmp put_sprite_crop ; tail call + +no_draw_page: + rts + + + ;========================== ; includes ;========================== @@ -290,7 +364,10 @@ save_rocket_state: .include "link_book_mist.s" + .include "handle_pages.s" + .include "common_sprites.inc" + .include "page_sprites.inc" .include "leveldata_selena.inc"