RUBY, RUG, SAPPH, SAY, SIGN, SNAKE,
STEPS, STREAM, THROW, TRIDNT, TROLL, TROLL2,
URN, VASE, VEND, VOLCAN, WATER;
RUBY, RUG, SAPPH, SAY, SIGN, SNAKE,
STEPS, STREAM, THROW, TRIDNT, TROLL, TROLL2,
URN, VASE, VEND, VOLCAN, WATER;
-long K, SPK, WD1, WD1X, WD2, WD2X;
+long WD1, WD1X, WD2, WD2X;
/* Handle "go back". Look for verb which goes from game.loc to
* game.oldloc, or to game.oldlc2 If game.oldloc has forced-motion.
* K2 saves entry -> forced loc -> previous loc. */
/* Handle "go back". Look for verb which goes from game.loc to
* game.oldloc, or to game.oldlc2 If game.oldloc has forced-motion.
* K2 saves entry -> forced loc -> previous loc. */
if (CNDBIT(game.loc,4))K2=274;
if (K2 == 0) {
for (;;) {
LL=MOD((labs(TRAVEL[KK])/1000),1000);
if (CNDBIT(game.loc,4))K2=274;
if (K2 == 0) {
for (;;) {
LL=MOD((labs(TRAVEL[KK])/1000),1000);
/* Look. Can't give more detail. Pretend it wasn't dark
* (though it may "now" be dark) so he won't fall into a
* pit while staring into the gloom. */
/* Look. Can't give more detail. Pretend it wasn't dark
* (though it may "now" be dark) so he won't fall into a
* pit while staring into the gloom. */
/* Cave. Different messages depending on whether above ground. */
RSPEAK((OUTSID(game.loc) && game.loc != 8) ? 57 : 58);
return true;
/* Cave. Different messages depending on whether above ground. */
RSPEAK((OUTSID(game.loc) && game.loc != 8) ? 57 : 58);
return true;
- SPK=12;
- if (K >= 43 && K <= 50)SPK=52;
- if (K == 29 || K == 30)SPK=52;
- if (K == 7 || K == 36 || K == 37)SPK=10;
- if (K == 11 || K == 19)SPK=11;
- if (verb == FIND || verb == INVENT)SPK=59;
- if (K == 62 || K == 65)SPK=42;
- if (K == 17)SPK=80;
- RSPEAK(SPK);
+ int spk=12;
+ if (motion >= 43 && motion <= 50)spk=52;
+ if (motion == 29 || motion == 30)spk=52;
+ if (motion == 7 || motion == 36 || motion == 37)spk=10;
+ if (motion == 11 || motion == 19)spk=11;
+ if (verb == FIND || verb == INVENT)spk=59;
+ if (motion == 62 || motion == 65)spk=42;
+ if (motion == 17)spk=80;
+ RSPEAK(spk);
if (game.newloc <= 300) {
if (game.newloc <= 100) {
if (game.newloc == 0 || PCT(game.newloc))
break;
/* else fall through */
if (game.newloc <= 300) {
if (game.newloc <= 100) {
if (game.newloc == 0 || PCT(game.newloc))
break;
/* else fall through */
static bool do_command(FILE *cmdin)
{
long KQ, VERB, KK, V1, V2;
static bool do_command(FILE *cmdin)
{
long KQ, VERB, KK, V1, V2;
- KK=STEXT[game.loc];
- if (MOD(game.abbrev[game.loc],game.abbnum) == 0 || KK == 0)
- KK=LTEXT[game.loc];
+ char* msg = short_location_descriptions[game.loc];
+ if (MOD(game.abbrev[game.loc],game.abbnum) == 0 || msg == 0)
+ msg=long_location_descriptions[game.loc];
* objects won't be described until they've been picked up
* and put down separate from their respective piles. Don't
* tick game.clock1 unless well into cave (and not at Y2). */
* objects won't be described until they've been picked up
* and put down separate from their respective piles. Don't
* tick game.clock1 unless well into cave (and not at Y2). */
- if (V1 == ENTER && WD2 > 0)
- goto L2800;
- if (!((V1 != 1000+WATER && V1 != 1000+OIL) ||
- (V2 != 1000+PLANT && V2 != 1000+DOOR))) {
- if (AT(V2-1000))
- WD2=MAKEWD(16152118);
- }
- if (V1 == 1000+CAGE && V2 == 1000+BIRD && HERE(CAGE) && HERE(BIRD))
+ if (V1 == ENTER && WD2 > 0) {
+ WD1=WD2;
+ WD1X=WD2X;
+ WD2=0;
+ } else {
+ if (!((V1 != 1000+WATER && V1 != 1000+OIL) ||
+ (V2 != 1000+PLANT && V2 != 1000+DOOR))) {
+ if (AT(V2-1000))
+ WD2=MAKEWD(16152118);
+ }
+ if (V1 == 1000+CAGE && V2 == 1000+BIRD && HERE(CAGE) && HERE(BIRD))
- /* Get second word for analysis. */
-L2800: WD1=WD2;
- WD1X=WD2X;
- WD2=0;
- goto L2620;
-
- /* Gee, I don't understand. */
-L3000: SETPRM(1,WD1,WD1X);
- if (fallback_handler(rawbuf))
- return true;
- RSPEAK(254);
- goto L2600;
-
Laction:
switch (action(cmdin, part, VERB, obj)) {
Laction:
switch (action(cmdin, part, VERB, obj)) {
- case 2: return true;
- case 8: goto L8;
- case 2000: goto L2000;
- case 2009: goto L2009;
- case 2012: goto L2012;
- case 2600: goto L2600;
- case 2607: goto L2607;
- case 2630: goto L2630;
- case 2800: goto L2800;
- case 8000:
- /* Random intransitive verbs come here. Clear obj just in case
- * (see attack()). */
- SETPRM(1,WD1,WD1X);
- RSPEAK(257);
- obj=0;
- goto L2600;
- case 18999:
- /* Oh dear, he's disturbed the dwarves. */
- RSPEAK(SPK);
- /* fall through */
- case 19000:
- RSPEAK(136);
- score(0);
- return true;
- }
+ case 2: return true;
+ case 8: KMOD=NUL; goto L8;
+ case 2000: goto L2000;
+ case 2012: goto L2012;
+ case 2600: goto L2600;
+ case 2607: goto L2607;
+ case 2630: goto L2630;
+ case 2800:
+ /* Get second word for analysis. */
+ WD1=WD2;
+ WD1X=WD2X;
+ WD2=0;
+ goto L2620;
+ case 8000:
+ /* Random intransitive verbs come here. Clear obj just in case
+ * (see attack()). */
+ SETPRM(1,WD1,WD1X);
+ RSPEAK(257);
+ obj=0;
+ goto L2600;
+ case 19000:
+ /* Oh dear, he's disturbed the dwarves. */
+ RSPEAK(136);
+ score(0);
+ return true;
+ }