peasant: hook up missing parts of ending

This commit is contained in:
Vince Weaver 2021-12-14 23:34:30 -05:00
parent 64eb80051c
commit 6317d01c61
5 changed files with 382 additions and 54 deletions

View File

@ -118,6 +118,7 @@ start_new_game:
sta GAME_STATE_0 sta GAME_STATE_0
sta GAME_STATE_1 sta GAME_STATE_1
sta GAME_STATE_2 sta GAME_STATE_2
sta GAME_STATE_3
sta NED_STATUS sta NED_STATUS
sta BUSH_STATUS sta BUSH_STATUS
sta KERREK_STATE sta KERREK_STATE

View File

@ -98,7 +98,8 @@ trogdor_throw_sword_message4:
;====================================== ;======================================
;====================================== ;======================================
; Type any command other than "Talk" or "Talk Trogdor" after Trogdor wakes up ; any command except talk/look
trogdor_awake_message:
.byte "Trogdor is awake and a",13 .byte "Trogdor is awake and a",13
.byte "couple seconds from a",13 .byte "couple seconds from a",13
.byte "Rather Dashing BBQ. Might",13 .byte "Rather Dashing BBQ. Might",13
@ -106,6 +107,7 @@ trogdor_throw_sword_message4:
.byte "him.",0 .byte "him.",0
; + look dragon/trogdor (when he's awake) ; + look dragon/trogdor (when he's awake)
trogdor_look_awake_message:
.byte "Trogdor is looming",13 .byte "Trogdor is looming",13
.byte "menacingly over you with a",13 .byte "menacingly over you with a",13
.byte "tiny wee sword stuck in his",13 .byte "tiny wee sword stuck in his",13
@ -114,20 +116,23 @@ trogdor_throw_sword_message4:
; +10 POINTS ; +10 POINTS
; + talk trogdor ; + talk trogdor
end_talk_message:
.byte "You scream that your name",13 .byte "You scream that your name",13
.byte "is Rather Dashing and that",13 .byte "is Rather Dashing and that",13
.byte "Trogdor burninated your",13 .byte "Trogdor burninated your",13
.byte "cottage and you're here for",13 .byte "cottage and you're here for",13
.byte "revenge!",0 .byte "revenge!",0
trogdor_sup_message:
.byte 34,"Sup, mortal,",34," booms",13 .byte 34,"Sup, mortal,",34," booms",13
.byte "Trogdor. ",34,"I really",13 .byte "Trogdor. ",34,"I really",13
.byte "appreciate you making the",13 .byte "appreciate you making the",13
.byte "effort to come all the way",13 .byte "effort to come all the way",13
.byte "up here to vanquish me and",13 ; and vanquish me ? .byte "up here and vanquish me and",13
.byte "all. But, I'm kinda",13 .byte "all. But, I'm kinda",13
.byte "indestructible.",34,0 .byte "indestructible.",34,0
trogdor_surprised_message:
.byte 34,"Yeah, I can't be killed.",13 .byte 34,"Yeah, I can't be killed.",13
.byte "I'm surprised nobody",13 .byte "I'm surprised nobody",13
.byte "mentioned that to you. I'll",13 .byte "mentioned that to you. I'll",13

View File

@ -27,6 +27,7 @@ trogdor_inner_verb_table:
trogdor_look: trogdor_look:
lda CURRENT_NOUN lda CURRENT_NOUN
cmp #NOUN_NONE cmp #NOUN_NONE
beq trogdor_look_at beq trogdor_look_at
@ -49,6 +50,7 @@ trogdor_look_trogdor:
trogdor_wake: trogdor_wake:
lda CURRENT_NOUN lda CURRENT_NOUN
cmp #NOUN_DRAGON cmp #NOUN_DRAGON
beq trogdor_wake_trogdor beq trogdor_wake_trogdor
@ -117,13 +119,65 @@ trogdor_throw_sword:
ldx #<trogdor_throw_sword_message4 ldx #<trogdor_throw_sword_message4
ldy #>trogdor_throw_sword_message4 ldy #>trogdor_throw_sword_message4
jmp finish_parse_message jsr partial_message_step
;==============================
; now we can no longer move
; you have about 10s or so to say "look" or "talk"
; otherwise it continues to the ending
jsr clear_bottom
lda #$60 ; modify parse input to return
sta parse_input_smc ; rather than verb-jump
lda #$FF
sta BABY_COUNT
trogdor_awake_loop:
lda #120
jsr wait
lda KEYPRESS
bpl awake_no_keypress
jsr clear_bottom
jsr hgr_input
jsr parse_input
lda CURRENT_VERB
cmp #VERB_LOOK
bne awake_check_talk
awake_looking:
ldx #<trogdor_look_awake_message
ldy #>trogdor_look_awake_message
jsr partial_message_step
jmp awake_try_again
awake_check_talk:
cmp #VERB_TALK
beq awake_talk_trogdor
awake_default:
ldx #<trogdor_awake_message
ldy #>trogdor_awake_message
jsr partial_message_step
awake_try_again:
jsr clear_bottom
awake_no_keypress:
dec BABY_COUNT
bne trogdor_awake_loop
; we timed out! Skip to burnination
jmp burninate_rather_dashing
trogdor_cave:
awake_talk_trogdor:
lda #<trogdor_cave_lzsa lda #<trogdor_cave_lzsa
sta getsrc_smc+1 sta getsrc_smc+1
@ -149,10 +203,52 @@ trogdor_cave:
jsr hgr_draw_sprite jsr hgr_draw_sprite
jsr update_top jsr update_top
jsr wait_until_keypress
;========================
;
ldx #<end_talk_message
ldy #>end_talk_message
jsr partial_message_step
;==============================
;==============================
; print sup message
;==============================
;==============================
ldx #<trogdor_sup_message
ldy #>trogdor_sup_message
jsr finish_parse_message_nowait
lda #<trogdor_sup
sta SPEECH_PTRL
lda #>trogdor_sup
sta SPEECH_PTRH
jsr trogdor_talks
;==============================
;==============================
; print surprised message
;==============================
;==============================
ldx #<trogdor_surprised_message
ldy #>trogdor_surprised_message
jsr finish_parse_message_nowait
lda #<trogdor_honestly
sta SPEECH_PTRL
lda #>trogdor_honestly
sta SPEECH_PTRH
jsr trogdor_talks
;============================== ;==============================
;============================== ;==============================
@ -164,37 +260,14 @@ trogdor_cave:
ldy #>trogdor_honestly_message ldy #>trogdor_honestly_message
jsr finish_parse_message_nowait jsr finish_parse_message_nowait
;==================================
; text to speech, where available!
lda SOUND_STATUS
and #SOUND_SSI263
beq skip_speech
speech_loop:
; trogdor
lda #4 ; assume slot #4 for now
jsr ssi263_speech_init
lda #<trogdor_honestly lda #<trogdor_honestly
sta SPEECH_PTRL sta SPEECH_PTRL
lda #>trogdor_honestly lda #>trogdor_honestly
sta SPEECH_PTRH sta SPEECH_PTRH
jsr ssi263_speak jsr trogdor_talks
wait_for_speech:
lda speech_busy
bmi wait_for_speech
bpl done_speech
skip_speech:
jsr wait_until_keypress
done_speech:
jsr hgr_partial_restore
;============================== ;==============================
@ -207,12 +280,13 @@ done_speech:
ldy #>trogdor_honestly_message2 ldy #>trogdor_honestly_message2
jsr finish_parse_message jsr finish_parse_message
; UPDATE SCORE ; UPDATE SCORE
lda #$10 ; it's BCD lda #$10 ; it's BCD
jsr score_points jsr score_points
burninate_rather_dashing:
trogdor_open: trogdor_open:
lda #<trogdor_open_lzsa lda #<trogdor_open_lzsa
@ -279,8 +353,6 @@ burninate_loop:
sta speaker_frequency sta speaker_frequency
jsr speaker_beep jsr speaker_beep
; jsr wait_until_keypress
bit PAGE2 bit PAGE2
lda #16 lda #16
@ -289,8 +361,6 @@ burninate_loop:
sta speaker_frequency sta speaker_frequency
jsr speaker_beep jsr speaker_beep
; jsr wait_until_keypress
dec BABY_COUNT dec BABY_COUNT
bne burninate_loop bne burninate_loop
@ -373,6 +443,52 @@ game_over:
rts rts
;============================
; trogdor talks
;============================
trogdor_talks:
;==================================
; text to speech, where available!
lda SOUND_STATUS
and #SOUND_SSI263
beq skip_speech
lda MOCKINGBOARD_SLOT ; assume slot #4 for now
jsr ssi263_speech_init
jsr ssi263_speak
bit KEYRESET
wait_for_speech:
lda KEYPRESS
bmi cancel_speech
lda speech_busy
bmi wait_for_speech
bpl done_speech
cancel_speech:
bit KEYRESET
jsr ssi263_speech_shutdown
jmp done_speech
skip_speech:
jsr wait_until_keypress
done_speech:
jsr hgr_partial_restore
rts
dashing_progress_l: dashing_progress_l:
.byte <dashing0_sprite,<dashing1_sprite,<dashing2_sprite .byte <dashing0_sprite,<dashing1_sprite,<dashing2_sprite
.byte <dashing3_sprite,<dashing4_sprite,<dashing5_sprite .byte <dashing3_sprite,<dashing4_sprite,<dashing5_sprite
@ -385,3 +501,4 @@ dashing_progress_h:
.include "dialog_trogdor.inc" .include "dialog_trogdor.inc"

View File

@ -4,22 +4,6 @@
; sc01-dictionary.pdf ; sc01-dictionary.pdf
; was very helpful here ; was very helpful here
; "Sup, mortal," booms
; Trogdor. "I really"
; "appreciate you making the"
; "effort to come all the way"
; "up here and vanquish me and"
; "all. But, I'm kinda"
; "indestructible."
trogdor_sup:
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte $FF
; "I can honestly say it'll",13 ; "I can honestly say it'll",13
; "be a pleasure and an honor",13 ; "be a pleasure and an honor",13
; "to burninate you, Rather",13 ; "to burninate you, Rather",13
@ -142,3 +126,215 @@ trogdor_honestly:
.byte $FF .byte $FF
; "Sup, mortal," booms
; Trogdor. "I really"
; "appreciate you making the"
; "effort to come all the way"
; "up here and vanquish me and"
; "all. But, I'm kinda"
; "indestructible."
trogdor_sup:
.byte PHONEME_S ; S 'sup
.byte PHONEME_UH1 ; UH1
.byte PHONEME_UH2 ; UH2
.byte PHONEME_P ; P
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_M ; M mortal
.byte PHONEME_O ; O2
.byte PHONEME_O ; O2
.byte PHONEME_R ; R
.byte PHONEME_T ; T
.byte PHONEME_UH1 ; UH1
.byte PHONEME_L ; L
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA ,
.byte PHONEME_AH1 ; AH1 ; I
.byte PHONEME_Y ; Y
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_R ; R really
.byte PHONEME_E1 ; E1
.byte PHONEME_AY ; AY
.byte PHONEME_L ; L
.byte PHONEME_E1 ; E1
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_UH1 ; UH1 appreciate
.byte PHONEME_P ; P
.byte PHONEME_R ; R
.byte PHONEME_E1 ; E1
.byte PHONEME_SCH ; SH
.byte PHONEME_E1 ; E1
.byte PHONEME_A ; A2
.byte PHONEME_Y ; Y
.byte PHONEME_T ; T
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_Y ; Y ; you
.byte PHONEME_IU ; IU
.byte PHONEME_U1 ; U1
.byte PHONEME_U1 ; U1
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_M ; M ; making
.byte PHONEME_A ; A1
.byte PHONEME_AY ; AY
.byte PHONEME_K ; K
.byte PHONEME_I ; I
.byte PHONEME_NG ; NG
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_THV ; THV ; the
.byte PHONEME_UH1 ; UH1
.byte PHONEME_UH3 ; UH3
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_EH ; EH ; effort
.byte PHONEME_F ; F
.byte PHONEME_F ; F
.byte PHONEME_O ; O2
.byte PHONEME_R ; R
.byte PHONEME_T ; T
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_T ; T ; to
.byte PHONEME_IU ; IU
.byte PHONEME_U1 ; U1
.byte PHONEME_U1 ; U1
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_K ; K ; come
.byte PHONEME_UH1 ; UH1
.byte PHONEME_UH3 ; UH3
.byte PHONEME_M ; M
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_AW ; AW ; all
.byte PHONEME_L ; L
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_THV ; THV ; the
.byte PHONEME_UH1 ; UH1
.byte PHONEME_UH3 ; UH3
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_W ; W ; way
.byte PHONEME_A ; A2
.byte PHONEME_A ; A2
.byte PHONEME_Y ; Y
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_UH1 ; UH1 ; up
.byte PHONEME_UH2 ; UH2
.byte PHONEME_P ; P
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_HF ; H ; here
.byte PHONEME_AY ; AY
.byte PHONEME_E ; I
.byte PHONEME_R ; R
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_AE1 ; AE1 ; and
.byte PHONEME_EH ; EH
.byte PHONEME_N ; N
.byte PHONEME_D ; D
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_V ; V ; vanquish
.byte PHONEME_AE1 ; AE1
.byte PHONEME_I ; I3
.byte PHONEME_NG ; NG
.byte PHONEME_K ; K
.byte PHONEME_W ; W
.byte PHONEME_I ; I
.byte PHONEME_SCH ; SH
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_M ; M ; me
.byte PHONEME_E1 ; E1
.byte PHONEME_Y ; Y
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_AE1 ; AE1 ; and
.byte PHONEME_EH ; EH
.byte PHONEME_N ; N
.byte PHONEME_D ; D
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_AW ; AW ; all
.byte PHONEME_L ; L
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA .
.byte PHONEME_PAUSE ; PA
.byte PHONEME_B ; B ; But
.byte PHONEME_UH1 ; UH1
.byte PHONEME_UH2 ; UH2
.byte PHONEME_T ; T
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA ; ,
.byte PHONEME_AH1 ; AH1 ; I'M
.byte PHONEME_Y ; Y
.byte PHONEME_PAUSE ; PA
.byte PHONEME_Y ; M
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_K ; K ; kinda
.byte PHONEME_AH1 ; AH1
.byte PHONEME_EH1 ; EH3
.byte PHONEME_Y ; Y
.byte PHONEME_N ; N
.byte PHONEME_D ; D
.byte PHONEME_UH1 ; UH1
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte PHONEME_I ; I ; indestructable
.byte PHONEME_N ; N
.byte PHONEME_D ; D
.byte PHONEME_E ; E
.byte PHONEME_S ; S
.byte PHONEME_T ; T
.byte PHONEME_R ; R
.byte PHONEME_UH1 ; UH1
.byte PHONEME_K ; K
.byte PHONEME_T ; T
.byte PHONEME_UH1 ; UH1
.byte PHONEME_B ; B
.byte PHONEME_UH3 ; UH3
.byte PHONEME_L ; L
.byte PHONEME_PAUSE ; PA
.byte PHONEME_PAUSE ; PA
.byte $FF

View File

@ -120,8 +120,10 @@ PEASANT_DIR = $93
PEASANT_DIR_RIGHT = 1 PEASANT_DIR_RIGHT = 1
PEASANT_DIR_LEFT = 2 PEASANT_DIR_LEFT = 2
PEASANT_DIR_DOWN = 3 PEASANT_DIR_DOWN = 3
;MAP_X = $94
;MAP_Y = $95 GAME_STATE_3 = $94
; SWORD_THROWN = $01
MAP_LOCATION = $96 MAP_LOCATION = $96
GAME_STATE_0 = $97 GAME_STATE_0 = $97
@ -208,7 +210,14 @@ INVENTORY_3_GONE = $A5
KERREK_X = $A6 ; should be in save area, as we use KERREK_X = $A6 ; should be in save area, as we use
KERREK_Y = $A7 ; for skeleton location KERREK_Y = $A7 ; for skeleton location
END_OF_SAVE = $A8 VISITED_0 = $A8 ; for MAP drawing purposes
VISITED_1 = $A9
VISITED_2 = $AA
VISITED_3 = $AB
END_OF_SAVE = $AC
;=============================================
CURRENT_VERB = $B0 ; parser CURRENT_VERB = $B0 ; parser
CURRENT_NOUN = $B1 CURRENT_NOUN = $B1