Relocate L12

With a bit of code duplication the L12 label can be moved outside
the loop.
This commit is contained in:
Peje Nilsson 2017-06-13 07:41:09 +02:00
parent 1b167e5e72
commit c366ddb733

8
main.c
View file

@ -606,6 +606,7 @@ static bool playermove(FILE *cmdin, token_t verb, int motion)
} }
LL=LL/1000; LL=LL/1000;
L12:
for (;;) { for (;;) {
game.newloc=LL/1000; game.newloc=LL/1000;
motion=MOD(game.newloc,100); motion=MOD(game.newloc,100);
@ -620,7 +621,6 @@ static bool playermove(FILE *cmdin, token_t verb, int motion)
} }
else if (game.prop[motion] != game.newloc/100-3) else if (game.prop[motion] != game.newloc/100-3)
break; break;
L12:
do { do {
if (TRAVEL[KK] < 0)BUG(25); if (TRAVEL[KK] < 0)BUG(25);
++KK; ++KK;
@ -654,6 +654,12 @@ static bool playermove(FILE *cmdin, token_t verb, int motion)
* plover-passage to get it out. Having dropped it, go back and * plover-passage to get it out. Having dropped it, go back and
* pretend he wasn't carrying it after all. */ * pretend he wasn't carrying it after all. */
DROP(EMRALD,game.loc); DROP(EMRALD,game.loc);
do {
if (TRAVEL[KK] < 0)BUG(25);
++KK;
game.newloc=labs(TRAVEL[KK])/1000;
} while
(game.newloc == LL);
goto L12; goto L12;
case 3: case 3:
/* Travel 303. Troll bridge. Must be done only as special /* Travel 303. Troll bridge. Must be done only as special