mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-09-28 02:55:03 +00:00
peasant: peasantry too big, split up in 4 pieces
This commit is contained in:
parent
4809b2ad13
commit
8ea755c9a2
@ -8,7 +8,8 @@ EMPTY_DISK = ../../empty_disk
|
|||||||
|
|
||||||
all: peasant.dsk
|
all: peasant.dsk
|
||||||
|
|
||||||
peasant.dsk: QBOOT QLOAD VID_LOGO TITLE INTRO COPY_CHECK PEASANT
|
peasant.dsk: QBOOT QLOAD VID_LOGO TITLE INTRO COPY_CHECK \
|
||||||
|
PEASANT1 PEASANT2 PEASANT3 PEASANT4
|
||||||
cp $(EMPTY_DISK)/empty.dsk peasant.dsk
|
cp $(EMPTY_DISK)/empty.dsk peasant.dsk
|
||||||
# $(DOS33) -y peasant.dsk BSAVE -a 0x6000 INTRO
|
# $(DOS33) -y peasant.dsk BSAVE -a 0x6000 INTRO
|
||||||
$(DOS33_RAW) peasant.dsk 0 0 QBOOT 0 1
|
$(DOS33_RAW) peasant.dsk 0 0 QBOOT 0 1
|
||||||
@ -19,7 +20,10 @@ peasant.dsk: QBOOT QLOAD VID_LOGO TITLE INTRO COPY_CHECK PEASANT
|
|||||||
$(DOS33_RAW) peasant.dsk 5 0 TITLE 0 0
|
$(DOS33_RAW) peasant.dsk 5 0 TITLE 0 0
|
||||||
$(DOS33_RAW) peasant.dsk 8 0 INTRO 0 0
|
$(DOS33_RAW) peasant.dsk 8 0 INTRO 0 0
|
||||||
$(DOS33_RAW) peasant.dsk 12 0 COPY_CHECK 0 0
|
$(DOS33_RAW) peasant.dsk 12 0 COPY_CHECK 0 0
|
||||||
$(DOS33_RAW) peasant.dsk 14 0 PEASANT 0 0
|
$(DOS33_RAW) peasant.dsk 14 0 PEASANT1 0 0
|
||||||
|
$(DOS33_RAW) peasant.dsk 19 0 PEASANT2 0 0
|
||||||
|
$(DOS33_RAW) peasant.dsk 24 0 PEASANT3 0 0
|
||||||
|
$(DOS33_RAW) peasant.dsk 29 0 PEASANT4 0 0
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
@ -82,16 +86,58 @@ intro.o: intro.s zp.inc \
|
|||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
PEASANT: peasant.o
|
PEASANT1: peasant1.o
|
||||||
ld65 -o PEASANT peasant.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
|
ld65 -o PEASANT1 peasant1.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
|
||||||
|
|
||||||
peasant.o: peasant.s zp.inc \
|
peasant1.o: peasant1.s zp.inc \
|
||||||
graphics/graphics.inc sprites/peasant_sprite.inc \
|
graphics/graphics_peasant1.inc sprites/peasant_sprite.inc \
|
||||||
draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \
|
draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \
|
||||||
hgr_7x30_sprite.s hgr_1x5_sprite.s hgr_save_restore.s \
|
hgr_7x30_sprite.s hgr_1x5_sprite.s hgr_save_restore.s \
|
||||||
wait_a_bit.s draw_peasant.s hgr_text_box.s \
|
wait_a_bit.s draw_peasant.s hgr_text_box.s \
|
||||||
keyboard.s
|
keyboard.s parse_input.s new_map_location.s
|
||||||
ca65 -o peasant.o peasant.s -l peasant.lst
|
ca65 -o peasant1.o peasant1.s -l peasant1.lst
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
PEASANT2: peasant2.o
|
||||||
|
ld65 -o PEASANT2 peasant2.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
|
||||||
|
|
||||||
|
peasant2.o: peasant2.s zp.inc \
|
||||||
|
graphics/graphics_peasant2.inc sprites/peasant_sprite.inc \
|
||||||
|
draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \
|
||||||
|
hgr_7x30_sprite.s hgr_1x5_sprite.s hgr_save_restore.s \
|
||||||
|
wait_a_bit.s draw_peasant.s hgr_text_box.s \
|
||||||
|
keyboard.s parse_input.s new_map_location.s
|
||||||
|
ca65 -o peasant2.o peasant2.s -l peasant2.lst
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
PEASANT3: peasant3.o
|
||||||
|
ld65 -o PEASANT3 peasant3.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
|
||||||
|
|
||||||
|
peasant3.o: peasant3.s zp.inc \
|
||||||
|
graphics/graphics_peasant3.inc sprites/peasant_sprite.inc \
|
||||||
|
draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \
|
||||||
|
hgr_7x30_sprite.s hgr_1x5_sprite.s hgr_save_restore.s \
|
||||||
|
wait_a_bit.s draw_peasant.s hgr_text_box.s \
|
||||||
|
keyboard.s parse_input.s new_map_location.s
|
||||||
|
ca65 -o peasant3.o peasant3.s -l peasant3.lst
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
PEASANT4: peasant4.o
|
||||||
|
ld65 -o PEASANT4 peasant4.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
|
||||||
|
|
||||||
|
peasant4.o: peasant4.s zp.inc \
|
||||||
|
graphics/graphics_peasant4.inc sprites/peasant_sprite.inc \
|
||||||
|
draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \
|
||||||
|
hgr_7x30_sprite.s hgr_1x5_sprite.s hgr_save_restore.s \
|
||||||
|
wait_a_bit.s draw_peasant.s hgr_text_box.s \
|
||||||
|
keyboard.s parse_input.s new_map_location.s
|
||||||
|
ca65 -o peasant4.o peasant4.s -l peasant4.lst
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
@ -124,7 +170,7 @@ graphics_title/title_graphics.inc:
|
|||||||
cd graphics_title && make
|
cd graphics_title && make
|
||||||
|
|
||||||
|
|
||||||
graphics/graphics.inc:
|
graphics/graphics_peasant1.inc:
|
||||||
cd graphics && make
|
cd graphics && make
|
||||||
|
|
||||||
graphics_copy/copy_graphics.inc:
|
graphics_copy/copy_graphics.inc:
|
||||||
@ -134,5 +180,6 @@ graphics_copy/copy_graphics.inc:
|
|||||||
###
|
###
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ *.o *.lst HELLO VID_LOGO TITLE INTRO COPY_CHECK
|
rm -f *~ *.o *.lst HELLO VID_LOGO TITLE INTRO COPY_CHECK \
|
||||||
|
PEASANT1 PEASANT2 PEASANT3 PEASANT4
|
||||||
|
|
||||||
|
@ -26,8 +26,10 @@ T 3 = VID_LOGO 6911 bytes 27S = 1T11S
|
|||||||
T 5 = TITLE 9662 bytes 38S = 2T6S
|
T 5 = TITLE 9662 bytes 38S = 2T6S
|
||||||
T 8 = INTRO 16040 bytes 63S = 3T15S
|
T 8 = INTRO 16040 bytes 63S = 3T15S
|
||||||
T 12 = COPY_CHECK 4922 bytes 20S = 1T4S
|
T 12 = COPY_CHECK 4922 bytes 20S = 1T4S
|
||||||
T 14 = PEASANT 18501 bytes 73S = 4T9S ; 88 is max?
|
T 14 = PEASANT1 22501 bytes 79S = 4T15S ; 88 is max?
|
||||||
|
T 19 = PEASANT2 ; 79 = 20224
|
||||||
|
T 24 = PEASANT3
|
||||||
|
T 29 = PEASANT4
|
||||||
|
|
||||||
238, to 280 (6)
|
238, to 280 (6)
|
||||||
50 to 135 (85) 6*85=510
|
50 to 135 (85) 6*85=510
|
||||||
|
30
games/peasant/clear_bottom.s
Normal file
30
games/peasant/clear_bottom.s
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
|
||||||
|
clear_bottom:
|
||||||
|
; draw rectangle
|
||||||
|
|
||||||
|
lda #$00 ; color is black1
|
||||||
|
sta VGI_RCOLOR
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta VGI_RX1
|
||||||
|
lda #183
|
||||||
|
sta VGI_RY1
|
||||||
|
lda #140
|
||||||
|
sta VGI_RXRUN
|
||||||
|
lda #9
|
||||||
|
sta VGI_RYRUN
|
||||||
|
|
||||||
|
jsr vgi_simple_rectangle
|
||||||
|
|
||||||
|
lda #140
|
||||||
|
sta VGI_RX1
|
||||||
|
lda #183
|
||||||
|
sta VGI_RY1
|
||||||
|
lda #140
|
||||||
|
sta VGI_RXRUN
|
||||||
|
lda #9
|
||||||
|
sta VGI_RYRUN
|
||||||
|
|
||||||
|
jsr vgi_simple_rectangle
|
||||||
|
|
||||||
|
rts
|
@ -61,7 +61,7 @@ trogdor_question:
|
|||||||
|
|
||||||
jsr wait_until_keypress
|
jsr wait_until_keypress
|
||||||
|
|
||||||
lda #LOAD_PEASANT
|
lda #LOAD_PEASANT3
|
||||||
sta WHICH_LOAD
|
sta WHICH_LOAD
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -5,7 +5,9 @@ PNG2HGR = ../../../utils/hgr-utils/png2hgr
|
|||||||
LZSA = ~/research/lzsa/lzsa/lzsa
|
LZSA = ~/research/lzsa/lzsa/lzsa
|
||||||
B2D = ../../../utils/bmp2dhr/b2d
|
B2D = ../../../utils/bmp2dhr/b2d
|
||||||
|
|
||||||
all: graphics_intro.inc graphics.inc
|
all: graphics_intro.inc graphics.inc \
|
||||||
|
graphics_peasant1.inc graphics_peasant2.inc graphics_peasant3.inc \
|
||||||
|
graphics_peasant4.inc
|
||||||
|
|
||||||
|
|
||||||
graphics_intro.inc: \
|
graphics_intro.inc: \
|
||||||
@ -23,29 +25,49 @@ graphics_intro.inc: \
|
|||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
graphics.inc: \
|
graphics_peasant1.inc: \
|
||||||
|
todo.lzsa \
|
||||||
|
waterfall.lzsa
|
||||||
|
echo "todo_lzsa: .incbin \"todo.lzsa\"" > graphics_peasant1.inc
|
||||||
|
echo "waterfall_lzsa: .incbin \"waterfall.lzsa\"" >> graphics_peasant1.inc
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
graphics_peasant2.inc: \
|
||||||
|
todo.lzsa \
|
||||||
|
river.lzsa \
|
||||||
|
knight.lzsa
|
||||||
|
echo "todo_lzsa: .incbin \"todo.lzsa\"" > graphics_peasant2.inc
|
||||||
|
echo "river_lzsa: .incbin \"river.lzsa\"" >> graphics_peasant2.inc
|
||||||
|
echo "knight_lzsa: .incbin \"knight.lzsa\"" >> graphics_peasant2.inc
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
graphics_peasant3.inc: \
|
||||||
|
todo.lzsa \
|
||||||
cottage.lzsa \
|
cottage.lzsa \
|
||||||
lake_e.lzsa \
|
lake_e.lzsa \
|
||||||
lake_w.lzsa \
|
lake_w.lzsa \
|
||||||
river.lzsa \
|
inn.lzsa
|
||||||
knight.lzsa \
|
echo "todo_lzsa: .incbin \"todo.lzsa\"" > graphics_peasant3.inc
|
||||||
waterfall.lzsa \
|
echo "cottage_lzsa: .incbin \"cottage.lzsa\"" >> graphics_peasant3.inc
|
||||||
inn.lzsa \
|
echo "lake_w_lzsa: .incbin \"lake_w.lzsa\"" >> graphics_peasant3.inc
|
||||||
crooked_tree.lzsa \
|
echo "lake_e_lzsa: .incbin \"lake_e.lzsa\"" >> graphics_peasant3.inc
|
||||||
todo.lzsa
|
echo "inn_lzsa: .incbin \"inn.lzsa\"" >> graphics_peasant3.inc
|
||||||
echo "cottage_lzsa: .incbin \"cottage.lzsa\"" > graphics.inc
|
|
||||||
echo "lake_w_lzsa: .incbin \"lake_w.lzsa\"" >> graphics.inc
|
|
||||||
echo "lake_e_lzsa: .incbin \"lake_e.lzsa\"" >> graphics.inc
|
|
||||||
echo "river_lzsa: .incbin \"river.lzsa\"" >> graphics.inc
|
|
||||||
echo "knight_lzsa: .incbin \"knight.lzsa\"" >> graphics.inc
|
|
||||||
echo "waterfall_lzsa: .incbin \"waterfall.lzsa\"" >> graphics.inc
|
|
||||||
echo "inn_lzsa: .incbin \"inn.lzsa\"" >> graphics.inc
|
|
||||||
echo "crooked_tree_lzsa: .incbin \"crooked_tree.lzsa\"" >> graphics.inc
|
|
||||||
echo "todo_lzsa: .incbin \"todo.lzsa\"" >> graphics.inc
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
|
graphics_peasant4.inc: \
|
||||||
|
todo.lzsa \
|
||||||
|
lady_cottage.lzsa \
|
||||||
|
crooked_tree.lzsa
|
||||||
|
echo "todo_lzsa: .incbin \"todo.lzsa\"" > graphics_peasant4.inc
|
||||||
|
echo "lady_cottage_lzsa: .incbin \"lady_cottage.lzsa\"" >> graphics_peasant4.inc
|
||||||
|
echo "crooked_tree_lzsa: .incbin \"crooked_tree.lzsa\"" >> graphics_peasant4.inc
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
|
||||||
cottage.lzsa: cottage.hgr
|
cottage.lzsa: cottage.hgr
|
||||||
$(LZSA) -r -f2 cottage.hgr cottage.lzsa
|
$(LZSA) -r -f2 cottage.hgr cottage.lzsa
|
||||||
|
|
||||||
@ -60,6 +82,14 @@ crooked_tree.lzsa: crooked_tree.hgr
|
|||||||
crooked_tree.hgr: crooked_tree.png
|
crooked_tree.hgr: crooked_tree.png
|
||||||
$(PNG2HGR) crooked_tree.png > crooked_tree.hgr
|
$(PNG2HGR) crooked_tree.png > crooked_tree.hgr
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
lady_cottage.lzsa: lady_cottage.hgr
|
||||||
|
$(LZSA) -r -f2 lady_cottage.hgr lady_cottage.lzsa
|
||||||
|
|
||||||
|
lady_cottage.hgr: lady_cottage.png
|
||||||
|
$(PNG2HGR) lady_cottage.png > lady_cottage.hgr
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
|
BIN
games/peasant/graphics/lady_cottage.png
Normal file
BIN
games/peasant/graphics/lady_cottage.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
@ -96,13 +96,35 @@ escape_handler:
|
|||||||
sei ; turn off music
|
sei ; turn off music
|
||||||
jsr clear_ay_both ; clear AY state
|
jsr clear_ay_both ; clear AY state
|
||||||
|
|
||||||
; jsr draw_peasant
|
|
||||||
|
|
||||||
; start game
|
;=============================
|
||||||
|
; start new game
|
||||||
|
;=============================
|
||||||
|
|
||||||
lda #LOAD_PEASANT
|
lda #LOAD_PEASANT2
|
||||||
sta WHICH_LOAD
|
sta WHICH_LOAD
|
||||||
|
|
||||||
|
;=========================
|
||||||
|
; init peasant position
|
||||||
|
; draw at 18,107
|
||||||
|
|
||||||
|
lda #18
|
||||||
|
sta PEASANT_X
|
||||||
|
lda #107
|
||||||
|
sta PEASANT_Y
|
||||||
|
|
||||||
|
lda #PEASANT_DIR_RIGHT
|
||||||
|
sta PEASANT_DIR
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta PEASANT_XADD
|
||||||
|
sta PEASANT_YADD
|
||||||
|
|
||||||
|
lda #4
|
||||||
|
sta MAP_X
|
||||||
|
lda #1
|
||||||
|
sta MAP_Y
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
68
games/peasant/new_map_location.s
Normal file
68
games/peasant/new_map_location.s
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
|
||||||
|
;=====================
|
||||||
|
; new map location
|
||||||
|
;=====================
|
||||||
|
|
||||||
|
new_map_location:
|
||||||
|
lda #NEW_LOCATION
|
||||||
|
sta GAME_OVER
|
||||||
|
|
||||||
|
; fall through
|
||||||
|
|
||||||
|
;==================
|
||||||
|
; update map
|
||||||
|
; on main map, it's (MAP_Y*5)+MAP_X
|
||||||
|
update_map_location:
|
||||||
|
; put in map
|
||||||
|
|
||||||
|
map_wrap_x:
|
||||||
|
; wrap X (0..4)
|
||||||
|
lda MAP_X
|
||||||
|
bmi map_x_went_negative
|
||||||
|
cmp #5
|
||||||
|
bcc map_wrap_y ; blt
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
beq update_map_x ; bra
|
||||||
|
|
||||||
|
map_x_went_negative:
|
||||||
|
lda #4
|
||||||
|
|
||||||
|
update_map_x:
|
||||||
|
sta MAP_X
|
||||||
|
|
||||||
|
map_wrap_y:
|
||||||
|
|
||||||
|
; wrap Y (0..3)
|
||||||
|
lda MAP_Y
|
||||||
|
and #$3
|
||||||
|
sta MAP_Y
|
||||||
|
|
||||||
|
clc
|
||||||
|
lda MAP_Y
|
||||||
|
asl
|
||||||
|
asl
|
||||||
|
adc MAP_Y
|
||||||
|
adc MAP_X
|
||||||
|
|
||||||
|
sta MAP_LOCATION
|
||||||
|
|
||||||
|
; see if we need to change disk
|
||||||
|
|
||||||
|
lda MAP_Y
|
||||||
|
cmp #WHICH_PEASANTRY
|
||||||
|
|
||||||
|
beq were_good
|
||||||
|
|
||||||
|
must_load_from_disk:
|
||||||
|
lda #NEW_FROM_DISK
|
||||||
|
sta GAME_OVER
|
||||||
|
|
||||||
|
lda MAP_Y
|
||||||
|
clc
|
||||||
|
adc #LOAD_PEASANT1
|
||||||
|
sta WHICH_LOAD
|
||||||
|
|
||||||
|
were_good:
|
||||||
|
rts
|
||||||
|
|
69
games/peasant/parse_input.s
Normal file
69
games/peasant/parse_input.s
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
; parse input
|
||||||
|
|
||||||
|
parse_input:
|
||||||
|
; jsr hgr_save
|
||||||
|
|
||||||
|
lda input_buffer ; get first char FIXME
|
||||||
|
and #$DF ; make uppercase 0110 0001 -> 0100 0001
|
||||||
|
|
||||||
|
parse_copy:
|
||||||
|
cmp #'C'
|
||||||
|
bne parse_look
|
||||||
|
|
||||||
|
; want copy
|
||||||
|
lda #NEW_FROM_DISK
|
||||||
|
sta GAME_OVER
|
||||||
|
|
||||||
|
lda #LOAD_COPY_CHECK
|
||||||
|
sta WHICH_LOAD
|
||||||
|
|
||||||
|
jmp done_parse_message
|
||||||
|
|
||||||
|
|
||||||
|
parse_look:
|
||||||
|
cmp #'L'
|
||||||
|
bne parse_talk
|
||||||
|
|
||||||
|
lda #<fake_error1
|
||||||
|
sta OUTL
|
||||||
|
lda #>fake_error1
|
||||||
|
jmp finish_parse_message
|
||||||
|
|
||||||
|
|
||||||
|
parse_talk:
|
||||||
|
cmp #'T'
|
||||||
|
bne parse_version
|
||||||
|
|
||||||
|
lda #<fake_error2
|
||||||
|
sta OUTL
|
||||||
|
lda #>fake_error2
|
||||||
|
jmp finish_parse_message
|
||||||
|
|
||||||
|
|
||||||
|
parse_version:
|
||||||
|
cmp #'V'
|
||||||
|
bne parse_help
|
||||||
|
|
||||||
|
lda #<version_message
|
||||||
|
sta OUTL
|
||||||
|
lda #>version_message
|
||||||
|
jmp finish_parse_message
|
||||||
|
|
||||||
|
parse_help:
|
||||||
|
lda #<help_message
|
||||||
|
sta OUTL
|
||||||
|
lda #>help_message
|
||||||
|
|
||||||
|
finish_parse_message:
|
||||||
|
sta OUTH
|
||||||
|
jsr hgr_text_box
|
||||||
|
|
||||||
|
jsr wait_until_keypress
|
||||||
|
|
||||||
|
done_parse_message:
|
||||||
|
jsr hgr_partial_restore
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
345
games/peasant/peasant1.s
Normal file
345
games/peasant/peasant1.s
Normal file
@ -0,0 +1,345 @@
|
|||||||
|
; Peasant's Quest
|
||||||
|
|
||||||
|
; Peasantry Part 1 (top line of map)
|
||||||
|
|
||||||
|
WHICH_PEASANTRY = 0
|
||||||
|
|
||||||
|
|
||||||
|
; by Vince `deater` Weaver vince@deater.net
|
||||||
|
|
||||||
|
; with apologies to everyone
|
||||||
|
|
||||||
|
.include "hardware.inc"
|
||||||
|
.include "zp.inc"
|
||||||
|
|
||||||
|
.include "qload.inc"
|
||||||
|
|
||||||
|
|
||||||
|
peasant_quest:
|
||||||
|
lda #0
|
||||||
|
sta GAME_OVER
|
||||||
|
|
||||||
|
jsr hgr_make_tables
|
||||||
|
|
||||||
|
jsr HGR2 ; Hi-res graphics, no text at bottom
|
||||||
|
; Y=0, A=0 after this called
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta FRAME
|
||||||
|
|
||||||
|
; update map location
|
||||||
|
|
||||||
|
jsr update_map_location
|
||||||
|
|
||||||
|
|
||||||
|
;=============================
|
||||||
|
;=============================
|
||||||
|
; new screen location
|
||||||
|
;=============================
|
||||||
|
;=============================
|
||||||
|
|
||||||
|
new_location:
|
||||||
|
lda #0
|
||||||
|
sta GAME_OVER
|
||||||
|
|
||||||
|
;=====================
|
||||||
|
; load bg
|
||||||
|
|
||||||
|
; we are PEASANT1 so locations 0...4 map to 0...4, no change
|
||||||
|
|
||||||
|
ldx MAP_LOCATION
|
||||||
|
|
||||||
|
lda map_backgrounds_low,X
|
||||||
|
sta getsrc_smc+1
|
||||||
|
lda map_backgrounds_hi,X
|
||||||
|
sta getsrc_smc+2
|
||||||
|
|
||||||
|
lda #$40
|
||||||
|
|
||||||
|
jsr decompress_lzsa2_fast
|
||||||
|
|
||||||
|
; put peasant text
|
||||||
|
|
||||||
|
lda #<peasant_text
|
||||||
|
sta OUTL
|
||||||
|
lda #>peasant_text
|
||||||
|
sta OUTH
|
||||||
|
|
||||||
|
jsr hgr_put_string
|
||||||
|
|
||||||
|
; put score
|
||||||
|
|
||||||
|
lda #<score_text
|
||||||
|
sta OUTL
|
||||||
|
lda #>score_text
|
||||||
|
sta OUTH
|
||||||
|
|
||||||
|
jsr hgr_put_string
|
||||||
|
|
||||||
|
;====================
|
||||||
|
; save background
|
||||||
|
|
||||||
|
lda PEASANT_X
|
||||||
|
sta CURSOR_X
|
||||||
|
lda PEASANT_Y
|
||||||
|
sta CURSOR_Y
|
||||||
|
|
||||||
|
;=======================
|
||||||
|
; draw initial peasant
|
||||||
|
|
||||||
|
jsr save_bg_7x30
|
||||||
|
|
||||||
|
jsr draw_peasant
|
||||||
|
|
||||||
|
game_loop:
|
||||||
|
|
||||||
|
; redraw peasant if moved
|
||||||
|
|
||||||
|
lda PEASANT_XADD
|
||||||
|
ora PEASANT_YADD
|
||||||
|
beq peasant_the_same
|
||||||
|
|
||||||
|
; restore bg behind peasant
|
||||||
|
|
||||||
|
lda PEASANT_X
|
||||||
|
sta CURSOR_X
|
||||||
|
|
||||||
|
lda PEASANT_Y
|
||||||
|
sta CURSOR_Y
|
||||||
|
|
||||||
|
jsr restore_bg_7x30
|
||||||
|
|
||||||
|
; move peasant
|
||||||
|
|
||||||
|
clc
|
||||||
|
lda PEASANT_X
|
||||||
|
adc PEASANT_XADD
|
||||||
|
bmi peasant_x_negative
|
||||||
|
cmp #40
|
||||||
|
bcs peasant_x_toobig ; bge
|
||||||
|
bcc done_movex
|
||||||
|
|
||||||
|
;============================
|
||||||
|
peasant_x_toobig:
|
||||||
|
|
||||||
|
inc MAP_X
|
||||||
|
|
||||||
|
jsr new_map_location
|
||||||
|
|
||||||
|
lda #0 ; new X location
|
||||||
|
|
||||||
|
jmp done_movex
|
||||||
|
|
||||||
|
;============================
|
||||||
|
peasant_x_negative:
|
||||||
|
|
||||||
|
dec MAP_X
|
||||||
|
|
||||||
|
jsr new_map_location
|
||||||
|
|
||||||
|
lda #39 ; new X location
|
||||||
|
|
||||||
|
jmp done_movex
|
||||||
|
|
||||||
|
; check edge of screen
|
||||||
|
done_movex:
|
||||||
|
sta PEASANT_X
|
||||||
|
|
||||||
|
|
||||||
|
; Move Peasant Y
|
||||||
|
|
||||||
|
clc
|
||||||
|
lda PEASANT_Y
|
||||||
|
adc PEASANT_YADD
|
||||||
|
cmp #45
|
||||||
|
bcc peasant_y_negative ; blt
|
||||||
|
cmp #150
|
||||||
|
bcs peasant_y_toobig ; bge
|
||||||
|
bcc done_movey
|
||||||
|
|
||||||
|
|
||||||
|
;============================
|
||||||
|
peasant_y_toobig:
|
||||||
|
|
||||||
|
inc MAP_Y
|
||||||
|
|
||||||
|
jsr new_map_location
|
||||||
|
|
||||||
|
lda #45 ; new X location
|
||||||
|
|
||||||
|
jmp done_movey
|
||||||
|
|
||||||
|
|
||||||
|
;============================
|
||||||
|
peasant_y_negative:
|
||||||
|
|
||||||
|
dec MAP_Y
|
||||||
|
|
||||||
|
jsr new_map_location
|
||||||
|
|
||||||
|
lda #150 ; new X location
|
||||||
|
|
||||||
|
jmp done_movey
|
||||||
|
|
||||||
|
; check edge of screen
|
||||||
|
done_movey:
|
||||||
|
sta PEASANT_Y
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; save behind new position
|
||||||
|
|
||||||
|
lda PEASANT_X
|
||||||
|
sta CURSOR_X
|
||||||
|
|
||||||
|
lda PEASANT_Y
|
||||||
|
sta CURSOR_Y
|
||||||
|
|
||||||
|
jsr save_bg_7x30
|
||||||
|
|
||||||
|
; draw peasant
|
||||||
|
|
||||||
|
jsr draw_peasant
|
||||||
|
|
||||||
|
peasant_the_same:
|
||||||
|
|
||||||
|
inc FRAME
|
||||||
|
|
||||||
|
jsr check_keyboard
|
||||||
|
|
||||||
|
lda GAME_OVER
|
||||||
|
bmi oops_new_location
|
||||||
|
bne game_over
|
||||||
|
|
||||||
|
|
||||||
|
; delay
|
||||||
|
|
||||||
|
lda #200
|
||||||
|
jsr WAIT
|
||||||
|
|
||||||
|
|
||||||
|
jmp game_loop
|
||||||
|
|
||||||
|
oops_new_location:
|
||||||
|
jmp new_location
|
||||||
|
|
||||||
|
|
||||||
|
;************************
|
||||||
|
; exit level
|
||||||
|
;************************
|
||||||
|
game_over:
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
peasant_text:
|
||||||
|
.byte 25,2,"Peasant's Quest",0
|
||||||
|
|
||||||
|
score_text:
|
||||||
|
.byte 0,2,"Score: 0 of 150",0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.include "decompress_fast_v2.s"
|
||||||
|
.include "wait_keypress.s"
|
||||||
|
|
||||||
|
.include "draw_peasant.s"
|
||||||
|
|
||||||
|
.include "hgr_font.s"
|
||||||
|
.include "draw_box.s"
|
||||||
|
.include "hgr_rectangle.s"
|
||||||
|
.include "hgr_7x30_sprite.s"
|
||||||
|
.include "hgr_1x5_sprite.s"
|
||||||
|
;.include "hgr_save_restore.s"
|
||||||
|
.include "hgr_partial_save.s"
|
||||||
|
.include "hgr_input.s"
|
||||||
|
.include "hgr_tables.s"
|
||||||
|
.include "hgr_text_box.s"
|
||||||
|
.include "clear_bottom.s"
|
||||||
|
|
||||||
|
.include "new_map_location.s"
|
||||||
|
|
||||||
|
.include "parse_input.s"
|
||||||
|
|
||||||
|
.include "keyboard.s"
|
||||||
|
|
||||||
|
.include "wait_a_bit.s"
|
||||||
|
|
||||||
|
.include "graphics/graphics_peasant1.inc"
|
||||||
|
|
||||||
|
|
||||||
|
help_message:
|
||||||
|
.byte 0,43,24, 0,253,82
|
||||||
|
.byte 8,41,"I don't understand. Type",13
|
||||||
|
.byte "HELP for assistances.",0
|
||||||
|
|
||||||
|
version_message:
|
||||||
|
.byte 0,43,24, 0,253,82
|
||||||
|
.byte 8,41,"APPLE ][ PEASANT'S QUEST",13
|
||||||
|
.byte "version 0.3",0
|
||||||
|
|
||||||
|
|
||||||
|
fake_error1:
|
||||||
|
.byte 0,43,24, 0,253,82
|
||||||
|
.byte 8,41,"?SYNTAX ERROR IN 1020",13
|
||||||
|
.byte "]",127,0
|
||||||
|
|
||||||
|
fake_error2:
|
||||||
|
.byte 0,43,24, 0,253,82
|
||||||
|
.byte 8,41,"?UNDEF'D STATEMENT ERROR",13
|
||||||
|
.byte "]",127,0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
map_backgrounds_low:
|
||||||
|
.byte <todo_lzsa ; 0
|
||||||
|
.byte <todo_lzsa ; 1
|
||||||
|
.byte <todo_lzsa ; 2
|
||||||
|
.byte <todo_lzsa ; 3 --
|
||||||
|
.byte <waterfall_lzsa ; 4 -- waterfall
|
||||||
|
; .byte <todo_lzsa ; 5
|
||||||
|
; .byte <todo_lzsa ; 6
|
||||||
|
; .byte <todo_lzsa ; 7
|
||||||
|
; .byte <river_lzsa ; 8 -- river
|
||||||
|
; .byte <knight_lzsa ; 9 -- knight
|
||||||
|
; .byte <todo_lzsa ; 10
|
||||||
|
; .byte <cottage_lzsa ; 11 -- cottage
|
||||||
|
; .byte <lake_w_lzsa ; 12 -- lake west
|
||||||
|
; .byte <lake_e_lzsa ; 13 -- lake east
|
||||||
|
; .byte <inn_lzsa ; 14 -- inn
|
||||||
|
; .byte <todo_lzsa ; 15
|
||||||
|
; .byte <todo_lzsa ; 16
|
||||||
|
; .byte <todo_lzsa ; 17
|
||||||
|
; .byte <lady_cottage_lzsa ; 18 -- cottage lady
|
||||||
|
; .byte <crooked_tree_lzsa ; 19 -- crooked tree
|
||||||
|
|
||||||
|
map_backgrounds_hi:
|
||||||
|
.byte >todo_lzsa ; 0
|
||||||
|
.byte >todo_lzsa ; 1
|
||||||
|
.byte >todo_lzsa ; 2
|
||||||
|
.byte >todo_lzsa ; 3
|
||||||
|
.byte >waterfall_lzsa ; 4 -- waterfall
|
||||||
|
; .byte >todo_lzsa ; 5
|
||||||
|
; .byte >todo_lzsa ; 6
|
||||||
|
; .byte >todo_lzsa ; 7
|
||||||
|
; .byte >river_lzsa ; 8 -- river
|
||||||
|
; .byte >knight_lzsa ; 9 -- knight
|
||||||
|
; .byte >todo_lzsa ; 10
|
||||||
|
; .byte >cottage_lzsa ; 11 -- cottage
|
||||||
|
; .byte >lake_w_lzsa ; 12 -- lake west
|
||||||
|
; .byte >lake_e_lzsa ; 13 -- lake east
|
||||||
|
; .byte >inn_lzsa ; 14 -- inn
|
||||||
|
; .byte >todo_lzsa ; 15
|
||||||
|
; .byte >todo_lzsa ; 16
|
||||||
|
; .byte >todo_lzsa ; 17
|
||||||
|
; .byte >lady_cottage_lzsa ; 18 -- cottage lady
|
||||||
|
; .byte >crooked_tree_lzsa ; 19 -- crooked tree
|
||||||
|
|
346
games/peasant/peasant2.s
Normal file
346
games/peasant/peasant2.s
Normal file
@ -0,0 +1,346 @@
|
|||||||
|
; Peasant's Quest
|
||||||
|
|
||||||
|
; Peasantry Part 2 (second line of map)
|
||||||
|
|
||||||
|
WHICH_PEASANTRY=1
|
||||||
|
|
||||||
|
; by Vince `deater` Weaver vince@deater.net
|
||||||
|
|
||||||
|
; with apologies to everyone
|
||||||
|
|
||||||
|
.include "hardware.inc"
|
||||||
|
.include "zp.inc"
|
||||||
|
|
||||||
|
.include "qload.inc"
|
||||||
|
|
||||||
|
|
||||||
|
peasant_quest:
|
||||||
|
lda #0
|
||||||
|
sta GAME_OVER
|
||||||
|
|
||||||
|
jsr hgr_make_tables
|
||||||
|
|
||||||
|
jsr HGR2 ; Hi-res graphics, no text at bottom
|
||||||
|
; Y=0, A=0 after this called
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta FRAME
|
||||||
|
|
||||||
|
; update map location
|
||||||
|
|
||||||
|
jsr update_map_location
|
||||||
|
|
||||||
|
|
||||||
|
;=============================
|
||||||
|
;=============================
|
||||||
|
; new screen location
|
||||||
|
;=============================
|
||||||
|
;=============================
|
||||||
|
|
||||||
|
new_location:
|
||||||
|
lda #0
|
||||||
|
sta GAME_OVER
|
||||||
|
|
||||||
|
;=====================
|
||||||
|
; load bg
|
||||||
|
|
||||||
|
; we are PEASANT2 so locations 5...9 map to 0...4
|
||||||
|
|
||||||
|
lda MAP_LOCATION
|
||||||
|
sec
|
||||||
|
sbc #5
|
||||||
|
tax
|
||||||
|
|
||||||
|
lda map_backgrounds_low,X
|
||||||
|
sta getsrc_smc+1
|
||||||
|
lda map_backgrounds_hi,X
|
||||||
|
sta getsrc_smc+2
|
||||||
|
|
||||||
|
lda #$40
|
||||||
|
|
||||||
|
jsr decompress_lzsa2_fast
|
||||||
|
|
||||||
|
; put peasant text
|
||||||
|
|
||||||
|
lda #<peasant_text
|
||||||
|
sta OUTL
|
||||||
|
lda #>peasant_text
|
||||||
|
sta OUTH
|
||||||
|
|
||||||
|
jsr hgr_put_string
|
||||||
|
|
||||||
|
; put score
|
||||||
|
|
||||||
|
lda #<score_text
|
||||||
|
sta OUTL
|
||||||
|
lda #>score_text
|
||||||
|
sta OUTH
|
||||||
|
|
||||||
|
jsr hgr_put_string
|
||||||
|
|
||||||
|
;====================
|
||||||
|
; save background
|
||||||
|
|
||||||
|
lda PEASANT_X
|
||||||
|
sta CURSOR_X
|
||||||
|
lda PEASANT_Y
|
||||||
|
sta CURSOR_Y
|
||||||
|
|
||||||
|
;=======================
|
||||||
|
; draw initial peasant
|
||||||
|
|
||||||
|
jsr save_bg_7x30
|
||||||
|
|
||||||
|
jsr draw_peasant
|
||||||
|
|
||||||
|
game_loop:
|
||||||
|
|
||||||
|
; redraw peasant if moved
|
||||||
|
|
||||||
|
lda PEASANT_XADD
|
||||||
|
ora PEASANT_YADD
|
||||||
|
beq peasant_the_same
|
||||||
|
|
||||||
|
; restore bg behind peasant
|
||||||
|
|
||||||
|
lda PEASANT_X
|
||||||
|
sta CURSOR_X
|
||||||
|
|
||||||
|
lda PEASANT_Y
|
||||||
|
sta CURSOR_Y
|
||||||
|
|
||||||
|
jsr restore_bg_7x30
|
||||||
|
|
||||||
|
; move peasant
|
||||||
|
|
||||||
|
clc
|
||||||
|
lda PEASANT_X
|
||||||
|
adc PEASANT_XADD
|
||||||
|
bmi peasant_x_negative
|
||||||
|
cmp #40
|
||||||
|
bcs peasant_x_toobig ; bge
|
||||||
|
bcc done_movex
|
||||||
|
|
||||||
|
;============================
|
||||||
|
peasant_x_toobig:
|
||||||
|
|
||||||
|
inc MAP_X
|
||||||
|
|
||||||
|
jsr new_map_location
|
||||||
|
|
||||||
|
lda #0 ; new X location
|
||||||
|
|
||||||
|
jmp done_movex
|
||||||
|
|
||||||
|
;============================
|
||||||
|
peasant_x_negative:
|
||||||
|
|
||||||
|
dec MAP_X
|
||||||
|
|
||||||
|
jsr new_map_location
|
||||||
|
|
||||||
|
lda #39 ; new X location
|
||||||
|
|
||||||
|
jmp done_movex
|
||||||
|
|
||||||
|
; check edge of screen
|
||||||
|
done_movex:
|
||||||
|
sta PEASANT_X
|
||||||
|
|
||||||
|
|
||||||
|
; Move Peasant Y
|
||||||
|
|
||||||
|
clc
|
||||||
|
lda PEASANT_Y
|
||||||
|
adc PEASANT_YADD
|
||||||
|
cmp #45
|
||||||
|
bcc peasant_y_negative ; blt
|
||||||
|
cmp #150
|
||||||
|
bcs peasant_y_toobig ; bge
|
||||||
|
bcc done_movey
|
||||||
|
|
||||||
|
|
||||||
|
;============================
|
||||||
|
peasant_y_toobig:
|
||||||
|
|
||||||
|
inc MAP_Y
|
||||||
|
|
||||||
|
jsr new_map_location
|
||||||
|
|
||||||
|
lda #45 ; new X location
|
||||||
|
|
||||||
|
jmp done_movey
|
||||||
|
|
||||||
|
|
||||||
|
;============================
|
||||||
|
peasant_y_negative:
|
||||||
|
|
||||||
|
dec MAP_Y
|
||||||
|
|
||||||
|
jsr new_map_location
|
||||||
|
|
||||||
|
lda #150 ; new X location
|
||||||
|
|
||||||
|
jmp done_movey
|
||||||
|
|
||||||
|
; check edge of screen
|
||||||
|
done_movey:
|
||||||
|
sta PEASANT_Y
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; save behind new position
|
||||||
|
|
||||||
|
lda PEASANT_X
|
||||||
|
sta CURSOR_X
|
||||||
|
|
||||||
|
lda PEASANT_Y
|
||||||
|
sta CURSOR_Y
|
||||||
|
|
||||||
|
jsr save_bg_7x30
|
||||||
|
|
||||||
|
; draw peasant
|
||||||
|
|
||||||
|
jsr draw_peasant
|
||||||
|
|
||||||
|
peasant_the_same:
|
||||||
|
|
||||||
|
inc FRAME
|
||||||
|
|
||||||
|
jsr check_keyboard
|
||||||
|
|
||||||
|
lda GAME_OVER
|
||||||
|
bmi oops_new_location
|
||||||
|
bne game_over
|
||||||
|
|
||||||
|
|
||||||
|
; delay
|
||||||
|
|
||||||
|
lda #200
|
||||||
|
jsr WAIT
|
||||||
|
|
||||||
|
|
||||||
|
jmp game_loop
|
||||||
|
|
||||||
|
oops_new_location:
|
||||||
|
jmp new_location
|
||||||
|
|
||||||
|
|
||||||
|
;************************
|
||||||
|
; exit level
|
||||||
|
;************************
|
||||||
|
game_over:
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
peasant_text:
|
||||||
|
.byte 25,2,"Peasant's Quest",0
|
||||||
|
|
||||||
|
score_text:
|
||||||
|
.byte 0,2,"Score: 0 of 150",0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.include "decompress_fast_v2.s"
|
||||||
|
.include "wait_keypress.s"
|
||||||
|
|
||||||
|
.include "draw_peasant.s"
|
||||||
|
|
||||||
|
.include "hgr_font.s"
|
||||||
|
.include "draw_box.s"
|
||||||
|
.include "hgr_rectangle.s"
|
||||||
|
.include "hgr_7x30_sprite.s"
|
||||||
|
.include "hgr_1x5_sprite.s"
|
||||||
|
;.include "hgr_save_restore.s"
|
||||||
|
.include "hgr_partial_save.s"
|
||||||
|
.include "hgr_input.s"
|
||||||
|
.include "hgr_tables.s"
|
||||||
|
.include "hgr_text_box.s"
|
||||||
|
.include "clear_bottom.s"
|
||||||
|
|
||||||
|
.include "new_map_location.s"
|
||||||
|
|
||||||
|
.include "parse_input.s"
|
||||||
|
|
||||||
|
.include "keyboard.s"
|
||||||
|
|
||||||
|
.include "wait_a_bit.s"
|
||||||
|
|
||||||
|
.include "graphics/graphics_peasant2.inc"
|
||||||
|
|
||||||
|
|
||||||
|
help_message:
|
||||||
|
.byte 0,43,24, 0,253,82
|
||||||
|
.byte 8,41,"I don't understand. Type",13
|
||||||
|
.byte "HELP for assistances.",0
|
||||||
|
|
||||||
|
version_message:
|
||||||
|
.byte 0,43,24, 0,253,82
|
||||||
|
.byte 8,41,"APPLE ][ PEASANT'S QUEST",13
|
||||||
|
.byte "version 0.3",0
|
||||||
|
|
||||||
|
|
||||||
|
fake_error1:
|
||||||
|
.byte 0,43,24, 0,253,82
|
||||||
|
.byte 8,41,"?SYNTAX ERROR IN 1020",13
|
||||||
|
.byte "]",127,0
|
||||||
|
|
||||||
|
fake_error2:
|
||||||
|
.byte 0,43,24, 0,253,82
|
||||||
|
.byte 8,41,"?UNDEF'D STATEMENT ERROR",13
|
||||||
|
.byte "]",127,0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
map_backgrounds_low:
|
||||||
|
; .byte <todo_lzsa ; 0
|
||||||
|
; .byte <todo_lzsa ; 1
|
||||||
|
; .byte <todo_lzsa ; 2
|
||||||
|
; .byte <waterfall_lzsa ; 3 -- temp intentional bug
|
||||||
|
; .byte <waterfall_lzsa ; 4 -- waterfall
|
||||||
|
.byte <todo_lzsa ; 5
|
||||||
|
.byte <todo_lzsa ; 6
|
||||||
|
.byte <todo_lzsa ; 7
|
||||||
|
.byte <river_lzsa ; 8 -- river
|
||||||
|
.byte <knight_lzsa ; 9 -- knight
|
||||||
|
; .byte <todo_lzsa ; 10
|
||||||
|
; .byte <cottage_lzsa ; 11 -- cottage
|
||||||
|
; .byte <lake_w_lzsa ; 12 -- lake west
|
||||||
|
; .byte <lake_e_lzsa ; 13 -- lake east
|
||||||
|
; .byte <inn_lzsa ; 14 -- inn
|
||||||
|
; .byte <todo_lzsa ; 15
|
||||||
|
; .byte <todo_lzsa ; 16
|
||||||
|
; .byte <todo_lzsa ; 17
|
||||||
|
; .byte <lady_cottage_lzsa ; 18 -- cottage lady
|
||||||
|
; .byte <crooked_tree_lzsa ; 19 -- crooked tree
|
||||||
|
|
||||||
|
map_backgrounds_hi:
|
||||||
|
; .byte >todo_lzsa ; 0
|
||||||
|
; .byte >todo_lzsa ; 1
|
||||||
|
; .byte >todo_lzsa ; 2
|
||||||
|
; .byte >todo_lzsa ; 3
|
||||||
|
; .byte >waterfall_lzsa ; 4 -- waterfall
|
||||||
|
.byte >todo_lzsa ; 5
|
||||||
|
.byte >todo_lzsa ; 6
|
||||||
|
.byte >todo_lzsa ; 7
|
||||||
|
.byte >river_lzsa ; 8 -- river
|
||||||
|
.byte >knight_lzsa ; 9 -- knight
|
||||||
|
; .byte >todo_lzsa ; 10
|
||||||
|
; .byte >cottage_lzsa ; 11 -- cottage
|
||||||
|
; .byte >lake_w_lzsa ; 12 -- lake west
|
||||||
|
; .byte >lake_e_lzsa ; 13 -- lake east
|
||||||
|
; .byte >inn_lzsa ; 14 -- inn
|
||||||
|
; .byte >todo_lzsa ; 15
|
||||||
|
; .byte >todo_lzsa ; 16
|
||||||
|
; .byte >todo_lzsa ; 17
|
||||||
|
; .byte >lady_cottage_lzsa ; 18 -- cottage lady
|
||||||
|
; .byte >crooked_tree_lzsa ; 19 -- crooked tree
|
||||||
|
|
@ -1,4 +1,8 @@
|
|||||||
; A Peasant's Quest????
|
; Peasant's Quest
|
||||||
|
|
||||||
|
; Peasantry Part 3 (third line of map)
|
||||||
|
|
||||||
|
WHICH_PEASANTRY = 2
|
||||||
|
|
||||||
; by Vince `deater` Weaver vince@deater.net
|
; by Vince `deater` Weaver vince@deater.net
|
||||||
|
|
||||||
@ -10,9 +14,6 @@
|
|||||||
.include "qload.inc"
|
.include "qload.inc"
|
||||||
|
|
||||||
|
|
||||||
ENDING_COPY = 1
|
|
||||||
|
|
||||||
|
|
||||||
peasant_quest:
|
peasant_quest:
|
||||||
lda #0
|
lda #0
|
||||||
sta GAME_OVER
|
sta GAME_OVER
|
||||||
@ -29,28 +30,8 @@ peasant_quest:
|
|||||||
lda #0
|
lda #0
|
||||||
sta FRAME
|
sta FRAME
|
||||||
|
|
||||||
;=========================
|
; update map location
|
||||||
; init peasant position
|
|
||||||
; draw at 18,107
|
|
||||||
|
|
||||||
lda #18
|
|
||||||
sta PEASANT_X
|
|
||||||
lda #107
|
|
||||||
sta PEASANT_Y
|
|
||||||
|
|
||||||
lda #PEASANT_DIR_RIGHT
|
|
||||||
sta PEASANT_DIR
|
|
||||||
|
|
||||||
lda #0
|
|
||||||
sta PEASANT_XADD
|
|
||||||
sta PEASANT_YADD
|
|
||||||
|
|
||||||
; setup map location
|
|
||||||
|
|
||||||
lda #4
|
|
||||||
sta MAP_X
|
|
||||||
lda #1
|
|
||||||
sta MAP_Y
|
|
||||||
jsr update_map_location
|
jsr update_map_location
|
||||||
|
|
||||||
|
|
||||||
@ -67,7 +48,13 @@ new_location:
|
|||||||
;=====================
|
;=====================
|
||||||
; load bg
|
; load bg
|
||||||
|
|
||||||
ldx MAP_LOCATION
|
; we are PEASANT3 so locations 10...14 map to 0...4, no change
|
||||||
|
|
||||||
|
lda MAP_LOCATION
|
||||||
|
sec
|
||||||
|
sbc #10
|
||||||
|
tax
|
||||||
|
|
||||||
lda map_backgrounds_low,X
|
lda map_backgrounds_low,X
|
||||||
sta getsrc_smc+1
|
sta getsrc_smc+1
|
||||||
lda map_backgrounds_hi,X
|
lda map_backgrounds_hi,X
|
||||||
@ -95,13 +82,6 @@ new_location:
|
|||||||
|
|
||||||
jsr hgr_put_string
|
jsr hgr_put_string
|
||||||
|
|
||||||
|
|
||||||
; draw rectangle on bottom
|
|
||||||
|
|
||||||
; jsr clear_bottom
|
|
||||||
|
|
||||||
; jsr hgr_save
|
|
||||||
|
|
||||||
;====================
|
;====================
|
||||||
; save background
|
; save background
|
||||||
|
|
||||||
@ -230,9 +210,6 @@ done_movey:
|
|||||||
|
|
||||||
peasant_the_same:
|
peasant_the_same:
|
||||||
|
|
||||||
; lda #3
|
|
||||||
; jsr wait_a_bit
|
|
||||||
|
|
||||||
inc FRAME
|
inc FRAME
|
||||||
|
|
||||||
jsr check_keyboard
|
jsr check_keyboard
|
||||||
@ -255,13 +232,9 @@ oops_new_location:
|
|||||||
|
|
||||||
|
|
||||||
;************************
|
;************************
|
||||||
; copy protection check
|
; exit level
|
||||||
;************************
|
;************************
|
||||||
game_over:
|
game_over:
|
||||||
exit_copy_check:
|
|
||||||
lda #LOAD_COPY_CHECK
|
|
||||||
sta WHICH_LOAD
|
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
@ -274,66 +247,6 @@ score_text:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
parse_input:
|
|
||||||
; jsr hgr_save
|
|
||||||
|
|
||||||
lda input_buffer ; get first char FIXME
|
|
||||||
and #$DF ; make uppercase 0110 0001 -> 0100 0001
|
|
||||||
|
|
||||||
parse_copy:
|
|
||||||
cmp #'C'
|
|
||||||
bne parse_look
|
|
||||||
|
|
||||||
; want copy
|
|
||||||
lda #ENDING_COPY
|
|
||||||
sta GAME_OVER
|
|
||||||
jmp done_parse_message
|
|
||||||
|
|
||||||
|
|
||||||
parse_look:
|
|
||||||
cmp #'L'
|
|
||||||
bne parse_talk
|
|
||||||
|
|
||||||
lda #<fake_error1
|
|
||||||
sta OUTL
|
|
||||||
lda #>fake_error1
|
|
||||||
jmp finish_parse_message
|
|
||||||
|
|
||||||
|
|
||||||
parse_talk:
|
|
||||||
cmp #'T'
|
|
||||||
bne parse_version
|
|
||||||
|
|
||||||
lda #<fake_error2
|
|
||||||
sta OUTL
|
|
||||||
lda #>fake_error2
|
|
||||||
jmp finish_parse_message
|
|
||||||
|
|
||||||
|
|
||||||
parse_version:
|
|
||||||
cmp #'V'
|
|
||||||
bne parse_help
|
|
||||||
|
|
||||||
lda #<version_message
|
|
||||||
sta OUTL
|
|
||||||
lda #>version_message
|
|
||||||
jmp finish_parse_message
|
|
||||||
|
|
||||||
parse_help:
|
|
||||||
lda #<help_message
|
|
||||||
sta OUTL
|
|
||||||
lda #>help_message
|
|
||||||
|
|
||||||
finish_parse_message:
|
|
||||||
sta OUTH
|
|
||||||
jsr hgr_text_box
|
|
||||||
|
|
||||||
jsr wait_until_keypress
|
|
||||||
|
|
||||||
done_parse_message:
|
|
||||||
jsr hgr_partial_restore
|
|
||||||
|
|
||||||
rts
|
|
||||||
|
|
||||||
.include "decompress_fast_v2.s"
|
.include "decompress_fast_v2.s"
|
||||||
.include "wait_keypress.s"
|
.include "wait_keypress.s"
|
||||||
@ -350,12 +263,17 @@ done_parse_message:
|
|||||||
.include "hgr_input.s"
|
.include "hgr_input.s"
|
||||||
.include "hgr_tables.s"
|
.include "hgr_tables.s"
|
||||||
.include "hgr_text_box.s"
|
.include "hgr_text_box.s"
|
||||||
|
.include "clear_bottom.s"
|
||||||
|
|
||||||
|
.include "new_map_location.s"
|
||||||
|
|
||||||
|
.include "parse_input.s"
|
||||||
|
|
||||||
.include "keyboard.s"
|
.include "keyboard.s"
|
||||||
|
|
||||||
.include "wait_a_bit.s"
|
.include "wait_a_bit.s"
|
||||||
|
|
||||||
.include "graphics/graphics.inc"
|
.include "graphics/graphics_peasant3.inc"
|
||||||
|
|
||||||
|
|
||||||
help_message:
|
help_message:
|
||||||
@ -380,128 +298,48 @@ fake_error2:
|
|||||||
.byte "]",127,0
|
.byte "]",127,0
|
||||||
|
|
||||||
|
|
||||||
clear_bottom:
|
|
||||||
; draw rectangle
|
|
||||||
|
|
||||||
lda #$00 ; color is black1
|
|
||||||
sta VGI_RCOLOR
|
|
||||||
|
|
||||||
lda #0
|
|
||||||
sta VGI_RX1
|
|
||||||
lda #183
|
|
||||||
sta VGI_RY1
|
|
||||||
lda #140
|
|
||||||
sta VGI_RXRUN
|
|
||||||
lda #9
|
|
||||||
sta VGI_RYRUN
|
|
||||||
|
|
||||||
jsr vgi_simple_rectangle
|
|
||||||
|
|
||||||
lda #140
|
|
||||||
sta VGI_RX1
|
|
||||||
lda #183
|
|
||||||
sta VGI_RY1
|
|
||||||
lda #140
|
|
||||||
sta VGI_RXRUN
|
|
||||||
lda #9
|
|
||||||
sta VGI_RYRUN
|
|
||||||
|
|
||||||
jsr vgi_simple_rectangle
|
|
||||||
|
|
||||||
rts
|
|
||||||
|
|
||||||
|
|
||||||
;=====================
|
|
||||||
;
|
|
||||||
;=====================
|
|
||||||
new_map_location:
|
|
||||||
lda #$FF
|
|
||||||
sta GAME_OVER
|
|
||||||
|
|
||||||
; fall through
|
|
||||||
|
|
||||||
;==================
|
|
||||||
; update map
|
|
||||||
; on main map, it's (MAP_Y*5)+MAP_X
|
|
||||||
update_map_location:
|
|
||||||
; put in map
|
|
||||||
|
|
||||||
map_wrap_x:
|
|
||||||
; wrap X (0..4)
|
|
||||||
lda MAP_X
|
|
||||||
bmi map_x_went_negative
|
|
||||||
cmp #5
|
|
||||||
bcc map_wrap_y ; blt
|
|
||||||
|
|
||||||
lda #0
|
|
||||||
beq update_map_x ; bra
|
|
||||||
|
|
||||||
map_x_went_negative:
|
|
||||||
lda #4
|
|
||||||
|
|
||||||
update_map_x:
|
|
||||||
sta MAP_X
|
|
||||||
|
|
||||||
map_wrap_y:
|
|
||||||
|
|
||||||
; wrap Y (0..3)
|
|
||||||
lda MAP_Y
|
|
||||||
and #$3
|
|
||||||
sta MAP_Y
|
|
||||||
|
|
||||||
clc
|
|
||||||
lda MAP_Y
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
adc MAP_Y
|
|
||||||
adc MAP_X
|
|
||||||
|
|
||||||
sta MAP_LOCATION
|
|
||||||
|
|
||||||
rts
|
|
||||||
|
|
||||||
|
|
||||||
map_backgrounds_low:
|
map_backgrounds_low:
|
||||||
.byte <todo_lzsa ; 0
|
; .byte <todo_lzsa ; 0
|
||||||
.byte <todo_lzsa ; 1
|
; .byte <todo_lzsa ; 1
|
||||||
.byte <todo_lzsa ; 2
|
; .byte <todo_lzsa ; 2
|
||||||
.byte <waterfall_lzsa ; 3 -- temp intentional bug
|
; .byte <waterfall_lzsa ; 3 -- temp intentional bug
|
||||||
.byte <waterfall_lzsa ; 4 -- waterfall
|
; .byte <waterfall_lzsa ; 4 -- waterfall
|
||||||
.byte <todo_lzsa ; 5
|
; .byte <todo_lzsa ; 5
|
||||||
.byte <todo_lzsa ; 6
|
; .byte <todo_lzsa ; 6
|
||||||
.byte <todo_lzsa ; 7
|
; .byte <todo_lzsa ; 7
|
||||||
.byte <river_lzsa ; 8 -- river
|
; .byte <river_lzsa ; 8 -- river
|
||||||
.byte <knight_lzsa ; 9 -- knight
|
; .byte <knight_lzsa ; 9 -- knight
|
||||||
.byte <todo_lzsa ; 10
|
.byte <todo_lzsa ; 10
|
||||||
.byte <cottage_lzsa ; 11 -- cottage
|
.byte <cottage_lzsa ; 11 -- cottage
|
||||||
.byte <lake_w_lzsa ; 12 -- lake west
|
.byte <lake_w_lzsa ; 12 -- lake west
|
||||||
.byte <lake_e_lzsa ; 13 -- lake east
|
.byte <lake_e_lzsa ; 13 -- lake east
|
||||||
.byte <inn_lzsa ; 14 -- inn
|
.byte <inn_lzsa ; 14 -- inn
|
||||||
.byte <todo_lzsa ; 15
|
; .byte <todo_lzsa ; 15
|
||||||
.byte <todo_lzsa ; 16
|
; .byte <todo_lzsa ; 16
|
||||||
.byte <todo_lzsa ; 17
|
; .byte <todo_lzsa ; 17
|
||||||
.byte <todo_lzsa ; 18
|
; .byte <lady_cottage_lzsa ; 18 -- cottage lady
|
||||||
.byte <crooked_tree_lzsa ; 19 -- crooked tree
|
; .byte <crooked_tree_lzsa ; 19 -- crooked tree
|
||||||
|
|
||||||
map_backgrounds_hi:
|
map_backgrounds_hi:
|
||||||
.byte >todo_lzsa ; 0
|
; .byte >todo_lzsa ; 0
|
||||||
.byte >todo_lzsa ; 1
|
; .byte >todo_lzsa ; 1
|
||||||
.byte >todo_lzsa ; 2
|
; .byte >todo_lzsa ; 2
|
||||||
.byte >todo_lzsa ; 3
|
; .byte >todo_lzsa ; 3
|
||||||
.byte >waterfall_lzsa ; 4 -- waterfall
|
; .byte >waterfall_lzsa ; 4 -- waterfall
|
||||||
.byte >todo_lzsa ; 5
|
; .byte >todo_lzsa ; 5
|
||||||
.byte >todo_lzsa ; 6
|
; .byte >todo_lzsa ; 6
|
||||||
.byte >todo_lzsa ; 7
|
; .byte >todo_lzsa ; 7
|
||||||
.byte >river_lzsa ; 8 -- river
|
; .byte >river_lzsa ; 8 -- river
|
||||||
.byte >knight_lzsa ; 9 -- knight
|
; .byte >knight_lzsa ; 9 -- knight
|
||||||
.byte >todo_lzsa ; 10
|
.byte >todo_lzsa ; 10
|
||||||
.byte >cottage_lzsa ; 11 -- cottage
|
.byte >cottage_lzsa ; 11 -- cottage
|
||||||
.byte >lake_w_lzsa ; 12 -- lake west
|
.byte >lake_w_lzsa ; 12 -- lake west
|
||||||
.byte >lake_e_lzsa ; 13 -- lake east
|
.byte >lake_e_lzsa ; 13 -- lake east
|
||||||
.byte >inn_lzsa ; 14 -- inn
|
.byte >inn_lzsa ; 14 -- inn
|
||||||
.byte >todo_lzsa ; 15
|
; .byte >todo_lzsa ; 15
|
||||||
.byte >todo_lzsa ; 16
|
; .byte >todo_lzsa ; 16
|
||||||
.byte >todo_lzsa ; 17
|
; .byte >todo_lzsa ; 17
|
||||||
.byte >todo_lzsa ; 18
|
; .byte >lady_cottage_lzsa ; 18 -- cottage lady
|
||||||
.byte >crooked_tree_lzsa ; 19 -- crooked tree
|
; .byte >crooked_tree_lzsa ; 19 -- crooked tree
|
||||||
|
|
345
games/peasant/peasant4.s
Normal file
345
games/peasant/peasant4.s
Normal file
@ -0,0 +1,345 @@
|
|||||||
|
; Peasant's Quest
|
||||||
|
|
||||||
|
; Peasantry Part 4 (bottom line of map)
|
||||||
|
|
||||||
|
WHICH_PEASANTRY = 3
|
||||||
|
|
||||||
|
; by Vince `deater` Weaver vince@deater.net
|
||||||
|
|
||||||
|
; with apologies to everyone
|
||||||
|
|
||||||
|
.include "hardware.inc"
|
||||||
|
.include "zp.inc"
|
||||||
|
|
||||||
|
.include "qload.inc"
|
||||||
|
|
||||||
|
|
||||||
|
peasant_quest:
|
||||||
|
lda #0
|
||||||
|
sta GAME_OVER
|
||||||
|
|
||||||
|
jsr hgr_make_tables
|
||||||
|
|
||||||
|
jsr HGR2 ; Hi-res graphics, no text at bottom
|
||||||
|
; Y=0, A=0 after this called
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta FRAME
|
||||||
|
|
||||||
|
; update map location
|
||||||
|
|
||||||
|
jsr update_map_location
|
||||||
|
|
||||||
|
|
||||||
|
;=============================
|
||||||
|
;=============================
|
||||||
|
; new screen location
|
||||||
|
;=============================
|
||||||
|
;=============================
|
||||||
|
|
||||||
|
new_location:
|
||||||
|
lda #0
|
||||||
|
sta GAME_OVER
|
||||||
|
|
||||||
|
;=====================
|
||||||
|
; load bg
|
||||||
|
|
||||||
|
; we are PEASANT1 so locations 15...19 map to 0...4, no change
|
||||||
|
|
||||||
|
lda MAP_LOCATION
|
||||||
|
sec
|
||||||
|
sbc #15
|
||||||
|
tax
|
||||||
|
|
||||||
|
lda map_backgrounds_low,X
|
||||||
|
sta getsrc_smc+1
|
||||||
|
lda map_backgrounds_hi,X
|
||||||
|
sta getsrc_smc+2
|
||||||
|
|
||||||
|
lda #$40
|
||||||
|
|
||||||
|
jsr decompress_lzsa2_fast
|
||||||
|
|
||||||
|
; put peasant text
|
||||||
|
|
||||||
|
lda #<peasant_text
|
||||||
|
sta OUTL
|
||||||
|
lda #>peasant_text
|
||||||
|
sta OUTH
|
||||||
|
|
||||||
|
jsr hgr_put_string
|
||||||
|
|
||||||
|
; put score
|
||||||
|
|
||||||
|
lda #<score_text
|
||||||
|
sta OUTL
|
||||||
|
lda #>score_text
|
||||||
|
sta OUTH
|
||||||
|
|
||||||
|
jsr hgr_put_string
|
||||||
|
|
||||||
|
;====================
|
||||||
|
; save background
|
||||||
|
|
||||||
|
lda PEASANT_X
|
||||||
|
sta CURSOR_X
|
||||||
|
lda PEASANT_Y
|
||||||
|
sta CURSOR_Y
|
||||||
|
|
||||||
|
;=======================
|
||||||
|
; draw initial peasant
|
||||||
|
|
||||||
|
jsr save_bg_7x30
|
||||||
|
|
||||||
|
jsr draw_peasant
|
||||||
|
|
||||||
|
game_loop:
|
||||||
|
|
||||||
|
; redraw peasant if moved
|
||||||
|
|
||||||
|
lda PEASANT_XADD
|
||||||
|
ora PEASANT_YADD
|
||||||
|
beq peasant_the_same
|
||||||
|
|
||||||
|
; restore bg behind peasant
|
||||||
|
|
||||||
|
lda PEASANT_X
|
||||||
|
sta CURSOR_X
|
||||||
|
|
||||||
|
lda PEASANT_Y
|
||||||
|
sta CURSOR_Y
|
||||||
|
|
||||||
|
jsr restore_bg_7x30
|
||||||
|
|
||||||
|
; move peasant
|
||||||
|
|
||||||
|
clc
|
||||||
|
lda PEASANT_X
|
||||||
|
adc PEASANT_XADD
|
||||||
|
bmi peasant_x_negative
|
||||||
|
cmp #40
|
||||||
|
bcs peasant_x_toobig ; bge
|
||||||
|
bcc done_movex
|
||||||
|
|
||||||
|
;============================
|
||||||
|
peasant_x_toobig:
|
||||||
|
|
||||||
|
inc MAP_X
|
||||||
|
|
||||||
|
jsr new_map_location
|
||||||
|
|
||||||
|
lda #0 ; new X location
|
||||||
|
|
||||||
|
jmp done_movex
|
||||||
|
|
||||||
|
;============================
|
||||||
|
peasant_x_negative:
|
||||||
|
|
||||||
|
dec MAP_X
|
||||||
|
|
||||||
|
jsr new_map_location
|
||||||
|
|
||||||
|
lda #39 ; new X location
|
||||||
|
|
||||||
|
jmp done_movex
|
||||||
|
|
||||||
|
; check edge of screen
|
||||||
|
done_movex:
|
||||||
|
sta PEASANT_X
|
||||||
|
|
||||||
|
|
||||||
|
; Move Peasant Y
|
||||||
|
|
||||||
|
clc
|
||||||
|
lda PEASANT_Y
|
||||||
|
adc PEASANT_YADD
|
||||||
|
cmp #45
|
||||||
|
bcc peasant_y_negative ; blt
|
||||||
|
cmp #150
|
||||||
|
bcs peasant_y_toobig ; bge
|
||||||
|
bcc done_movey
|
||||||
|
|
||||||
|
|
||||||
|
;============================
|
||||||
|
peasant_y_toobig:
|
||||||
|
|
||||||
|
inc MAP_Y
|
||||||
|
|
||||||
|
jsr new_map_location
|
||||||
|
|
||||||
|
lda #45 ; new X location
|
||||||
|
|
||||||
|
jmp done_movey
|
||||||
|
|
||||||
|
|
||||||
|
;============================
|
||||||
|
peasant_y_negative:
|
||||||
|
|
||||||
|
dec MAP_Y
|
||||||
|
|
||||||
|
jsr new_map_location
|
||||||
|
|
||||||
|
lda #150 ; new X location
|
||||||
|
|
||||||
|
jmp done_movey
|
||||||
|
|
||||||
|
; check edge of screen
|
||||||
|
done_movey:
|
||||||
|
sta PEASANT_Y
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; save behind new position
|
||||||
|
|
||||||
|
lda PEASANT_X
|
||||||
|
sta CURSOR_X
|
||||||
|
|
||||||
|
lda PEASANT_Y
|
||||||
|
sta CURSOR_Y
|
||||||
|
|
||||||
|
jsr save_bg_7x30
|
||||||
|
|
||||||
|
; draw peasant
|
||||||
|
|
||||||
|
jsr draw_peasant
|
||||||
|
|
||||||
|
peasant_the_same:
|
||||||
|
|
||||||
|
inc FRAME
|
||||||
|
|
||||||
|
jsr check_keyboard
|
||||||
|
|
||||||
|
lda GAME_OVER
|
||||||
|
bmi oops_new_location
|
||||||
|
bne game_over
|
||||||
|
|
||||||
|
|
||||||
|
; delay
|
||||||
|
|
||||||
|
lda #200
|
||||||
|
jsr WAIT
|
||||||
|
|
||||||
|
|
||||||
|
jmp game_loop
|
||||||
|
|
||||||
|
oops_new_location:
|
||||||
|
jmp new_location
|
||||||
|
|
||||||
|
|
||||||
|
;************************
|
||||||
|
; exit level
|
||||||
|
;************************
|
||||||
|
game_over:
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
peasant_text:
|
||||||
|
.byte 25,2,"Peasant's Quest",0
|
||||||
|
|
||||||
|
score_text:
|
||||||
|
.byte 0,2,"Score: 0 of 150",0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.include "decompress_fast_v2.s"
|
||||||
|
.include "wait_keypress.s"
|
||||||
|
|
||||||
|
.include "draw_peasant.s"
|
||||||
|
|
||||||
|
.include "hgr_font.s"
|
||||||
|
.include "draw_box.s"
|
||||||
|
.include "hgr_rectangle.s"
|
||||||
|
.include "hgr_7x30_sprite.s"
|
||||||
|
.include "hgr_1x5_sprite.s"
|
||||||
|
;.include "hgr_save_restore.s"
|
||||||
|
.include "hgr_partial_save.s"
|
||||||
|
.include "hgr_input.s"
|
||||||
|
.include "hgr_tables.s"
|
||||||
|
.include "hgr_text_box.s"
|
||||||
|
.include "clear_bottom.s"
|
||||||
|
|
||||||
|
.include "new_map_location.s"
|
||||||
|
|
||||||
|
.include "parse_input.s"
|
||||||
|
|
||||||
|
.include "keyboard.s"
|
||||||
|
|
||||||
|
.include "wait_a_bit.s"
|
||||||
|
|
||||||
|
.include "graphics/graphics_peasant4.inc"
|
||||||
|
|
||||||
|
|
||||||
|
help_message:
|
||||||
|
.byte 0,43,24, 0,253,82
|
||||||
|
.byte 8,41,"I don't understand. Type",13
|
||||||
|
.byte "HELP for assistances.",0
|
||||||
|
|
||||||
|
version_message:
|
||||||
|
.byte 0,43,24, 0,253,82
|
||||||
|
.byte 8,41,"APPLE ][ PEASANT'S QUEST",13
|
||||||
|
.byte "version 0.3",0
|
||||||
|
|
||||||
|
|
||||||
|
fake_error1:
|
||||||
|
.byte 0,43,24, 0,253,82
|
||||||
|
.byte 8,41,"?SYNTAX ERROR IN 1020",13
|
||||||
|
.byte "]",127,0
|
||||||
|
|
||||||
|
fake_error2:
|
||||||
|
.byte 0,43,24, 0,253,82
|
||||||
|
.byte 8,41,"?UNDEF'D STATEMENT ERROR",13
|
||||||
|
.byte "]",127,0
|
||||||
|
|
||||||
|
|
||||||
|
map_backgrounds_low:
|
||||||
|
; .byte <todo_lzsa ; 0
|
||||||
|
; .byte <todo_lzsa ; 1
|
||||||
|
; .byte <todo_lzsa ; 2
|
||||||
|
; .byte <waterfall_lzsa ; 3 -- temp intentional bug
|
||||||
|
; .byte <waterfall_lzsa ; 4 -- waterfall
|
||||||
|
; .byte <todo_lzsa ; 5
|
||||||
|
; .byte <todo_lzsa ; 6
|
||||||
|
; .byte <todo_lzsa ; 7
|
||||||
|
; .byte <river_lzsa ; 8 -- river
|
||||||
|
; .byte <knight_lzsa ; 9 -- knight
|
||||||
|
; .byte <todo_lzsa ; 10
|
||||||
|
; .byte <cottage_lzsa ; 11 -- cottage
|
||||||
|
; .byte <lake_w_lzsa ; 12 -- lake west
|
||||||
|
; .byte <lake_e_lzsa ; 13 -- lake east
|
||||||
|
; .byte <inn_lzsa ; 14 -- inn
|
||||||
|
.byte <todo_lzsa ; 15
|
||||||
|
.byte <todo_lzsa ; 16
|
||||||
|
.byte <todo_lzsa ; 17
|
||||||
|
.byte <lady_cottage_lzsa ; 18 -- cottage lady
|
||||||
|
.byte <crooked_tree_lzsa ; 19 -- crooked tree
|
||||||
|
|
||||||
|
map_backgrounds_hi:
|
||||||
|
; .byte >todo_lzsa ; 0
|
||||||
|
; .byte >todo_lzsa ; 1
|
||||||
|
; .byte >todo_lzsa ; 2
|
||||||
|
; .byte >todo_lzsa ; 3
|
||||||
|
; .byte >waterfall_lzsa ; 4 -- waterfall
|
||||||
|
; .byte >todo_lzsa ; 5
|
||||||
|
; .byte >todo_lzsa ; 6
|
||||||
|
; .byte >todo_lzsa ; 7
|
||||||
|
; .byte >river_lzsa ; 8 -- river
|
||||||
|
; .byte >knight_lzsa ; 9 -- knight
|
||||||
|
; .byte >todo_lzsa ; 10
|
||||||
|
; .byte >cottage_lzsa ; 11 -- cottage
|
||||||
|
; .byte >lake_w_lzsa ; 12 -- lake west
|
||||||
|
; .byte >lake_e_lzsa ; 13 -- lake east
|
||||||
|
; .byte >inn_lzsa ; 14 -- inn
|
||||||
|
.byte >todo_lzsa ; 15
|
||||||
|
.byte >todo_lzsa ; 16
|
||||||
|
.byte >todo_lzsa ; 17
|
||||||
|
.byte >lady_cottage_lzsa ; 18 -- cottage lady
|
||||||
|
.byte >crooked_tree_lzsa ; 19 -- crooked tree
|
||||||
|
|
@ -189,7 +189,7 @@ error_string:
|
|||||||
|
|
||||||
which_disk_array:
|
which_disk_array:
|
||||||
.byte 1,1,1,1 ; VID_LOGO, TITLE, INTRO. COPY_CHECK
|
.byte 1,1,1,1 ; VID_LOGO, TITLE, INTRO. COPY_CHECK
|
||||||
.byte 1,1,3,2 ; PEASANT
|
.byte 1,1,1,1 ; PEASANT1, PEASANT2, PEASANT3, PEASANT4
|
||||||
.byte 2,1,2,2 ;
|
.byte 2,1,2,2 ;
|
||||||
.byte 1,1,1,3 ;
|
.byte 1,1,1,3 ;
|
||||||
.byte 1 ;
|
.byte 1 ;
|
||||||
@ -198,7 +198,7 @@ which_disk_array:
|
|||||||
|
|
||||||
load_address_array:
|
load_address_array:
|
||||||
.byte $60,$60,$60,$60 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
|
.byte $60,$60,$60,$60 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
|
||||||
.byte $60,$40,$40,$40 ; PEASANT
|
.byte $60,$60,$60,$60 ; PEASANT1, PEASANT2, PEASANT3, PEASANT4
|
||||||
.byte $40,$40,$40,$40 ;
|
.byte $40,$40,$40,$40 ;
|
||||||
.byte $40,$40,$40,$40 ;
|
.byte $40,$40,$40,$40 ;
|
||||||
.byte $08 ;
|
.byte $08 ;
|
||||||
@ -208,7 +208,7 @@ load_address_array:
|
|||||||
|
|
||||||
track_array:
|
track_array:
|
||||||
.byte 3, 5, 8,12 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
|
.byte 3, 5, 8,12 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
|
||||||
.byte 14,31,11, 1 ; PEASANT
|
.byte 14,19,24,29 ; PEASANT1, PEASANT2, PEASANT3, PEASANT4
|
||||||
.byte 27,26,10,20 ;
|
.byte 27,26,10,20 ;
|
||||||
.byte 30,32,28,30 ;
|
.byte 30,32,28,30 ;
|
||||||
.byte 0 ;
|
.byte 0 ;
|
||||||
@ -217,7 +217,7 @@ track_array:
|
|||||||
|
|
||||||
sector_array:
|
sector_array:
|
||||||
.byte 0, 0, 0, 0 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
|
.byte 0, 0, 0, 0 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
|
||||||
.byte 0, 0, 0, 0 ; PEASANT
|
.byte 0, 0, 0, 0 ; PEASANT1, PEASANT2, PEASANT3, PEASANT4
|
||||||
.byte 0, 0, 0, 0 ;
|
.byte 0, 0, 0, 0 ;
|
||||||
.byte 0,13, 0, 1 ;
|
.byte 0,13, 0, 1 ;
|
||||||
.byte 6 ;
|
.byte 6 ;
|
||||||
@ -226,7 +226,7 @@ sector_array:
|
|||||||
|
|
||||||
length_array:
|
length_array:
|
||||||
.byte 28, 50, 60, 20 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
|
.byte 28, 50, 60, 20 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
|
||||||
.byte 88, 20,158,135 ; PEASANT
|
.byte 80, 80, 80, 80 ; PEASANT1, PEASANT2, PEASANT3, PEASANT4
|
||||||
.byte 61, 31,159,109 ;
|
.byte 61, 31,159,109 ;
|
||||||
.byte 20, 33, 27, 78 ;
|
.byte 20, 33, 27, 78 ;
|
||||||
.byte 3 ;
|
.byte 3 ;
|
||||||
|
@ -29,6 +29,8 @@ SAVED_X = $69
|
|||||||
PEASANT_XADD = $6A
|
PEASANT_XADD = $6A
|
||||||
PEASANT_YADD = $6B
|
PEASANT_YADD = $6B
|
||||||
GAME_OVER = $6C
|
GAME_OVER = $6C
|
||||||
|
NEW_LOCATION = $FF
|
||||||
|
NEW_FROM_DISK = $01
|
||||||
MAP_X = $6D
|
MAP_X = $6D
|
||||||
MAP_Y = $6E
|
MAP_Y = $6E
|
||||||
MAP_LOCATION = $6F
|
MAP_LOCATION = $6F
|
||||||
@ -107,7 +109,10 @@ LOAD_VID_LOGO = 0
|
|||||||
LOAD_TITLE = 1
|
LOAD_TITLE = 1
|
||||||
LOAD_INTRO = 2
|
LOAD_INTRO = 2
|
||||||
LOAD_COPY_CHECK = 3
|
LOAD_COPY_CHECK = 3
|
||||||
LOAD_PEASANT = 4
|
LOAD_PEASANT1 = 4
|
||||||
|
LOAD_PEASANT2 = 5
|
||||||
|
LOAD_PEASANT3 = 6
|
||||||
|
LOAD_PEASANT4 = 7
|
||||||
|
|
||||||
VGI_RCOLOR = P0
|
VGI_RCOLOR = P0
|
||||||
VGI_RX1 = P1
|
VGI_RX1 = P1
|
||||||
|
Loading…
Reference in New Issue
Block a user