mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-03-10 14:32:34 +00:00
peasant: hook up the new "next level" code
this was in preparation to getting the going-inside-buildings code working that still doesn't work for unknown reasons
This commit is contained in:
parent
99558c2ac9
commit
b4b5650fd6
@ -31,11 +31,13 @@ peasant.dsk: QBOOT QLOAD VID_LOGO TITLE INTRO \
|
||||
$(DOS33_RAW) peasant.dsk 25 0 PEASANT3 0 0
|
||||
$(DOS33_RAW) peasant.dsk 30 0 PEASANT4 0 0
|
||||
|
||||
peasant_side2.dsk: WBOOT2 COPY_CHECK TROGDOR ENDING CLIFF GAME_OVER
|
||||
peasant_side2.dsk: WBOOT2 COPY_CHECK TROGDOR ENDING CLIFF GAME_OVER INSIDE
|
||||
cp $(EMPTY_DISK)/empty.dsk peasant_side2.dsk
|
||||
$(DOS33_RAW) peasant_side2.dsk 0 0 WBOOT2 0 1
|
||||
$(DOS33_RAW) peasant_side2.dsk 1 0 COPY_CHECK 0 0
|
||||
$(DOS33_RAW) peasant_side2.dsk 3 0 GAME_OVER 0 0
|
||||
# $(DOS33_RAW) peasant_side2.dsk 4 0 MAP 0 0
|
||||
$(DOS33_RAW) peasant_side2.dsk 5 0 INSIDE 0 0
|
||||
$(DOS33_RAW) peasant_side2.dsk 19 0 TROGDOR 0 0
|
||||
$(DOS33_RAW) peasant_side2.dsk 24 0 ENDING 0 0
|
||||
$(DOS33_RAW) peasant_side2.dsk 29 0 CLIFF 0 0
|
||||
@ -376,6 +378,24 @@ copy_check.o: copy_check.s graphics_copy/copy_graphics.inc \
|
||||
copy_check.s
|
||||
ca65 -o copy_check.o copy_check.s -l copy_check.lst
|
||||
|
||||
###
|
||||
|
||||
INSIDE: inside.o
|
||||
ld65 -o INSIDE inside.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
|
||||
|
||||
inside.o: inside.s zp.inc inventory.inc \
|
||||
parse_input.inc \
|
||||
inside_actions.s DIALOG_INSIDE.LZSA dialog_inside.inc \
|
||||
graphics_inside/graphics_inside.inc sprites/peasant_sprites.inc \
|
||||
graphics_inside/priority_inside.inc \
|
||||
sprites/inventory_sprites.inc \
|
||||
draw_box.s hgr_rectangle.s hgr_font.s hgr_input.s \
|
||||
hgr_1x28_sprite_mask.s hgr_1x5_sprite.s hgr_save_restore.s \
|
||||
wait_a_bit.s draw_peasant.s hgr_text_box.s \
|
||||
keyboard.s new_map_location.s \
|
||||
peasant_move.s score.s inventory.s loadsave_menu.s
|
||||
ca65 -o inside.o inside.s -l inside.lst
|
||||
|
||||
|
||||
###
|
||||
|
||||
@ -405,7 +425,7 @@ save3.o: save3.s
|
||||
|
||||
parse_input.inc: generate_common parse_input
|
||||
./generate_common -a 0xee00 -s parse_input parse_input.lst > parse_input.inc
|
||||
./generate_common -a 0xee00 -s setup_verb_table parse_input.lst >> parse_input.inc
|
||||
./generate_common -a 0xee00 -s setup_default_verb_table parse_input.lst >> parse_input.inc
|
||||
./generate_common -a 0xee00 -s load_custom_verb_table parse_input.lst >> parse_input.inc
|
||||
./generate_common -a 0xee00 -s partial_message_step parse_input.lst >> parse_input.inc
|
||||
./generate_common -a 0xee00 -s finish_parse_message parse_input.lst >> parse_input.inc
|
||||
@ -505,6 +525,11 @@ dialog_inside: dialog_inside.o
|
||||
dialog_inside.o: dialog_inside.s text/inside.inc
|
||||
ca65 -o dialog_inside.o dialog_inside.s -l dialog_inside.lst
|
||||
|
||||
###
|
||||
|
||||
dialog_inside.inc: generate_all_symbols dialog_inside
|
||||
./generate_all_symbols -a 0xd000 dialog_inside.lst > dialog_inside.inc
|
||||
|
||||
####
|
||||
|
||||
DIALOG_INN.LZSA: dialog_inn
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
; Cliff Base
|
||||
|
||||
WHICH_PEASANTRY=0
|
||||
|
||||
; by Vince `deater` Weaver vince@deater.net
|
||||
|
||||
.include "hardware.inc"
|
||||
@ -15,7 +13,7 @@ WHICH_PEASANTRY=0
|
||||
|
||||
cliff_base:
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
sta LEVEL_OVER
|
||||
sta FRAME
|
||||
|
||||
jsr hgr_make_tables
|
||||
@ -40,7 +38,7 @@ cliff_base:
|
||||
|
||||
new_location:
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
sta LEVEL_OVER
|
||||
|
||||
;=====================
|
||||
; load bg
|
||||
@ -115,7 +113,7 @@ game_loop:
|
||||
|
||||
jsr check_keyboard
|
||||
|
||||
lda GAME_OVER
|
||||
lda LEVEL_OVER
|
||||
bmi oops_new_location
|
||||
bne game_over
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
game_over:
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
sta LEVEL_OVER
|
||||
sta FRAME
|
||||
|
||||
jsr hgr_make_tables
|
||||
|
@ -5,16 +5,16 @@ PNG2HGR = ../../../utils/hgr-utils/png2hgr
|
||||
LZSA = ~/research/lzsa/lzsa/lzsa
|
||||
B2D = ../../../utils/bmp2dhr/b2d
|
||||
|
||||
all: inside_graphics.inc \
|
||||
all: graphics_inside.inc \
|
||||
priority_inside.inc
|
||||
|
||||
###
|
||||
|
||||
inside_graphics.inc: \
|
||||
graphics_inside.inc: \
|
||||
hidden_glen.lzsa inside_cottage.lzsa inside_nn.lzsa
|
||||
echo "hidden_glen_lzsa: .incbin \"hidden_glen.lzsa\"" > inside_graphics.inc
|
||||
echo "inside_cottage_lzsa: .incbin \"inside_cottage.lzsa\"" >> inside_graphics.inc
|
||||
echo "inside_nn_lzsa: .incbin \"inside_nn.lzsa\"" >> inside_graphics.inc
|
||||
echo "hidden_glen_lzsa: .incbin \"hidden_glen.lzsa\"" > graphics_inside.inc
|
||||
echo "inside_cottage_lzsa: .incbin \"inside_cottage.lzsa\"" >> graphics_inside.inc
|
||||
echo "inside_nn_lzsa: .incbin \"inside_nn.lzsa\"" >> graphics_inside.inc
|
||||
|
||||
###
|
||||
|
||||
@ -73,5 +73,5 @@ hidden_glen_priority.gr: hidden_glen_priority.png
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *~ inside_graphics.inc priority_inside.inc *.lzsa *.gr *.hgr
|
||||
rm -f *~ graphics_inside.inc priority_inside.inc *.lzsa *.gr *.hgr
|
||||
|
||||
|
285
games/peasant/inside.s
Normal file
285
games/peasant/inside.s
Normal file
@ -0,0 +1,285 @@
|
||||
; Peasant's Quest
|
||||
|
||||
; Inside Graphics
|
||||
|
||||
; inside lady cottage, inside ned cottage, hidden glen
|
||||
|
||||
; by Vince `deater` Weaver vince@deater.net
|
||||
|
||||
; with apologies to everyone
|
||||
|
||||
.include "hardware.inc"
|
||||
.include "zp.inc"
|
||||
|
||||
.include "qload.inc"
|
||||
.include "inventory.inc"
|
||||
.include "parse_input.inc"
|
||||
|
||||
LOCATION_BASE = LOCATION_HIDDEN_GLEN ; index starts here (24)
|
||||
|
||||
inside:
|
||||
|
||||
lda #0
|
||||
sta LEVEL_OVER
|
||||
sta FRAME
|
||||
|
||||
jsr hgr_make_tables ; necessary?
|
||||
jsr hgr2 ; necessary?
|
||||
|
||||
; decompress dialog to $D000
|
||||
|
||||
lda #<inside_text_lzsa
|
||||
sta getsrc_smc+1
|
||||
lda #>inside_text_lzsa
|
||||
sta getsrc_smc+2
|
||||
|
||||
lda #$D0
|
||||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
|
||||
; update map location
|
||||
|
||||
jsr update_map_location
|
||||
|
||||
; update score
|
||||
|
||||
jsr update_score
|
||||
|
||||
|
||||
;=============================
|
||||
;=============================
|
||||
; new screen location
|
||||
;=============================
|
||||
;=============================
|
||||
|
||||
new_location:
|
||||
lda #0
|
||||
sta LEVEL_OVER
|
||||
|
||||
;==========================
|
||||
; load updated verb table
|
||||
|
||||
; we are INSIDE so locations 24...26 map to 0...2
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda verb_tables_low,X
|
||||
sta INL
|
||||
lda verb_tables_hi,X
|
||||
sta INH
|
||||
jsr load_custom_verb_table
|
||||
|
||||
|
||||
;=====================
|
||||
; load bg
|
||||
|
||||
; we are INSIDE so locations 24...26 map to 0...2
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda map_backgrounds_low,X
|
||||
sta getsrc_smc+1
|
||||
; sta last_bg_l
|
||||
lda map_backgrounds_hi,X
|
||||
sta getsrc_smc+2
|
||||
; sta last_bg_h
|
||||
|
||||
lda #$40
|
||||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
|
||||
; we are INSIDE so locations 24...26 map to 0...2
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda map_priority_low,X
|
||||
sta getsrc_smc+1
|
||||
lda map_priority_hi,X
|
||||
sta getsrc_smc+2
|
||||
|
||||
lda #$20
|
||||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
jsr gr_copy_to_page1
|
||||
|
||||
; put peasant text
|
||||
|
||||
lda #<peasant_text
|
||||
sta OUTL
|
||||
lda #>peasant_text
|
||||
sta OUTH
|
||||
|
||||
jsr hgr_put_string
|
||||
|
||||
; put score
|
||||
|
||||
jsr print_score
|
||||
|
||||
;====================
|
||||
; save background
|
||||
|
||||
lda PEASANT_X
|
||||
sta CURSOR_X
|
||||
lda PEASANT_Y
|
||||
sta CURSOR_Y
|
||||
|
||||
;=======================
|
||||
; draw initial peasant
|
||||
|
||||
jsr save_bg_1x28
|
||||
|
||||
jsr draw_peasant
|
||||
|
||||
game_loop:
|
||||
|
||||
jsr move_peasant
|
||||
|
||||
inc FRAME
|
||||
|
||||
jsr check_keyboard
|
||||
|
||||
lda LEVEL_OVER
|
||||
bmi oops_new_location
|
||||
bne level_over
|
||||
|
||||
|
||||
; delay
|
||||
|
||||
lda #200
|
||||
jsr wait
|
||||
|
||||
|
||||
jmp game_loop
|
||||
|
||||
oops_new_location:
|
||||
jmp new_location
|
||||
|
||||
|
||||
;========================
|
||||
; exit level
|
||||
;========================
|
||||
level_over:
|
||||
lda MAP_LOCATION
|
||||
cmp #LOCATION_OUTSIDE_INN
|
||||
bne really_level_over
|
||||
|
||||
; be sure we're in range
|
||||
lda PEASANT_X
|
||||
cmp #6
|
||||
bcc really_level_over ; fine
|
||||
|
||||
cmp #18
|
||||
bcc to_left
|
||||
cmp #30
|
||||
bcc to_right
|
||||
|
||||
really_level_over:
|
||||
|
||||
rts
|
||||
|
||||
to_right:
|
||||
lda #31
|
||||
sta PEASANT_X
|
||||
rts
|
||||
|
||||
to_left:
|
||||
lda #5
|
||||
sta PEASANT_X
|
||||
rts
|
||||
|
||||
|
||||
.include "draw_peasant.s"
|
||||
|
||||
.include "gr_copy.s"
|
||||
|
||||
.include "new_map_location.s"
|
||||
.include "peasant_move.s"
|
||||
|
||||
.include "score.s"
|
||||
|
||||
;.include "parse_input.s"
|
||||
|
||||
.include "keyboard.s"
|
||||
|
||||
.include "wait.s"
|
||||
.include "wait_a_bit.s"
|
||||
|
||||
.include "graphics_inside/graphics_inside.inc"
|
||||
.include "graphics_inside/priority_inside.inc"
|
||||
|
||||
.include "version.inc"
|
||||
|
||||
;.include "inventory.s"
|
||||
|
||||
|
||||
|
||||
|
||||
; moved to QLOAD
|
||||
|
||||
;.include "decompress_fast_v2.s"
|
||||
;.include "hgr_font.s"
|
||||
;.include "draw_box.s"
|
||||
;.include "hgr_rectangle.s"
|
||||
;.include "hgr_1x28_sprite_mask.s"
|
||||
;.include "hgr_1x5_sprite.s"
|
||||
;.include "hgr_partial_save.s"
|
||||
;.include "hgr_input.s"
|
||||
;.include "hgr_tables.s"
|
||||
;.include "hgr_text_box.s"
|
||||
;.include "clear_bottom.s"
|
||||
;.include "hgr_hgr2.s"
|
||||
;.include "wait_keypress.s"
|
||||
;.include "loadsave_menu.s"
|
||||
|
||||
|
||||
|
||||
map_backgrounds_low:
|
||||
.byte <hidden_glen_lzsa ; 24 -- hidden glen
|
||||
.byte <inside_cottage_lzsa ; 25 -- inside lady cottage
|
||||
.byte <inside_nn_lzsa ; 26 -- inside ned cottage
|
||||
|
||||
map_backgrounds_hi:
|
||||
.byte >hidden_glen_lzsa ; 24 -- hidden glen
|
||||
.byte >inside_cottage_lzsa ; 25 -- inside lady cottage
|
||||
.byte >inside_nn_lzsa ; 26 -- inside ned cottage
|
||||
|
||||
map_priority_low:
|
||||
.byte <hidden_glen_priority_lzsa ; 24 -- hidden glen
|
||||
.byte <inside_cottage_priority_lzsa ; 25 -- inside lady cottage
|
||||
.byte <inside_nn_priority_lzsa ; 26 -- inside ned cottage
|
||||
|
||||
map_priority_hi:
|
||||
.byte >hidden_glen_priority_lzsa ; 24 -- hidden glen
|
||||
.byte >inside_cottage_priority_lzsa ; 25 -- inside lady cottage
|
||||
.byte >inside_nn_priority_lzsa ; 26 -- inside ned cottage
|
||||
|
||||
|
||||
verb_tables_low:
|
||||
.byte <hidden_glen_verb_table ; 24 -- hidden glen
|
||||
.byte <inside_cottage_verb_table ; 25 -- inside lady cottage
|
||||
.byte <inside_nn_verb_table ; 26 -- inside ned cottage
|
||||
|
||||
verb_tables_hi:
|
||||
.byte >hidden_glen_verb_table ; 24 -- hidden glen
|
||||
.byte >inside_cottage_verb_table ; 25 -- inside lady cottage
|
||||
.byte >inside_nn_verb_table ; 26 -- inside ned cottage
|
||||
|
||||
|
||||
|
||||
|
||||
inside_text_lzsa:
|
||||
.incbin "DIALOG_INSIDE.LZSA"
|
||||
|
||||
.include "inside_actions.s"
|
440
games/peasant/inside_actions.s
Normal file
440
games/peasant/inside_actions.s
Normal file
@ -0,0 +1,440 @@
|
||||
.include "tokens.inc"
|
||||
|
||||
;=======================
|
||||
;=======================
|
||||
;=======================
|
||||
; Hidden Glen
|
||||
;=======================
|
||||
;=======================
|
||||
;=======================
|
||||
|
||||
hidden_glen_verb_table:
|
||||
.if 0
|
||||
.byte VERB_ENTER
|
||||
.word hay_bale_enter-1
|
||||
.byte VERB_GET
|
||||
.word hay_bale_get-1
|
||||
.byte VERB_JUMP
|
||||
.word hay_bale_jump-1
|
||||
.byte VERB_HIDE
|
||||
.word hay_bale_hide-1
|
||||
.byte VERB_HUG
|
||||
.word hay_bale_hug-1
|
||||
.byte VERB_LOOK
|
||||
.word hay_bale_look-1
|
||||
.byte VERB_STEAL
|
||||
.word hay_bale_steal-1
|
||||
.byte VERB_TAKE
|
||||
.word hay_bale_take-1
|
||||
.endif
|
||||
.byte 0
|
||||
.if 0
|
||||
|
||||
;================
|
||||
; get
|
||||
;================
|
||||
hay_bale_get:
|
||||
hay_bale_steal:
|
||||
hay_bale_take:
|
||||
lda CURRENT_NOUN
|
||||
|
||||
cmp #NOUN_HAY
|
||||
beq hay_get_hay
|
||||
|
||||
; else "probably wish" message
|
||||
|
||||
jmp parse_common_get
|
||||
|
||||
hay_get_hay:
|
||||
ldx #<hay_get_hay_message
|
||||
ldy #>hay_get_hay_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;=================
|
||||
; look
|
||||
;=================
|
||||
|
||||
hay_bale_look:
|
||||
|
||||
lda CURRENT_NOUN
|
||||
|
||||
cmp #NOUN_HAY
|
||||
beq hay_look_at_hay
|
||||
cmp #NOUN_IN_HAY
|
||||
beq hay_look_in_hay
|
||||
cmp #NOUN_TREE
|
||||
beq hay_look_at_tree
|
||||
cmp #NOUN_FENCE
|
||||
beq hay_look_at_fence
|
||||
|
||||
|
||||
cmp #NOUN_NONE
|
||||
beq hay_look_at
|
||||
|
||||
jmp parse_common_look
|
||||
|
||||
hay_look_at:
|
||||
ldx #<hay_look_message
|
||||
ldy #>hay_look_message
|
||||
jmp finish_parse_message
|
||||
|
||||
hay_look_at_hay:
|
||||
ldx #<hay_look_at_hay_message
|
||||
ldy #>hay_look_at_hay_message
|
||||
jmp finish_parse_message
|
||||
|
||||
hay_look_in_hay:
|
||||
ldx #<hay_look_in_hay_message
|
||||
ldy #>hay_look_in_hay_message
|
||||
jmp finish_parse_message
|
||||
|
||||
hay_look_at_tree:
|
||||
ldx #<hay_look_at_tree_message
|
||||
ldy #>hay_look_at_tree_message
|
||||
jmp finish_parse_message
|
||||
|
||||
hay_look_at_fence:
|
||||
ldx #<hay_look_at_fence_message
|
||||
ldy #>hay_look_at_fence_message
|
||||
jmp finish_parse_message
|
||||
|
||||
|
||||
;===================
|
||||
; enter hay
|
||||
;===================
|
||||
|
||||
hay_bale_enter:
|
||||
hay_bale_jump:
|
||||
hay_bale_hide:
|
||||
|
||||
lda CURRENT_NOUN
|
||||
|
||||
cmp #NOUN_HAY
|
||||
beq enter_hay
|
||||
|
||||
jmp parse_common_unknown
|
||||
|
||||
enter_hay:
|
||||
ldx #<hay_enter_hay_clean_message
|
||||
ldy #>hay_enter_hay_clean_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;===================
|
||||
; hug tree
|
||||
;===================
|
||||
|
||||
hay_bale_hug:
|
||||
|
||||
lda CURRENT_NOUN
|
||||
|
||||
cmp #NOUN_TREE
|
||||
beq hug_tree
|
||||
|
||||
jmp parse_common_unknown
|
||||
|
||||
hug_tree:
|
||||
ldx #<hay_hug_tree_message
|
||||
ldy #>hay_hug_tree_message
|
||||
jmp finish_parse_message
|
||||
.endif
|
||||
|
||||
|
||||
;=======================
|
||||
;=======================
|
||||
;=======================
|
||||
; Inside Lady Cottage
|
||||
;=======================
|
||||
;=======================
|
||||
;=======================
|
||||
|
||||
inside_cottage_verb_table:
|
||||
.if 0
|
||||
.byte VERB_GET
|
||||
.word puddle_get-1
|
||||
.byte VERB_TAKE
|
||||
.word puddle_take-1
|
||||
.byte VERB_STEAL
|
||||
.word puddle_steal-1
|
||||
.byte VERB_LOOK
|
||||
.word puddle_look-1
|
||||
.endif
|
||||
.byte 0
|
||||
.if 0
|
||||
|
||||
;================
|
||||
; get
|
||||
;================
|
||||
puddle_get:
|
||||
puddle_steal:
|
||||
puddle_take:
|
||||
lda CURRENT_NOUN
|
||||
|
||||
cmp #NOUN_ROCK
|
||||
beq puddle_get_rock
|
||||
cmp #NOUN_STONE
|
||||
beq puddle_get_rock
|
||||
|
||||
|
||||
; else "probably wish" message
|
||||
|
||||
jmp parse_common_get
|
||||
|
||||
puddle_get_rock:
|
||||
ldx #<puddle_get_rock_message
|
||||
ldy #>puddle_get_rock_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;=================
|
||||
; look
|
||||
;=================
|
||||
|
||||
puddle_look:
|
||||
|
||||
lda CURRENT_NOUN
|
||||
|
||||
cmp #NOUN_ROCK
|
||||
beq puddle_look_at_rock
|
||||
cmp #NOUN_STONE
|
||||
beq puddle_look_at_rock
|
||||
cmp #NOUN_MUD
|
||||
beq puddle_look_at_mud
|
||||
cmp #NOUN_PUDDLE
|
||||
beq puddle_look_at_mud
|
||||
cmp #NOUN_NONE
|
||||
beq puddle_look_at
|
||||
|
||||
jmp parse_common_look
|
||||
|
||||
puddle_look_at:
|
||||
ldx #<puddle_look_at_message
|
||||
ldy #>puddle_look_at_message
|
||||
jmp finish_parse_message
|
||||
|
||||
puddle_look_at_mud:
|
||||
ldx #<puddle_look_mud_message
|
||||
ldy #>puddle_look_mud_message
|
||||
jmp finish_parse_message
|
||||
|
||||
puddle_look_at_rock:
|
||||
ldx #<puddle_get_rock_message
|
||||
ldy #>puddle_get_rock_message
|
||||
jmp finish_parse_message
|
||||
|
||||
.endif
|
||||
;=======================
|
||||
;=======================
|
||||
;=======================
|
||||
; Inside Ned Cottage
|
||||
;=======================
|
||||
;=======================
|
||||
;=======================
|
||||
|
||||
inside_nn_verb_table:
|
||||
.if 0
|
||||
.byte VERB_ASK
|
||||
.word archery_ask-1
|
||||
.byte VERB_GET
|
||||
.word archery_get-1
|
||||
.byte VERB_GIVE
|
||||
.word archery_give-1
|
||||
.byte VERB_HALDO
|
||||
.word archery_haldo-1
|
||||
.byte VERB_LOOK
|
||||
.word archery_look-1
|
||||
.byte VERB_PLAY
|
||||
.word archery_play-1
|
||||
.byte VERB_STEAL
|
||||
.word archery_steal-1
|
||||
.byte VERB_TALK
|
||||
.word archery_talk-1
|
||||
.byte VERB_TAKE
|
||||
.word archery_take-1
|
||||
.endif
|
||||
.byte 0
|
||||
.if 0
|
||||
|
||||
;================
|
||||
; ask
|
||||
;================
|
||||
archery_ask:
|
||||
|
||||
; TODO
|
||||
|
||||
jmp parse_common_ask
|
||||
|
||||
|
||||
;================
|
||||
; get
|
||||
;================
|
||||
archery_get:
|
||||
archery_steal:
|
||||
archery_take:
|
||||
lda CURRENT_NOUN
|
||||
|
||||
cmp #NOUN_TARGET
|
||||
beq archery_get_target
|
||||
cmp #NOUN_ARROW
|
||||
beq archery_get_arrow
|
||||
|
||||
; else "probably wish" message
|
||||
|
||||
jmp parse_common_get
|
||||
|
||||
archery_get_target:
|
||||
ldx #<archery_get_target_message
|
||||
ldy #>archery_get_target_message
|
||||
jmp finish_parse_message
|
||||
|
||||
archery_get_arrow:
|
||||
ldx #<archery_get_arrow_message
|
||||
ldy #>archery_get_arrow_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;================
|
||||
; give
|
||||
;================
|
||||
archery_give:
|
||||
|
||||
; TODO
|
||||
|
||||
jmp parse_common_give
|
||||
|
||||
;================
|
||||
; haldo
|
||||
;================
|
||||
archery_haldo:
|
||||
|
||||
; TODO
|
||||
|
||||
jmp parse_common_haldo
|
||||
|
||||
|
||||
|
||||
;=================
|
||||
; look
|
||||
;=================
|
||||
|
||||
archery_look:
|
||||
|
||||
lda CURRENT_NOUN
|
||||
|
||||
cmp #NOUN_DESK
|
||||
beq archery_look_at_desk
|
||||
cmp #NOUN_TARGET
|
||||
beq archery_look_at_target
|
||||
cmp #NOUN_ARCHER
|
||||
beq archery_look_at_archer
|
||||
cmp #NOUN_NONE
|
||||
beq archery_look_at
|
||||
|
||||
jmp parse_common_look
|
||||
|
||||
archery_look_at:
|
||||
ldx #<archery_look_message
|
||||
ldy #>archery_look_message
|
||||
jmp finish_parse_message
|
||||
|
||||
archery_look_at_archer:
|
||||
ldx #<archery_look_at_archer_message
|
||||
ldy #>archery_look_at_archer_message
|
||||
jmp finish_parse_message
|
||||
|
||||
archery_look_at_target:
|
||||
ldx #<archery_look_at_target_message
|
||||
ldy #>archery_look_at_target_message
|
||||
jmp finish_parse_message
|
||||
|
||||
archery_look_at_desk:
|
||||
ldx #<archery_look_at_desk_message
|
||||
ldy #>archery_look_at_desk_message
|
||||
jmp finish_parse_message
|
||||
|
||||
|
||||
;================
|
||||
; play
|
||||
;================
|
||||
archery_play:
|
||||
lda CURRENT_NOUN
|
||||
|
||||
cmp #NOUN_GAME
|
||||
beq archery_play_game
|
||||
|
||||
jmp parse_common_unknown
|
||||
|
||||
archery_play_game:
|
||||
ldx #<archery_play_game_message
|
||||
ldy #>archery_play_game_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;================
|
||||
; talk
|
||||
;================
|
||||
archery_talk:
|
||||
|
||||
; only talk if close
|
||||
lda PEASANT_X
|
||||
cmp #23
|
||||
bcc archery_talk_too_far
|
||||
; check Y too?
|
||||
; probably less than $7D?
|
||||
; actual game will walk you in if close
|
||||
; will it work from beind?
|
||||
|
||||
lda CURRENT_NOUN
|
||||
|
||||
cmp #NOUN_MAN
|
||||
beq archery_talk_mendelev
|
||||
cmp #NOUN_GUY
|
||||
beq archery_talk_mendelev
|
||||
cmp #NOUN_DUDE
|
||||
beq archery_talk_mendelev
|
||||
cmp #NOUN_MENDELEV
|
||||
beq archery_talk_mendelev
|
||||
cmp #NOUN_ARCHER
|
||||
beq archery_talk_mendelev
|
||||
|
||||
jmp parse_common_unknown
|
||||
|
||||
archery_talk_mendelev:
|
||||
ldx #<archery_talk_mendelev_message
|
||||
ldy #>archery_talk_mendelev_message
|
||||
jsr partial_message_step
|
||||
|
||||
ldx #<archery_talk_mendelev2_message
|
||||
ldy #>archery_talk_mendelev2_message
|
||||
jsr partial_message_step
|
||||
|
||||
ldx #<archery_talk_mendelev3_message
|
||||
ldy #>archery_talk_mendelev3_message
|
||||
jsr finish_parse_message
|
||||
|
||||
; add 1 point to score if don't have mask or trinket
|
||||
; add 2 points otherwise
|
||||
|
||||
lda INVENTORY_2
|
||||
and #INV2_TRINKET
|
||||
bne archer_2_points
|
||||
|
||||
lda INVENTORY_1
|
||||
and #INV1_MONSTER_MASK
|
||||
bne archer_2_points
|
||||
|
||||
archer_1_point:
|
||||
lda #1
|
||||
bne archer_score_points ; bra
|
||||
archer_2_points:
|
||||
lda #2
|
||||
archer_score_points:
|
||||
jsr score_points
|
||||
|
||||
rts
|
||||
|
||||
archery_talk_too_far:
|
||||
ldx #<archery_talk_far_message
|
||||
ldy #>archery_talk_far_message
|
||||
jmp finish_parse_message
|
||||
|
||||
.endif
|
||||
|
||||
|
||||
.include "dialog_inside.inc"
|
@ -487,8 +487,8 @@ load_loop:
|
||||
cpx #(END_OF_SAVE-WHICH_LOAD+1)
|
||||
bne load_loop
|
||||
|
||||
lda #$1 ; 1 means exit to loader?
|
||||
sta GAME_OVER
|
||||
lda #NEW_FROM_DISK ; load whole level from disk
|
||||
sta LEVEL_OVER
|
||||
|
||||
done_load:
|
||||
|
||||
@ -565,8 +565,8 @@ copy_loop:
|
||||
jsr driveoff
|
||||
|
||||
done_save:
|
||||
lda #$FF ; reload level as we scrawled on $2000
|
||||
sta GAME_OVER
|
||||
lda #NEW_LOCATION ; reload level as we scrawled on $2000
|
||||
sta LEVEL_OVER
|
||||
|
||||
rts
|
||||
|
||||
@ -758,15 +758,16 @@ lname_kerrek_2: .byte "Kerrek Tracks 2",0 ; C4 LOCATION_KERREK_2
|
||||
lname_outside_lady: .byte "Outside Baby Lady Cottage",0 ; D4 LOCATION_OUTSIDE_LADY
|
||||
lname_burn_tree: .byte "Burninated Trees",0 ; E4 LOCATION_BURN_TREES
|
||||
|
||||
lname_hidden_glen: .byte "Hidden Glen",0 ; LOCATION_HIDDEN_GLEN
|
||||
|
||||
lname_cliff_base: .byte "Cliff Base",0 ; LOCATION_CLIFF_BASE
|
||||
lname_cliffland_heights:.byte "Cliffland Heights",0 ; LOCATION_CLIFF_HEIGHTS
|
||||
lname_trogdor_outer: .byte "Trogdor's Outer Sanctum",0 ; LOCATION_TROGDOR_OUTER
|
||||
lname_trogdor_posh: .byte "Trogdor's Posh Lair",0 ; LOCATION_TROGDOR_LAIR
|
||||
|
||||
lname_hidden_glen: .byte "Hidden Glen",0 ; LOCATION_HIDDEN_GLEN
|
||||
lname_inside_lady: .byte "Inside Baby Lady Cottage",0 ; LOCATION_INSIDE_LADY
|
||||
lname_inside_inn: .byte "Inside Giant Inn",0 ; LOCATION_INSIDE_INN
|
||||
lname_inside_nn: .byte "Inside Mysterious Cottage",0 ; LOCATION_INSIDE_NN
|
||||
lname_inside_inn: .byte "Inside Giant Inn",0 ; LOCATION_INSIDE_INN
|
||||
|
||||
lname_empty: .byte "Empty",0
|
||||
location_names_end:
|
||||
|
@ -84,10 +84,13 @@ start_new_game:
|
||||
|
||||
; map location
|
||||
|
||||
lda #4
|
||||
sta MAP_X
|
||||
lda #1
|
||||
sta MAP_Y
|
||||
lda #LOCATION_MOUNTAIN_PASS
|
||||
sta MAP_LOCATION
|
||||
|
||||
; lda #4
|
||||
; sta MAP_X
|
||||
; lda #1
|
||||
; sta MAP_Y
|
||||
|
||||
; inventory is only t-shirt
|
||||
|
||||
|
@ -1,89 +1,75 @@
|
||||
|
||||
;=====================
|
||||
; new map location
|
||||
; update map location
|
||||
;=====================
|
||||
|
||||
new_map_location:
|
||||
lda #NEW_LOCATION
|
||||
sta GAME_OVER
|
||||
|
||||
; fall through
|
||||
|
||||
|
||||
; new location is in A
|
||||
update_map_location:
|
||||
|
||||
;==================
|
||||
; setup verb table
|
||||
; get disk location of old location
|
||||
; we do this because the disk load code will over-write WHICH_LOAD
|
||||
|
||||
jsr setup_verb_table
|
||||
ldx MAP_LOCATION
|
||||
ldy location_to_file,X
|
||||
sty WHICH_LOAD
|
||||
|
||||
|
||||
;==================
|
||||
; update map
|
||||
; on main map, it's (MAP_Y*5)+MAP_X
|
||||
|
||||
|
||||
; 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 #NEW_FROM_DISK
|
||||
sta GAME_OVER
|
||||
|
||||
lda #LOAD_CLIFF
|
||||
sta WHICH_LOAD
|
||||
rts
|
||||
|
||||
map_x_went_negative:
|
||||
lda #0 ; don't wrap anymore
|
||||
|
||||
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
|
||||
; save new location
|
||||
|
||||
sta MAP_LOCATION
|
||||
|
||||
; see if we need to change disk
|
||||
;==============================
|
||||
; check if need to switch disk
|
||||
|
||||
lda MAP_Y
|
||||
cmp #WHICH_PEASANTRY
|
||||
tax
|
||||
lda location_to_file,X
|
||||
cmp WHICH_LOAD
|
||||
beq same_disk
|
||||
new_disk:
|
||||
sta WHICH_LOAD ; point to new file
|
||||
lda #NEW_FROM_DISK ; indicate we need to load
|
||||
sta LEVEL_OVER
|
||||
rts
|
||||
|
||||
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:
|
||||
same_disk:
|
||||
lda #NEW_LOCATION
|
||||
sta LEVEL_OVER
|
||||
rts
|
||||
|
||||
|
||||
;=========================
|
||||
; Move Map NORTH
|
||||
;=========================
|
||||
move_map_north:
|
||||
lda MAP_LOCATION
|
||||
tax
|
||||
lda exits_north,X
|
||||
jmp update_map_location
|
||||
|
||||
;=========================
|
||||
; Move Map SOUTH
|
||||
;=========================
|
||||
move_map_south:
|
||||
lda MAP_LOCATION
|
||||
tax
|
||||
lda exits_south,X
|
||||
jmp update_map_location
|
||||
|
||||
;=========================
|
||||
; Move Map EAST
|
||||
;=========================
|
||||
move_map_east:
|
||||
lda MAP_LOCATION
|
||||
tax
|
||||
lda exits_east,X
|
||||
jmp update_map_location
|
||||
|
||||
;=========================
|
||||
; Move Map WEST
|
||||
;=========================
|
||||
move_map_west:
|
||||
lda MAP_LOCATION
|
||||
tax
|
||||
lda exits_west,X
|
||||
jmp update_map_location
|
||||
|
||||
exits_north:
|
||||
.byte LOCATION_OUTSIDE_NN ; LOCATION_POOR_GARY = 0
|
||||
@ -110,14 +96,15 @@ exits_north:
|
||||
.byte LOCATION_LAKE_EAST ; LOCATION_OUTSIDE_LADY = 18
|
||||
.byte LOCATION_OUTSIDE_INN ; LOCATION_BURN_TREES = 19
|
||||
|
||||
.byte LOCATION_EMPTY ; LOCATION_HIDDEN_GLEN = 20
|
||||
.byte LOCATION_CLIFF_HEIGHTS ; LOCATION_CLIFF_BASE = 21
|
||||
.byte LOCATION_EMPTY ; LOCATION_CLIFF_HEIGHTS= 22
|
||||
.byte LOCATION_EMPTY ; LOCATION_TROGDOR_OUTER= 23
|
||||
.byte LOCATION_EMPTY ; LOCATION_TROGDOR_LAIR = 24
|
||||
.byte LOCATION_CLIFF_HEIGHTS ; LOCATION_CLIFF_BASE = 20
|
||||
.byte LOCATION_EMPTY ; LOCATION_CLIFF_HEIGHTS= 21
|
||||
.byte LOCATION_EMPTY ; LOCATION_TROGDOR_OUTER= 22
|
||||
.byte LOCATION_EMPTY ; LOCATION_TROGDOR_LAIR = 23
|
||||
|
||||
.byte LOCATION_EMPTY ; LOCATION_HIDDEN_GLEN = 24
|
||||
.byte LOCATION_EMPTY ; LOCATION_INSIDE_LADY = 25
|
||||
.byte LOCATION_EMPTY ; LOCATION_INSIDE_INN = 26
|
||||
.byte LOCATION_EMPTY ; LOCATION_INSIDE_NN = 27
|
||||
.byte LOCATION_EMPTY ; LOCATION_INSIDE_NN = 26
|
||||
.byte LOCATION_EMPTY ; LOCATION_INSIDE_INN = 27
|
||||
.byte LOCATION_EMPTY ; LOCATION_EMPTY = 28
|
||||
|
||||
exits_south:
|
||||
@ -145,14 +132,15 @@ exits_south:
|
||||
.byte LOCATION_YELLOW_TREE ; LOCATION_OUTSIDE_LADY = 18
|
||||
.byte LOCATION_WATERFALL ; LOCATION_BURN_TREES = 19
|
||||
|
||||
.byte LOCATION_EMPTY ; LOCATION_HIDDEN_GLEN = 20
|
||||
.byte LOCATION_EMPTY ; LOCATION_CLIFF_BASE = 21
|
||||
.byte LOCATION_EMPTY ; LOCATION_CLIFF_HEIGHTS= 22
|
||||
.byte LOCATION_EMPTY ; LOCATION_TROGDOR_OUTER= 23
|
||||
.byte LOCATION_EMPTY ; LOCATION_TROGDOR_LAIR = 24
|
||||
.byte LOCATION_EMPTY ; LOCATION_CLIFF_BASE = 20
|
||||
.byte LOCATION_EMPTY ; LOCATION_CLIFF_HEIGHTS= 21
|
||||
.byte LOCATION_EMPTY ; LOCATION_TROGDOR_OUTER= 22
|
||||
.byte LOCATION_EMPTY ; LOCATION_TROGDOR_LAIR = 23
|
||||
|
||||
.byte LOCATION_EMPTY ; LOCATION_HIDDEN_GLEN = 24
|
||||
.byte LOCATION_OUTSIDE_LADY ; LOCATION_INSIDE_LADY = 25
|
||||
.byte LOCATION_OUTSIDE_INN ; LOCATION_INSIDE_INN = 26
|
||||
.byte LOCATION_OUTSIDE_NN ; LOCATION_INSIDE_NN = 27
|
||||
.byte LOCATION_OUTSIDE_NN ; LOCATION_INSIDE_NN = 26
|
||||
.byte LOCATION_OUTSIDE_INN ; LOCATION_INSIDE_INN = 27
|
||||
.byte LOCATION_EMPTY ; LOCATION_EMPTY = 28
|
||||
|
||||
exits_east:
|
||||
@ -180,14 +168,15 @@ exits_east:
|
||||
.byte LOCATION_BURN_TREES ; LOCATION_OUTSIDE_LADY = 18
|
||||
.byte LOCATION_EMPTY ; LOCATION_BURN_TREES = 19
|
||||
|
||||
.byte LOCATION_POOR_GARY ; LOCATION_HIDDEN_GLEN = 20
|
||||
.byte LOCATION_EMPTY ; LOCATION_CLIFF_BASE = 21
|
||||
.byte LOCATION_TROGDOR_OUTER ; LOCATION_CLIFF_HEIGHTS= 22
|
||||
.byte LOCATION_TROGDOR_LAIR ; LOCATION_TROGDOR_OUTER= 23
|
||||
.byte LOCATION_EMPTY ; LOCATION_TROGDOR_LAIR = 24
|
||||
.byte LOCATION_EMPTY ; LOCATION_CLIFF_BASE = 20
|
||||
.byte LOCATION_TROGDOR_OUTER ; LOCATION_CLIFF_HEIGHTS= 21
|
||||
.byte LOCATION_TROGDOR_LAIR ; LOCATION_TROGDOR_OUTER= 22
|
||||
.byte LOCATION_EMPTY ; LOCATION_TROGDOR_LAIR = 23
|
||||
|
||||
.byte LOCATION_POOR_GARY ; LOCATION_HIDDEN_GLEN = 24
|
||||
.byte LOCATION_EMPTY ; LOCATION_INSIDE_LADY = 25
|
||||
.byte LOCATION_EMPTY ; LOCATION_INSIDE_INN = 26
|
||||
.byte LOCATION_EMPTY ; LOCATION_INSIDE_NN = 27
|
||||
.byte LOCATION_EMPTY ; LOCATION_INSIDE_NN = 26
|
||||
.byte LOCATION_EMPTY ; LOCATION_INSIDE_INN = 27
|
||||
.byte LOCATION_EMPTY ; LOCATION_EMPTY = 28
|
||||
|
||||
exits_west:
|
||||
@ -215,14 +204,15 @@ exits_west:
|
||||
.byte LOCATION_KERREK_2 ; LOCATION_OUTSIDE_LADY = 18
|
||||
.byte LOCATION_OUTSIDE_LADY ; LOCATION_BURN_TREES = 19
|
||||
|
||||
.byte LOCATION_EMPTY ; LOCATION_HIDDEN_GLEN = 20
|
||||
.byte LOCATION_EMPTY ; LOCATION_CLIFF_BASE = 21
|
||||
.byte LOCATION_EMPTY ; LOCATION_CLIFF_HEIGHTS= 22
|
||||
.byte LOCATION_EMPTY ; LOCATION_TROGDOR_OUTER= 23
|
||||
.byte LOCATION_EMPTY ; LOCATION_TROGDOR_LAIR = 24
|
||||
.byte LOCATION_EMPTY ; LOCATION_CLIFF_BASE = 20
|
||||
.byte LOCATION_EMPTY ; LOCATION_CLIFF_HEIGHTS= 21
|
||||
.byte LOCATION_EMPTY ; LOCATION_TROGDOR_OUTER= 22
|
||||
.byte LOCATION_EMPTY ; LOCATION_TROGDOR_LAIR = 23
|
||||
|
||||
.byte LOCATION_EMPTY ; LOCATION_HIDDEN_GLEN = 24
|
||||
.byte LOCATION_EMPTY ; LOCATION_INSIDE_LADY = 25
|
||||
.byte LOCATION_EMPTY ; LOCATION_INSIDE_INN = 26
|
||||
.byte LOCATION_EMPTY ; LOCATION_INSIDE_NN = 27
|
||||
.byte LOCATION_EMPTY ; LOCATION_INSIDE_NN = 26
|
||||
.byte LOCATION_EMPTY ; LOCATION_INSIDE_INN = 27
|
||||
.byte LOCATION_EMPTY ; LOCATION_EMPTY = 28
|
||||
|
||||
location_to_file:
|
||||
@ -250,14 +240,14 @@ location_to_file:
|
||||
.byte LOAD_PEASANT4 ; LOCATION_OUTSIDE_LADY = 18
|
||||
.byte LOAD_PEASANT4 ; LOCATION_BURN_TREES = 19
|
||||
|
||||
.byte LOAD_INSIDE ; LOCATION_HIDDEN_GLEN = 20
|
||||
.byte LOAD_CLIFF ; LOCATION_CLIFF_BASE = 21
|
||||
.byte LOAD_CLIFF ; LOCATION_CLIFF_HEIGHTS= 22
|
||||
.byte LOAD_CLIFF ; LOCATION_TROGDOR_OUTER= 23
|
||||
.byte LOAD_TROGDOR ; LOCATION_TROGDOR_LAIR = 24
|
||||
.byte LOAD_CLIFF ; LOCATION_CLIFF_BASE = 20
|
||||
.byte LOAD_CLIFF ; LOCATION_CLIFF_HEIGHTS= 21
|
||||
.byte LOAD_CLIFF ; LOCATION_TROGDOR_OUTER= 22
|
||||
.byte LOAD_TROGDOR ; LOCATION_TROGDOR_LAIR = 23
|
||||
|
||||
.byte LOAD_INSIDE ; LOCATION_HIDDEN_GLEN = 24
|
||||
.byte LOAD_INSIDE ; LOCATION_INSIDE_LADY = 25
|
||||
.byte LOAD_INN ; LOCATION_INSIDE_INN = 26
|
||||
.byte LOAD_INSIDE ; LOCATION_INSIDE_NN = 27
|
||||
.byte LOAD_INSIDE ; LOCATION_INSIDE_NN = 26
|
||||
.byte LOAD_INN ; LOCATION_INSIDE_INN = 27
|
||||
.byte LOCATION_EMPTY ; LOCATION_EMPTY = 28
|
||||
|
||||
|
||||
|
@ -127,7 +127,7 @@ parse_common_copy:
|
||||
|
||||
; want copy
|
||||
lda #NEW_FROM_DISK
|
||||
sta GAME_OVER
|
||||
sta LEVEL_OVER
|
||||
|
||||
lda #LOAD_COPY_CHECK
|
||||
sta WHICH_LOAD
|
||||
@ -161,8 +161,8 @@ parse_common_die:
|
||||
lda #LOAD_GAME_OVER
|
||||
sta WHICH_LOAD
|
||||
|
||||
lda #1
|
||||
sta GAME_OVER
|
||||
lda #NEW_FROM_DISK
|
||||
sta LEVEL_OVER
|
||||
|
||||
ldx #<die_message
|
||||
ldy #>die_message
|
||||
@ -1033,10 +1033,10 @@ verb_table = $BF00
|
||||
|
||||
;=========================
|
||||
;=========================
|
||||
; setup verb table
|
||||
; setup default verb table
|
||||
;=========================
|
||||
;=========================
|
||||
setup_verb_table:
|
||||
setup_default_verb_table:
|
||||
|
||||
;===========================
|
||||
; first make it all unknown
|
||||
@ -1060,11 +1060,8 @@ unknown_loop:
|
||||
lda #>common_verb_table
|
||||
sta INH
|
||||
|
||||
; jsr load_custom_verb_table
|
||||
; fallthrough
|
||||
|
||||
; rts
|
||||
|
||||
; Fallthrough
|
||||
|
||||
;=========================
|
||||
;=========================
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
; Gary, Kerrek 1, Well, Yellow Tree, Waterfall
|
||||
|
||||
WHICH_PEASANTRY = 0
|
||||
|
||||
; by Vince `deater` Weaver vince@deater.net
|
||||
|
||||
; with apologies to everyone
|
||||
@ -17,10 +15,12 @@ WHICH_PEASANTRY = 0
|
||||
.include "inventory.inc"
|
||||
.include "parse_input.inc"
|
||||
|
||||
LOCATION_BASE = LOCATION_POOR_GARY ; index starts here (0)
|
||||
|
||||
peasantry1:
|
||||
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
sta LEVEL_OVER
|
||||
sta FRAME
|
||||
|
||||
jsr hgr_make_tables ; necessary?
|
||||
@ -39,7 +39,7 @@ peasantry1:
|
||||
|
||||
; update map location
|
||||
|
||||
jsr update_map_location
|
||||
; jsr update_map_location
|
||||
|
||||
; update score
|
||||
|
||||
@ -53,7 +53,7 @@ peasantry1:
|
||||
|
||||
new_location:
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
sta LEVEL_OVER
|
||||
|
||||
;==========================
|
||||
; load updated verb table
|
||||
@ -142,7 +142,7 @@ game_loop:
|
||||
|
||||
jsr check_keyboard
|
||||
|
||||
lda GAME_OVER
|
||||
lda LEVEL_OVER
|
||||
bmi oops_new_location
|
||||
bne game_over
|
||||
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
; haystack, puddle, archery, river, knight (pass)
|
||||
|
||||
WHICH_PEASANTRY = 1
|
||||
|
||||
; by Vince `deater` Weaver vince@deater.net
|
||||
|
||||
; with apologies to everyone
|
||||
@ -17,10 +15,13 @@ WHICH_PEASANTRY = 1
|
||||
.include "inventory.inc"
|
||||
.include "parse_input.inc"
|
||||
|
||||
LOCATION_BASE = LOCATION_HAY_BALE ; index starts here (5)
|
||||
|
||||
|
||||
peasantry2:
|
||||
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
sta LEVEL_OVER
|
||||
sta FRAME
|
||||
|
||||
jsr hgr_make_tables ; necessary?
|
||||
@ -39,8 +40,7 @@ peasantry2:
|
||||
|
||||
|
||||
; update map location
|
||||
|
||||
jsr update_map_location
|
||||
; jsr update_map_location
|
||||
|
||||
; update score
|
||||
|
||||
@ -55,16 +55,20 @@ peasantry2:
|
||||
|
||||
new_location:
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
sta LEVEL_OVER
|
||||
|
||||
;==========================
|
||||
; load updated verb table
|
||||
|
||||
; setup default verb table
|
||||
|
||||
jsr setup_default_verb_table
|
||||
|
||||
; we are PEASANT2 so locations 5...9 map to 0...4
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #5
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda verb_tables_low,X
|
||||
@ -81,7 +85,7 @@ new_location:
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #5
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda map_backgrounds_low,X
|
||||
@ -100,7 +104,7 @@ new_location:
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #5
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda map_priority_low,X
|
||||
@ -150,7 +154,7 @@ game_loop:
|
||||
|
||||
jsr check_keyboard
|
||||
|
||||
lda GAME_OVER
|
||||
lda LEVEL_OVER
|
||||
bmi oops_new_location
|
||||
bne level_over
|
||||
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
; Jhonka, your cottage, w lake, e lake, inn
|
||||
|
||||
WHICH_PEASANTRY = 2
|
||||
|
||||
; by Vince `deater` Weaver vince@deater.net
|
||||
|
||||
; with apologies to everyone
|
||||
@ -17,10 +15,12 @@ WHICH_PEASANTRY = 2
|
||||
.include "inventory.inc"
|
||||
.include "parse_input.inc"
|
||||
|
||||
LOCATION_BASE = LOCATION_JHONKA_CAVE ; index starts here (10)
|
||||
|
||||
peasantry3:
|
||||
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
sta LEVEL_OVER
|
||||
sta FRAME
|
||||
|
||||
jsr hgr_make_tables ; necessary?
|
||||
@ -40,7 +40,7 @@ peasantry3:
|
||||
|
||||
; update map location
|
||||
|
||||
jsr update_map_location
|
||||
; jsr update_map_location
|
||||
|
||||
; update score
|
||||
|
||||
@ -54,7 +54,7 @@ peasantry3:
|
||||
|
||||
new_location:
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
sta LEVEL_OVER
|
||||
|
||||
|
||||
;==========================
|
||||
@ -64,7 +64,7 @@ new_location:
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #10
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda verb_tables_low,X
|
||||
@ -80,7 +80,7 @@ new_location:
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #10
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda map_backgrounds_low,X
|
||||
@ -96,7 +96,7 @@ new_location:
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #10
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda map_priority_low,X
|
||||
@ -146,7 +146,7 @@ game_loop:
|
||||
|
||||
jsr check_keyboard
|
||||
|
||||
lda GAME_OVER
|
||||
lda LEVEL_OVER
|
||||
bmi oops_new_location
|
||||
bne game_over
|
||||
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
; ned cottage, wavy tree, kerrek 2, lady cottage, burninated tree
|
||||
|
||||
WHICH_PEASANTRY = 3
|
||||
|
||||
; by Vince `deater` Weaver vince@deater.net
|
||||
|
||||
; with apologies to everyone
|
||||
@ -17,10 +15,12 @@ WHICH_PEASANTRY = 3
|
||||
.include "inventory.inc"
|
||||
.include "parse_input.inc"
|
||||
|
||||
LOCATION_BASE = LOCATION_OUTSIDE_NN ; index starts here (15)
|
||||
|
||||
peasantry4:
|
||||
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
sta LEVEL_OVER
|
||||
sta FRAME
|
||||
|
||||
jsr hgr_make_tables ; necessary?
|
||||
@ -40,7 +40,7 @@ peasantry4:
|
||||
|
||||
; update map location
|
||||
|
||||
jsr update_map_location
|
||||
; jsr update_map_location
|
||||
|
||||
; update score
|
||||
|
||||
@ -54,7 +54,7 @@ peasantry4:
|
||||
|
||||
new_location:
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
sta LEVEL_OVER
|
||||
|
||||
;==========================
|
||||
; load updated verb table
|
||||
@ -63,7 +63,7 @@ new_location:
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #15
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda verb_tables_low,X
|
||||
@ -79,7 +79,7 @@ new_location:
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #15
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda map_backgrounds_low,X
|
||||
@ -125,7 +125,7 @@ not_necessary_cottage:
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #15
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda map_priority_low,X
|
||||
@ -175,7 +175,7 @@ game_loop:
|
||||
|
||||
jsr check_keyboard
|
||||
|
||||
lda GAME_OVER
|
||||
lda LEVEL_OVER
|
||||
bmi oops_new_location
|
||||
bne game_over
|
||||
|
||||
|
@ -288,8 +288,8 @@ ned_cottage_try:
|
||||
lda #LOAD_GAME_OVER
|
||||
sta WHICH_LOAD
|
||||
|
||||
lda #1
|
||||
sta GAME_OVER
|
||||
lda #NEW_FROM_DISK
|
||||
sta LEVEL_OVER
|
||||
|
||||
ldx #<ned_cottage_try_message
|
||||
ldy #>ned_cottage_try_message
|
||||
|
@ -52,9 +52,7 @@ really_move_peasant:
|
||||
;============================
|
||||
peasant_x_toobig:
|
||||
|
||||
inc MAP_X
|
||||
|
||||
jsr new_map_location
|
||||
jsr move_map_east
|
||||
|
||||
lda #0 ; new X location
|
||||
|
||||
@ -63,9 +61,7 @@ peasant_x_toobig:
|
||||
;============================
|
||||
peasant_x_negative:
|
||||
|
||||
dec MAP_X
|
||||
|
||||
jsr new_map_location
|
||||
jsr move_map_west
|
||||
|
||||
lda #39 ; new X location
|
||||
|
||||
@ -110,9 +106,7 @@ done_movex:
|
||||
;============================
|
||||
peasant_y_toobig:
|
||||
|
||||
inc MAP_Y
|
||||
|
||||
jsr new_map_location
|
||||
jsr move_map_south
|
||||
|
||||
lda #45 ; new X location
|
||||
|
||||
@ -122,9 +116,7 @@ peasant_y_toobig:
|
||||
;============================
|
||||
peasant_y_negative:
|
||||
|
||||
dec MAP_Y
|
||||
|
||||
jsr new_map_location
|
||||
jsr move_map_north
|
||||
|
||||
lda #160 ; new X location
|
||||
|
||||
@ -136,7 +128,7 @@ done_movey:
|
||||
|
||||
; if we moved off screen, don't re-draw peasant
|
||||
|
||||
lda GAME_OVER
|
||||
lda LEVEL_OVER
|
||||
bne peasant_the_same
|
||||
|
||||
; save behind new position
|
||||
|
@ -196,17 +196,18 @@ which_disk_array:
|
||||
.byte 1,1,1,2 ; VID_LOGO, TITLE, INTRO. COPY_CHECK
|
||||
.byte 1,1,1,1 ; PEASANT1, PEASANT2, PEASANT3, PEASANT4
|
||||
.byte 2,2,1,2 ; TROGDOR, ENDING, MUSIC, CLIFF
|
||||
.byte 2,1,1,1 ; GAME_OVER, INVENTORY, PARSE_INPUT
|
||||
.byte 1 ;
|
||||
.byte 1,1,1,1,1 ; SAVE1, SAVE2, SAVE3
|
||||
.byte 2,1,1,2 ; GAME_OVER, INVENTORY, PARSE_INPUT, INN
|
||||
.byte 2 ; INSIDE
|
||||
.byte 1,1,1,1 ; SAVE1, SAVE2, SAVE3
|
||||
.byte 1
|
||||
.byte $f ; disk detect
|
||||
|
||||
load_address_array:
|
||||
.byte $60,$60,$60,$60 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
|
||||
.byte $60,$60,$60,$60 ; PEASANT1, PEASANT2, PEASANT3, PEASANT4
|
||||
.byte $60,$60,$D0,$60 ; TROGDOR, ENDING, MUSIC, CLIFF
|
||||
.byte $60,$D0,$20,$40 ; GAME_OVER, INVENTORY, PARSE_INPUT
|
||||
.byte $08 ;
|
||||
.byte $60,$D0,$20,$60 ; GAME_OVER, INVENTORY, PARSE_INPUT, INN
|
||||
.byte $60 ; INSIDE
|
||||
.byte $BC,$BC,$BC,$0A ; SAVE1, SAVE2, SAVE3
|
||||
.byte $0A ;
|
||||
.byte $BC ; disk detect
|
||||
@ -215,8 +216,8 @@ track_array:
|
||||
.byte 4, 6, 9,1 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
|
||||
.byte 15,20,25,30 ; PEASANT1, PEASANT2, PEASANT3, PEASANT4
|
||||
.byte 19,24, 3,29 ; TROGDOR, ENDING, MUSIC, CLIFF
|
||||
.byte 3,14,13,30 ; GAME_OVER, INVENTORY, PARSE_INPUT
|
||||
.byte 0 ;
|
||||
.byte 3,14,13,30 ; GAME_OVER, INVENTORY, PARSE_INPUT, INN
|
||||
.byte 5 ; INSIDE
|
||||
.byte 0, 0, 0, 0, 0 ; SAVE1, SAVE2, SAVE3
|
||||
.byte 0 ; disk detect
|
||||
|
||||
@ -224,8 +225,8 @@ sector_array:
|
||||
.byte 0, 0, 0, 0 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
|
||||
.byte 0, 0, 0, 0 ; PEASANT1, PEASANT2, PEASANT3, PEASANT4
|
||||
.byte 0, 0, 0, 0 ; TROGDOR, ENDING, MUSIC, CLIFF
|
||||
.byte 0, 0, 0, 1 ; GAME_OVER, INVENTORY, PARSE_INPUT
|
||||
.byte 6 ;
|
||||
.byte 0, 0, 0, 0 ; GAME_OVER, INVENTORY, PARSE_INPUT, INN
|
||||
.byte 0 ; INSIDE
|
||||
.byte 11,12,13,14,15 ; SAVE1, SAVE2, SAVE3
|
||||
.byte 0 ; disk detect
|
||||
|
||||
@ -233,8 +234,8 @@ length_array:
|
||||
.byte 32, 50, 60, 20 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
|
||||
.byte 80, 88, 88, 80 ; PEASANT1, PEASANT2, PEASANT3, PEASANT4
|
||||
.byte 80, 80, 16, 80 ; TROGDOR, ENDING, MUSIC, CLIFF
|
||||
.byte 16, 16, 18, 78 ; GAME_OVER, INVENTORY, PARSE_INPUT
|
||||
.byte 3 ;
|
||||
.byte 16, 16, 18, 80 ; GAME_OVER, INVENTORY, PARSE_INPUT, INN
|
||||
.byte 80 ; INSIDE
|
||||
.byte 1,1,1,1,1 ; SAVE1, SAVE2, SAVE3
|
||||
.byte 1 ; disk detect
|
||||
|
||||
|
@ -5,13 +5,13 @@
|
||||
; want to load this to address $90
|
||||
|
||||
;
|
||||
.byte LOAD_PEASANT4 ; WHICH_LOAD = $90
|
||||
.byte LOAD_INSIDE ; WHICH_LOAD = $90
|
||||
.byte 15 ; PEASANT_X = $91
|
||||
.byte 128 ; PEASANT_Y = $92
|
||||
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
|
||||
.byte 1 ; MAP_X = $94
|
||||
.byte 3 ; MAP_Y = $95
|
||||
.byte LOCATION_WAVY_TREE; MAP_LOCATION = $96
|
||||
.byte 0 ; MAP_X = $94
|
||||
.byte 0 ; MAP_Y = $95
|
||||
.byte LOCATION_INSIDE_LADY; MAP_LOCATION = $96
|
||||
.byte $ff ; GAME_STATE_0 = $97
|
||||
.byte $00 ; GAME_STATE_1 = $98
|
||||
.byte $00 ; GAME_STATE_2 = $99
|
||||
|
@ -2,6 +2,8 @@
|
||||
; Hidden Glen
|
||||
;================
|
||||
|
||||
blah:
|
||||
|
||||
; (Walk in the path of Dongolev's arrows)
|
||||
.byte "Hopefully this guy will have some sense and not shoot you.",0
|
||||
; {Dongolev shoots you in the head}
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
trogdor:
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
sta LEVEL_OVER
|
||||
sta FRAME
|
||||
|
||||
jsr hgr_make_tables ; needed?
|
||||
|
@ -56,7 +56,7 @@ ALTH = $68
|
||||
SAVED_X = $69
|
||||
PEASANT_XADD = $6A
|
||||
PEASANT_YADD = $6B
|
||||
GAME_OVER = $6C
|
||||
LEVEL_OVER = $6C
|
||||
NEW_LOCATION = $FF
|
||||
NEW_FROM_DISK = $01
|
||||
|
||||
@ -111,8 +111,8 @@ PEASANT_DIR = $93
|
||||
PEASANT_DIR_RIGHT = 1
|
||||
PEASANT_DIR_LEFT = 2
|
||||
PEASANT_DIR_DOWN = 3
|
||||
MAP_X = $94
|
||||
MAP_Y = $95
|
||||
;MAP_X = $94
|
||||
;MAP_Y = $95
|
||||
MAP_LOCATION = $96
|
||||
|
||||
GAME_STATE_0 = $97
|
||||
@ -275,13 +275,14 @@ LOCATION_WAVY_TREE = 16
|
||||
LOCATION_KERREK_2 = 17
|
||||
LOCATION_OUTSIDE_LADY = 18
|
||||
LOCATION_BURN_TREES = 19
|
||||
LOCATION_HIDDEN_GLEN = 20
|
||||
LOCATION_CLIFF_BASE = 21
|
||||
LOCATION_CLIFF_HEIGHTS = 22
|
||||
LOCATION_TROGDOR_OUTER = 23
|
||||
LOCATION_TROGDOR_LAIR = 24
|
||||
LOCATION_CLIFF_BASE = 20
|
||||
LOCATION_CLIFF_HEIGHTS = 21
|
||||
LOCATION_TROGDOR_OUTER = 22
|
||||
LOCATION_TROGDOR_LAIR = 23
|
||||
LOCATION_HIDDEN_GLEN = 24
|
||||
LOCATION_INSIDE_LADY = 25
|
||||
LOCATION_INSIDE_INN = 26
|
||||
LOCATION_INSIDE_NN = 27
|
||||
LOCATION_INSIDE_NN = 26
|
||||
LOCATION_INSIDE_INN = 27
|
||||
|
||||
|
||||
LOCATION_EMPTY = 28
|
||||
|
Loading…
x
Reference in New Issue
Block a user