Structuring move.
This commit is contained in:
parent
d3e84846d3
commit
dd2a949730
1 changed files with 7 additions and 6 deletions
13
main.c
13
main.c
|
@ -476,7 +476,7 @@ static void croak(FILE *cmdin)
|
||||||
* "K", put the new location in "game.newloc". The current loc is saved
|
* "K", put the new location in "game.newloc". The current loc is saved
|
||||||
* in "game.oldloc" in case he wants to retreat. The current
|
* in "game.oldloc" in case he wants to retreat. The current
|
||||||
* game.oldloc is saved in game.oldlc2, in case he dies. (if he
|
* game.oldloc is saved in game.oldlc2, in case he dies. (if he
|
||||||
* does, game.newloc will be limbo, and OLgame.dloc will be what killed
|
* does, game.newloc will be limbo, and game.oldloc will be what killed
|
||||||
* him, so we need game.oldlc2, which is the last place he was
|
* him, so we need game.oldlc2, which is the last place he was
|
||||||
* safe.) */
|
* safe.) */
|
||||||
|
|
||||||
|
@ -488,7 +488,7 @@ static bool playermove(FILE *cmdin, token_t verb)
|
||||||
BUG(26);
|
BUG(26);
|
||||||
if (K == NUL)
|
if (K == NUL)
|
||||||
return true;
|
return true;
|
||||||
if (K == BACK) {
|
else if (K == BACK) {
|
||||||
/* Handle "go back". Look for verb which goes from game.loc to
|
/* Handle "go back". Look for verb which goes from game.loc to
|
||||||
* game.oldloc, or to game.oldlc2 If game.oldloc has forced-motion.
|
* game.oldloc, or to game.oldlc2 If game.oldloc has forced-motion.
|
||||||
* K2 saves entry -> forced loc -> previous loc. */
|
* K2 saves entry -> forced loc -> previous loc. */
|
||||||
|
@ -522,11 +522,12 @@ static bool playermove(FILE *cmdin, token_t verb)
|
||||||
K=MOD(labs(TRAVEL[KK]),1000);
|
K=MOD(labs(TRAVEL[KK]),1000);
|
||||||
KK=KEY[game.loc];
|
KK=KEY[game.loc];
|
||||||
goto L9;
|
goto L9;
|
||||||
|
} else {
|
||||||
|
RSPEAK(K2);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
RSPEAK(K2);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
if (K == LOOK) {
|
else if (K == LOOK) {
|
||||||
/* Look. Can't give more detail. Pretend it wasn't dark
|
/* Look. Can't give more detail. Pretend it wasn't dark
|
||||||
* (though it may "now" be dark) so he won't fall into a
|
* (though it may "now" be dark) so he won't fall into a
|
||||||
* pit while staring into the gloom. */
|
* pit while staring into the gloom. */
|
||||||
|
@ -536,7 +537,7 @@ static bool playermove(FILE *cmdin, token_t verb)
|
||||||
game.abbrev[game.loc]=0;
|
game.abbrev[game.loc]=0;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (K == CAVE) {
|
else if (K == CAVE) {
|
||||||
/* Cave. Different messages depending on whether above ground. */
|
/* Cave. Different messages depending on whether above ground. */
|
||||||
RSPEAK((OUTSID(game.loc) && game.loc != 8) ? 57 : 58);
|
RSPEAK((OUTSID(game.loc) && game.loc != 8) ? 57 : 58);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue