Reformat for readability.

This commit is contained in:
Eric S. Raymond 2017-06-12 08:07:49 -04:00
parent b0eb54b125
commit 73d5310839

20
main.c
View file

@ -744,7 +744,9 @@ L2000: if (game.loc == 0)
if (DARK(game.loc)) goto L2012; if (DARK(game.loc)) goto L2012;
++game.abbrev[game.loc]; ++game.abbrev[game.loc];
i=game.atloc[game.loc]; i=game.atloc[game.loc];
L2004: if (i == 0) goto L2012; L2004:
if (i == 0)
goto L2012;
obj=i; obj=i;
if (obj > NOBJECTS)obj=obj-NOBJECTS; if (obj > NOBJECTS)obj=obj-NOBJECTS;
if (obj == STEPS && TOTING(NUGGET)) goto L2008; if (obj == STEPS && TOTING(NUGGET)) goto L2008;
@ -774,9 +776,10 @@ L2012: VERB=0;
game.oldobj=obj; game.oldobj=obj;
obj=0; obj=0;
/* Check if this loc is eligible for any hints. If been here long enough, /* Check if this loc is eligible for any hints. If been here
* branch to help section (on later page). Hints all come back here eventually * long enough, branch to help section (on later page). Hints
* to finish the loop. Ignore "HINTS" < 4 (special stuff, see database notes). * all come back here eventually to finish the loop. Ignore
* "HINTS" < 4 (special stuff, see database notes).
*/ */
L2600: if (COND[game.loc] >= game.conds) { L2600: if (COND[game.loc] >= game.conds) {
for (int hint=1; hint<=HNTMAX; hint++) { for (int hint=1; hint<=HNTMAX; hint++) {
@ -814,7 +817,8 @@ L2600: if (COND[game.loc] >= game.conds) {
/* Every input, check "game.foobar" flag. If zero, nothing's /* Every input, check "game.foobar" flag. If zero, nothing's
* going on. If pos, make neg. If neg, he skipped a word, * going on. If pos, make neg. If neg, he skipped a word,
* so make it zero. */ * so make it zero. */
L2607: game.foobar=(game.foobar>0 ? -game.foobar : 0); L2607:
game.foobar=(game.foobar>0 ? -game.foobar : 0);
++game.turns; ++game.turns;
if (game.turns == game.thresh) { if (game.turns == game.thresh) {
newspeak(turn_threshold_messages[game.trndex]); newspeak(turn_threshold_messages[game.trndex]);
@ -972,7 +976,8 @@ L2607: game.foobar=(game.foobar>0 ? -game.foobar : 0);
RSPEAK(spk); RSPEAK(spk);
} }
} }
L19999: k=43; L19999:
k=43;
if (LIQLOC(game.loc) == WATER)k=70; if (LIQLOC(game.loc) == WATER)k=70;
V1=VOCAB(WD1,-1); V1=VOCAB(WD1,-1);
V2=VOCAB(WD2,-1); V2=VOCAB(WD2,-1);
@ -993,7 +998,8 @@ L19999: k=43;
if (V1 == 1000+CAGE && V2 == 1000+BIRD && HERE(CAGE) && HERE(BIRD)) if (V1 == 1000+CAGE && V2 == 1000+BIRD && HERE(CAGE) && HERE(BIRD))
WD1=MAKEWD(301200308); WD1=MAKEWD(301200308);
} }
L2620: if (WD1 == MAKEWD(23051920)) { L2620:
if (WD1 == MAKEWD(23051920)) {
++game.iwest; ++game.iwest;
if (game.iwest == 10) if (game.iwest == 10)
RSPEAK(17); RSPEAK(17);