diff --git a/mist/common_defines.inc b/mist/common_defines.inc index f2d19a8d..adb2c2fb 100644 --- a/mist/common_defines.inc +++ b/mist/common_defines.inc @@ -51,6 +51,9 @@ LOAD_MIST = $1 LOAD_MECHE = $2 LOAD_SELENA = $3 LOAD_OCTAGON = $4 +LOAD_STONEDSHIP = $5 +LOAD_CHANNEL = $6 +LOAD_ENDING = $7 @@ -125,6 +128,13 @@ MECHE_FORT_VIEW = 5 MECHE_BRIDGE2 = 6 MECHE_FORT_DOOR = 7 MECHE_FORT_ENTRY = 8 +MECHE_WEST_PLATFORM = 9 +MECHE_NORTH_PLATFORM = 10 +MECHE_NORTH_HINT = 11 +MECHE_NORTH_TOP = 12 +MECHE_NORTH_DIP = 13 + +;MECHE_EAST_PLATFORM = 9 ; Selena Age diff --git a/mist/graphics_meche/Makefile b/mist/graphics_meche/Makefile index 80b676bd..817f1bb4 100644 --- a/mist/graphics_meche/Makefile +++ b/mist/graphics_meche/Makefile @@ -17,7 +17,12 @@ meche_graphics.inc: \ fort_view_n.lzsa fort_view_s.lzsa \ bridge2_n.lzsa bridge2_s.lzsa bridge2_e.lzsa bridge2_w.lzsa \ fort_door_n.lzsa \ - fort_entry_n.lzsa fort_entry_s.lzsa fort_entry_e.lzsa + fort_entry_n.lzsa fort_entry_s.lzsa fort_entry_e.lzsa \ + westturn_s.lzsa westturn_n.lzsa westturn_w.lzsa westturn_e.lzsa \ + north_hint_n.lzsa \ + north_top_n.lzsa north_top_s.lzsa \ + north_dip_n.lzsa north_dip_s.lzsa \ + northturn_s.lzsa northturn_n.lzsa northturn_w.lzsa northturn_e.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 @@ -36,6 +41,19 @@ meche_graphics.inc: \ echo "fort_entry_n_lzsa: .incbin \"fort_entry_n.lzsa\"" >> meche_graphics.inc echo "fort_entry_s_lzsa: .incbin \"fort_entry_s.lzsa\"" >> meche_graphics.inc echo "fort_entry_e_lzsa: .incbin \"fort_entry_e.lzsa\"" >> meche_graphics.inc + echo "westturn_n_lzsa: .incbin \"westturn_n.lzsa\"" >> meche_graphics.inc + echo "westturn_s_lzsa: .incbin \"westturn_s.lzsa\"" >> meche_graphics.inc + echo "westturn_e_lzsa: .incbin \"westturn_e.lzsa\"" >> meche_graphics.inc + echo "westturn_w_lzsa: .incbin \"westturn_w.lzsa\"" >> meche_graphics.inc + echo "north_hint_n_lzsa: .incbin \"north_hint_n.lzsa\"" >> meche_graphics.inc + echo "north_top_n_lzsa: .incbin \"north_top_n.lzsa\"" >> meche_graphics.inc + echo "north_top_s_lzsa: .incbin \"north_top_s.lzsa\"" >> meche_graphics.inc + echo "north_dip_n_lzsa: .incbin \"north_dip_n.lzsa\"" >> meche_graphics.inc + echo "north_dip_s_lzsa: .incbin \"north_dip_s.lzsa\"" >> meche_graphics.inc + echo "northturn_n_lzsa: .incbin \"northturn_n.lzsa\"" >> meche_graphics.inc + echo "northturn_s_lzsa: .incbin \"northturn_s.lzsa\"" >> meche_graphics.inc + echo "northturn_e_lzsa: .incbin \"northturn_e.lzsa\"" >> meche_graphics.inc + echo "northturn_w_lzsa: .incbin \"northturn_w.lzsa\"" >> meche_graphics.inc %.gr: %.png diff --git a/mist/graphics_meche/fort_exit_n.png b/mist/graphics_meche/fort_exit_n.png new file mode 100644 index 00000000..6eef3f17 Binary files /dev/null and b/mist/graphics_meche/fort_exit_n.png differ diff --git a/mist/graphics_meche/fort_exit_w.png b/mist/graphics_meche/fort_exit_w.png new file mode 100644 index 00000000..5fe8edd2 Binary files /dev/null and b/mist/graphics_meche/fort_exit_w.png differ diff --git a/mist/graphics_meche/meche_graphics.inc b/mist/graphics_meche/meche_graphics.inc index 82e3c16d..693d002d 100644 --- a/mist/graphics_meche/meche_graphics.inc +++ b/mist/graphics_meche/meche_graphics.inc @@ -16,3 +16,16 @@ fort_door_n_lzsa: .incbin "fort_door_n.lzsa" fort_entry_n_lzsa: .incbin "fort_entry_n.lzsa" fort_entry_s_lzsa: .incbin "fort_entry_s.lzsa" fort_entry_e_lzsa: .incbin "fort_entry_e.lzsa" +westturn_n_lzsa: .incbin "westturn_n.lzsa" +westturn_s_lzsa: .incbin "westturn_s.lzsa" +westturn_e_lzsa: .incbin "westturn_e.lzsa" +westturn_w_lzsa: .incbin "westturn_w.lzsa" +north_hint_n_lzsa: .incbin "north_hint_n.lzsa" +north_top_n_lzsa: .incbin "north_top_n.lzsa" +north_top_s_lzsa: .incbin "north_top_s.lzsa" +north_dip_n_lzsa: .incbin "north_dip_n.lzsa" +north_dip_s_lzsa: .incbin "north_dip_s.lzsa" +northturn_n_lzsa: .incbin "northturn_n.lzsa" +northturn_s_lzsa: .incbin "northturn_s.lzsa" +northturn_e_lzsa: .incbin "northturn_e.lzsa" +northturn_w_lzsa: .incbin "northturn_w.lzsa" diff --git a/mist/graphics_meche/north_dip_n.png b/mist/graphics_meche/north_dip_n.png new file mode 100644 index 00000000..8368ab4a Binary files /dev/null and b/mist/graphics_meche/north_dip_n.png differ diff --git a/mist/graphics_meche/north_dip_s.png b/mist/graphics_meche/north_dip_s.png new file mode 100644 index 00000000..ae8b73aa Binary files /dev/null and b/mist/graphics_meche/north_dip_s.png differ diff --git a/mist/graphics_meche/north_hint_n.png b/mist/graphics_meche/north_hint_n.png new file mode 100644 index 00000000..cbb58897 Binary files /dev/null and b/mist/graphics_meche/north_hint_n.png differ diff --git a/mist/graphics_meche/north_top_n.png b/mist/graphics_meche/north_top_n.png new file mode 100644 index 00000000..613519f0 Binary files /dev/null and b/mist/graphics_meche/north_top_n.png differ diff --git a/mist/graphics_meche/north_top_s.png b/mist/graphics_meche/north_top_s.png new file mode 100644 index 00000000..be6aeb78 Binary files /dev/null and b/mist/graphics_meche/north_top_s.png differ diff --git a/mist/graphics_meche/northturn_e.png b/mist/graphics_meche/northturn_e.png new file mode 100644 index 00000000..c22e1e30 Binary files /dev/null and b/mist/graphics_meche/northturn_e.png differ diff --git a/mist/graphics_meche/northturn_n.png b/mist/graphics_meche/northturn_n.png new file mode 100644 index 00000000..93ca52dc Binary files /dev/null and b/mist/graphics_meche/northturn_n.png differ diff --git a/mist/graphics_meche/northturn_s.png b/mist/graphics_meche/northturn_s.png new file mode 100644 index 00000000..1789f707 Binary files /dev/null and b/mist/graphics_meche/northturn_s.png differ diff --git a/mist/graphics_meche/northturn_w.png b/mist/graphics_meche/northturn_w.png new file mode 100644 index 00000000..927ac017 Binary files /dev/null and b/mist/graphics_meche/northturn_w.png differ diff --git a/mist/graphics_meche/westturn_e.png b/mist/graphics_meche/westturn_e.png new file mode 100644 index 00000000..518278f4 Binary files /dev/null and b/mist/graphics_meche/westturn_e.png differ diff --git a/mist/graphics_meche/westturn_n.png b/mist/graphics_meche/westturn_n.png new file mode 100644 index 00000000..0d0881d6 Binary files /dev/null and b/mist/graphics_meche/westturn_n.png differ diff --git a/mist/graphics_meche/westturn_s.png b/mist/graphics_meche/westturn_s.png new file mode 100644 index 00000000..0df64647 Binary files /dev/null and b/mist/graphics_meche/westturn_s.png differ diff --git a/mist/graphics_meche/westturn_w.png b/mist/graphics_meche/westturn_w.png new file mode 100644 index 00000000..df15070a Binary files /dev/null and b/mist/graphics_meche/westturn_w.png differ diff --git a/mist/init_state.s b/mist/init_state.s new file mode 100644 index 00000000..1d66f3d9 --- /dev/null +++ b/mist/init_state.s @@ -0,0 +1,36 @@ +; init state + +; in future we might load from disk + +init_state: + lda #0 + + ; init clock puzzles + sta CLOCK_MINUTE + sta CLOCK_HOUR + sta CLOCK_TOP + sta CLOCK_MIDDLE + sta CLOCK_BOTTOM + sta CLOCK_COUNT + sta CLOCK_LAST + + ; init gear + sta GEAR_OPEN + + ; init generator + sta BREAKER_TRIPPED + sta GENERATOR_VOLTS + sta ROCKET_VOLTS + sta GENERATOR_VOLTS_DISP + sta ROCKET_VOLTS_DISP + sta SWITCH_TOP_ROW + sta SWITCH_BOTTOM_ROW + sta ROCKET_HANDLE_STEP + + ; init rocket sliders + sta ROCKET_NOTE1 + sta ROCKET_NOTE2 + sta ROCKET_NOTE3 + sta ROCKET_NOTE4 + + rts diff --git a/mist/leveldata_meche.inc b/mist/leveldata_meche.inc index faddab09..72c3016d 100644 --- a/mist/leveldata_meche.inc +++ b/mist/leveldata_meche.inc @@ -6,7 +6,8 @@ locations: .word location0, location1, location2, location3 .word location4, location5, location6, location7 - .word location8 + .word location8, location9, location10,location11 + .word location12,location13 ; MECHE_INSIDE_GEAR -- Inside gear on Mist location0: @@ -167,3 +168,90 @@ location8: .byte BG_NORTH|BG_SOUTH|BG_EAST .byte $ff ; special exit +; MECHE_WEST_PLATFORM -- rotated to west platform +location9: + .byte $ff ; north exit + .byte $ff ; south exit + .byte MECHE_FORT_ENTRY ; east exit + .byte $ff ; west exit + .byte $ff ; north exit_dir + .byte DIRECTION_N ; south exit_dir + .byte $ff ; east exit_dir + .byte $ff ; west exit_dir + .word westturn_n_lzsa ; north bg + .word westturn_s_lzsa ; south bg + .word westturn_e_lzsa ; east bg + .word westturn_w_lzsa ; west bg + .byte BG_NORTH|BG_SOUTH|BG_EAST|BG_WEST + .byte $ff ; special exit + + +; MECHE_NORTH_PLATFORM -- rotated to north platform +location10: + .byte $ff ; north exit + .byte MECHE_FORT_ENTRY ; south exit + .byte $ff ; east exit + .byte $ff ; west exit + .byte $ff ; north exit_dir + .byte DIRECTION_N ; south exit_dir + .byte $ff ; east exit_dir + .byte $ff ; west exit_dir + .word northturn_n_lzsa ; north bg + .word northturn_s_lzsa ; south bg + .word northturn_e_lzsa ; east bg + .word northturn_w_lzsa ; west bg + .byte BG_NORTH|BG_SOUTH|BG_EAST|BG_WEST + .byte $ff ; special exit + +; MECHE_NORTH_HINT -- hint plate +location11: + .byte MECHE_NORTH_TOP ; 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 north_hint_n_lzsa ; north bg + .word $0000 ; south bg + .word $0000 ; east bg + .word $0000 ; west bg + .byte BG_NORTH + .byte $ff ; special exit + +; MECHE_NORTH_TOP -- north top +location12: + .byte MECHE_NORTH_HINT ; 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 north_top_n_lzsa ; north bg + .word north_top_s_lzsa ; south bg + .word $0000 ; east bg + .word $0000 ; west bg + .byte BG_NORTH|BG_SOUTH + .byte $ff ; special exit + +; MECHE_NORTH_DIP -- north dip +location13: + .byte MECHE_NORTH_TOP ; north exit + .byte MECHE_NORTH_PLATFORM ; 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 north_dip_n_lzsa ; north bg + .word north_dip_s_lzsa ; south bg + .word $0000 ; east bg + .word $0000 ; west bg + .byte BG_NORTH|BG_SOUTH + .byte $ff ; special exit + + diff --git a/mist/loader.s b/mist/loader.s index d5c03558..9f98d166 100644 --- a/mist/loader.s +++ b/mist/loader.s @@ -51,8 +51,18 @@ filbuf = $3D6 ; filbuf: .res 4 ; = bit2tbl+86 ;=================================================== ;=================================================== +LOAD_TITLE = $0 +LOAD_MIST = $1 +LOAD_MECHE = $2 +LOAD_SELENA = $3 +LOAD_OCTAGON = $4 +LOAD_STONEDSHIP = $5 +LOAD_CHANNEL = $6 +LOAD_ENDING = $7 + + loader_start: - lda #0 + lda #LOAD_TITLE sta WHICH_LOAD jsr init ; unhook DOS, init nibble table diff --git a/mist/mist.s b/mist/mist.s index 281a48c4..01bd13d2 100644 --- a/mist/mist.s +++ b/mist/mist.s @@ -32,45 +32,6 @@ mist_start: sta CURSOR_X sta CURSOR_Y - lda LOCATION - cmp #MIST_ARRIVAL_DOCK - bne not_first_time - - ; first time init - lda #0 - - sta CLOCK_MINUTE - sta CLOCK_HOUR - jsr clock_inside_reset - - lda #0 - sta DIRECTION - - sta GEAR_OPEN - - sta BREAKER_TRIPPED - sta GENERATOR_VOLTS - sta ROCKET_VOLTS - sta GENERATOR_VOLTS_DISP - sta ROCKET_VOLTS_DISP - sta SWITCH_TOP_ROW - sta SWITCH_BOTTOM_ROW - sta ROCKET_HANDLE_STEP - - sta ROCKET_NOTE1 - sta ROCKET_NOTE2 - sta ROCKET_NOTE3 - sta ROCKET_NOTE4 - - -; debug -; lda #1 -; sta GEAR_OPEN -; jsr open_the_gear - -not_first_time: - - ; set up initial location jsr change_location diff --git a/mist/mist_title.s b/mist/mist_title.s index eb1b9443..a30870a8 100644 --- a/mist/mist_title.s +++ b/mist/mist_title.s @@ -95,6 +95,12 @@ done_keyloop: lda #0 sta LEVEL_OVER + ;============================ + ; init vars + + jsr init_state + + ;============================ ; set up initial location lda #TITLE_MIST_LINKING_DOCK @@ -112,9 +118,6 @@ done_keyloop: lda #1 sta CURSOR_VISIBLE ; visible at first -; lda #0 -; sta ANIMATE_FRAME - game_loop: ;================= @@ -202,6 +205,8 @@ really_exit: .include "audio.s" + .include "init_state.s" + .include "graphics_title/title_graphics.inc"