From 925f43d140da88a80b27959e24874ab1a520018d Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Tue, 8 Oct 2024 00:17:06 -0400 Subject: [PATCH] peasant: fix bug where game starts with escape in the text buffer --- games/peasant/intro/intro.s | 1 + games/peasant/intro/new_game.s | 2 ++ games/peasant/keyboard.s | 3 +-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/games/peasant/intro/intro.s b/games/peasant/intro/intro.s index 91c62529..1f02fda5 100644 --- a/games/peasant/intro/intro.s +++ b/games/peasant/intro/intro.s @@ -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 diff --git a/games/peasant/intro/new_game.s b/games/peasant/intro/new_game.s index 10941ac3..5aafa38e 100644 --- a/games/peasant/intro/new_game.s +++ b/games/peasant/intro/new_game.s @@ -124,5 +124,7 @@ start_new_game: sta KERREK_STATE sta ARROW_SCORE + bit KEYRESET ; clear or else escape ends up in buffer + rts diff --git a/games/peasant/keyboard.s b/games/peasant/keyboard.s index c1c62e22..292c19fd 100644 --- a/games/peasant/keyboard.s +++ b/games/peasant/keyboard.s @@ -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 +