From d3227c94ceb5a0a57de2b9dd9fc8ba129857c6f1 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 23 Oct 2021 09:22:18 -0400 Subject: [PATCH] peasant: hook up waterfall dialog --- games/peasant/peasant1.s | 4 +- games/peasant/peasant1_actions.s | 227 ++++++------------------------- games/peasant/text/peasant1.inc | 4 + 3 files changed, 44 insertions(+), 191 deletions(-) diff --git a/games/peasant/peasant1.s b/games/peasant/peasant1.s index 6a076338..cfff3a19 100644 --- a/games/peasant/peasant1.s +++ b/games/peasant/peasant1.s @@ -248,14 +248,14 @@ verb_tables_low: .byte gary_verb_table ; 0 -- gary the horse .byte >gary_verb_table ; 1 -- top footprints .byte >gary_verb_table ; 2 -- wishing well .byte >gary_verb_table ; 3 -- leaning tree - .byte >gary_verb_table ; 4 -- waterfall + .byte >waterfall_verb_table ; 4 -- waterfall peasant1_text_lzsa: diff --git a/games/peasant/peasant1_actions.s b/games/peasant/peasant1_actions.s index db00e4fd..e9917443 100644 --- a/games/peasant/peasant1_actions.s +++ b/games/peasant/peasant1_actions.s @@ -688,229 +688,78 @@ river_swim: ldx #river_swim_message jmp finish_parse_message +.endif ;======================= ;======================= ;======================= - ; mountain pass + ; waterfall ;======================= ;======================= ;======================= -mountain_pass_verb_table: - .byte VERB_ASK - .word mountain_pass_ask-1 - .byte VERB_ATTACK - .word mountain_pass_attack-1 - .byte VERB_BREAK - .word mountain_pass_break-1 - .byte VERB_LOOK - .word mountain_pass_look-1 - .byte VERB_TALK - .word mountain_pass_talk-1 +waterfall_verb_table: + .byte VERB_LOOK + .word waterfall_look-1 + .byte VERB_SWIM + .word waterfall_swim-1 .byte 0 - - ;================ - ; ask - ;================ -mountain_pass_ask: - lda CURRENT_NOUN - - cmp #NOUN_FIRE - beq ask_about_fire - cmp #NOUN_JHONKA - beq ask_about_jhonka - cmp #NOUN_KERREK - beq ask_about_kerrek - cmp #NOUN_NED - beq ask_about_ned - cmp #NOUN_ROBE - beq ask_about_robe - cmp #NOUN_SMELL - beq ask_about_smell - cmp #NOUN_TROGDOR - beq ask_about_trogdor - - ; else ask about unknown - -ask_about_unknown: - ldx #knight_ask_unknown_message - jmp finish_parse_message - -ask_about_fire: - ldx #knight_ask_fire_message - jmp finish_parse_message - -ask_about_jhonka: - ldx #knight_ask_jhonka_message - jmp finish_parse_message - -ask_about_kerrek: - ldx #knight_ask_kerrek_message - jmp finish_parse_message - -ask_about_ned: - ldx #knight_ask_ned_message - jmp finish_parse_message - -ask_about_robe: - ldx #knight_ask_robe_message - jmp finish_parse_message - -ask_about_smell: - ldx #knight_ask_smell_message - jmp finish_parse_message - -ask_about_trogdor: - ldx #knight_ask_trogdor_message - jmp finish_parse_message - - - - ;================ - ; attack - ;================ -mountain_pass_break: -mountain_pass_attack: - lda CURRENT_NOUN - cmp #NOUN_SIGN - beq attack_sign - - jmp parse_common_unknown - -attack_sign: - ldx #attack_sign_message - jmp finish_parse_message - - ;================= ; look ;================= -mountain_pass_look: +waterfall_look: lda CURRENT_NOUN - cmp #NOUN_KNIGHT - beq knight_look - cmp #NOUN_MAN - beq knight_look - cmp #NOUN_DUDE - beq knight_look - cmp #NOUN_GUY - beq knight_look + cmp #NOUN_TREE + beq waterfall_look_tree + cmp #NOUN_WATERFALL + beq waterfall_look_waterfall - cmp #NOUN_SIGN - beq sign_look - cmp #NOUN_TROGDOR - beq trogdor_look cmp #NOUN_NONE - beq pass_look + beq waterfall_look_at jmp parse_common_look -knight_look: - ldx #knight_look_message +waterfall_look_at: + ldx #waterfall_look_at_message jmp finish_parse_message -pass_look: - ldx #pass_look_message +waterfall_look_tree: + ldx #waterfall_look_tree_message jmp finish_parse_message -sign_look: - ldx #sign_look_message +waterfall_look_waterfall: + ldx #waterfall_look_waterfall_message jmp finish_parse_message -trogdor_look: - ldx #trogdor_look_message - jmp finish_parse_message + ;================= + ; swim + ;================= - - ;=================== - ; talk - ;=================== - -mountain_pass_talk: +waterfall_swim: lda CURRENT_NOUN - cmp #NOUN_KNIGHT - beq talk_to_knight - cmp #NOUN_GUY - beq talk_to_knight - cmp #NOUN_MAN - beq talk_to_knight - cmp #NOUN_DUDE - beq talk_to_knight - ; else, no one - jmp parse_common_talk + cmp #NOUN_WATER + beq waterfall_swim_water + cmp #NOUN_WATERFALL + beq waterfall_swim_water + cmp #NOUN_NONE + beq waterfall_swim_water -talk_to_knight: + jmp parse_common_unknown - lda GAME_STATE_2 - and #TALKED_TO_KNIGHT - bne knight_skip_text - - ; first time only - ldx #talk_knight_first_message - jsr partial_message_step - - ; first time only - ldx #talk_knight_second_message - jsr partial_message_step - -knight_skip_text: - ldx #talk_knight_third_message - jsr partial_message_step - - ldx #talk_knight_stink_message - jsr partial_message_step - - ldx #talk_knight_dress_message - jsr partial_message_step - - ldx #talk_knight_fire_message - jsr partial_message_step - - ldx #talk_knight_fourth_message - - lda GAME_STATE_2 - and #TALKED_TO_KNIGHT - bne knight_skip_text2 - - jsr partial_message_step - - ; first time only - ldx #talk_knight_fifth_message - - lda GAME_STATE_2 - ora #TALKED_TO_KNIGHT - sta GAME_STATE_2 - -knight_skip_text2: +waterfall_swim_water: + ldx #waterfall_swim_message jmp finish_parse_message -.endif + + .include "dialog_peasant1.inc" diff --git a/games/peasant/text/peasant1.inc b/games/peasant/text/peasant1.inc index e3326249..ec6e201c 100644 --- a/games/peasant/text/peasant1.inc +++ b/games/peasant/text/peasant1.inc @@ -284,18 +284,21 @@ gary_talk_message: ;=========== ; + look +waterfall_look_at_message: .byte "There's a beautiful,",13 .byte "magical waterfall",13 .byte "cascading down the cliff",13 .byte "side.",0 ; + look tree +waterfall_look_tree_message: .byte "You see some trees in the",13 .byte "distance. You hold your",13 .byte "fingers up to one eye and",13 .byte "pretend to squash it.",0 ; + look waterfall +waterfall_look_waterfall_message: .byte "Upon closer inspection,",13 .byte "you discover it's not",13 .byte "magical. That's just mist,",13 @@ -303,6 +306,7 @@ gary_talk_message: .byte "anything.",0 ; + swim +waterfall_swim_message: .byte "That waterfall would",13 .byte "probably churn you into one",13 .byte "of those weight-gain",13