Abstracted a chuck of do_command() into seperate function do_move(), moved that call to main loop, so as to narrow the focus of do_command() to getting and processing commands.
This commit is contained in:
parent
e3b508536d
commit
2a5dac3d8c
3 changed files with 39 additions and 21 deletions
11
misc.c
11
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. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue