peasant: fix bug where game starts with escape in the text buffer

This commit is contained in:
Vince Weaver 2024-10-08 00:17:06 -04:00
parent 3b314fa727
commit 925f43d140
3 changed files with 4 additions and 2 deletions

View File

@ -17,6 +17,7 @@ peasant_quest_intro:
sta LEVEL_OVER
sta PEASANT_STEPS
sta INPUT_X
sta input_buffer ; reset buffer (NUL at start)
sta GAME_STATE_2
jsr hgr_make_tables

View File

@ -124,5 +124,7 @@ start_new_game:
sta KERREK_STATE
sta ARROW_SCORE
bit KEYRESET ; clear or else escape ends up in buffer
rts

View File

@ -165,8 +165,6 @@ stop_peasant:
;==================================
reset_prompt:
lda #0 ; reset buffer
sta input_buffer
sta INPUT_X ; reset INPUT_X
@ -181,3 +179,4 @@ setup_prompt:
jsr hgr_put_char
rts