/*
- * Actions for the duneon-running code.
+ * Actions for the dungeon-running code.
*
* Copyright (c) 1977, 2005 by Will Crowther and Don Woods
* Copyright (c) 2017 by Eric S. Raymond
}
static phase_codes_t listen(void)
-/* Listen. Intransitive only. Print stuff based on object sound proprties. */
+/* Listen. Intransitive only. Print stuff based on object sound properties. */
{
bool soundlatch = false;
vocab_t sound = locations[game.loc].sound;
#define LCG_M 1048576L
#define LINESIZE 1024
-#define TOKLEN 5 // # sigificant characters in a token */
+#define TOKLEN 5 // # outputting characters in a token */
#define NDWARVES 6 // number of dwarves
#define PIRATE NDWARVES // must be NDWARVES-1 when zero-origin
#define DALTLC LOC_NUGGET // alternate dwarf location
}
}
- /* copy inncation line part after switches */
+ /* copy invocation line part after switches */
settings.argc = argc - optind;
settings.argv = argv + optind;
settings.optind = 0;
char *myreadline(const char *prompt)
{
/*
- * This function isbn't required for gameplay, readline() straight
- * up would suffice for tat. It's where we interpret command-line
+ * This function isn't required for gameplay, readline() straight
+ * up would suffice for that. It's where we interpret command-line
* logfiles for testing purposes.
*/
/* Normal case - no script arguments */
static bool preprocess_command(command_t *command)
/* Pre-processes a command input to see if we need to tease out a few specific cases:
* - "enter water" or "enter stream":
- * wierd specific case that gets the user wet, and then kicks us back to get another command
+ * weird specific case that gets the user wet, and then kicks us back to get another command
* - <object> <verb>:
* Irregular form of input, but should be allowed. We switch back to <verb> <object> form for
- * furtherprocessing.
+ * further processing.
* - "grate":
* If in location with grate, we move to that grate. If we're in a number of other places,
* we move to the entrance.
if (closecheck() )
return true;
- /* loop until all words in command are procesed */
+ /* loop until all words in command are processed */
while (command.state == PREPROCESSED ) {
command.state = PROCESSING;
/*
- * I/O and support riutines.
+ * I/O and support routines.
*
* Copyright (c) 1977, 2005 by Will Crowther and Don Woods
* Copyright (c) 2017 by Eric S. Raymond
if (!*str)
return false; // LCOV_EXCL_LINE
- // Check for non-digit chars in the rest of the stirng.
+ // Check for non-digit chars in the rest of the string.
while (*str) {
if (!isdigit(*str))
return false;
static void tokenize(char* raw, command_t *cmd)
{
/*
- * Be caereful about modifing this. We do not want to nuke the
+ * Be careful about modifying this. We do not want to nuke the
* the speech part or ID from the previous turn.
*/
memset(&cmd->word[0].raw, '\0', sizeof(cmd->word[0].raw));
bool is_valid(struct game_t valgame)
{
/* Save files can be roughly grouped into three groups:
- * With valid, reaceable state, with valid, but unreachable
- * state and with invaild state. We check that state is
+ * With valid, reacheable state, with valid, but unreachable
+ * state and with invalid state. We check that state is
* valid: no states are outside minimal or maximal value
*/