char rawbuf[LINESIZE], INLINE[LINESIZE + 1];
long AMBER, AXE, BACK, BATTERY, BEAR, BIRD, BLOOD,
char rawbuf[LINESIZE], INLINE[LINESIZE + 1];
long AMBER, AXE, BACK, BATTERY, BEAR, BIRD, BLOOD,
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;
- if (!YES(arbitrary_messages[HINTS[hint][3]], arbitrary_messages[NO_MESSAGE], arbitrary_messages[OK_MAN]))
+ if (!YES(hints[hint].question, arbitrary_messages[NO_MESSAGE], arbitrary_messages[OK_MAN]))
- SETPRM(1, HINTS[hint][2], HINTS[hint][2]);
- RSPEAK(HINT_COST);
- game.hinted[hint] = YES(arbitrary_messages[WANT_HINT], arbitrary_messages[HINTS[hint][4]], arbitrary_messages[OK_MAN]);
+ rspeak(HINT_COST, hints[hint].penalty, hints[hint].penalty);
+ game.hinted[hint] = YES(arbitrary_messages[WANT_HINT], hints[hint].hint, arbitrary_messages[OK_MAN]);
}
/* Force chest placement before player finds last treasure */
if (game.tally == 1 && snarfed == 0 && game.place[CHEST] == LOC_NOWHERE && HERE(LAMP) && game.prop[LAMP] == 1) {
}
/* Force chest placement before player finds last treasure */
if (game.tally == 1 && snarfed == 0 && game.place[CHEST] == LOC_NOWHERE && HERE(LAMP) && game.prop[LAMP] == 1) {
/* You might get a hint of the pirate's presence even if the
* chest doesn't move... */
if (game.odloc[PIRATE] != game.dloc[PIRATE] && PCT(20))
/* You might get a hint of the pirate's presence even if the
* chest doesn't move... */
if (game.odloc[PIRATE] != game.dloc[PIRATE] && PCT(20))
for (int treasure = MINTRS; treasure <= MAXTRS; treasure++) {
if (!(treasure == PYRAMID && (game.loc == PLAC[PYRAMID] || game.loc == PLAC[EMERALD]))) {
if (AT(treasure) && game.fixed[treasure] == 0)
for (int treasure = MINTRS; treasure <= MAXTRS; treasure++) {
if (!(treasure == PYRAMID && (game.loc == PLAC[PYRAMID] || game.loc == PLAC[EMERALD]))) {
if (AT(treasure) && game.fixed[treasure] == 0)
/* Now we know what's happening. Let's tell the poor sucker about it.
* Note that various of the "knife" messages must have specific relative
/* Now we know what's happening. Let's tell the poor sucker about it.
* Note that various of the "knife" messages must have specific relative
- SETPRM(1, game.dtotal, 0);
- RSPEAK(game.dtotal == 1 ? DWARF_SINGLE : DWARF_PACK);
+ rspeak(game.dtotal == 1 ? DWARF_SINGLE : DWARF_PACK, game.dtotal);
++game.detail;
game.wzdark = false;
game.abbrev[game.loc] = 0;
return true;
} else if (motion == CAVE) {
/* Cave. Different messages depending on whether above ground. */
++game.detail;
game.wzdark = false;
game.abbrev[game.loc] = 0;
return true;
} else if (motion == CAVE) {
/* Cave. Different messages depending on whether above ground. */
if (verb == FIND || verb == INVENT)spk = NEARBY;
if (motion == 62 || motion == 65)spk = NOTHING_HAPPENS;
if (motion == 17)spk = WHICH_WAY;
if (verb == FIND || verb == INVENT)spk = NEARBY;
if (motion == 62 || motion == 65)spk = NOTHING_HAPPENS;
if (motion == 17)spk = WHICH_WAY;
* and block him. (standard travel entries check for
* game.prop(TROLL)=0.) Special stuff for bear. */
if (game.prop[TROLL] == 1) {
* and block him. (standard travel entries check for
* game.prop(TROLL)=0.) Special stuff for bear. */
if (game.prop[TROLL] == 1) {
game.newloc = PLAC[TROLL] + FIXD[TROLL] - game.loc;
if (game.prop[TROLL] == 0)game.prop[TROLL] = 1;
if (!TOTING(BEAR)) return true;
game.newloc = PLAC[TROLL] + FIXD[TROLL] - game.loc;
if (game.prop[TROLL] == 0)game.prop[TROLL] = 1;
if (!TOTING(BEAR)) return true;
* Second is for other cases of lamp dying. Eve after it goes
* out, he can explore outside for a while if desired. */
if (game.limit <= WARNTIME && HERE(BATTERY) && game.prop[BATTERY] == 0 && HERE(LAMP)) {
* Second is for other cases of lamp dying. Eve after it goes
* out, he can explore outside for a while if desired. */
if (game.limit <= WARNTIME && HERE(BATTERY) && game.prop[BATTERY] == 0 && HERE(LAMP)) {
} else if (game.limit <= WARNTIME) {
if (!game.lmwarn && HERE(LAMP)) {
game.lmwarn = true;
int spk = GET_BATTERIES;
if (game.place[BATTERY] == LOC_NOWHERE)spk = LAMP_DIM;
if (game.prop[BATTERY] == 1)spk = MISSING_BATTERYIES;
} else if (game.limit <= WARNTIME) {
if (!game.lmwarn && HERE(LAMP)) {
game.lmwarn = true;
int spk = GET_BATTERIES;
if (game.place[BATTERY] == LOC_NOWHERE)spk = LAMP_DIM;
if (game.prop[BATTERY] == 1)spk = MISSING_BATTERYIES;
/* Can't leave cave once it's closing (except by main office). */
if (OUTSID(game.newloc) && game.newloc != 0 && game.closng) {
/* Can't leave cave once it's closing (except by main office). */
if (OUTSID(game.newloc) && game.newloc != 0 && game.closng) {
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)
* tick game.clock1 unless well into cave (and not at Y2). */
if (game.closed) {
if (game.prop[OYSTER] < 0 && TOTING(OYSTER))
* tick game.clock1 unless well into cave (and not at Y2). */
if (game.closed) {
if (game.prop[OYSTER] < 0 && TOTING(OYSTER))
for (size_t i = 1; i <= NOBJECTS; i++) {
if (TOTING(i) && game.prop[i] < 0)
game.prop[i] = -1 - game.prop[i];
for (size_t i = 1; i <= NOBJECTS; i++) {
if (TOTING(i) && game.prop[i] < 0)
game.prop[i] = -1 - game.prop[i];
- if (!GETIN(cmdin, &WD1, &WD1X, &WD2, &WD2X))
+ if (!GETIN(cmdin, &command.wd1, &command.wd1x, &command.wd2, &command.wd2x))
/* If a turn threshold has been met, apply penalties and tell
* the player about it. */
/* If a turn threshold has been met, apply penalties and tell
* the player about it. */
- /* if (game.turns == game.thresh) { */
- /* speak(turn_threshold_messages[game.trndex]); */
- /* game.trnluz = game.trnluz + TRNVAL[game.trndex] / 100000; */
- /* ++game.trndex; */
- /* game.thresh = -1; */
- /* if (game.trndex <= TRNVLS) */
- /* game.thresh = MOD(TRNVAL[game.trndex], 100000) + 1; */
- /* } */
- if (command.verb == SAY && WD2 > 0)
+
+ if (command.verb == SAY && command.wd2 > 0)
- if (V1 == ENTER && WD2 > 0) {
- WD1 = WD2;
- WD1X = WD2X;
- wordclear(&WD2);
+ if (V1 == ENTER && command.wd2 > 0) {
+ command.wd1 = command.wd2;
+ command.wd1x = command.wd2x;
+ wordclear(&command.wd2);
if (defn == -1) {
/* Gee, I don't understand. */
if (fallback_handler(rawbuf))
continue;
if (defn == -1) {
/* Gee, I don't understand. */
if (fallback_handler(rawbuf))
continue;