* fixed), move rug there (not fixed), and move him there,
* too. Then do a null motion to get new description. */
rspeak(BARE_HANDS_QUERY);
- if (!silent_yes()) {
+ if (!silent_yes_or_no()) {
speak(arbitrary_messages[NASTY_DRAGON]);
return GO_MOVE;
}
static phase_codes_t quit(void)
/* Quit. Intransitive only. Verify intent and exit if that's what he wants. */
{
- if (yes(arbitrary_messages[REALLY_QUIT], arbitrary_messages[OK_MAN], arbitrary_messages[OK_MAN]))
+ if (yes_or_no(arbitrary_messages[REALLY_QUIT], arbitrary_messages[OK_MAN], arbitrary_messages[OK_MAN]))
terminate(quitgame);
return GO_CLEAROBJ;
}
if (!TOTING(OYSTER) || !game.closed) {
rspeak(DONT_UNDERSTAND);
} else if (!game.clshnt) {
- game.clshnt = yes(arbitrary_messages[CLUE_QUERY], arbitrary_messages[WAYOUT_CLUE], arbitrary_messages[OK_MAN]);
- } else if (game.clshnt) {
+ game.clshnt = yes_or_no(arbitrary_messages[CLUE_QUERY], arbitrary_messages[WAYOUT_CLUE], arbitrary_messages[OK_MAN]);
+ } else {
pspeak(OYSTER, hear, true, 1); // Not really a sound, but oh well.
}
} else if (objects[command.obj].texts[0] == NULL ||
return GO_MOVE;
}
-static phase_codes_t throw (command_t command)
+static phase_codes_t throwit(command_t command)
/* Throw. Same as discard unless axe. Then same as attack except
* ignore bird, and if dwarf is present then one might be killed.
* (Only way to do so!) Axe also special for dragon, bear, and
case RUB:
return rub(command.verb, command.obj);
case THROW:
- return throw (command);
+ return throwit(command);
case QUIT: {
speak(actions[command.verb].message);
return GO_CLEAROBJ;
extern void pspeak(vocab_t, enum speaktype, bool, int, ...);
extern void rspeak(vocab_t, ...);
extern void echo_input(FILE*, const char*, const char*);
-extern bool silent_yes(void);
-extern bool yes(const char*, const char*, const char*);
+extern bool silent_yes_or_no(void);
+extern bool yes_or_no(const char*, const char*, const char*);
extern void juggle(obj_t);
extern void move(obj_t, loc_t);
extern loc_t put(obj_t, int, int);
#ifndef ADVENT_NOSAVE
if (!rfp) {
- game.novice = yes(arbitrary_messages[WELCOME_YOU], arbitrary_messages[CAVE_NEARBY], arbitrary_messages[NO_MESSAGE]);
+ game.novice = yes_or_no(arbitrary_messages[WELCOME_YOU], arbitrary_messages[CAVE_NEARBY], arbitrary_messages[NO_MESSAGE]);
if (game.novice)
game.limit = NOVICELIMIT;
} else {
restore(rfp);
}
#else
- game.novice = yes(arbitrary_messages[WELCOME_YOU], arbitrary_messages[CAVE_NEARBY], arbitrary_messages[NO_MESSAGE]);
+ game.novice = yes_or_no(arbitrary_messages[WELCOME_YOU], arbitrary_messages[CAVE_NEARBY], arbitrary_messages[NO_MESSAGE]);
if (game.novice)
game.limit = NOVICELIMIT;
#endif
/* Fall through to hint display */
game.hintlc[hint] = 0;
- if (!yes(hints[hint].question, arbitrary_messages[NO_MESSAGE], arbitrary_messages[OK_MAN]))
+ if (!yes_or_no(hints[hint].question, arbitrary_messages[NO_MESSAGE], arbitrary_messages[OK_MAN]))
return;
rspeak(HINT_COST, hints[hint].penalty, hints[hint].penalty);
- game.hinted[hint] = yes(arbitrary_messages[WANT_HINT], hints[hint].hint, arbitrary_messages[OK_MAN]);
+ game.hinted[hint] = yes_or_no(arbitrary_messages[WANT_HINT], hints[hint].hint, arbitrary_messages[OK_MAN]);
if (game.hinted[hint] && game.limit > WARNTIME)
game.limit += WARNTIME * hints[hint].penalty;
}
* death and exit. */
rspeak(DEATH_CLOSING);
terminate(endgame);
- } else if (!yes(query, yes_response, arbitrary_messages[OK_MAN])
+ } else if (!yes_or_no(query, yes_response, arbitrary_messages[OK_MAN])
|| game.numdie == NDEATHS) {
/* Player is asked if he wants to try again. If not, or if
* he's already used all of his lives, we end the game */
return (input);
}
-bool silent_yes(void)
+bool silent_yes_or_no(void)
{
bool outcome = false;
}
-bool yes(const char* question, const char* yes_response, const char* no_response)
+bool yes_or_no(const char* question, const char* yes_response, const char* no_response)
/* Print message X, wait for yes/no answer. If yes, print Y and return true;
* if no, print Z and return false. */
{
FILE *fp = NULL;
rspeak(SUSPEND_WARNING);
- if (!yes(arbitrary_messages[THIS_ACCEPTABLE], arbitrary_messages[OK_MAN], arbitrary_messages[OK_MAN]))
+ if (!yes_or_no(arbitrary_messages[THIS_ACCEPTABLE], arbitrary_messages[OK_MAN], arbitrary_messages[OK_MAN]))
return GO_CLEAROBJ;
game.saved = game.saved + 5;
if (game.loc != 1 ||
game.abbrev[1] != 1) {
rspeak(RESUME_ABANDON);
- if (!yes(arbitrary_messages[THIS_ACCEPTABLE], arbitrary_messages[OK_MAN], arbitrary_messages[OK_MAN]))
+ if (!yes_or_no(arbitrary_messages[THIS_ACCEPTABLE], arbitrary_messages[OK_MAN], arbitrary_messages[OK_MAN]))
return GO_CLEAROBJ;
}