riven_hgr: hook up new graphics
|
@ -12,12 +12,13 @@ EMPTY_DISK = ../../empty_disk/empty.dsk
|
|||
all: riven_hgr.dsk
|
||||
|
||||
riven_hgr.dsk: HELLO LOADER TITLE \
|
||||
LEVEL_PROJECTOR DOME
|
||||
LEVEL_PROJECTOR LEVEL_MAGSTEPS DOME
|
||||
cp $(EMPTY_DISK) riven_hgr.dsk
|
||||
$(DOS33) -y riven_hgr.dsk SAVE A HELLO
|
||||
$(DOS33) -y riven_hgr.dsk BSAVE -a 0x1000 LOADER
|
||||
$(DOS33) -y riven_hgr.dsk BSAVE -a 0x4000 TITLE
|
||||
$(DOS33) -y riven_hgr.dsk BSAVE -a 0x4000 LEVEL_PROJECTOR
|
||||
$(DOS33) -y riven_hgr.dsk BSAVE -a 0x4000 LEVEL_MAGSTEPS
|
||||
$(DOS33) -y riven_hgr.dsk BSAVE -a 0x4000 DOME
|
||||
|
||||
###
|
||||
|
@ -74,12 +75,28 @@ level_projector.o: level_projector.s zp.inc hardware.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 \
|
||||
zx02_optim.s \
|
||||
hgr_sprite.s hgr_tables.s \
|
||||
keyboard.s \
|
||||
hgr_14x14_sprite.s \
|
||||
leveldata_magsteps.inc \
|
||||
graphics_sprites/pointer_sprites.inc \
|
||||
graphics_magsteps/magsteps_graphics.inc
|
||||
ca65 -o level_magsteps.o level_magsteps.s -l level_magsteps.lst
|
||||
|
||||
|
||||
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst HELLO LOADER TITLE \
|
||||
LEVEL_PROJECTOR DOME
|
||||
LEVEL_PROJECTOR LEVEL_MAGSTEPS DOME
|
||||
# cd graphics && make clean
|
||||
# cd maps && make clean
|
||||
# cd title && make clean
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
LOAD_TITLE = 0
|
||||
LOAD_DOME = 1
|
||||
LOAD_PROJECTOR = 2
|
||||
LOAD_MAGSTEPS = 3
|
||||
|
||||
|
||||
div7_table = $BC00
|
||||
|
@ -50,11 +51,14 @@ LOCATION_SPECIAL_FUNC=22 ; pointer-1 of function to call on click
|
|||
; Dome
|
||||
|
||||
RIVEN_MAGLEV1 = 0
|
||||
RIVEN_MAGLEV2 = 1
|
||||
RIVEN_MAGLEV3 = 2
|
||||
|
||||
; Projector
|
||||
|
||||
RIVEN_PROJECTOR = 0
|
||||
RIVEN_PROJ_DOOR = 1
|
||||
|
||||
; Magsteps
|
||||
|
||||
RIVEN_MAGSTEPS2 = 0
|
||||
RIVEN_MAGSTEPS3 = 1
|
||||
|
||||
|
|
|
@ -2,26 +2,17 @@ include ../../../Makefile.inc
|
|||
|
||||
ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f
|
||||
PNG_TO_HGR = ../../../utils/hgr-utils/png2hgr
|
||||
LINKER_SCRIPTS = ../../../linker_scripts
|
||||
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||
EMPTY_DISK = ../../../empty_disk/empty.dsk
|
||||
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||
PNG2GR = ../../../utils/gr-utils/png2gr
|
||||
PNG2SPRITES = ../../../utils/gr-utils/png2sprites
|
||||
HGR_SPRITE = ../../../utils/hgr-utils/hgr_make_sprite
|
||||
|
||||
all: dome_graphics.inc
|
||||
all: magsteps_graphics.inc
|
||||
|
||||
magsteps_graphics.inc: \
|
||||
magsteps2_n.hgr.zx02 magsteps2_s.hgr.zx02 \
|
||||
magsteps3_n.hgr.zx02 magsteps3_s.hgr.zx02
|
||||
echo "magsteps2_n_zx02: .incbin \"magsteps2_n.hgr.zx02\"" > magsteps_graphics.inc
|
||||
echo "magsteps2_s_zx02: .incbin \"magsteps2_s.hgr.zx02\"" >> magsteps_graphics.inc
|
||||
echo "magsteps3_n_zx02: .incbin \"magsteps3_n.hgr.zx02\"" >> magsteps_graphics.inc
|
||||
echo "magsteps3_s_zx02: .incbin \"magsteps3_s.hgr.zx02\"" >> magsteps_graphics.inc
|
||||
|
||||
dome_graphics.inc: \
|
||||
maglev1_n.hgr.zx02 maglev1_s.hgr.zx02 maglev1_e.hgr.zx02 maglev1_w.hgr.zx02 \
|
||||
maglev2_n.hgr.zx02 \
|
||||
maglev3_n.hgr.zx02
|
||||
echo "maglev1_n_zx02: .incbin \"maglev1_n.hgr.zx02\"" > dome_graphics.inc
|
||||
echo "maglev1_s_zx02: .incbin \"maglev1_s.hgr.zx02\"" >> dome_graphics.inc
|
||||
echo "maglev1_e_zx02: .incbin \"maglev1_e.hgr.zx02\"" >> dome_graphics.inc
|
||||
echo "maglev1_w_zx02: .incbin \"maglev1_w.hgr.zx02\"" >> dome_graphics.inc
|
||||
echo "maglev2_n_zx02: .incbin \"maglev2_n.hgr.zx02\"" >> dome_graphics.inc
|
||||
echo "maglev3_n_zx02: .incbin \"maglev3_n.hgr.zx02\"" >> dome_graphics.inc
|
||||
|
||||
|
||||
####
|
||||
|
@ -35,5 +26,5 @@ dome_graphics.inc: \
|
|||
####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst *.zx02 *.hgr dome_graphics.inc
|
||||
rm -f *~ *.o *.lst *.zx02 *.hgr magsteps_graphics.inc
|
||||
|
||||
|
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
123
games/riven_hgr/level_magsteps.s
Normal file
|
@ -0,0 +1,123 @@
|
|||
; Riven -- Dome Island, Steps to Maglev
|
||||
|
||||
; by deater (Vince Weaver) <vince@deater.net>
|
||||
|
||||
; Zero Page
|
||||
.include "zp.inc"
|
||||
.include "hardware.inc"
|
||||
.include "common_defines.inc"
|
||||
|
||||
riven_magsteps:
|
||||
|
||||
;===================
|
||||
; 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
|
||||
;===================================
|
||||
|
||||
; done in title
|
||||
|
||||
; lda #$20
|
||||
; sta HGR_PAGE
|
||||
; jsr hgr_make_tables
|
||||
|
||||
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 "zx02_optim.s"
|
||||
|
||||
.include "keyboard.s"
|
||||
|
||||
.include "hgr_14x14_sprite.s"
|
||||
.include "draw_pointer.s"
|
||||
|
||||
.include "log_table.s"
|
||||
|
||||
.include "graphics_magsteps/magsteps_graphics.inc"
|
||||
|
||||
;.include "common_sprites.inc"
|
||||
|
||||
.include "graphics_sprites/pointer_sprites.inc"
|
||||
|
||||
.include "leveldata_magsteps.inc"
|
|
@ -3,11 +3,11 @@
|
|||
;===============================================
|
||||
|
||||
locations:
|
||||
.word location0,location1,location2
|
||||
.word location0
|
||||
|
||||
; RIVEN_MAGLEV1 -- maglev steps
|
||||
location0:
|
||||
.byte RIVEN_MAGLEV2 ; north exit
|
||||
.byte LOAD_MAGSTEPS<<4|RIVEN_MAGSTEPS2 ; north exit
|
||||
.byte LOAD_PROJECTOR<<4|RIVEN_PROJ_DOOR ; south exit
|
||||
.byte $ff ; east exit
|
||||
.byte $ff ; west exit
|
||||
|
@ -25,43 +25,4 @@ location0:
|
|||
.byte 2,46 ; special y
|
||||
.word location0-1 ; FIXME
|
||||
|
||||
; RIVEN_MAGLEV2 -- maglev steps
|
||||
location1:
|
||||
.byte RIVEN_MAGLEV3 ; north exit
|
||||
.byte $ff ; south exit
|
||||
.byte $ff ; east exit
|
||||
.byte $ff ; west exit
|
||||
.byte DIRECTION_N ; north exit_dir
|
||||
.byte $ff ; south exit_dir
|
||||
.byte $ff ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
.word maglev2_n_zx02 ; north bg
|
||||
.word $0000 ; south bg
|
||||
.word $0000 ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_NORTH
|
||||
.byte DIRECTION_E ; special exit
|
||||
.byte 9,29 ; special x
|
||||
.byte 2,46 ; special y
|
||||
.word location1-1 ; special function FIXME
|
||||
|
||||
; RIVEN_MAGLEV3 -- maglev inside
|
||||
location2:
|
||||
.byte $ff ; north exit
|
||||
.byte $ff ; south exit
|
||||
.byte $ff ; east exit
|
||||
.byte $ff ; west exit
|
||||
.byte $ff ; north exit_dir
|
||||
.byte $ff ; south exit_dir
|
||||
.byte $ff ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
.word maglev3_n_zx02 ; north bg
|
||||
.word $0000 ; south bg
|
||||
.word $0000 ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_NORTH
|
||||
.byte DIRECTION_E ; special exit
|
||||
.byte 9,29 ; special x
|
||||
.byte 2,46 ; special y
|
||||
.word location2-1 ; FIXME
|
||||
|
||||
|
|
46
games/riven_hgr/leveldata_magsteps.inc
Normal file
|
@ -0,0 +1,46 @@
|
|||
;===============================================
|
||||
; level data for Maglev Steps on Dome Island
|
||||
;===============================================
|
||||
|
||||
locations:
|
||||
.word location0,location1
|
||||
|
||||
; RIVEN_MAGSTEPS2 -- meglev steps middle
|
||||
location0:
|
||||
.byte RIVEN_MAGSTEPS3 ; north exit
|
||||
.byte LOAD_DOME<<4|RIVEN_MAGLEV1 ; south exit
|
||||
.byte $ff ; east exit
|
||||
.byte $ff ; west exit
|
||||
.byte DIRECTION_N ; north exit_dir
|
||||
.byte DIRECTION_S ; south exit_dir
|
||||
.byte $ff ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
.word magsteps2_n_zx02 ; north bg
|
||||
.word magsteps2_s_zx02 ; south bg
|
||||
.word $0000 ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_NORTH|BG_SOUTH
|
||||
.byte DIRECTION_E ; special exit
|
||||
.byte 9,29 ; special x
|
||||
.byte 2,46 ; special y
|
||||
.word location0-1 ; FIXME
|
||||
|
||||
; RIVEN_MAGSTEPS3 -- maglev steps top
|
||||
location1:
|
||||
.byte RIVEN_MAGSTEPS3 ; north exit
|
||||
.byte RIVEN_MAGSTEPS2 ; south exit
|
||||
.byte $ff ; east exit
|
||||
.byte $ff ; west exit
|
||||
.byte DIRECTION_N ; north exit_dir
|
||||
.byte DIRECTION_S ; south exit_dir
|
||||
.byte $ff ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
.word magsteps3_n_zx02 ; north bg
|
||||
.word magsteps3_s_zx02 ; south bg
|
||||
.word $0000 ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_NORTH|BG_SOUTH
|
||||
.byte DIRECTION_E ; special exit
|
||||
.byte 9,29 ; special x
|
||||
.byte 2,46 ; special y
|
||||
.word location1-1 ; special function FIXME
|
|
@ -196,6 +196,7 @@ filenames:
|
|||
.word title_filename
|
||||
.word dome_filename
|
||||
.word projector_filename
|
||||
.word magsteps_filename
|
||||
|
||||
title_filename:
|
||||
.byte "TITLE",0
|
||||
|
@ -203,6 +204,8 @@ dome_filename:
|
|||
.byte "DOME",0
|
||||
projector_filename:
|
||||
.byte "LEVEL_PROJECTOR",0
|
||||
magsteps_filename:
|
||||
.byte "LEVEL_MAGSTEPS",0
|
||||
|
||||
;===================================================
|
||||
;===================================================
|
||||
|
|