riven: figured out how to allow split-directions for going forward

engine actually more or less supported it already
This commit is contained in:
Vince Weaver 2024-08-03 22:37:49 -04:00
parent 4330d81d22
commit 9f31ed98be
10 changed files with 90 additions and 9 deletions

View File

@ -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

View File

@ -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
####

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -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

View File

@ -97,7 +97,6 @@ really_exit:
rts
;==========================
; includes
;==========================

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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