riven: hook up more stairs

This commit is contained in:
Vince Weaver 2024-06-24 13:18:39 -04:00
parent 4f8c9fd2cc
commit 5b1174af93
18 changed files with 271 additions and 31 deletions

View File

@ -71,7 +71,8 @@ riven_disk41.dsk: QBOOT QLOAD TITLE_41 \
disk41_files/DISK41 \
disk41_files/LEVEL_TUNNEL \
disk41_files/LEVEL_STAIRS \
disk41_files/LEVEL_COVE
disk41_files/LEVEL_COVE \
disk41_files/LEVEL_STAIRS2
cp $(EMPTY_DISK)/empty.dsk riven_disk41.dsk
$(DOS33_RAW) riven_disk41.dsk 0 0 QBOOT 0 1
$(DOS33_RAW) riven_disk41.dsk 0 2 QBOOT 1 1
@ -82,6 +83,7 @@ riven_disk41.dsk: QBOOT QLOAD TITLE_41 \
$(DOS33_RAW) riven_disk41.dsk 2 0 disk41_files/LEVEL_TUNNEL 0 0
$(DOS33_RAW) riven_disk41.dsk 10 0 disk41_files/LEVEL_STAIRS 0 0
$(DOS33_RAW) riven_disk41.dsk 17 0 disk41_files/LEVEL_COVE 0 0
$(DOS33_RAW) riven_disk41.dsk 25 0 disk41_files/LEVEL_STAIRS2 0 0
riven_disk43.dsk: QBOOT QLOAD TITLE_43 \

View File

@ -72,7 +72,8 @@ T 1 = QLOAD 1762 bytes 8S = 0T8S (2048) 300B free
T 1.5 = TITLE 1531 bytes 8S = 0T8S (2048) 500B free
T 2 = TUNNEL 30609 bytes = 8T (32768) 2k free
T 10 = STAIRS 25533 100S= 6T4S (28672) 3k free
T 17 = COVE 9139 = 8T (32768)
T 17 = COVE 18337 = 8T (32768)
T 25 = STAIRS2 24965 = 7T (28672)
Disk43 Map (disk has 35 tracks, each 4k in size)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -172,8 +172,6 @@ done_play_movie2:
; TODO: complex handle movement at end
; TODO: end with message
;===============================
; wait 9 frames (1.8s?)
@ -181,27 +179,36 @@ done_play_movie2:
jsr wait_50xms
lda #<end_message
sta ZX0_src
lda #>end_message
sta ZX0_src+1
lda #$04
jsr full_decomp
;================================
; indicate level over and return
lda #$00
sta DRAW_PAGE
bit PAGE1
bit SET_TEXT
lda #$E0|$00
sta LEVEL_OVER
rts
done_movie2:
bit KEYRESET
; lda #<end_message
; sta ZX0_src
; lda #>end_message
; sta ZX0_src+1
; lda #$04
; jsr full_decomp
; bit PAGE1
; bit SET_TEXT
forever_and_ever:
jmp forever_and_ever
;done_movie2:
; bit KEYRESET
;
;forever_and_ever:
; jmp forever_and_ever
; jmp movie2_start
rts
; rts
@ -614,5 +621,5 @@ overlays_combined_zx02:
.incbin "movie_maglev_ride/overlays/overlay_combined.zx02"
end_message:
.incbin "end_message/end_message.gr.zx02"
;end_message:
; .incbin "end_message/end_message.gr.zx02"

View File

@ -3,7 +3,7 @@ include ../../../Makefile.inc
LINKER_SCRIPTS = ../../../linker_scripts/
all: DISK41 LEVEL_TUNNEL LEVEL_STAIRS LEVEL_COVE
all: DISK41 LEVEL_TUNNEL LEVEL_STAIRS LEVEL_COVE LEVEL_STAIRS2
###
@ -39,6 +39,19 @@ level_stairs.o: level_stairs.s \
####
LEVEL_STAIRS2: level_stairs2.o
ld65 -o LEVEL_STAIRS2 level_stairs2.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
level_stairs2.o: level_stairs2.s \
../zp.inc ../hardware.inc ../qload.inc \
../common_defines.inc disk41_defines.inc \
leveldata_stairs2.inc \
graphics_stairs2/stairs2_graphics.inc
ca65 -o level_stairs2.o level_stairs2.s -l level_stairs2.lst
####
LEVEL_COVE: level_cove.o
ld65 -o LEVEL_COVE level_cove.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
@ -59,6 +72,9 @@ graphics_tunnel/tunnel_graphics.inc:
graphics_stairs/stairs_graphics.inc:
cd graphics_stairs && make
graphics_stairs2/stairs2_graphics.inc:
cd graphics_stairs2 && make
graphics_cove/cove_graphics.inc:
cd graphics_cove && make
@ -66,15 +82,15 @@ graphics_cove/cove_graphics.inc:
clean:
rm -f *~ *.o *.lst \
DISK41 LEVEL_TUNNEL LEVEL_STAIRS LEVEL_COVE
DISK41 LEVEL_TUNNEL LEVEL_STAIRS LEVEL_COVE LEVEL_STAIRS2
####
distclean:
rm -f *~ *.o *.lst \
DISK41 LEVEL_TUNNEL LEVEL_STAIRS LEVEL_COVE
DISK41 LEVEL_TUNNEL LEVEL_STAIRS LEVEL_COVE LEVEL_STAIRS2
cd graphics_tunnel && make clean
cd graphics_stairs && make clean
cd graphics_cove && make clean
cd graphics_stairs2 && make clean

View File

@ -6,12 +6,12 @@ PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr
all: cove_graphics.inc
cove_graphics.inc: \
stairs_down2_e.hgr.zx02 stairs_down2_w.hgr.zx02
stairs_down2_e.hgr.zx02 stairs_down2_w.hgr.zx02 \
cove_e.hgr.zx02 cove_w.hgr.zx02
echo "stairs_down2_e_zx02: .incbin \"stairs_down2_e.hgr.zx02\"" > cove_graphics.inc
echo "stairs_down2_w_zx02: .incbin \"stairs_down2_w.hgr.zx02\"" >> cove_graphics.inc
echo "cove_e_zx02: .incbin \"cove_e.hgr.zx02\"" >> cove_graphics.inc
echo "cove_w_zx02: .incbin \"cove_w.hgr.zx02\"" >> cove_graphics.inc
####

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -0,0 +1,31 @@
include ../../../../Makefile.inc
ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f
PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr
all: stairs2_graphics.inc
stairs2_graphics.inc: \
stairs_up1_e.hgr.zx02 stairs_up1_w.hgr.zx02 \
stairs_up2_e.hgr.zx02 stairs_up2_w.hgr.zx02 \
stairs_up3_e.hgr.zx02 stairs_up3_w.hgr.zx02
echo "stairs_up1_e_zx02: .incbin \"stairs_up1_e.hgr.zx02\"" > stairs2_graphics.inc
echo "stairs_up1_w_zx02: .incbin \"stairs_up1_w.hgr.zx02\"" >> stairs2_graphics.inc
echo "stairs_up2_e_zx02: .incbin \"stairs_up2_e.hgr.zx02\"" >> stairs2_graphics.inc
echo "stairs_up2_w_zx02: .incbin \"stairs_up2_w.hgr.zx02\"" >> stairs2_graphics.inc
echo "stairs_up3_e_zx02: .incbin \"stairs_up3_e.hgr.zx02\"" >> stairs2_graphics.inc
echo "stairs_up3_w_zx02: .incbin \"stairs_up3_w.hgr.zx02\"" >> stairs2_graphics.inc
####
%.hgr: %.png
$(PNG_TO_HGR) $< > $@
%.hgr.zx02: %.hgr
$(ZX02) -f $< $@
####
clean:
rm -f *~ *.o *.lst *.zx02 *.hgr stairs2_graphics.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -0,0 +1,107 @@
; Riven -- Jungle Island -- Stairs going up
; by deater (Vince Weaver) <vince@deater.net>
; Zero Page
.include "../zp.inc"
.include "../hardware.inc"
.include "../common_defines.inc"
.include "../qload.inc"
.include "disk41_defines.inc"
riven_jungle_stairs2:
;===================
; init screen
;===================
; jsr TEXT
; jsr HOME
bit KEYRESET
bit SET_GR
bit PAGE1
bit HIRES
bit FULLGR
;========================
; set up location
;========================
lda #<locations
sta LOCATIONS_L
lda #>locations
sta LOCATIONS_H
lda #0
sta DRAW_PAGE
sta LEVEL_OVER
lda #0
sta JOYSTICK_ENABLED
sta UPDATE_POINTER
lda #1
sta CURSOR_VISIBLE
lda #20
sta CURSOR_X
sta CURSOR_Y
;===================================
; init
;===================================
jsr change_location
jsr save_bg_14x14 ; save old bg
game_loop:
;===================================
; draw pointer
;===================================
jsr draw_pointer
;===================================
; handle keypress/joystick
;===================================
jsr handle_keypress
;===================================
; increment frame count
;===================================
inc FRAMEL
bne frame_no_oflo
inc FRAMEH
frame_no_oflo:
;====================================
; check level over
;====================================
lda LEVEL_OVER
bne really_exit
jmp game_loop
really_exit:
rts
;==========================
; includes
;==========================
.include "graphics_stairs2/stairs2_graphics.inc"
.include "leveldata_stairs2.inc"

View File

@ -3,13 +3,13 @@
;===============================================
locations:
.word location0
.word location0,location1
; RIVEN_DOWN2 -- down two flights of stairs
location0:
.byte $ff ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte RIVEN_COVE ; east exit
.byte LOAD_STAIRS<<4|RIVEN_DOWN1 ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
@ -21,3 +21,21 @@ location0:
.word stairs_down2_w_zx02 ; west bg
.byte BG_EAST|BG_WEST
.byte $ff ; special exit
; RIVEN_COVE -- down by the cove
location1:
.byte $ff ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte RIVEN_DOWN2 ; 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 $0000 ; north bg
.word $0000 ; south bg
.word cove_e_zx02 ; east bg
.word cove_w_zx02 ; west bg
.byte BG_EAST|BG_WEST
.byte $ff ; special exit

View File

@ -10,7 +10,7 @@ location0:
.byte LOAD_TUNNEL2<<4|RIVEN_TUNNEL8; north exit
.byte $FF ; south exit
.byte RIVEN_DOWN1 ; east exit
.byte $FF ; west exit
.byte LOAD_STAIRS2<<4|RIVEN_UP1 ; west exit
.byte DIRECTION_N ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_E ; east exit_dir

View File

@ -0,0 +1,58 @@
;===============================================
; level data for Jungle stair going up
;===============================================
locations:
.word location0,location1,location2
; RIVEN_UP1 -- going up
location0:
.byte $ff ; north exit
.byte $FF ; south exit
.byte LOAD_STAIRS<<4|RIVEN_STAIRS ; east exit
.byte RIVEN_UP2 ; 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 $0000 ; north bg
.word $0000 ; south bg
.word stairs_up1_e_zx02 ; east bg
.word stairs_up1_w_zx02 ; west bg
.byte BG_EAST|BG_WEST
.byte $ff ; special exit
; RIVEN_UP2 -- going up
location1:
.byte $ff ; north exit
.byte $FF ; south exit
.byte RIVEN_UP1 ; east exit
.byte RIVEN_UP3 ; 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 $0000 ; north bg
.word $0000 ; south bg
.word stairs_up2_e_zx02 ; east bg
.word stairs_up2_w_zx02 ; west bg
.byte BG_EAST|BG_WEST
.byte $ff ; special exit
; RIVEN_UP3 -- going up
location2:
.byte $ff ; north exit
.byte $FF ; south exit
.byte RIVEN_UP2 ; east exit
.byte $FF ; 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 $0000 ; north bg
.word $0000 ; south bg
.word stairs_up3_e_zx02 ; east bg
.word stairs_up3_w_zx02 ; west bg
.byte BG_EAST|BG_WEST
.byte $ff ; special exit