diff --git a/games/riven_hgr/disk39_files/leveldata_outside.inc b/games/riven_hgr/disk39_files/leveldata_outside.inc index ab949bc5..b7e467b0 100644 --- a/games/riven_hgr/disk39_files/leveldata_outside.inc +++ b/games/riven_hgr/disk39_files/leveldata_outside.inc @@ -20,10 +20,7 @@ location0: .word maglev1_e_zx02 ; east bg .word maglev1_w_zx02 ; west bg .byte BG_EAST|BG_NORTH|BG_SOUTH|BG_WEST ; all bgs - .byte DIRECTION_N ; special exit - .byte 32,34 ; special x - .byte 136,154 ; special y - .word call_button_clicked-1 + .byte $ff ; special exit ; RIVEN_MAGPATH -- path to maglev location1: diff --git a/games/riven_hgr/disk40_files/disk40_defines.inc b/games/riven_hgr/disk40_files/disk40_defines.inc index 61c0e2b5..db982072 100644 --- a/games/riven_hgr/disk40_files/disk40_defines.inc +++ b/games/riven_hgr/disk40_files/disk40_defines.inc @@ -1,10 +1,14 @@ LOAD_TITLE = 0 LOAD_MAGLEV = 1 +LOAD_MOVIE1 = 2 +LOAD_MOVIE2 = 3 ;================================ ; Level definitions ; Maglev -RIVEN_MAGLEV_SIT = 0 +RIVEN_LOOKIN = 0 +RIVEN_INSEAT = 1 +RIVEN_READYTOGO = 2 diff --git a/games/riven_hgr/disk40_files/graphics_maglev/Makefile b/games/riven_hgr/disk40_files/graphics_maglev/Makefile index 74a9dd6d..7f8b08c0 100644 --- a/games/riven_hgr/disk40_files/graphics_maglev/Makefile +++ b/games/riven_hgr/disk40_files/graphics_maglev/Makefile @@ -6,8 +6,13 @@ PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr all: maglev_graphics.inc maglev_graphics.inc: \ - maglev_sit_s.hgr.zx02 - echo "maglev_sit_s_zx02: .incbin \"maglev_sit_s.hgr.zx02\"" > maglev_graphics.inc + inseat_s.hgr.zx02 inseat_w.hgr.zx02 inseat_e.hgr.zx02 \ + lookin_w.hgr.zx02 + echo "inseat_s_zx02: .incbin \"inseat_s.hgr.zx02\"" > maglev_graphics.inc + echo "inseat_w_zx02: .incbin \"inseat_w.hgr.zx02\"" >> maglev_graphics.inc + echo "inseat_e_zx02: .incbin \"inseat_e.hgr.zx02\"" >> maglev_graphics.inc + echo "lookin_w_zx02: .incbin \"lookin_w.hgr.zx02\"" >> maglev_graphics.inc + #### diff --git a/games/riven_hgr/disk40_files/graphics_maglev/inseat_e.png b/games/riven_hgr/disk40_files/graphics_maglev/inseat_e.png new file mode 100644 index 00000000..df67293a Binary files /dev/null and b/games/riven_hgr/disk40_files/graphics_maglev/inseat_e.png differ diff --git a/games/riven_hgr/disk40_files/graphics_maglev/inseat_s.png b/games/riven_hgr/disk40_files/graphics_maglev/inseat_s.png new file mode 100644 index 00000000..c11cdce3 Binary files /dev/null and b/games/riven_hgr/disk40_files/graphics_maglev/inseat_s.png differ diff --git a/games/riven_hgr/disk40_files/graphics_maglev/maglev_sit_s.png b/games/riven_hgr/disk40_files/graphics_maglev/inseat_w.png similarity index 100% rename from games/riven_hgr/disk40_files/graphics_maglev/maglev_sit_s.png rename to games/riven_hgr/disk40_files/graphics_maglev/inseat_w.png diff --git a/games/riven_hgr/disk40_files/graphics_maglev/lookin_w.png b/games/riven_hgr/disk40_files/graphics_maglev/lookin_w.png new file mode 100644 index 00000000..8b471a82 Binary files /dev/null and b/games/riven_hgr/disk40_files/graphics_maglev/lookin_w.png differ diff --git a/games/riven_hgr/disk40_files/graphics_outside/outside_s.png b/games/riven_hgr/disk40_files/graphics_outside/outside_s.png new file mode 100644 index 00000000..aa4e63a5 Binary files /dev/null and b/games/riven_hgr/disk40_files/graphics_outside/outside_s.png differ diff --git a/games/riven_hgr/disk40_files/graphics_outside/outside_w.png b/games/riven_hgr/disk40_files/graphics_outside/outside_w.png new file mode 100644 index 00000000..073cf856 Binary files /dev/null and b/games/riven_hgr/disk40_files/graphics_outside/outside_w.png differ diff --git a/games/riven_hgr/disk40_files/level_maglev.s b/games/riven_hgr/disk40_files/level_maglev.s index 89e4bc53..8546bc2d 100644 --- a/games/riven_hgr/disk40_files/level_maglev.s +++ b/games/riven_hgr/disk40_files/level_maglev.s @@ -55,12 +55,6 @@ riven_jungle_maglev: ; init ;=================================== -; done in title - -; lda #$20 -; sta HGR_PAGE -; jsr hgr_make_tables - jsr change_location jsr save_bg_14x14 ; save old bg @@ -102,15 +96,63 @@ really_exit: rts - ;================================== - ; cart button clicked - ;================================== - ; TODO: call cart code + ;===================================== + ; handle clicked facing west + ;===================================== + ; all we can do here is flip + ; flip us to the east + ; go lores and play the movie +handle1_clicked: -cart_button_clicked: bit SPEAKER +.if 0 + lda #0 + sta MAGLEV_FLIP_DIRECTION + + lda #LOAD_MOVIE1 + sta WHICH_LOAD + + lda #1 + sta LEVEL_OVER +.endif + bit SPEAKER + rts + ;===================================== + ; handle clicked facing east + ;===================================== + ; if x<27, go for maglev ride + ; else, flip back west +handle2_clicked: + + bit SPEAKER +.if 0 + lda CURSOR_X + cmp #27 + bcc go_for_maglev + + lda #1 + sta MAGLEV_FLIP_DIRECTION + + lda #LOAD_MOVIE1 + jmp common_handle2 + +go_for_maglev: + lda #LOAD_MOVIE2 + +common_handle2: + sta WHICH_LOAD + + lda #1 + sta LEVEL_OVER +.endif + bit SPEAKER + + rts + + + ;========================== ; includes diff --git a/games/riven_hgr/disk40_files/leveldata_maglev.inc b/games/riven_hgr/disk40_files/leveldata_maglev.inc index 68c0f833..092c0d69 100644 --- a/games/riven_hgr/disk40_files/leveldata_maglev.inc +++ b/games/riven_hgr/disk40_files/leveldata_maglev.inc @@ -3,25 +3,64 @@ ;=============================================== locations: - .word location0 + .word location0,location1,location2 -; RIVEN_MAGLEV_SIT -- sitting in maglev + +; RIVEN_LOOKIN -- looking into the maglev location0: - .byte $ff ; north exit - .byte $ff ; south exit - .byte $ff ; east exit - .byte $ff ; west exit - .byte $ff ; north exit_dir - .byte $ff ; south exit_dir - .byte $ff ; east exit_dir - .byte $ff ; west exit_dir - .word $0000 ; north bg - .word maglev_sit_s_zx02 ; south bg - .word $0000 ; east bg - .word $0000 ; west bg - .byte BG_SOUTH ; bgs - .byte DIRECTION_S ; special exit - .byte 3,5 ; special x - .byte 107,130 ; special y - .word cart_button_clicked-1 + .byte $FF ; north exit + .byte $ff ; south exit + .byte $ff ; east exit + .byte RIVEN_INSEAT ; 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 $0000 ; north bg + .word inseat_s_zx02 ; south bg + .word $0000 ; east bg + .word lookin_w_zx02 ; west bg + .byte BG_WEST|BG_SOUTH + .byte $ff ; special exit + +; RIVEN_INSEAT -- when sitting in seat +location1: + .byte $FF ; north exit + .byte $ff ; 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 inseat_s_zx02 ; south bg + .word $0000 ; east bg + .word inseat_w_zx02 ; west bg + .byte BG_WEST|BG_SOUTH + .byte DIRECTION_W ; special exit + .byte 11,14 ; special x + .byte 119,145 ; special y + .word handle1_clicked-1 ; special function + + +; RIVEN_READY2GO -- ready for maglev ride +location2: + .byte $FF ; north exit + .byte $FF ; south exit + .byte $ff ; east exit + .byte $ff ; west exit + .byte $FF ; north exit_dir + .byte $FF ; south exit_dir + .byte $ff ; east exit_dir + .byte $ff ; west exit_dir + .word $0000 ; north bg + .word $0000 ; south bg + .word inseat_e_zx02 ; east bg + .word $0000 ; west bg + .byte BG_EAST + .byte DIRECTION_E ; special exit + .byte 17,29 ; special x + .byte 127,168 ; special y + .word handle2_clicked-1 ; special function