riven: hookup room rotation
@ -71,7 +71,8 @@ riven_disk02.dsk: QBOOT QLOAD TITLE_02 \
|
||||
disk02_files/LEVEL_STEPS1 \
|
||||
disk02_files/LEVEL_STEPS3 \
|
||||
disk02_files/LEVEL_TOP \
|
||||
disk02_files/LEVEL_BRIDGE
|
||||
disk02_files/LEVEL_BRIDGE \
|
||||
disk02_files/LEVEL_ALCOVE
|
||||
cp $(EMPTY_DISK)/empty.dsk riven_disk02.dsk
|
||||
$(DOS33_RAW) riven_disk02.dsk 0 0 QBOOT 0 1
|
||||
$(DOS33_RAW) riven_disk02.dsk 0 2 QBOOT 1 1
|
||||
@ -82,7 +83,8 @@ riven_disk02.dsk: QBOOT QLOAD TITLE_02 \
|
||||
$(DOS33_RAW) riven_disk02.dsk 2 0 disk02_files/LEVEL_STEPS1 0 0
|
||||
$(DOS33_RAW) riven_disk02.dsk 8 0 disk02_files/LEVEL_STEPS3 0 0
|
||||
$(DOS33_RAW) riven_disk02.dsk 14 0 disk02_files/LEVEL_TOP 0 0
|
||||
$(DOS33_RAW) riven_disk02.dsk 20 0 disk02_files/LEVEL_BRIDGE 0 0
|
||||
$(DOS33_RAW) riven_disk02.dsk 18 0 disk02_files/LEVEL_BRIDGE 0 0
|
||||
$(DOS33_RAW) riven_disk02.dsk 22 0 disk02_files/LEVEL_ALCOVE 0 0
|
||||
|
||||
|
||||
###
|
||||
@ -558,6 +560,9 @@ disk02_files/LEVEL_TOP:
|
||||
disk02_files/LEVEL_BRIDGE:
|
||||
cd disk02_files && make
|
||||
|
||||
disk02_files/LEVEL_ALCOVE:
|
||||
cd disk02_files && make
|
||||
|
||||
####
|
||||
|
||||
disk03_files/LEVEL_DOWNSTEPS:
|
||||
@ -783,6 +788,7 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \
|
||||
disk02_files/LEVEL_STEPS3 \
|
||||
disk02_files/LEVEL_TOP \
|
||||
disk02_files/LEVEL_BRIDGE \
|
||||
disk02_files/LEVEL_ALCOVE \
|
||||
disk03_files/DISK03 \
|
||||
disk03_files/LEVEL_DOWNSTEPS \
|
||||
disk03_files/LEVEL_DOWNSTEPS3 \
|
||||
@ -851,7 +857,8 @@ riven_hgr.2mg: dts_block PROBOOTHD QLOAD_HD \
|
||||
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 2 2 0` disk02_files/LEVEL_STEPS1 0 0
|
||||
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 2 8 0` disk02_files/LEVEL_STEPS3 0 0
|
||||
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 2 14 0` disk02_files/LEVEL_TOP 0 0
|
||||
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 2 20 0` disk02_files/LEVEL_BRIDGE 0 0
|
||||
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 2 18 0` disk02_files/LEVEL_BRIDGE 0 0
|
||||
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 2 22 0` disk02_files/LEVEL_ALCOVE 0 0
|
||||
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 3 0 2` disk03_files/DISK03 0 0
|
||||
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 3 2 0` disk03_files/LEVEL_DOWNSTEPS 0 0
|
||||
$(PRODOS_RAW) riven_hgr.2mg `./dts_block 3 9 0` disk03_files/LEVEL_DOWNSTEPS3 0 0
|
||||
|
@ -87,8 +87,9 @@ 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 8 = STEPS3 15872 bytes = 6T0S (24576) 9k free
|
||||
T 14 = TOP 15658 bytes = 6T0S (24576) 9k free
|
||||
T 20 = BRIDGE 15021 bytes = 6T0S (24575) 9k free
|
||||
T 14 = TOP 15210 bytes = 4T0S (16384) 1k free
|
||||
T 18 = BRIDGE 15021 bytes = 4T0S (16384) 1k free
|
||||
T 22 = ALCOVE 21061 bytes = 6T0S (24575) 3k free
|
||||
|
||||
Disk03 Map (disk has 35 tracks, each 4k in size)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -2,7 +2,7 @@ include ../../../Makefile.inc
|
||||
|
||||
LINKER_SCRIPTS = ../../../linker_scripts/
|
||||
|
||||
all: DISK02 LEVEL_STEPS1 LEVEL_STEPS3 LEVEL_TOP LEVEL_BRIDGE
|
||||
all: DISK02 LEVEL_STEPS1 LEVEL_STEPS3 LEVEL_TOP LEVEL_BRIDGE LEVEL_ALCOVE
|
||||
|
||||
####
|
||||
|
||||
@ -51,6 +51,20 @@ level_top.o: level_top.s \
|
||||
|
||||
####
|
||||
|
||||
LEVEL_ALCOVE: level_alcove.o
|
||||
ld65 -o LEVEL_ALCOVE level_alcove.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
|
||||
|
||||
level_alcove.o: level_alcove.s \
|
||||
../zp.inc ../hardware.inc ../qload.inc \
|
||||
../common_defines.inc disk02_defines.inc \
|
||||
leveldata_alcove.inc \
|
||||
audio/rotate.btc.zx02 \
|
||||
graphics_alcove/alcove_graphics.inc
|
||||
ca65 -o level_alcove.o level_alcove.s -l level_alcove.lst
|
||||
|
||||
|
||||
####
|
||||
|
||||
LEVEL_BRIDGE: level_bridge.o
|
||||
ld65 -o LEVEL_BRIDGE level_bridge.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
|
||||
|
||||
@ -76,21 +90,28 @@ graphics_top/top_graphics.inc:
|
||||
graphics_bridge/bridge_graphics.inc:
|
||||
cd graphics_bridge && make
|
||||
|
||||
graphics_alcove/alcove_graphics.inc:
|
||||
cd graphics_alcove && make
|
||||
|
||||
audio/rotate.btc.zx02:
|
||||
cd audio && make
|
||||
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst \
|
||||
LEVEL_STEPS1 LEVEL_STEPS3 LEVEL_TOP LEVEL_BRIDGE
|
||||
LEVEL_STEPS1 LEVEL_STEPS3 LEVEL_TOP LEVEL_BRIDGE LEVEL_ALCOVE
|
||||
|
||||
####
|
||||
|
||||
distclean:
|
||||
rm -f *~ *.o *.lst \
|
||||
LEVEL_STEPS1 LEVEL_STEPS3 LEVEL_TOP LEVEL_BRIDGE
|
||||
LEVEL_STEPS1 LEVEL_STEPS3 LEVEL_TOP LEVEL_BRIDGE LEVEL_ALCOVE
|
||||
cd graphics_steps1 && make clean
|
||||
cd graphics_steps3 && make clean
|
||||
cd graphics_top && make clean
|
||||
cd graphics_bridge && make clean
|
||||
cd graphics_alcove && make clean
|
||||
|
||||
|
||||
|
||||
|
@ -13,19 +13,19 @@ which_disk_bin:
|
||||
|
||||
load_address_array:
|
||||
.byte $40,$40,$40,$40 ; TITLE, STEPS1, STEPS3, TOP
|
||||
.byte $40,$40,$40,$40 ; BRIDGE
|
||||
.byte $40,$40,$40,$40 ; BRIDGE,ALCOVE
|
||||
|
||||
track_array:
|
||||
.byte 0, 2, 8,14 ; TITLE, STEPS1, STEPS3, TOP
|
||||
.byte 20,0,0,0 ; BRIDGE
|
||||
.byte 18,22,0,0 ; BRIDGE,ALCOVE
|
||||
|
||||
sector_array:
|
||||
.byte 8, 0, 0, 0 ; TITLE, STEPS1, STEPS3, TOP
|
||||
.byte 0,0,0,0 ; BRIDGE
|
||||
.byte 0,0,0,0 ; BRIDGE,ALCOVE
|
||||
|
||||
length_array:
|
||||
.byte 8, 96,96,96 ; TITLE, STEPS1, STEPS3, TOP
|
||||
.byte 96,0,0,0 ;
|
||||
.byte 8, 96,96,64 ; TITLE, STEPS1, STEPS3, TOP
|
||||
.byte 64,96,0,0 ; BRIDGE,ALCOVE
|
||||
|
||||
; disk 1
|
||||
|
||||
|
@ -3,6 +3,7 @@ LOAD_STEPS1 = 1
|
||||
LOAD_STEPS3 = 2
|
||||
LOAD_TOP = 3
|
||||
LOAD_BRIDGE = 4
|
||||
LOAD_ALCOVE = 5
|
||||
|
||||
;================================
|
||||
; Level definitions
|
||||
@ -18,10 +19,11 @@ RIVEN_STEPS3 = 0
|
||||
RIVEN_STEPS4 = 1
|
||||
|
||||
; TOP
|
||||
|
||||
RIVEN_TOP = 0
|
||||
RIVEN_ALCOVE = 1
|
||||
|
||||
; BRIDGE
|
||||
RIVEN_BRIDGE = 0
|
||||
|
||||
; ALCOVE
|
||||
RIVEN_ALCOVE = 0
|
||||
|
||||
|
BIN
games/riven_hgr/disk02_files/graphics_alcove/alcove2_w.png
Normal file
After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
@ -6,14 +6,11 @@ PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr
|
||||
all: top_graphics.inc
|
||||
|
||||
top_graphics.inc: \
|
||||
top_n.hgr.zx02 top_s.hgr.zx02 top_e.hgr.zx02 top_w.hgr.zx02 \
|
||||
alcove_e.hgr.zx02 alcove_w.hgr.zx02
|
||||
top_n.hgr.zx02 top_s.hgr.zx02 top_e.hgr.zx02 top_w.hgr.zx02
|
||||
echo "top_n_zx02: .incbin \"top_n.hgr.zx02\"" > top_graphics.inc
|
||||
echo "top_s_zx02: .incbin \"top_s.hgr.zx02\"" >> top_graphics.inc
|
||||
echo "top_e_zx02: .incbin \"top_e.hgr.zx02\"" >> top_graphics.inc
|
||||
echo "top_w_zx02: .incbin \"top_w.hgr.zx02\"" >> top_graphics.inc
|
||||
echo "alcove_e_zx02: .incbin \"alcove_e.hgr.zx02\"" >> top_graphics.inc
|
||||
echo "alcove_w_zx02: .incbin \"alcove_w.hgr.zx02\"" >> top_graphics.inc
|
||||
|
||||
####
|
||||
|
||||
|
Before Width: | Height: | Size: 5.3 KiB |
273
games/riven_hgr/disk02_files/level_alcove.s
Normal file
@ -0,0 +1,273 @@
|
||||
; Riven -- Alcove
|
||||
|
||||
; by deater (Vince Weaver) <vince@deater.net>
|
||||
|
||||
; Zero Page
|
||||
.include "../zp.inc"
|
||||
.include "../hardware.inc"
|
||||
.include "../common_defines.inc"
|
||||
.include "../qload.inc"
|
||||
.include "disk02_defines.inc"
|
||||
|
||||
alcove_start:
|
||||
|
||||
;===================
|
||||
; init screen
|
||||
;===================
|
||||
|
||||
; jsr TEXT
|
||||
; jsr HOME
|
||||
bit KEYRESET
|
||||
|
||||
bit SET_GR
|
||||
bit PAGE1
|
||||
bit HIRES
|
||||
bit FULLGR
|
||||
|
||||
;===============================
|
||||
; load sound into language card
|
||||
;===============================
|
||||
|
||||
lda SOUND_STATUS
|
||||
and #SOUND_IN_LC
|
||||
beq do_not_load_audio
|
||||
|
||||
; load sounds into LC
|
||||
|
||||
; read ram, write ram, use $d000 bank1
|
||||
bit $C08B
|
||||
bit $C08B
|
||||
|
||||
lda #<rotate_audio
|
||||
sta ZX0_src
|
||||
lda #>rotate_audio
|
||||
sta ZX0_src+1
|
||||
|
||||
lda #$D0 ; decompress to $D000
|
||||
|
||||
jsr full_decomp
|
||||
|
||||
; read rom, nowrite, use $d000 bank1
|
||||
bit $C08A
|
||||
|
||||
|
||||
do_not_load_audio:
|
||||
|
||||
|
||||
|
||||
;========================
|
||||
; 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 update_exit ; update rotation
|
||||
|
||||
|
||||
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
|
||||
|
||||
;==========================
|
||||
; update exit
|
||||
;==========================
|
||||
|
||||
update_exit:
|
||||
ldx ROOM_ROTATION
|
||||
|
||||
lda room_bg_l,X
|
||||
sta location0+14
|
||||
|
||||
lda room_bg_h,X
|
||||
sta location0+15
|
||||
|
||||
lda room_exits,X
|
||||
sta location0+3
|
||||
|
||||
rts
|
||||
|
||||
; rotates clockwise
|
||||
|
||||
room_bg_l:
|
||||
.byte <alcove_w_zx02 ; opening
|
||||
.byte <alcove3_w_zx02 ; blocked
|
||||
.byte <alcove3_w_zx02 ; blocked
|
||||
.byte <alcove_w_zx02 ; opening
|
||||
.byte <alcove3_w_zx02 ; blocked
|
||||
|
||||
room_bg_h:
|
||||
.byte >alcove_w_zx02 ; opening
|
||||
.byte >alcove3_w_zx02 ; blocked
|
||||
.byte >alcove3_w_zx02 ; blocked
|
||||
.byte >alcove_w_zx02 ; opening
|
||||
.byte >alcove3_w_zx02 ; blocked
|
||||
|
||||
room_exits:
|
||||
.byte $E3 ; 0
|
||||
.byte $FF ; 1
|
||||
.byte $FF ; 2
|
||||
.byte $E3 ; 3
|
||||
.byte $FF ; 4
|
||||
|
||||
|
||||
;==========================
|
||||
; alcove button
|
||||
;==========================
|
||||
|
||||
alcove_button:
|
||||
|
||||
; rotate, mod5
|
||||
|
||||
inc ROOM_ROTATION
|
||||
lda ROOM_ROTATION
|
||||
cmp #5
|
||||
bne room_no_wrap
|
||||
lda #0
|
||||
sta ROOM_ROTATION
|
||||
|
||||
room_no_wrap:
|
||||
|
||||
; update the pointers
|
||||
|
||||
jsr update_exit
|
||||
|
||||
; display "rotation" animation
|
||||
|
||||
lda #<alcove2_w_zx02
|
||||
sta ZX0_src
|
||||
lda #>alcove2_w_zx02
|
||||
sta ZX0_src+1
|
||||
|
||||
lda #$20
|
||||
|
||||
jsr full_decomp
|
||||
|
||||
; only play sound if language card
|
||||
|
||||
lda SOUND_STATUS
|
||||
and #SOUND_IN_LC
|
||||
bne do_play_audio
|
||||
|
||||
; wait a bit instead
|
||||
|
||||
ldx #20
|
||||
jsr wait_50xms
|
||||
|
||||
jmp done_play_audio
|
||||
|
||||
do_play_audio:
|
||||
; switch in language card
|
||||
; read/write RAM $d000 bank 1
|
||||
|
||||
bit $C08B
|
||||
bit $C08B
|
||||
|
||||
; call the btc player
|
||||
|
||||
lda #$00
|
||||
sta BTC_L
|
||||
|
||||
lda #$D0
|
||||
sta BTC_H
|
||||
|
||||
ldx #45 ; length
|
||||
|
||||
jsr play_audio
|
||||
|
||||
; read ROM/no-write
|
||||
|
||||
bit $c08A ; restore language card
|
||||
|
||||
done_play_audio:
|
||||
|
||||
; re-display exit graphic
|
||||
|
||||
lda location0+14
|
||||
sta ZX0_src
|
||||
|
||||
lda location0+15
|
||||
sta ZX0_src+1
|
||||
|
||||
lda #$20
|
||||
|
||||
jsr full_decomp
|
||||
|
||||
; TODO: tail call
|
||||
|
||||
rts
|
||||
|
||||
;==========================
|
||||
; includes
|
||||
;==========================
|
||||
|
||||
|
||||
.include "graphics_alcove/alcove_graphics.inc"
|
||||
|
||||
.include "leveldata_alcove.inc"
|
||||
|
||||
.include "../audio.s"
|
||||
|
||||
rotate_audio:
|
||||
.incbin "audio/rotate.btc.zx02"
|
@ -55,11 +55,6 @@ steps1_start:
|
||||
; init
|
||||
;===================================
|
||||
|
||||
; done in title
|
||||
|
||||
; lda #$20
|
||||
; sta HGR_PAGE
|
||||
; jsr hgr_make_tables
|
||||
|
||||
jsr change_location
|
||||
|
||||
|
26
games/riven_hgr/disk02_files/leveldata_alcove.inc
Normal file
@ -0,0 +1,26 @@
|
||||
;===============================================
|
||||
; level data for rotation alcove
|
||||
;===============================================
|
||||
|
||||
locations:
|
||||
.word location0
|
||||
|
||||
; RIVEN_ALCOVE -- looking into rotation room
|
||||
location0:
|
||||
.byte $ff ; north exit
|
||||
.byte $ff ; south exit
|
||||
.byte LOAD_TOP<<4|RIVEN_TOP ; east exit
|
||||
.byte $E3 ; west exit
|
||||
.byte $FF ; north exit_dir
|
||||
.byte $fF ; south exit_dir
|
||||
.byte DIRECTION_E ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
.word $0000 ; north bg
|
||||
.word $0000 ; south bg
|
||||
.word alcove_e_zx02 ; east bg
|
||||
.word alcove_w_zx02 ; west bg
|
||||
.byte BG_EAST|BG_WEST ; all bgs
|
||||
.byte DIRECTION_W ; special exit
|
||||
.byte 30,36 ; x
|
||||
.byte 96,130 ; y
|
||||
.word alcove_button-1
|
@ -3,14 +3,14 @@
|
||||
;===============================================
|
||||
|
||||
locations:
|
||||
.word location0,location1
|
||||
.word location0
|
||||
|
||||
; RIVEN_TOP -- top of steps
|
||||
location0:
|
||||
.byte $E1 ; north exit
|
||||
.byte LOAD_STEPS3<<4|RIVEN_STEPS4 ; south exit
|
||||
.byte LOAD_BRIDGE<<4|RIVEN_BRIDGE ; east exit
|
||||
.byte RIVEN_ALCOVE ; west exit
|
||||
.byte LOAD_STEPS3<<4|RIVEN_STEPS4 ; south exit
|
||||
.byte LOAD_BRIDGE<<4|RIVEN_BRIDGE ; east exit
|
||||
.byte LOAD_ALCOVE<<4|RIVEN_ALCOVE ; west exit
|
||||
.byte DIRECTION_N ; north exit_dir
|
||||
.byte DIRECTION_S ; south exit_dir
|
||||
.byte DIRECTION_E ; east exit_dir
|
||||
@ -21,21 +21,3 @@ location0:
|
||||
.word top_w_zx02 ; west bg
|
||||
.byte BG_NORTH|BG_SOUTH|BG_EAST|BG_WEST ; all bgs
|
||||
.byte $ff ; special exit
|
||||
|
||||
; RIVEN_ALCOVE -- looking into rotation room
|
||||
location1:
|
||||
.byte $ff ; north exit
|
||||
.byte $ff ; south exit
|
||||
.byte RIVEN_TOP ; east exit
|
||||
.byte $E3 ; west exit
|
||||
.byte $FF ; north exit_dir
|
||||
.byte $fF ; south exit_dir
|
||||
.byte DIRECTION_E ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
.word $0000 ; north bg
|
||||
.word $0000 ; south bg
|
||||
.word alcove_e_zx02 ; east bg
|
||||
.word alcove_w_zx02 ; west bg
|
||||
.byte BG_EAST|BG_WEST ; all bgs
|
||||
.byte $ff ; special exit
|
||||
|
||||
|
@ -17,9 +17,9 @@ location0:
|
||||
.byte $ff ; west exit_dir
|
||||
.word down1_n_zx02 ; north bg
|
||||
.word down1_s_zx02 ; south bg
|
||||
.word $0000 ; east bg
|
||||
.word down1_e_zx02 ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_NORTH|BG_SOUTH
|
||||
.byte BG_NORTH|BG_EAST|BG_SOUTH
|
||||
.byte $ff ; special exit
|
||||
|
||||
; RIVEN_DOWN2 -- continuing down
|
||||
|