From: Peje Nilsson Date: Tue, 13 Jun 2017 05:41:09 +0000 (+0200) Subject: Relocate L12 X-Git-Tag: 1.1~372 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=c366ddb7334cf85dba1f0dc75a68a8a094960aa3;p=open-adventure.git Relocate L12 With a bit of code duplication the L12 label can be moved outside the loop. --- diff --git a/main.c b/main.c index a74aa6b..5288e43 100644 --- a/main.c +++ b/main.c @@ -606,6 +606,7 @@ static bool playermove(FILE *cmdin, token_t verb, int motion) } LL=LL/1000; + L12: for (;;) { game.newloc=LL/1000; 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) break; - L12: do { if (TRAVEL[KK] < 0)BUG(25); ++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 * pretend he wasn't carrying it after all. */ DROP(EMRALD,game.loc); + do { + if (TRAVEL[KK] < 0)BUG(25); + ++KK; + game.newloc=labs(TRAVEL[KK])/1000; + } while + (game.newloc == LL); goto L12; case 3: /* Travel 303. Troll bridge. Must be done only as special