Make extended commands return defined flags
Instead of returning 0 or 1, we'll now use ECMD_OK or ECMD_TURN. These have the same meaning as the hardcoded numbers; ECMD_TURN means the command uses a turn. In future, could add eg. a flag denoting "user cancelled command" or "command failed", and should clear eg. the cmdq. Mostly this was simply replacing return values with the defines in the extended commands, so hopefully I didn't break anything.
This commit is contained in:
@@ -1813,15 +1813,15 @@ dosearch0(int aflag) /* intrinsic autosearch vs explicit searching */
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* the 's' command -- explicit searching */
|
||||
/* the #search command -- explicit searching */
|
||||
int
|
||||
dosearch(void)
|
||||
{
|
||||
if (cmd_safety_prevention("another search",
|
||||
"You already found a monster.",
|
||||
&g.already_found_flag))
|
||||
return 0;
|
||||
return dosearch0(0);
|
||||
return ECMD_OK;
|
||||
return dosearch0(0) ? ECMD_TIME : ECMD_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user