Readability fix.

This commit is contained in:
Eric S. Raymond 2017-06-10 13:58:18 -04:00
parent b92fb66c44
commit d3e84846d3

View file

@ -897,56 +897,56 @@ int action(FILE *input, enum speechpart part, long verb, long obj)
if (part == unknown) if (part == unknown)
{ {
/* Analyse an object word. See if the thing is here, whether /* Analyse an object word. See if the thing is here, whether
* we've got a verb yet, and so on. Object must be here * we've got a verb yet, and so on. Object must be here
* unless verb is "find" or "invent(ory)" (and no new verb * unless verb is "find" or "invent(ory)" (and no new verb
* yet to be analysed). Water and oil are also funny, since * yet to be analysed). Water and oil are also funny, since
* they are never actually dropped at any location, but might * they are never actually dropped at any location, but might
* be here inside the bottle or urn or as a feature of the * be here inside the bottle or urn or as a feature of the
* location. */ * location. */
if (HERE(obj)) if (HERE(obj))
/* FALL THROUGH */; /* FALL THROUGH */;
else if (obj == GRATE) { else if (obj == GRATE) {
if (game.loc == 1 || game.loc == 4 || game.loc == 7) if (game.loc == 1 || game.loc == 4 || game.loc == 7)
obj=DPRSSN; obj=DPRSSN;
if (game.loc > 9 && game.loc < 15) if (game.loc > 9 && game.loc < 15)
obj=ENTRNC; obj=ENTRNC;
if (obj != GRATE) if (obj != GRATE)
return(8); return(8);
} }
else if (obj == DWARF && ATDWRF(game.loc) > 0) else if (obj == DWARF && ATDWRF(game.loc) > 0)
/* FALL THROUGH */; /* FALL THROUGH */;
else if ((LIQ(0) == obj && HERE(BOTTLE)) || obj == LIQLOC(game.loc)) else if ((LIQ(0) == obj && HERE(BOTTLE)) || obj == LIQLOC(game.loc))
/* FALL THROUGH */; /* FALL THROUGH */;
else if (obj == OIL && HERE(URN) && game.prop[URN] != 0) { else if (obj == OIL && HERE(URN) && game.prop[URN] != 0) {
obj=URN; obj=URN;
/* FALL THROUGH */; /* FALL THROUGH */;
} }
else if (obj == PLANT && AT(PLANT2) && game.prop[PLANT2] != 0) { else if (obj == PLANT && AT(PLANT2) && game.prop[PLANT2] != 0) {
obj=PLANT2; obj=PLANT2;
/* FALL THROUGH */; /* FALL THROUGH */;
} }
else if (obj == KNIFE && game.knfloc == game.loc) { else if (obj == KNIFE && game.knfloc == game.loc) {
game.knfloc= -1; game.knfloc= -1;
SPK=116; SPK=116;
return(2011); return(2011);
} }
else if (obj == ROD && HERE(ROD2)) { else if (obj == ROD && HERE(ROD2)) {
obj=ROD2; obj=ROD2;
/* FALL THROUGH */; /* FALL THROUGH */;
} }
else if ((verb == FIND || verb == INVENT) && WD2 <= 0) else if ((verb == FIND || verb == INVENT) && WD2 <= 0)
/* FALL THROUGH */; /* FALL THROUGH */;
else { else {
SETPRM(1,WD1,WD1X); SETPRM(1,WD1,WD1X);
RSPEAK(256); RSPEAK(256);
return(2012); return(2012);
} }
if (WD2 > 0) if (WD2 > 0)
return(2800); return(2800);
if (verb != 0) if (verb != 0)
part = transitive; part = transitive;
} }
switch(part) switch(part)
@ -1036,6 +1036,7 @@ int action(FILE *input, enum speechpart part, long verb, long obj)
} }
BUG(24); BUG(24);
case unknown: case unknown:
/* Unknown verb, couldn't deduce object - might need hint */
SETPRM(1,WD1,WD1X); SETPRM(1,WD1,WD1X);
RSPEAK(255); RSPEAK(255);
return(2600); return(2600);