diff --git a/mist/common_defines.inc b/mist/common_defines.inc index fa1d5828..112ea55a 100644 --- a/mist/common_defines.inc +++ b/mist/common_defines.inc @@ -209,6 +209,10 @@ MECHE_EAST_PATH = 44 MECHE_EAST_STEPS = 45 MECHE_EAST_LANDING = 46 MECHE_NORTH_CLOSE = 47 +MECHE_RED_THRONE = 48 +MECHE_RED_ROOM_EAST = 49 +MECHE_TELESCOPE_SKELETON= 50 +MECHE_TELESCOPE_PLAIN = 51 ; Selena Age diff --git a/mist/graphics_meche/Makefile b/mist/graphics_meche/Makefile index 6bc69762..9f282eae 100644 --- a/mist/graphics_meche/Makefile +++ b/mist/graphics_meche/Makefile @@ -64,7 +64,10 @@ meche_graphics.inc: \ east_path_e.lzsa east_path_w.lzsa \ east_steps_s.lzsa east_steps_n.lzsa \ east_landing_e.lzsa east_landing_w.lzsa \ - north_close_n.lzsa north_close_s.lzsa + north_close_n.lzsa north_close_s.lzsa \ + red_throne_s.lzsa \ + red_room_east_e.lzsa red_room_east_n.lzsa red_room_east_w.lzsa \ + red_skeleton.lzsa red_no_skeleton.lzsa echo "departure_e_lzsa: .incbin \"departure_e.lzsa\"" > meche_graphics.inc echo "arrival_w_lzsa: .incbin \"arrival_w.lzsa\"" >> meche_graphics.inc echo "entrance_e_lzsa: .incbin \"entrance_e.lzsa\"" >> meche_graphics.inc @@ -176,6 +179,14 @@ meche_graphics.inc: \ echo "east_landing_w_lzsa: .incbin \"east_landing_w.lzsa\"" >> meche_graphics.inc echo "north_close_s_lzsa: .incbin \"north_close_s.lzsa\"" >> meche_graphics.inc echo "north_close_n_lzsa: .incbin \"north_close_n.lzsa\"" >> meche_graphics.inc + echo "red_throne_s_lzsa: .incbin \"red_throne_s.lzsa\"" >> meche_graphics.inc + echo "red_room_east_e_lzsa: .incbin \"red_room_east_e.lzsa\"" >> meche_graphics.inc + echo "red_room_east_n_lzsa: .incbin \"red_room_east_n.lzsa\"" >> meche_graphics.inc + echo "red_room_east_w_lzsa: .incbin \"red_room_east_w.lzsa\"" >> meche_graphics.inc + echo "red_skeleton_lzsa: .incbin \"red_skeleton.lzsa\"" >> meche_graphics.inc + echo "red_no_skeleton_lzsa: .incbin \"red_no_skeleton.lzsa\"" >> meche_graphics.inc + + %.gr: %.png $(PNG2GR) $< $@ diff --git a/mist/graphics_meche/red_no_skeleton.png b/mist/graphics_meche/red_no_skeleton.png new file mode 100644 index 00000000..d5391de2 Binary files /dev/null and b/mist/graphics_meche/red_no_skeleton.png differ diff --git a/mist/graphics_meche/red_room_east_e.png b/mist/graphics_meche/red_room_east_e.png new file mode 100644 index 00000000..8200adba Binary files /dev/null and b/mist/graphics_meche/red_room_east_e.png differ diff --git a/mist/graphics_meche/red_room_east_n.png b/mist/graphics_meche/red_room_east_n.png new file mode 100644 index 00000000..3d8e1394 Binary files /dev/null and b/mist/graphics_meche/red_room_east_n.png differ diff --git a/mist/graphics_meche/red_room_east_w.png b/mist/graphics_meche/red_room_east_w.png new file mode 100644 index 00000000..256d1abe Binary files /dev/null and b/mist/graphics_meche/red_room_east_w.png differ diff --git a/mist/graphics_meche/red_skeleton.png b/mist/graphics_meche/red_skeleton.png new file mode 100644 index 00000000..739ab6e1 Binary files /dev/null and b/mist/graphics_meche/red_skeleton.png differ diff --git a/mist/graphics_meche/red_throne_s.png b/mist/graphics_meche/red_throne_s.png new file mode 100644 index 00000000..36b5c8e0 Binary files /dev/null and b/mist/graphics_meche/red_throne_s.png differ diff --git a/mist/leveldata_meche.inc b/mist/leveldata_meche.inc index dff3713e..0f5692f8 100644 --- a/mist/leveldata_meche.inc +++ b/mist/leveldata_meche.inc @@ -16,6 +16,7 @@ locations: .word location36,location37,location38,location39 .word location40,location41,location42,location43 .word location44,location45,location46,location47 + .word location48,location49,location50,location51 ; MECHE_INSIDE_GEAR -- Inside gear on Mist location0: @@ -303,11 +304,11 @@ location15: ; MECHE_RED_ROOM_CENTER -- center of red room location16: .byte $ff ; north exit - .byte $ff ; south exit - .byte MECHE_CENTER_HALL ; east exit + .byte MECHE_RED_THRONE ; south exit + .byte MECHE_RED_ROOM_EAST ; east exit .byte MECHE_LEFT_HALL_CORNER ; west exit .byte $ff ; north exit_dir - .byte $ff ; south exit_dir + .byte DIRECTION_S ; south exit_dir .byte DIRECTION_E ; east exit_dir .byte DIRECTION_S ; west exit_dir .word red_room_center_n_lzsa ; north bg @@ -315,17 +316,21 @@ location16: .word red_room_center_e_lzsa ; east bg .word red_room_center_w_lzsa ; west bg .byte BG_NORTH|BG_SOUTH|BG_WEST|BG_EAST - .byte DIRECTION_S - .byte 25,33 ; special x - .byte 18,38 ; special y - .word enter_red_secret-1 ; special function + .byte DIRECTION_N + .byte 21,28 ; special x + .byte 12,26 ; special y + .word view_telescope-1 ; special function +; .byte DIRECTION_S +; .byte 25,33 ; special x +; .byte 18,38 ; special y +; .word enter_red_secret-1 ; special function ; MECHE_CENTER_HALL -- center hall 1 location17: .byte $ff ; north exit .byte MECHE_RED_BUTTON ; south exit - .byte MECHE_CENTER_HALL ; east exit - .byte MECHE_RED_ROOM_CENTER ; west exit + .byte MECHE_CENTER_HALL ; east exit + .byte MECHE_RED_ROOM_EAST ; west exit .byte $ff ; north exit_dir .byte DIRECTION_S ; south exit_dir .byte DIRECTION_S ; east exit_dir @@ -880,3 +885,77 @@ location47: .word $0000 ; west bg .byte BG_NORTH|BG_SOUTH .byte $ff ; special exit + +; MECHE_RED_THRONE -- red room throne +location48: + .byte $ff ; north exit + .byte MECHE_RED_ROOM_CENTER ; 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 red_throne_s_lzsa ; south bg + .word $0000 ; east bg + .word $0000 ; west bg + .byte BG_SOUTH + .byte DIRECTION_S + .byte 28,37 ; special x + .byte 10,34 ; special y + .word enter_red_secret-1 ; special function + +; MECHE_RED_ROOM_EAST -- east exit of red room +location49: + .byte $ff ; north exit + .byte $ff ; south exit + .byte MECHE_CENTER_HALL ; east exit + .byte MECHE_RED_ROOM_CENTER ; west exit + .byte $ff ; north exit_dir + .byte $ff ; south exit_dir + .byte DIRECTION_E ; east exit_dir + .byte DIRECTION_W ; west exit_dir + .word red_room_east_n_lzsa ; north bg + .word $0000 ; south bg + .word red_room_east_e_lzsa ; east bg + .word red_room_east_w_lzsa ; west bg + .byte BG_NORTH|BG_WEST|BG_EAST + .byte $ff + +; MECHE_TELESCOPE_SKELETON -- some call him "Bob" +location50: + .byte MECHE_RED_ROOM_CENTER ; north exit + .byte $ff ; south exit + .byte $ff ; east exit + .byte $ff ; west exit + .byte DIRECTION_N ; north exit_dir + .byte $ff ; south exit_dir + .byte $ff ; east exit_dir + .byte $ff ; west exit_dir + .word red_skeleton_lzsa ; north bg + .word $0000 ; south bg + .word $0000 ; east bg + .word $0000 ; west bg + .byte BG_NORTH + .byte $ff ; special exit + + +; MECHE_TELESCOPE_PLAIN -- nothing +location51: + .byte MECHE_RED_ROOM_CENTER ; north exit + .byte $ff ; south exit + .byte $ff ; east exit + .byte $ff ; west exit + .byte DIRECTION_N ; north exit_dir + .byte $ff ; south exit_dir + .byte $ff ; east exit_dir + .byte $ff ; west exit_dir + .word red_no_skeleton_lzsa ; north bg + .word $0000 ; south bg + .word $0000 ; east bg + .word $0000 ; west bg + .byte BG_NORTH + .byte $ff ; special exit + + diff --git a/mist/meche.s b/mist/meche.s index 8967838b..9a19ca7e 100644 --- a/mist/meche.s +++ b/mist/meche.s @@ -88,6 +88,8 @@ game_loop: beq fg_draw_blue_page cmp #MECHE_RED_SECRET_ROOM beq fg_draw_red_page + cmp #MECHE_RED_ROOM_EAST + beq fg_draw_crystals jmp nothing_special animate_meche_book: @@ -177,6 +179,10 @@ fg_draw_blue_page: jsr draw_blue_page jmp nothing_special +fg_draw_crystals: + jsr draw_crystals + jmp nothing_special + nothing_special: ;==================================== diff --git a/mist/meche_rotation.s b/mist/meche_rotation.s index 6febb866..56249144 100644 --- a/mist/meche_rotation.s +++ b/mist/meche_rotation.s @@ -1,3 +1,114 @@ + ;=============================== + ; draw hover crystals + ;=============================== +draw_crystals: + lda DIRECTION + cmp #DIRECTION_N + bne done_draw_crystals + + lda CURSOR_Y + cmp #15 + bcc done_draw_crystals ; blt + + cmp #24 + bcs done_draw_crystals ; bge + + lda CURSOR_X + cmp #8 + bcc done_draw_crystals + cmp #13 + bcc draw_yellow_crystal + cmp #17 + bcc done_draw_crystals + cmp #22 + bcc draw_green_crystal + cmp #25 + bcc done_draw_crystals + cmp #31 + bcc draw_red_crystal + bcs done_draw_crystals + +draw_yellow_crystal: + lda #10 + sta XPOS + + lda #yellow_crystal_sprite + + jmp common_draw_crystal +draw_green_crystal: + lda #18 + sta XPOS + + lda #green_crystal_sprite + + jmp common_draw_crystal +draw_red_crystal: + lda #27 + sta XPOS + + lda #red_crystal_sprite + +common_draw_crystal: + sta INH + + lda #16 + sta YPOS + + jsr put_sprite_crop + +done_draw_crystals: + rts + +yellow_crystal_sprite: + .byte 2,3 + .byte $fd,$d5 + .byte $dd,$dd + .byte $df,$0d + +green_crystal_sprite: + + .byte 3,3 + .byte $c5,$cc,$cc + .byte $dc,$dc,$dc + .byte $cc,$cc,$cc + +red_crystal_sprite: + .byte 3,3 + .byte $88,$35,$dd + .byte $33,$bb,$33 + .byte $08,$33,$d3 + + + + ;=============================== + ; view telescope + ;=============================== +view_telescope: + + lda MECHE_ROTATION + ; it's a range + lsr + lsr + cmp #2 + bne no_skeleton + +yes_skeleton: + lda #MECHE_TELESCOPE_SKELETON + sta LOCATION + jmp change_location + +no_skeleton: + lda #MECHE_TELESCOPE_PLAIN + sta LOCATION + jmp change_location + + ;=============================== ; top floor up ;=============================== @@ -498,6 +609,11 @@ lever_sprite: rotate_fortress: + ; 0 = S + ; 4 = E + ; 8 = N + ; 12 = W + lda MECHE_ROTATION lsr lsr diff --git a/mist/zp.inc b/mist/zp.inc index 5417b8a2..7939a1d1 100644 --- a/mist/zp.inc +++ b/mist/zp.inc @@ -137,6 +137,10 @@ ROCKET_NOTE4 = $A1 ; organ (note slider 4) MECHE_ELEVATOR = $A2 ; fortress elevator state MECHE_ROTATION = $A3 ; fortress rotation state + ; 0..3 = S + ; 4..7 = E + ; 8..11 = N + ; 12..15 = W MECHE_LEVERS = $A4 ; fortress rotation levers LEFT_LEVER = 1 RIGHT_LEVER = 2