riven: straighten out the cardinal directions outside on jungle island

This commit is contained in:
Vince Weaver 2024-06-20 12:49:57 -04:00
parent 46bff89636
commit 942e670268
12 changed files with 264 additions and 108 deletions

View File

@ -45,14 +45,16 @@ riven_disk39.dsk: QBOOT QLOAD_39 TITLE_39 \
$(DOS33_RAW) riven_disk39.dsk 27 0 disk39_files/MOVIE_MAGLEV_RIDE 0 0
riven_disk40.dsk: QBOOT QLOAD_40 TITLE_40 \
disk40_files/LEVEL_MAGLEV
disk40_files/LEVEL_MAGLEV \
disk40_files/LEVEL_OUTSIDE
cp $(EMPTY_DISK)/empty.dsk riven_disk40.dsk
$(DOS33_RAW) riven_disk40.dsk 0 0 QBOOT 0 1
$(DOS33_RAW) riven_disk40.dsk 0 2 QBOOT 1 1
$(DOS33_RAW) riven_disk40.dsk 0 4 QBOOT 2 1
$(DOS33_RAW) riven_disk40.dsk 1 0 QLOAD_40 0 0
$(DOS33_RAW) riven_disk40.dsk 1 8 TITLE_40 0 0
$(DOS33_RAW) riven_disk40.dsk 2 0 disk40_files/LEVEL_MAGLEV 0 0
$(DOS33_RAW) riven_disk40.dsk 2 0 disk40_files/LEVEL_MAGLEV 0 0
$(DOS33_RAW) riven_disk40.dsk 9 0 disk40_files/LEVEL_OUTSIDE 0 0
riven_disk43.dsk: QBOOT QLOAD_43 TITLE_43 \
disk43_files/LEVEL_CART
@ -181,6 +183,11 @@ title_43.o: title.s zp.inc hardware.inc \
####
disk01_files/LEVEL_ARRIVAL:
cd disk01_files && make
####
disk39_files/LEVEL_OUTSIDE:
cd disk39_files && make
@ -204,6 +211,9 @@ disk39_files/MOVIE_MAGLEV_RIDE:
disk40_files/LEVEL_MAGLEV:
cd disk40_files && make
disk40_files/LEVEL_OUTSIDE:
cd disk40_files && make
####
disk43_files/LEVEL_CART:

View File

@ -59,7 +59,8 @@ Disk40 Map (disk has 35 tracks, each 4k in size)
T 0 = Qboot
T 1 = QLOAD 1762 bytes 8S = 0T8S (2048) 300B free
T 1.5 = TITLE 1531 bytes 8S = 0T8S (2048) 500B free
T 2 = STATION 26736 bytes 112S = 7T0S (28672) 2k free
T 2 = MAGLEV 15200 bytes 112S = 7T0S (28672) 13k free
T 9 = OUTSIDE
T 25 = MOVIE_FLIP 7680 bytes 32S = 2T0S (8192) 500B free
T 27 = MOVIE_MAG 32275 bytes 128S = 8T0S (32768)500B free

View File

@ -3,7 +3,7 @@ include ../../../Makefile.inc
LINKER_SCRIPTS = ../../../linker_scripts/
all: LEVEL_MAGLEV
all: LEVEL_MAGLEV LEVEL_OUTSIDE
####
@ -17,53 +17,18 @@ level_maglev.o: level_maglev.s \
graphics_maglev/maglev_graphics.inc
ca65 -o level_maglev.o level_maglev.s -l level_maglev.lst
####
LEVEL_PROJECTOR: level_projector.o
ld65 -o LEVEL_PROJECTOR level_projector.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
LEVEL_OUTSIDE: level_outside.o
ld65 -o LEVEL_OUTSIDE level_outside.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
level_projector.o: level_projector.s \
level_outside.o: level_outside.s \
../zp.inc ../hardware.inc ../qload.inc \
../common_defines.inc disk40_defines.inc \
leveldata_projector.inc \
graphics_projector/projector_graphics.inc
ca65 -o level_projector.o level_projector.s -l level_projector.lst
####
LEVEL_MAGSTEPS: level_magsteps.o
ld65 -o LEVEL_MAGSTEPS level_magsteps.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
level_magsteps.o: level_magsteps.s \
../zp.inc ../hardware.inc ../qload.inc \
../common_defines.inc disk40_defines.inc \
leveldata_magsteps.inc \
graphics_magsteps/magsteps_graphics.inc
ca65 -o level_magsteps.o level_magsteps.s -l level_magsteps.lst
####
MOVIE_MAGLEV_FLIP: movie_maglev_flip.o
ld65 -o MOVIE_MAGLEV_FLIP movie_maglev_flip.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
movie_maglev_flip.o: movie_maglev_flip.s \
../zp.inc ../hardware.inc ../qload.inc \
../common_defines.inc disk40_defines.inc \
movie_maglev_flip/movie_maglev_flip.inc
ca65 -o movie_maglev_flip.o movie_maglev_flip.s -l movie_maglev_flip.lst
####
MOVIE_MAGLEV_RIDE: movie_maglev_ride.o
ld65 -o MOVIE_MAGLEV_RIDE movie_maglev_ride.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
movie_maglev_ride.o: movie_maglev_ride.s \
../zp.inc ../hardware.inc ../qload.inc \
../common_defines.inc disk40_defines.inc \
end_message/end_message.gr.zx02 \
movie_maglev_ride/movie_maglev_ride.inc
ca65 -o movie_maglev_ride.o movie_maglev_ride.s -l movie_maglev_ride.lst
leveldata_outside.inc \
graphics_outside/outside_graphics.inc
ca65 -o level_outside.o level_outside.s -l level_outside.lst
####
@ -71,35 +36,21 @@ movie_maglev_ride.o: movie_maglev_ride.s \
graphics_maglev/maglev_graphics.inc:
cd graphics_maglev && make
graphics_magsteps/magsteps_graphics.inc:
cd graphics_magsteps && make
graphics_projector/projector_graphics.inc:
cd graphics_projector && make
movie_maglev_flip/movie_maglev_flip.inc:
cd movie_maglev_flip && make
movie_maglev_ride/movie_maglev_ride.inc:
cd movie_maglev_ride && make
graphics_outside/outside_graphics.inc:
cd graphics_outside && make
####
clean:
rm -f *~ *.o *.lst \
LEVEL_PROJECTOR LEVEL_MAGSTEPS LEVEL_MAGLEV LEVEL_MAGLEV \
MOVIE_MAGLEV_FLIP MOVIE_MAGLEV_RIDE
LEVEL_MAGLEV LEVEL_OUTSIDE
####
distclean:
rm -f *~ *.o *.lst \
LEVEL_PROJECTOR LEVEL_MAGSTEPS LEVEL_MAGLEV LEVEL_MAGLEV \
MOVIE_MAGLEV_FLIP MOVIE_MAGLEV_RIDE
LEVEL_MAGLEV LEVEL_OUTSIDE
cd graphics_maglev && make clean
# cd graphics_projector && make clean
# cd graphics_magsteps && make clean
# cd graphics_maglev && make clean
# cd movie_maglev_flip && make clean
# cd movie_maglev_ride && make clean
cd graphics_outside && make clean

View File

@ -1,7 +1,8 @@
LOAD_TITLE = 0
LOAD_MAGLEV = 1
LOAD_MOVIE1 = 2
LOAD_MOVIE2 = 3
LOAD_OUTSIDE = 2
LOAD_MOVIE1 = 3
LOAD_MOVIE2 = 4
;================================
; Level definitions
@ -12,3 +13,7 @@ RIVEN_LOOKIN = 0
RIVEN_INSEAT = 1
RIVEN_READYTOGO = 2
; Outside
RIVEN_OUTSIDE = 0

View File

@ -1,14 +1,14 @@
which_disk_array:
.byte 1,1,1,1 ; TITLE, MAGLEV
.byte 1,1,1,1 ; TITLE, MAGLEV, OUTSIDE
load_address_array:
.byte $40,$40,$40,$40 ; TITLE, MAGLEV
.byte $40,$40,$40,$40 ; TITLE, MAGLEV, OUTSIDE
track_array:
.byte 1, 2, 9,17 ; TITLE, MAGLEV
.byte 1, 2, 9,17 ; TITLE, MAGLEV, OUTSIDE
sector_array:
.byte 8, 0, 0, 0 ; TITLE, MAGLEV
.byte 8, 0, 0, 0 ; TITLE, MAGLEV, OUTSIDE
length_array:
.byte 16, 96,123, 64 ; TITLE, MAGLEV
.byte 16, 96,96, 64 ; TITLE, MAGLEV, OUTSIDE

View File

@ -0,0 +1,25 @@
include ../../../../Makefile.inc
ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f
PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr
all: outside_graphics.inc
outside_graphics.inc: \
outside_w.hgr.zx02 outside_n.hgr.zx02
echo "outside_w_zx02: .incbin \"outside_w.hgr.zx02\"" > outside_graphics.inc
echo "outside_n_zx02: .incbin \"outside_n.hgr.zx02\"" >> outside_graphics.inc
####
%.hgr: %.png
$(PNG_TO_HGR) $< > $@
%.hgr.zx02: %.hgr
$(ZX02) -f $< $@
####
clean:
rm -f *~ *.o *.lst *.zx02 *.hgr outside_graphics.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1,164 @@
; Riven -- Jungle Island -- Just Outside Maglev
; by deater (Vince Weaver) <vince@deater.net>
; Zero Page
.include "../zp.inc"
.include "../hardware.inc"
.include "../common_defines.inc"
.include "../qload.inc"
.include "disk40_defines.inc"
riven_jungle_outside:
;===================
; 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
;=====================================
; handle clicked facing west
;=====================================
; all we can do here is flip
; flip us to the east
; go lores and play the movie
handle1_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
;==========================
.include "graphics_outside/outside_graphics.inc"
.include "leveldata_outside.inc"

View File

@ -8,40 +8,40 @@ locations:
; RIVEN_LOOKIN -- looking into the maglev
location0:
.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
.byte $FF ; north exit
.byte LOAD_OUTSIDE<<4|RIVEN_OUTSIDE ; south exit
.byte $ff ; east exit
.byte RIVEN_INSEAT ; west exit
.byte $FF ; north exit_dir
.byte DIRECTION_W ; 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
.byte $FF ; north exit
.byte LOAD_OUTSIDE<<4|RIVEN_OUTSIDE ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte $FF ; north exit_dir
.byte DIRECTION_W ; 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

View File

@ -325,12 +325,12 @@ clear_loop:
.if DISK=40
lda #LOAD_MAGLEV
sta WHICH_LOAD ; assume new game (dome island)
sta WHICH_LOAD ; sitting in maglev
lda #RIVEN_MAGLEV_SIT
lda #RIVEN_INSEAT
sta LOCATION
lda #DIRECTION_S
lda #DIRECTION_W
sta DIRECTION
.endif