diff --git a/games/riven_hgr/NOTES b/games/riven_hgr/NOTES index 68493c7d..b3f8f8f6 100644 --- a/games/riven_hgr/NOTES +++ b/games/riven_hgr/NOTES @@ -85,7 +85,7 @@ Disk02 Map (disk has 35 tracks, each 4k in size) T 0 = Qboot T 0.5 = TITLE 1805 bytes 8S = 0T8S (2048) 400B free T 1 = QLOAD 2314 bytes 16S= 1T0S (4096) 2k free -T 2 = STEPS1 21647 bytes = 6T0S (24576) 3k free +T 2 = STEPS1 23639 bytes = 6T0S (24576) 1k free T 8 = STEPS3 15872 bytes = 6T0S (24576) 9k free T 14 = TOP 15210 bytes = 4T0S (16384) 1k free T 18 = BRIDGE 15021 bytes = 4T0S (16384) 1k free @@ -257,3 +257,15 @@ API for loading: only one copy of qload/title + +IN_SPECIAL +IN_RIGHT +IN_LEFT + + SPECIAL + FF = not special + bottom nibble = directions + 1/3/4/8 direction + 40 = only point + 80 = split screen + diff --git a/games/riven_hgr/disk02_files/graphics_steps1/Makefile b/games/riven_hgr/disk02_files/graphics_steps1/Makefile index aedacebd..a1fb2be6 100644 --- a/games/riven_hgr/disk02_files/graphics_steps1/Makefile +++ b/games/riven_hgr/disk02_files/graphics_steps1/Makefile @@ -8,12 +8,14 @@ all: steps1_graphics.inc steps1_graphics.inc: \ steps1_n.hgr.zx02 steps1_s.hgr.zx02 \ steps1_e.hgr.zx02 \ - steps2_n.hgr.zx02 steps2_s.hgr.zx02 + steps2_n.hgr.zx02 steps2_s.hgr.zx02 \ + steps2_e.hgr.zx02 echo "steps1_n_zx02: .incbin \"steps1_n.hgr.zx02\"" > steps1_graphics.inc echo "steps1_s_zx02: .incbin \"steps1_s.hgr.zx02\"" >> steps1_graphics.inc echo "steps1_e_zx02: .incbin \"steps1_e.hgr.zx02\"" >> steps1_graphics.inc echo "steps2_n_zx02: .incbin \"steps2_n.hgr.zx02\"" >> steps1_graphics.inc echo "steps2_s_zx02: .incbin \"steps2_s.hgr.zx02\"" >> steps1_graphics.inc + echo "steps2_e_zx02: .incbin \"steps2_e.hgr.zx02\"" >> steps1_graphics.inc #### diff --git a/games/riven_hgr/disk02_files/graphics_steps1/steps2_e.png b/games/riven_hgr/disk02_files/graphics_steps1/steps2_e.png new file mode 100644 index 00000000..5aee827d Binary files /dev/null and b/games/riven_hgr/disk02_files/graphics_steps1/steps2_e.png differ diff --git a/games/riven_hgr/disk02_files/level_steps3.s b/games/riven_hgr/disk02_files/level_steps3.s index a47ae225..e82c74fc 100644 --- a/games/riven_hgr/disk02_files/level_steps3.s +++ b/games/riven_hgr/disk02_files/level_steps3.s @@ -102,6 +102,39 @@ really_exit: rts + ;========================== + ; handle split dir + ;========================== +handle_split_dir: + + ; if 19 or less, go N + ; if 20 or more, go E + + lda #LOAD_TOP + sta WHICH_LOAD + + lda #RIVEN_TOP + sta LOCATION + + lda CURSOR_X + cmp #20 + bcs go_east + +go_north: + lda #DIRECTION_N + bne done_dir ; bra + +go_east: + lda #DIRECTION_E +done_dir: + + sta DIRECTION + + lda #1 + sta LEVEL_OVER + + rts + ;========================== ; includes diff --git a/games/riven_hgr/disk02_files/level_top.s b/games/riven_hgr/disk02_files/level_top.s index 74c928ca..47a4ec34 100644 --- a/games/riven_hgr/disk02_files/level_top.s +++ b/games/riven_hgr/disk02_files/level_top.s @@ -97,7 +97,6 @@ really_exit: rts - ;========================== ; includes ;========================== diff --git a/games/riven_hgr/disk02_files/leveldata_steps1.inc b/games/riven_hgr/disk02_files/leveldata_steps1.inc index d9fca220..8ea26ef1 100644 --- a/games/riven_hgr/disk02_files/leveldata_steps1.inc +++ b/games/riven_hgr/disk02_files/leveldata_steps1.inc @@ -34,8 +34,8 @@ location1: .byte $ff ; west exit_dir .word steps2_n_zx02 ; north bg .word steps2_s_zx02 ; south bg - .word $0000 ; east bg + .word steps2_e_zx02 ; east bg .word $0000 ; west bg - .byte BG_NORTH|BG_SOUTH ; all bgs + .byte BG_NORTH|BG_SOUTH|BG_EAST .byte $ff ; special exit diff --git a/games/riven_hgr/disk02_files/leveldata_steps3.inc b/games/riven_hgr/disk02_files/leveldata_steps3.inc index 7e6e8e4e..cad9e409 100644 --- a/games/riven_hgr/disk02_files/leveldata_steps3.inc +++ b/games/riven_hgr/disk02_files/leveldata_steps3.inc @@ -22,7 +22,7 @@ location0: .byte BG_NORTH|BG_SOUTH ; all bgs .byte $ff ; special exit -; RIVEN_STEPS2 -- second level of steps +; RIVEN_STEPS4 -- second level of steps location1: .byte LOAD_TOP<<4|RIVEN_TOP ; north exit .byte RIVEN_STEPS3 ; south exit @@ -37,5 +37,9 @@ location1: .word $0000 ; east bg .word $0000 ; west bg .byte BG_NORTH|BG_SOUTH ; all bgs - .byte $ff ; special exit + .byte DIRECTION_N|DIRECTION_ONLY_POINT ; special exit + .byte 7,33 + .byte 0,180 + .word handle_split_dir-1 + diff --git a/games/riven_hgr/disk02_files/leveldata_top.inc b/games/riven_hgr/disk02_files/leveldata_top.inc index c1d804f0..0ecc2e77 100644 --- a/games/riven_hgr/disk02_files/leveldata_top.inc +++ b/games/riven_hgr/disk02_files/leveldata_top.inc @@ -20,4 +20,5 @@ location0: .word top_e_zx02 ; east bg .word top_w_zx02 ; west bg .byte BG_NORTH|BG_SOUTH|BG_EAST|BG_WEST ; all bgs - .byte $ff ; special exit + .byte $ff + diff --git a/games/riven_hgr/disk04_files/graphics_tunnel4/Makefile b/games/riven_hgr/disk04_files/graphics_tunnel4/Makefile new file mode 100644 index 00000000..490af46a --- /dev/null +++ b/games/riven_hgr/disk04_files/graphics_tunnel4/Makefile @@ -0,0 +1,28 @@ +include ../../../../Makefile.inc + +ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f +PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr + +all: tunnel4_graphics.inc + +tunnel4_graphics.inc: \ + tunnel4_w.hgr.zx02 tunnel4_e.hgr.zx02 \ + tunnel5_w.hgr.zx02 tunnel5_e.hgr.zx02 + echo "tunnel4_w_zx02: .incbin \"tunnel4_w.hgr.zx02\"" > tunnel4_graphics.inc + echo "tunnel4_e_zx02: .incbin \"tunnel4_e.hgr.zx02\"" >> tunnel4_graphics.inc + echo "tunnel5_w_zx02: .incbin \"tunnel5_w.hgr.zx02\"" >> tunnel4_graphics.inc + echo "tunnel5_e_zx02: .incbin \"tunnel5_e.hgr.zx02\"" >> tunnel4_graphics.inc + +#### + +%.hgr: %.png + $(PNG_TO_HGR) $< > $@ + +%.hgr.zx02: %.hgr + $(ZX02) -f $< $@ + +#### + +clean: + rm -f *~ *.o *.lst *.zx02 *.hgr tunnel4_graphics.inc + diff --git a/games/riven_hgr/draw_pointer.s b/games/riven_hgr/draw_pointer.s index 623aa24f..5282b615 100644 --- a/games/riven_hgr/draw_pointer.s +++ b/games/riven_hgr/draw_pointer.s @@ -75,8 +75,10 @@ finger_grab: rts really_draw_grab: + ldy #LOCATION_SPECIAL_EXIT + lda (LOCATION_STRUCT_L),Y - lda DIRECTION +; lda DIRECTION and #DIRECTION_ONLY_POINT bne special_but_point