RUBY, RUG, SAPPH, SAY, SIGN, SNAKE,
STEPS, STREAM, THROW, TRIDENT, TROLL, TROLL2,
URN, VASE, VEND, VOLCANO, WATER;
RUBY, RUG, SAPPH, SAY, SIGN, SNAKE,
STEPS, STREAM, THROW, TRIDENT, TROLL, TROLL2,
URN, VASE, VEND, VOLCANO, WATER;
-long WD1, WD1X, WD2, WD2X;
+token_t WD1, WD1X, WD2, WD2X;
- while ((ch = getopt(argc, argv, "l:or:s")) != EOF) {
+#ifndef ADVENT_NOSAVE
+ const char* opts = "l:or:s";
+ const char* usage = "Usage: %s [-l logfilename] [-o] [-r restorefilename] [-s] \n";
+#else
+ const char* opts = "l:os";
+ const char* usage = "Usage: %s [-l logfilename] [-o] [-s] \n";
+#endif
+ while ((ch = getopt(argc, argv, opts)) != EOF) {
- /* Logical variables:
- *
- * game.closed says whether we're all the way closed
- * game.closng says whether it's closing time yet
- * game.clshnt says whether he's read the clue in the endgame
- * game.lmwarn says whether he's been warned about lamp going dim
- * game.novice says whether he asked for instructions at start-up
- * game.panic says whether he's found out he's trapped in the cave
- * game.wzdark says whether the loc he's leaving was dark */
-
if (!rfp) {
game.novice = YES(arbitrary_messages[WELCOME_YOU], arbitrary_messages[CAVE_NEARBY], arbitrary_messages[NO_MESSAGE]);
if (!rfp) {
game.novice = YES(arbitrary_messages[WELCOME_YOU], arbitrary_messages[CAVE_NEARBY], arbitrary_messages[NO_MESSAGE]);
/* The pirate's spotted him. He leaves him alone once we've
* found chest. K counts if a treasure is here. If not, and
* tally=1 for an unseen chest, let the pirate be spotted. Note
/* The pirate's spotted him. He leaves him alone once we've
* found chest. K counts if a treasure is here. If not, and
* tally=1 for an unseen chest, let the pirate be spotted. Note
* it to the troll, but in that case he's seen the chest
* (game.prop=0). */
if (game.loc == game.chloc || game.prop[CHEST] >= 0)
* it to the troll, but in that case he's seen the chest
* (game.prop=0). */
if (game.loc == game.chloc || game.prop[CHEST] >= 0)
continue; /* back to top of main interpreter loop */
}
if (game.loc == LOC_Y2 && PCT(25) && !game.closng)
continue; /* back to top of main interpreter loop */
}
if (game.loc == LOC_Y2 && PCT(25) && !game.closng)