peasant: work on getting cliff base fully working

This commit is contained in:
Vince Weaver 2024-10-04 00:43:26 -04:00
parent d238bef0e2
commit ae5ff9fc75
9 changed files with 193 additions and 288 deletions

View File

@ -14,8 +14,8 @@ cliff_base.o: cliff_base.s \
../zp.inc ../hardware.inc ../qload.inc ../version.inc \
../inventory/inventory.inc \
../parse_input.inc \
cliff_actions.s \
DIALOG_CLIFF_BASE.ZX02 dialog_cliff_base.inc \
cliff_base_actions.s \
../text/DIALOG_CLIFF_BASE.ZX02 ../text/dialog_cliff_base.inc \
graphics_cliff/cliff_graphics.inc \
graphics_cliff/priority_cliff.inc \
../sprites/peasant_sprites.inc \
@ -28,22 +28,6 @@ cliff_base.o: cliff_base.s \
###
DIALOG_CLIFF_BASE.ZX02: dialog_cliff_base
$(ZX02) -f dialog_cliff_base DIALOG_CLIFF_BASE.ZX02
dialog_cliff_base: dialog_cliff_base.o
ld65 -o dialog_cliff_base dialog_cliff_base.o -C $(LINKER_SCRIPTS)/apple2_d000.inc
dialog_cliff_base.o: dialog_cliff_base.s ../text/cliff.inc
ca65 -o dialog_cliff_base.o dialog_cliff_base.s -l dialog_cliff_base.lst
###
dialog_cliff_base.inc: ../generate_all_symbols dialog_cliff_base
../generate_all_symbols -a 0xd000 dialog_cliff_base.lst > dialog_cliff_base.inc
###
graphics_cliff/cliff_graphics.inc:
cd graphics_cliff && make

View File

@ -1,250 +0,0 @@
.include "../tokens.inc"
;=======================
;=======================
;=======================
; cliff base
;=======================
;=======================
;=======================
cliff_base_verb_table:
.byte VERB_LOOK
.word cliff_base_look-1
.byte VERB_CLIMB
.word cliff_base_climb-1
.byte 0
;=================
; look
;=================
cliff_base_look:
lda CURRENT_NOUN
cmp #NOUN_NONE
beq cliff_base_look_at
jmp parse_common_look
cliff_base_look_at:
ldx #<cliff_base_look_message
ldy #>cliff_base_look_message
jmp finish_parse_message
;=================
; climb
;=================
cliff_base_climb:
lda CURRENT_NOUN
cmp #NOUN_CLIFF
beq cliff_base_do_climb
cmp #NOUN_NONE
beq cliff_base_do_climb
jmp parse_common_unknown
cliff_base_do_climb:
ldx #<cliff_base_climb_message
ldy #>cliff_base_climb_message
jsr partial_message_step
ldx #<cliff_base_climb2_message
ldy #>cliff_base_climb2_message
jmp finish_parse_message
;=======================
;=======================
;=======================
; Cliff Heights
;=======================
;=======================
;=======================
cliff_heights_verb_table:
.byte VERB_GET
.word cliff_heights_get-1
.byte VERB_TAKE
.word cliff_heights_get-1
.byte VERB_STEAL
.word cliff_heights_get-1
.byte VERB_CLIMB
.word cliff_heights_climb-1
.byte VERB_LOOK
.word cliff_heights_look-1
.byte 0
;================
; climb
;================
cliff_heights_climb:
lda CURRENT_NOUN
cmp #NOUN_CLIFF
beq cliff_heights_do_climb
cmp #NOUN_NONE
beq cliff_heights_do_climb
jmp parse_common_unknown
cliff_heights_do_climb:
ldx #<cliff_heights_climb_message
ldy #>cliff_heights_climb_message
jmp finish_parse_message
;================
; get
;================
cliff_heights_get:
cliff_heights_steal:
cliff_heights_take:
lda CURRENT_NOUN
cmp #NOUN_BONE
beq cliff_heights_get_bone
cmp #NOUN_SKULL
beq cliff_heights_get_bone
; else "probably wish" message
jmp parse_common_get
cliff_heights_get_bone:
ldx #<cliff_heights_get_bone_message
ldy #>cliff_heights_get_bone_message
jmp finish_parse_message
;=================
; look
;=================
cliff_heights_look:
lda CURRENT_NOUN
cmp #NOUN_LIGHTNING
beq cliff_heights_look_at_lightning
cmp #NOUN_CAVE
beq cliff_heights_look_at_cave
cmp #NOUN_BONE
beq cliff_heights_look_at_bone
cmp #NOUN_SKULL
beq cliff_heights_look_at_bone
cmp #NOUN_NONE
beq cliff_heights_look_at
jmp parse_common_look
cliff_heights_look_at:
ldx #<cliff_heights_look_at_message
ldy #>cliff_heights_look_at_message
jmp finish_parse_message
cliff_heights_look_at_bone:
ldx #<cliff_heights_look_bone_message
ldy #>cliff_heights_look_bone_message
jmp finish_parse_message
cliff_heights_look_at_cave:
ldx #<cliff_heights_look_cave_message
ldy #>cliff_heights_look_cave_message
jmp finish_parse_message
cliff_heights_look_at_lightning:
ldx #<cliff_heights_look_lightning_message
ldy #>cliff_heights_look_lightning_message
jmp finish_parse_message
;=======================
;=======================
;=======================
; Trogdor Cave Outer
;=======================
;=======================
;=======================
cave_outer_verb_table:
.byte VERB_CLIMB
.word cave_outer_climb-1
.byte VERB_LOOK
.word cave_outer_look-1
.byte 0
;=================
; look
;=================
cave_outer_look:
lda CURRENT_NOUN
cmp #NOUN_BEADS
beq cave_outer_look_at_curtain
cmp #NOUN_CURTAIN
beq cave_outer_look_at_curtain
cmp #NOUN_DOOR
beq cave_outer_look_at_door
cmp #NOUN_SKELETON
beq cave_outer_look_at_skeleton
cmp #NOUN_OPENINGS
beq cave_outer_look_at_openings
cmp #NOUN_NONE
beq cave_outer_look_at
jmp parse_common_look
cave_outer_look_at:
ldx #<cave_outer_look_message
ldy #>cave_outer_look_message
jmp finish_parse_message
cave_outer_look_at_curtain:
ldx #<cave_outer_look_curtain_message
ldy #>cave_outer_look_curtain_message
jmp finish_parse_message
cave_outer_look_at_door:
ldx #<cave_outer_look_door_message
ldy #>cave_outer_look_door_message
jmp finish_parse_message
cave_outer_look_at_openings:
ldx #<cave_outer_look_openings_message
ldy #>cave_outer_look_openings_message
jmp finish_parse_message
cave_outer_look_at_skeleton:
ldx #<cave_outer_look_skeleton_message
ldy #>cave_outer_look_skeleton_message
jmp finish_parse_message
;================
; climb
;================
cave_outer_climb:
lda CURRENT_NOUN
cmp #NOUN_CLIFF
beq cave_outer_do_climb
cmp #NOUN_NONE
beq cave_outer_do_climb
jmp parse_common_unknown
cave_outer_do_climb:
ldx #<cave_outer_climb_message
ldy #>cave_outer_climb_message
jmp finish_parse_message
.include "../dialog_cliff.inc"

View File

@ -147,9 +147,9 @@ col_copy_loop:
; Note: to get to this point of the game you have to be
; in a robe and on fire, so we should enforce that
lda #<walking_sprite_data
lda #<robe_sprite_data
sta zx_src_l+1
lda #>walking_sprite_data
lda #>robe_sprite_data
sta zx_src_h+1
lda #$a0
@ -206,13 +206,6 @@ wait_loop:
bne wait_loop
; delay
; lda #200
; jsr wait
jmp game_loop
oops_new_location:
@ -326,9 +319,9 @@ verb_tables_hi:
cliff_text_zx02:
.incbin "DIALOG_CLIFF_BASE.ZX02"
.incbin "../text/DIALOG_CLIFF_BASE.ZX02"
.include "cliff_actions.s"
.include "cliff_base_actions.s"
walking_sprite_data:
.incbin "../sprites_peasant/walking_sprites.zx02"
robe_sprite_data:
.incbin "../sprites_peasant/robe_sprites.zx02"

View File

@ -0,0 +1,61 @@
.include "../tokens.inc"
;=======================
;=======================
;=======================
; cliff base
;=======================
;=======================
;=======================
cliff_base_verb_table:
.byte VERB_LOOK
.word cliff_base_look-1
.byte VERB_CLIMB
.word cliff_base_climb-1
.byte 0
;=================
; look
;=================
cliff_base_look:
lda CURRENT_NOUN
cmp #NOUN_NONE
beq cliff_base_look_at
jmp parse_common_look
cliff_base_look_at:
ldx #<cliff_base_look_message
ldy #>cliff_base_look_message
jmp finish_parse_message
;=================
; climb
;=================
cliff_base_climb:
lda CURRENT_NOUN
cmp #NOUN_CLIFF
beq cliff_base_do_climb
cmp #NOUN_NONE
beq cliff_base_do_climb
jmp parse_common_unknown
cliff_base_do_climb:
ldx #<cliff_base_climb_message
ldy #>cliff_base_climb_message
jsr partial_message_step
ldx #<cliff_base_climb2_message
ldy #>cliff_base_climb2_message
jmp finish_parse_message
.include "../text/dialog_cliff_base.inc"

View File

@ -1,2 +0,0 @@
.include "../text/lookup.inc"
.include "../text/cliff_base.inc.lookup"

View File

@ -4,7 +4,7 @@ LINKER_SCRIPTS = ../../../linker_scripts
all: enemy_sprites.inc walk_sprites.inc climb_flame_sprites.inc \
climb_sprites.inc robe_sprites.inc flame_sprites.inc \
walking_sprites.zx02
walking_sprites.zx02 robe_sprites.zx02
####
@ -18,6 +18,19 @@ walking_sprites.o: walking_sprites.s \
flame_sprites.inc walk_sprites.inc
ca65 -o walking_sprites.o walking_sprites.s -l walking_sprites.lst
####
robe_sprites.zx02: robe_sprites
$(ZX02) -f robe_sprites robe_sprites.zx02
robe_sprites: robe_sprites.o
ld65 -o robe_sprites robe_sprites.o -C $(LINKER_SCRIPTS)/apple2_a000.inc
robe_sprites.o: robe_sprites.s \
flame_sprites.inc walk_sprites.inc
ca65 -o robe_sprites.o robe_sprites.s -l robe_sprites.lst
enemy_sprites.inc: enemy_sprites.png

View File

@ -0,0 +1,87 @@
robe_sprites_xsize:
.byte 2, 2, 2, 2, 2, 2 ; right ; 0
.byte 2, 2, 2, 2, 2, 2 ; left ; 6
.byte 2, 2, 2, 2, 2, 2 ; up ; 12
.byte 2, 2, 2, 2, 2, 2 ; down ; 18
flame_sprites_xsize:
.byte 2, 2, 2 ; right ; 24
.byte 2, 2, 2 ; left ; 27
.byte 2, 2, 2 ; up ; 30
.byte 2, 2, 2 ; down ; 33
robe_sprites_ysize:
.byte 30, 30, 30, 30, 30, 30 ; right
.byte 30, 30, 30, 30, 30, 30 ; left
.byte 30, 30, 30, 30, 30, 30 ; up
.byte 30, 30, 30, 30, 30, 30 ; down
flame_sprites_ysize:
.byte 9, 9, 9 ; right
.byte 9, 9, 9 ; left
.byte 9, 9, 9 ; up
.byte 9, 9, 9 ; down
robe_sprites_data_l:
.byte <robe_r0_sprite,<robe_r1_sprite,<robe_r2_sprite
.byte <robe_r3_sprite,<robe_r4_sprite,<robe_r5_sprite
.byte <robe_l0_sprite,<robe_l1_sprite,<robe_l2_sprite
.byte <robe_l3_sprite,<robe_l4_sprite,<robe_l5_sprite
.byte <robe_u0_sprite,<robe_u1_sprite,<robe_u2_sprite
.byte <robe_u3_sprite,<robe_u4_sprite,<robe_u5_sprite
.byte <robe_d0_sprite,<robe_d1_sprite,<robe_d2_sprite
.byte <robe_d3_sprite,<robe_d4_sprite,<robe_d5_sprite
flame_sprites_data_l:
.byte <flame_r0_sprite,<flame_r1_sprite,<flame_r2_sprite
.byte <flame_l0_sprite,<flame_l1_sprite,<flame_l2_sprite
.byte <flame_u0_sprite,<flame_u1_sprite,<flame_u2_sprite
.byte <flame_d0_sprite,<flame_d1_sprite,<flame_d2_sprite
robe_sprites_data_h:
.byte >robe_r0_sprite,>robe_r1_sprite,>robe_r2_sprite
.byte >robe_r3_sprite,>robe_r4_sprite,>robe_r5_sprite
.byte >robe_l0_sprite,>robe_l1_sprite,>robe_l2_sprite
.byte >robe_l3_sprite,>robe_l4_sprite,>robe_l5_sprite
.byte >robe_u0_sprite,>robe_u1_sprite,>robe_u2_sprite
.byte >robe_u3_sprite,>robe_u4_sprite,>robe_u5_sprite
.byte >robe_d0_sprite,>robe_d1_sprite,>robe_d2_sprite
.byte >robe_d3_sprite,>robe_d4_sprite,>robe_d5_sprite
flame_sprites_data_h:
.byte >flame_r0_sprite,>flame_r1_sprite,>flame_r2_sprite
.byte >flame_l0_sprite,>flame_l1_sprite,>flame_l2_sprite
.byte >flame_u0_sprite,>flame_u1_sprite,>flame_u2_sprite
.byte >flame_d0_sprite,>flame_d1_sprite,>flame_d2_sprite
robe_mask_data_l:
.byte <robe_r0_mask,<robe_r1_mask,<robe_r2_mask
.byte <robe_r3_mask,<robe_r4_mask,<robe_r5_mask
.byte <robe_l0_mask,<robe_l1_mask,<robe_l2_mask
.byte <robe_l3_mask,<robe_l4_mask,<robe_l5_mask
.byte <robe_u0_mask,<robe_u1_mask,<robe_u2_mask
.byte <robe_u3_mask,<robe_u4_mask,<robe_u5_mask
.byte <robe_d0_mask,<robe_d1_mask,<robe_d2_mask
.byte <robe_d3_mask,<robe_d4_mask,<robe_d5_mask
flame_mask_data_l:
.byte <flame_r0_mask,<flame_r1_mask,<flame_r2_mask
.byte <flame_l0_mask,<flame_l1_mask,<flame_l2_mask
.byte <flame_u0_mask,<flame_u1_mask,<flame_u2_mask
.byte <flame_d0_mask,<flame_d1_mask,<flame_d2_mask
robe_mask_data_h:
.byte >robe_r0_mask,>robe_r1_mask,>robe_r2_mask
.byte >robe_r3_mask,>robe_r4_mask,>robe_r5_mask
.byte >robe_l0_mask,>robe_l1_mask,>robe_l2_mask
.byte >robe_l3_mask,>robe_l4_mask,>robe_l5_mask
.byte >robe_u0_mask,>robe_u1_mask,>robe_u2_mask
.byte >robe_u3_mask,>robe_u4_mask,>robe_u5_mask
.byte >robe_d0_mask,>robe_d1_mask,>robe_d2_mask
.byte >robe_d3_mask,>robe_d4_mask,>robe_d5_mask
flame_mask_data_h:
.byte >flame_r0_mask,>flame_r1_mask,>flame_r2_mask
.byte >flame_l0_mask,>flame_l1_mask,>flame_l2_mask
.byte >flame_u0_mask,>flame_u1_mask,>flame_u2_mask
.byte >flame_d0_mask,>flame_d1_mask,>flame_d2_mask
.include "robe_sprites.inc"
.include "flame_sprites.inc"

View File

@ -13,12 +13,29 @@ all: dump_text shrink_text \
DIALOG_PEASANT4.ZX02 dialog_peasant4.inc \
DIALOG_INSIDE.ZX02 dialog_inside.inc \
DIALOG_INN.ZX02 dialog_inn.inc \
cliff_base.inc.lookup \
DIALOG_CLIFF_BASE.ZX02 dialog_cliff_base.inc \
cliff.inc.lookup \
DIALOG_TROGDOR.ZX02 dialog_trogdor.inc \
common.inc.lookup \
inventory.inc.lookup
###
DIALOG_CLIFF_BASE.ZX02: dialog_cliff_base
$(ZX02) -f dialog_cliff_base DIALOG_CLIFF_BASE.ZX02
dialog_cliff_base: dialog_cliff_base.o
ld65 -o dialog_cliff_base dialog_cliff_base.o -C $(LINKER_SCRIPTS)/apple2_d000.inc
dialog_cliff_base.o: dialog_cliff_base.s \
cliff_base.inc.lookup
ca65 -o dialog_cliff_base.o dialog_cliff_base.s -l dialog_cliff_base.lst
dialog_cliff_base.inc: ../generate_all_symbols dialog_cliff_base
../generate_all_symbols -a 0xd000 dialog_cliff_base.lst > dialog_cliff_base.inc
###
DIALOG_PEASANT1.ZX02: dialog_peasant1
@ -148,6 +165,9 @@ archery.inc.lookup: archery.inc shrink_text
burninated_tree.inc.lookup: burninated_tree.inc shrink_text
./shrink_text < burninated_tree.inc > burninated_tree.inc.lookup
cliff_base.inc.lookup: cliff_base.inc shrink_text
./shrink_text < cliff_base.inc > cliff_base.inc.lookup
cottage.inc.lookup: cottage.inc shrink_text
./shrink_text < cottage.inc > cottage.inc.lookup
@ -219,9 +239,6 @@ yellow_tree.inc.lookup: yellow_tree.inc shrink_text
cliff.inc.lookup: cliff.inc shrink_text
./shrink_text < cliff.inc > cliff.inc.lookup
cliff_base.inc.lookup: cliff_base.inc shrink_text
./shrink_text < cliff_base.inc > cliff_base.inc.lookup
common.inc.lookup: common.inc shrink_text
./shrink_text < common.inc > common.inc.lookup

View File

@ -0,0 +1,2 @@
.include "lookup.inc"
.include "cliff_base.inc.lookup"