X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=misc.c;h=36339289ad71b8af759dc7738fe6a78e5a32318e;hp=6db040a1fb3c0f755b3a741d5d9646845df698e5;hb=2a5dac3d8ce9d8b41704a88230b2031b99b15de6;hpb=5f4df123b40b8d9c01b88bc506ee5bb8b3c82d70 diff --git a/misc.c b/misc.c index 6db040a..3633928 100644 --- a/misc.c +++ b/misc.c @@ -556,6 +556,17 @@ bool get_command_input(command_t *command) return true; } +void clear_command(command_t *cmd) +/* Resets the state of the command to empty */ +{ + cmd->verb = ACT_NULL; + cmd->part = unknown; + game.oldobj = cmd->obj; + cmd->obj = NO_OBJECT; + cmd->state = EMPTY; +} + + void juggle(obj_t object) /* Juggle an object by picking it up and putting it down again, the purpose * being to get the object to the front of the chain of things at its loc. */