peasant: hook up some dialog

This commit is contained in:
Vince Weaver 2021-10-03 21:59:24 -04:00
parent 266e5cd784
commit c8d61d3051
9 changed files with 353 additions and 180 deletions

View File

@ -2,7 +2,8 @@ peasant2 18302
18043 (decompress fast moved)
15899 (much of hgr code moved to qload)
16653 (work on load/save support)
17191 (more work on priorities)
19326 (include common text)
Notes
~~~~~
Some people would like actual S.A.M. support like the original game,

View File

@ -1,23 +1,21 @@
TODO:
before 0.75 release
+ update version file
+ complete waterfall, including animation
+ have init routine set starting score, etc
+ Fix the speech generation code
+ hold down open-apple at boot skip sound check?
+ update intro to walk closer to edges
+ fix color 15 on prioirty to cover all
+ fix issue where walking stops when you cross to screen w priority
+ get screenshot of boat in lake, trogdor, end scene and update website
after 0.75
+ move copy to disk2
+ re-do how off edge-of-screen works (have destination for all 4 co-ords?)
+ move drawing to PAGE1 and use PAGE2 for RAM?
This would remove backing store when drawing text boxes?
+ add dictionary lookup for text
+ add standard set of text box sizes
+ add dictionary lookup for text for smaller size
+ optimize text box sizes
+ replace parse_input lookup with a giant jump table
General:
- More frames in peasant sprites

View File

@ -40,10 +40,20 @@ done_upcase_loop:
lda CURRENT_VERB
check_cheat:
cmp #VERB_CHEAT
bne check_copy
lda #<cheat_message
sta OUTL
lda #>cheat_message
jmp finish_parse_message
check_copy:
cmp #VERB_COPY
bne check_inventory
bne check_dance
; want copy
lda #NEW_FROM_DISK
@ -54,6 +64,40 @@ check_copy:
jmp done_parse_message
check_dance:
cmp #VERB_DANCE
bne check_drink
lda #<dance_message
sta OUTL
lda #>dance_message
jmp finish_parse_message
check_drink:
cmp #VERB_DRINK
bne check_inventory
lda #<drink_message
sta OUTL
lda #>drink_message
sta OUTH
jsr print_text_message
jsr wait_until_keypress
jsr hgr_partial_restore
lda #<drink_message2
sta OUTL
lda #>drink_message2
sta OUTH
jmp finish_parse_message
check_inventory:
cmp #VERB_INVENTORY
bne check_load
@ -74,9 +118,9 @@ check_look:
cmp #VERB_LOOK
bne check_talk
lda #<fake_error1
sta OUTL
lda #>fake_error1
lda #<look_irrelevant_message
sta OUTL
lda #>look_irrelevant_message
jmp finish_parse_message
@ -84,9 +128,9 @@ check_talk:
cmp #VERB_TALK
bne check_save
lda #<fake_error2
lda #<talk_noone_message
sta OUTL
lda #>fake_error2
lda #>talk_noone_message
jmp finish_parse_message
check_save:
@ -114,21 +158,21 @@ check_show:
check_version:
cmp #VERB_VERSION
bne check_help
bne check_unknown
lda #<version_message
sta OUTL
lda #>version_message
jmp finish_parse_message
check_help:
check_unknown:
lda #<help_message
sta OUTL
lda #>help_message
finish_parse_message:
sta OUTH
jsr hgr_text_box
jsr print_text_message
jsr wait_until_keypress
@ -198,7 +242,10 @@ inc_verb_ptr_noflo:
rts
verb_lookup:
.byte "CHEAT",VERB_CHEAT|$80
.byte "COPY",VERB_COPY|$80
.byte "DANCE",VERB_DANCE|$80
.byte "DRINK",VERB_DRINK|$80
.byte "INV",VERB_INVENTORY|$80
.byte "LOAD",VERB_LOAD|$80
.byte "LOOK",VERB_LOOK|$80
@ -207,3 +254,105 @@ verb_lookup:
.byte "SHOW",VERB_SHOW|$80
.byte "VER",VERB_VERSION|$80
.byte $00
.include "text/common.inc"
;======================
; print text message
; OUTL/OUTH point to message
; first we need to calculate the size of the message (lines)
; next we need to set up the box
print_text_message:
jsr count_message_lines
ldy message_len
dey
lda message_x1h,Y
sta BOX_X1H
lda message_x1l,Y
sta BOX_X1L
lda message_y1,Y
sta BOX_Y1
lda message_x2h,Y
sta BOX_X2H
lda message_x2l,Y
sta BOX_X2L
lda message_y2,Y
sta BOX_Y2
tya
pha
jsr hgr_partial_save
jsr draw_box
pla
tay
lda message_tx,Y
sta CURSOR_X
lda message_ty,Y
sta CURSOR_Y
jsr disp_put_string_cursor
rts
;.byte 0,43,24, 0,253,82
;.byte 8,41
; alternate 1
;.byte 0,35,34, 0,253,72
;.byte 7,49,"OK go for it.",0
; .byte 0,35,34, 0,253,82
; .byte 7,49
; 1 2 3 4 5 6 7 8
message_x1h: .byte 0, 0, 0, 0, 0, 0, 0, 0
message_x1l: .byte 35, 35, 35, 35, 35, 35, 35, 35
message_y1: .byte 24, 24, 24, 24, 20, 20, 20, 20
message_x2h: .byte 0, 0, 0, 0, 0, 0, 0, 0
message_x2l: .byte 253, 253, 253, 253, 253, 253, 253, 253
message_y2: .byte 54, 62, 82, 82, 86, 86, 86, 86
message_tx: .byte 7, 7, 7, 7, 7, 7, 7, 7
message_ty: .byte 36, 36, 41, 35, 33, 33, 33, 33
;======================
; count message lines
; in OUTL/OUTH
count_message_lines:
ldy #0
sty message_len
count_message_lines_loop:
lda (OUTL),Y
beq count_message_done
cmp #13
bne count_message_not_cr
inc message_len
count_message_not_cr:
iny
bne count_message_lines_loop ; bra
count_message_done:
inc message_len ; increment for end of message too
rts
message_len:
.byte $0

View File

@ -183,20 +183,20 @@ game_over:
help_message:
.byte 0,43,24, 0,253,82
.byte 8,41,"I don't understand. Type",13
.byte "HELP for assistances.",0
;help_message:
;.byte 0,43,24, 0,253,82
;.byte 8,41,"I don't understand. Type",13
;.byte "HELP for assistances.",0
fake_error1:
.byte 0,43,24, 0,253,82
.byte 8,41,"?SYNTAX ERROR IN 1020",13
.byte "]",127,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
;fake_error2:
;.byte 0,43,24, 0,253,82
;.byte 8,41,"?UNDEF'D STATEMENT ERROR",13
;.byte "]",127,0
.include "graphics/graphics_peasant1.inc"

View File

@ -186,23 +186,26 @@ game_over:
;.include "clear_bottom.s"
;.include "hgr_hgr2.s"
;.include "text/common.inc"
help_message:
.byte 0,43,24, 0,253,82
.byte 8,41,"I don't understand. Type",13
.byte "HELP for assistances.",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
;help_message:
;.byte 0,43,24, 0,253,82
;.byte 8,41,"I don't understand. Type",13
;.byte "HELP for assistances.",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

View File

@ -176,20 +176,20 @@ game_over:
.include "version.inc"
.include "loadsave_menu.s"
help_message:
.byte 0,43,24, 0,253,82
.byte 8,41,"I don't understand. Type",13
.byte "HELP for assistances.",0
;help_message:
;.byte 0,43,24, 0,253,82
;.byte 8,41,"I don't understand. Type",13
;.byte "HELP for assistances.",0
fake_error1:
.byte 0,43,24, 0,253,82
.byte 8,41,"?SYNTAX ERROR IN 1020",13
.byte "]",127,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
;fake_error2:
;.byte 0,43,24, 0,253,82
;.byte 8,41,"?UNDEF'D STATEMENT ERROR",13
;.byte "]",127,0
.include "graphics/graphics_peasant3.inc"

View File

@ -187,20 +187,20 @@ game_over:
.include "version.inc"
.include "loadsave_menu.s"
help_message:
.byte 0,43,24, 0,253,82
.byte 8,41,"I don't understand. Type",13
.byte "HELP for assistances.",0
;help_message:
;.byte 0,43,24, 0,253,82
;.byte 8,41,"I don't understand. Type",13
;.byte "HELP for assistances.",0
fake_error1:
.byte 0,43,24, 0,253,82
.byte 8,41,"?SYNTAX ERROR IN 1020",13
.byte "]",127,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
;fake_error2:
;.byte 0,43,24, 0,253,82
;.byte 8,41,"?UNDEF'D STATEMENT ERROR",13
;.byte "]",127,0
map_backgrounds_low:

View File

@ -0,0 +1,138 @@
;==================
; Anywhere
;==================
; + get/wear belt (after getting it)
.byte "You're already wearing it. Too bad you smell like the trash barge off Peasant Isle.",0
; + wear mask (after getting it)
.byte "Not on this screen. You've got your image to think about. Actually, you might want to start deliberating on that right now.",0
; + wear robe (after getting it)
.byte "You slip into the vintage robe. It smells like grampa's lap. Now you're lookin like a serious peasant.",0
; + wear robe (not in inventory)
.byte "You don't have anything but",13
.byte "your 'Scalding Lake'",13
.byte "t-shirt.",0
.byte "And pants. Forgot to",13
.byte "mention the pants.",0
; + wear robe (already wearing)
.byte "You're already in the old skool robe. Represent.",0
; + look (when in hay disguise)
.byte "Right now, you see a bunch of hay.",0
; + look trees
.byte "You are an incredibly",13
.byte "boring person.",0
; + ask about (unknown)
.byte "Ask about what?",0
; + boo
.byte "Scared me.",0
; + cheat
cheat_message:
.byte "Meh.",0
; + dan (or any phrase involving Dan; anywhere)
.byte "Dan's still okay. Got a",13
.byte "place on Dekalb with Rick",13
.byte "and his wife. Slimmed up a",13
.byte "bit and looking towards the",13
.byte "future.",0
; + dance (anywhere)
dance_message:
.byte "You'd rather just stand",13
.byte "here and soak up the scene.",0
; + die (anywhere) (Warning: This kills you.)
.byte "That wasn't very smart. You dead.",0
; + drink
drink_message:
.byte "For simplicity's sake you",13
.byte "are immune to hunger and",13
.byte "thirst in this game. So you",13
.byte "got that going for you.",0
drink_message2:
.byte "Which is nice.",0
; + quit (Warning: The game actually does quit.)
.byte "Well fine Boring Sanders! Hope you saved your game cause it is OVER between us!",0
; + map (before you find it)
.byte "We are neither confirming nor denying the presence of a map in this game, but irridisregardless, you don't have one.",0
; + party
.byte "You are part of the Whig party. They are making gangrene-awareness their number one campaign priority.",0
; + what the f- / this sucks
.byte "Come now. Don't get discouraged.",0
; + where
.byte "You're hanging out in {location}.",0
; + why
.byte "I wish I knew.",0
; + haldo
.byte "That's totally not Dongolev.",0
; + smell/sniff
.byte "Smells like a computer game.",0
; + pwd
.byte "~peasantsquest/{location}",0
; + go _____
.byte "Use the arrow keys, pal. Just like a joypad only more like your day job.",0
; + ditch/drop baby (if you have it)
.byte "Quit tryin to ditch the baby!",0
; + ditch/drop/deploy/use baby (before you have it or after left)
; + throw baby (anywhere without the baby)
.byte "You don't even have two babies to rub together.",0
; + climb cliff (screens where cliff is there)
.byte "There aren't enough footholds and you don't have any carabeaners on you.",0
; + climb tree
.byte "But then your hands would get all sappy.",0
; + climb tree (after getting room at inn)
.byte "Naw. That's dumb. Do better.",0
; + get/take/steal
.byte "You probably WISH you could get that.",0
; + get pebbles/rocks (after you've gotten them)
.byte "Come now. We've been through this jaunty little bit before. You took them from the half lake screen with the cattail and stuff.",0
; + give
.byte "You don't need to give that now.",0
; + throw baby (anywhere but the west side of the lake)
.byte "Hmmm. Maybe try someplace else.",0
; + talk
talk_noone_message:
.byte "It's sad when you have to",13
.byte "make up people to talk to.",0
; + look (at anything irrelevant)
look_irrelevant_message:
.byte "You don't need to look at",13
.byte "that.",0
; + look (at anything, while hiding inside the bale of hay)
.byte "Right now, you see a bunch of hay.",0
; + look (at something previously in your inventory but now gone)
.byte "You used to have one, before the great item blight of 402. Check your INVENTORY to read about it.",0
; + look (at something currently in your inventory)
.byte "You've totally got one of those! Check your INVENTORY to give'r a serious looksee.",0
; + help
; + load
; + save
; + show priority
; + version
; + copy
help_message:
.byte "I don't understand. Type",13
.byte "HELP for assistances.",0

View File

@ -1,116 +0,0 @@
;==================
; Anywhere
;==================
; + get/wear belt (after getting it)
.byte "You're already wearing it. Too bad you smell like the trash barge off Peasant Isle.",0
; + wear mask (after getting it)
.byte "Not on this screen. You've got your image to think about. Actually, you might want to start deliberating on that right now.",0
; + wear robe (after getting it)
.byte "You slip into the vintage robe. It smells like grampa's lap. Now you're lookin like a serious peasant.",0
; + wear robe (not in inventory)
.byte "You don't have anything but",13
.byte "your 'Scalding Lake'",13
.byte "t-shirt.",0
.byte "And pants. Forgot to",13
.byte "mention the pants.",0
; + wear robe (already wearing)
.byte "You're already in the old skool robe. Represent.",0
; + look (when in hay disguise)
.byte "Right now, you see a bunch of hay.",0
; + look trees
.byte "You are an incredibly",13
.byte "boring person.",0
; + ask about (unknown)
.byte "Ask about what?",0
; + boo
.byte "Scared me.",0
; + cheat
.byte "Meh.",0
; + dan (or any phrase involving Dan; anywhere)
.byte "Dan's still okay. Got a",13
.byte "place on Dekalb with Rick",13
.byte "and his wife. Slimmed up a",13
.byte "bit and looking towards the",13
.byte "future.",0
; + dance (anywhere)
.byte "You'd rather just stand",13
.byte "here and soak up the scene.",0
; + die (anywhere) (Warning: This kills you.)
.byte "That wasn't very smart. You dead.",0
; + drink
.byte "For simplicity's sake you",13
.byte "are immune to hunger and",
.byte "thirst in this game. So you",13
.byte "got that going for you.",0
.byte "Which is nice.",0
# + quit (Warning: The game actually does quit.)
Well fine Boring Sanders! Hope you saved your game cause it is OVER between us!
# + map (before you find it)
We are neither confirming nor denying the presence of a map in this game, but irridisregardless, you don't have one.
# + party
You are part of the Whig party. They are making gangrene-awareness their number one campaign priority.
# + what the f- / this sucks
Come now. Don't get discouraged.
# + where
You're hanging out in {location}.
# + why
I wish I knew.
# + haldo
That's totally not Dongolev.
# + smell/sniff
Smells like a computer game.
# + pwd
~peasantsquest/{location}
# + go _____
Use the arrow keys, pal. Just like a joypad only more like your day job.
# + ditch/drop baby (if you have it)
Quit tryin to ditch the baby!
# + ditch/drop/deploy/use baby (before you have it or after left)
You don't even have two babies to rub together.
# + climb cliff (screens where cliff is there)
There aren't enough footholds and you don't have any carabeaners on you.
# + climb tree
But then your hands would get all sappy.
# + climb tree (after getting room at inn)
Naw. That's dumb. Do better.
# + get/take/steal
You probably WISH you could get that.
# + get pebbles/rocks (after you've gotten them)
Come now. We've been through this jaunty little bit before. You took them from the half lake screen with the cattail and stuff.
# + give
You don't need to give that now.
# + throw baby (anywhere without the baby)
You don't even have two babies to rub together.
# + throw baby (anywhere but the west side of the lake)
Hmmm. Maybe try someplace else.
# + talk
It's sad when you have to make up people to talk to.
# + look (at anything irrelevant)
You don't need to look at that.
# + look (at anything, while hiding inside the bale of hay)
Right now, you see a bunch of hay.
# + look (at something previously in your inventory but now gone)
You used to have one, before the great item blight of 402. Check your INVENTORY to read about it.
# + look (at something currently in your inventory)
You've totally got one of those! Check your INVENTORY to give'r a serious looksee.
# + load
# + save
# + show priority
# + version
# + copy