X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=main.c;h=7a6c6c868542fc55cbf0960bd02ce52f1bc1a161;hb=b044e9ab422ef7501c5ce98ec39eb89e2f142c5e;hp=94f2b45b9fe30d5c2251e9d9b431cee7af9c028e;hpb=f911e4245357c9049ae3bd171922bdb33e4e8f84;p=open-adventure.git diff --git a/main.c b/main.c index 94f2b45..7a6c6c8 100644 --- a/main.c +++ b/main.c @@ -1074,7 +1074,7 @@ static bool do_move(void) return true; } -static bool do_command() +static bool do_command(void) /* Get and execute a command */ { static command_t command; @@ -1125,6 +1125,12 @@ static bool do_command() if (!get_command_input(&command)) return false; + /* Every input, check "foobar" flag. If zero, nothing's going + * on. If pos, make neg. If neg, he skipped a word, so make it + * zero. + */ + game.foobar = (game.foobar > WORD_EMPTY) ? -game.foobar : WORD_EMPTY; + ++game.turns; preprocess_command(&command); }