mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-09-29 08:55:10 +00:00
peasant: hook up a bunch more text parsing
This commit is contained in:
parent
ef86ae6ea1
commit
c0e41a9255
@ -1,5 +1,8 @@
|
||||
TODO:
|
||||
|
||||
+ consolidate the lookup info for message box sizes, as in the
|
||||
end only Y2 is changing
|
||||
|
||||
+ background priority mask not working when at far top of screen
|
||||
+ ESC SKIPS at top of intro
|
||||
+ Loading screen is slow when getting names
|
||||
|
@ -13,7 +13,10 @@ parse_input:
|
||||
upcase_loop:
|
||||
lda input_buffer,X
|
||||
beq done_upcase_loop
|
||||
and #$DF
|
||||
cmp #' '|$80 ; skip uppercasing space
|
||||
bne skip_uppercase
|
||||
and #$DF ; uppercase
|
||||
skip_uppercase:
|
||||
sta input_buffer,X
|
||||
inx
|
||||
jmp upcase_loop
|
||||
@ -50,6 +53,148 @@ done_upcase_loop:
|
||||
rts ; jump to routine
|
||||
|
||||
|
||||
;================
|
||||
; quit
|
||||
;================
|
||||
parse_quit:
|
||||
lda #<quit_message
|
||||
sta OUTL
|
||||
lda #>quit_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;================
|
||||
; smell / sniff
|
||||
;================
|
||||
parse_smell:
|
||||
parse_sniff:
|
||||
lda #<smell_message
|
||||
sta OUTL
|
||||
lda #>smell_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;================
|
||||
; dan
|
||||
;================
|
||||
parse_dan:
|
||||
lda #<dan_message
|
||||
sta OUTL
|
||||
lda #>dan_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;================
|
||||
; go
|
||||
;================
|
||||
parse_go:
|
||||
lda #<go_message
|
||||
sta OUTL
|
||||
lda #>go_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;================
|
||||
; drop/throw
|
||||
;================
|
||||
parse_drop:
|
||||
parse_throw:
|
||||
lda #<no_baby_message
|
||||
sta OUTL
|
||||
lda #>no_baby_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;================
|
||||
; climb
|
||||
;================
|
||||
parse_climb:
|
||||
lda #<climb_cliff_message
|
||||
sta OUTL
|
||||
lda #>climb_cliff_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;================
|
||||
; get/take/steal
|
||||
;================
|
||||
parse_get:
|
||||
parse_take:
|
||||
parse_steal:
|
||||
lda #<get_message
|
||||
sta OUTL
|
||||
lda #>get_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;================
|
||||
; give
|
||||
;================
|
||||
parse_give:
|
||||
lda #<give_message
|
||||
sta OUTL
|
||||
lda #>give_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;================
|
||||
; haldo
|
||||
;================
|
||||
parse_haldo:
|
||||
lda #<haldo_message
|
||||
sta OUTL
|
||||
lda #>haldo_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;================
|
||||
; why
|
||||
;================
|
||||
parse_why:
|
||||
lda #<why_message
|
||||
sta OUTL
|
||||
lda #>why_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;================
|
||||
; this / what the
|
||||
;================
|
||||
parse_this:
|
||||
parse_what:
|
||||
lda #<what_message
|
||||
sta OUTL
|
||||
lda #>what_message
|
||||
jmp finish_parse_message
|
||||
|
||||
|
||||
;================
|
||||
; party
|
||||
;================
|
||||
parse_party:
|
||||
lda #<party_message
|
||||
sta OUTL
|
||||
lda #>party_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;================
|
||||
; map
|
||||
;================
|
||||
parse_map:
|
||||
lda #<map_message
|
||||
sta OUTL
|
||||
lda #>map_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;================
|
||||
; help
|
||||
;================
|
||||
parse_help:
|
||||
lda #<help_message
|
||||
sta OUTL
|
||||
lda #>help_message
|
||||
jmp finish_parse_message
|
||||
|
||||
|
||||
;================
|
||||
; boo
|
||||
;================
|
||||
parse_boo:
|
||||
lda #<boo_message
|
||||
sta OUTL
|
||||
lda #>boo_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;================
|
||||
; cheat
|
||||
;================
|
||||
@ -86,6 +231,18 @@ parse_dance:
|
||||
lda #>dance_message
|
||||
jmp finish_parse_message
|
||||
|
||||
;===================
|
||||
; die
|
||||
;===================
|
||||
|
||||
parse_die:
|
||||
|
||||
lda #<die_message
|
||||
sta OUTL
|
||||
lda #>die_message
|
||||
jmp finish_parse_message
|
||||
|
||||
|
||||
;=====================
|
||||
; drink
|
||||
;=====================
|
||||
@ -223,31 +380,21 @@ where_done:
|
||||
; unknown
|
||||
;=================
|
||||
parse_ask:
|
||||
parse_boo:
|
||||
parse_break:
|
||||
parse_buy:
|
||||
parse_climb:
|
||||
parse_close:
|
||||
parse_deploy:
|
||||
parse_die:
|
||||
parse_ditch:
|
||||
parse_drop:
|
||||
parse_enter:
|
||||
parse_feed:
|
||||
parse_get:
|
||||
parse_give:
|
||||
parse_go:
|
||||
parse_haldo:
|
||||
parse_jump:
|
||||
parse_kick:
|
||||
parse_kill:
|
||||
parse_knock:
|
||||
parse_light:
|
||||
parse_make:
|
||||
parse_map:
|
||||
parse_no:
|
||||
parse_open:
|
||||
parse_party:
|
||||
parse_pet:
|
||||
parse_play:
|
||||
parse_pull:
|
||||
@ -255,7 +402,6 @@ parse_punch:
|
||||
parse_push:
|
||||
parse_put:
|
||||
parse_pwd:
|
||||
parse_quit:
|
||||
parse_read:
|
||||
parse_ride:
|
||||
parse_ring:
|
||||
@ -264,25 +410,17 @@ parse_shoot:
|
||||
parse_sit:
|
||||
parse_skip:
|
||||
parse_sleep:
|
||||
parse_smell:
|
||||
parse_sniff:
|
||||
parse_steal:
|
||||
parse_swim:
|
||||
parse_take:
|
||||
parse_this:
|
||||
parse_throw:
|
||||
parse_try:
|
||||
parse_turn:
|
||||
parse_use:
|
||||
parse_wake:
|
||||
parse_wear:
|
||||
parse_what:
|
||||
parse_why:
|
||||
parse_yet:
|
||||
parse_unknown:
|
||||
lda #<help_message
|
||||
lda #<unknown_message
|
||||
sta OUTL
|
||||
lda #>help_message
|
||||
lda #>unknown_message
|
||||
jmp finish_parse_message
|
||||
|
||||
|
||||
@ -298,12 +436,10 @@ restore_parse_message:
|
||||
jsr hgr_partial_restore
|
||||
|
||||
; lda last_bg_l
|
||||
; sta getsrc_smc+1
|
||||
; lda last_bg_h
|
||||
; sta getsrc_smc+2
|
||||
|
||||
; lda #$40
|
||||
|
||||
; sta getsrc_smc+1
|
||||
; lda last_bg_h
|
||||
; sta getsrc_smc+2
|
||||
; lda #$40
|
||||
; jsr decompress_lzsa2_fast
|
||||
|
||||
|
||||
@ -368,18 +504,38 @@ inc_verb_ptr_noflo:
|
||||
rts
|
||||
|
||||
verb_lookup:
|
||||
.byte "BOO",VERB_BOO|$80
|
||||
.byte "CHEAT",VERB_CHEAT|$80
|
||||
.byte "CLIMB",VERB_CLIMB|$80
|
||||
.byte "COPY",VERB_COPY|$80
|
||||
.byte "DANCE",VERB_DANCE|$80
|
||||
.byte "DIE",VERB_DIE|$80
|
||||
.byte "DRINK",VERB_DRINK|$80
|
||||
.byte "DROP",VERB_DROP|$80
|
||||
.byte "GET",VERB_GET|$80
|
||||
.byte "GIVE",VERB_GIVE|$80
|
||||
.byte "GO ",VERB_GO|$80
|
||||
.byte "HALDO",VERB_HALDO|$80
|
||||
.byte "HELP",VERB_HELP|$80
|
||||
.byte "INV",VERB_INVENTORY|$80
|
||||
.byte "LOAD",VERB_LOAD|$80
|
||||
.byte "LOOK",VERB_LOOK|$80
|
||||
.byte "MAP",VERB_MAP|$80
|
||||
.byte "PARTY",VERB_PARTY|$80
|
||||
.byte "QUIT",VERB_QUIT|$80
|
||||
.byte "SMELL",VERB_SMELL|$80
|
||||
.byte "SNIFF",VERB_SNIFF|$80
|
||||
.byte "TAKE",VERB_TAKE|$80
|
||||
.byte "TALK",VERB_TALK|$80
|
||||
.byte "THIS",VERB_THIS|$80
|
||||
.byte "THROW",VERB_THROW|$80
|
||||
.byte "SAVE",VERB_SAVE|$80
|
||||
.byte "SHOW",VERB_SHOW|$80
|
||||
.byte "STEAL",VERB_STEAL|$80
|
||||
.byte "VER",VERB_VERSION|$80
|
||||
.byte "WHAT THE",VERB_WHAT|$80
|
||||
.byte "WHERE",VERB_WHERE|$80
|
||||
.byte "WHY",VERB_WHY|$80
|
||||
.byte $00
|
||||
|
||||
|
||||
@ -455,9 +611,9 @@ 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_y2: .byte 54, 62, 70, 78, 86, 94, 102, 110
|
||||
message_tx: .byte 7, 7, 7, 7, 7, 7, 7, 7
|
||||
message_ty: .byte 36, 36, 41, 35, 33, 33, 33, 33
|
||||
message_ty: .byte 36, 36, 36, 36, 36, 36, 36, 36
|
||||
|
||||
|
||||
;======================
|
||||
@ -560,3 +716,4 @@ verb_table:
|
||||
.word parse_where-1 ; VERB_WHERE = 67
|
||||
.word parse_why-1 ; VERB_WHY = 68
|
||||
.word parse_yet-1 ; VERB_YES = 69
|
||||
.word parse_help-1 ; VERB_HELP = 70
|
||||
|
@ -231,7 +231,7 @@ sector_array:
|
||||
|
||||
length_array:
|
||||
.byte 32, 50, 60, 20 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
|
||||
.byte 80, 80, 88, 80 ; PEASANT1, PEASANT2, PEASANT3, PEASANT4
|
||||
.byte 80, 88, 88, 80 ; PEASANT1, PEASANT2, PEASANT3, PEASANT4
|
||||
.byte 80, 80, 16, 80 ; TROGDOR, ENDING, MUSIC, CLIFF
|
||||
.byte 20, 33, 27, 78 ;
|
||||
.byte 3 ;
|
||||
|
@ -32,6 +32,7 @@
|
||||
.byte "Ask about what?",0
|
||||
|
||||
; + boo
|
||||
boo_message:
|
||||
.byte "Scared me.",0
|
||||
|
||||
; + cheat
|
||||
@ -39,6 +40,7 @@ cheat_message:
|
||||
.byte "Meh.",0
|
||||
|
||||
; + dan (or any phrase involving Dan; anywhere)
|
||||
dan_message:
|
||||
.byte "Dan's still okay. Got a",13
|
||||
.byte "place on Dekalb with Rick",13
|
||||
.byte "and his wife. Slimmed up a",13
|
||||
@ -51,7 +53,9 @@ dance_message:
|
||||
.byte "here and soak up the scene.",0
|
||||
|
||||
; + die (anywhere) (Warning: This kills you.)
|
||||
.byte "That wasn't very smart. You dead.",0
|
||||
die_message:
|
||||
.byte "That wasn't very smart. You",13
|
||||
.byte "dead.",0
|
||||
|
||||
; + drink
|
||||
drink_message:
|
||||
@ -63,16 +67,32 @@ 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
|
||||
quit_message:
|
||||
.byte "Well fine Boring Sanders!",13
|
||||
.byte "Hope you saved your game",13
|
||||
.byte "cause it is OVER between",13
|
||||
.byte "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
|
||||
map_message:
|
||||
.byte "We are neither confirming",13
|
||||
.byte "nor denying the presence of",13
|
||||
.byte "a map in this game, but",13
|
||||
.byte "irridisregardless, you",13
|
||||
.byte "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
|
||||
party_message:
|
||||
.byte "You are part of the Whig",13
|
||||
.byte "party. They are making",13
|
||||
.byte "gangrene-awareness their",13
|
||||
.byte "number one campaign",13
|
||||
.byte "priority.",0
|
||||
|
||||
; + what the f- / this sucks
|
||||
.byte "Come now. Don't get discouraged.",0
|
||||
what_message:
|
||||
.byte "Come now. Don't get",13
|
||||
.byte "discouraged.",0
|
||||
|
||||
; + where (offset 22)
|
||||
where_message:
|
||||
@ -80,32 +100,65 @@ where_message:
|
||||
.byte " ",0
|
||||
|
||||
; + why
|
||||
why_message:
|
||||
.byte "I wish I knew.",0
|
||||
|
||||
; + haldo
|
||||
.byte "That's totally not Dongolev.",0
|
||||
haldo_message:
|
||||
.byte "That's totally not",13
|
||||
.byte "Dongolev.",0
|
||||
|
||||
; + smell/sniff
|
||||
.byte "Smells like a computer game.",0
|
||||
smell_message:
|
||||
.byte "Smells like a computer",13
|
||||
.byte "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
|
||||
go_message:
|
||||
.byte "Use the arrow keys, pal.",13
|
||||
.byte "Just like a joypad only",13
|
||||
.byte "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
|
||||
|
||||
; + ???? ditch/drop/deploy/use baby (after baby left)
|
||||
; + drop baby, throw baby (before getting the baby)
|
||||
no_baby_message:
|
||||
.byte "You don't even have two",13
|
||||
.byte "babies to rub together.",0
|
||||
|
||||
; + climb cliff (screens where cliff is there [pass doesn't count?])
|
||||
climb_cliff_message:
|
||||
.byte "There aren't enough",13
|
||||
.byte "footholds and you don't",13
|
||||
.byte "have any carabeaners on",13
|
||||
.byte "you.",0
|
||||
|
||||
; + climb tree
|
||||
.byte "But then your hands would get all sappy.",0
|
||||
.byte "But then your hands would",13
|
||||
.byte "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
|
||||
|
||||
; ???? steal
|
||||
; + get/take
|
||||
get_message:
|
||||
.byte "You probably WISH you could",13
|
||||
.byte "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
|
||||
give_message:
|
||||
.byte "You don't need to give",13
|
||||
.byte "that now.",0
|
||||
|
||||
; + throw baby (anywhere but the west side of the lake)
|
||||
.byte "Hmmm. Maybe try someplace else.",0
|
||||
|
||||
@ -128,15 +181,22 @@ look_irrelevant_message:
|
||||
; + 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
|
||||
|
||||
unknown_message:
|
||||
.byte "I don't understand. Type",13
|
||||
.byte "HELP for assistances.",0
|
||||
|
||||
help_message:
|
||||
.byte "I don't understand. Type",13
|
||||
.byte "HELP for assistances.",0
|
||||
|
||||
.byte "Type LOOK to see your",13
|
||||
.byte "surroundings. Type",13
|
||||
.byte "INVENTORY or INV to see",13
|
||||
.byte "your stuff. Type WHERE to",13
|
||||
.byte "see the name of the place",13
|
||||
.byte "you're in. Type SAVE or",13
|
||||
.byte "LOAD to save or load your",13
|
||||
.byte "game.",0
|
||||
|
@ -68,6 +68,7 @@ VERB_WHAT = 66
|
||||
VERB_WHERE = 67
|
||||
VERB_WHY = 68
|
||||
VERB_YES = 69
|
||||
VERB_HELP = 70
|
||||
|
||||
NOUN_UNKNOWN = 0
|
||||
NOUN_ARCHER = 1
|
||||
|
Loading…
Reference in New Issue
Block a user