X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=main.c;h=95acac2fb47adcec557ecce53bf2df089704e45c;hb=40acab43afda431486c650b5f98bf5a4a5722781;hp=9ad6cd4dadc8341ce736d553f63c741e55dff468;hpb=46185a6e88836c861891b348bb020eb9b6e7f2df;p=open-adventure.git diff --git a/main.c b/main.c index 9ad6cd4..95acac2 100644 --- a/main.c +++ b/main.c @@ -29,9 +29,6 @@ struct game_t game; -long LNLENG, LNPOSN; -char rawbuf[LINESIZE], INLINE[LINESIZE + 1]; - FILE *logfp = NULL, *rfp = NULL; bool oldstyle = false; bool editline = true; @@ -521,7 +518,7 @@ static void croak(void) * him, so we need game.oldlc2, which is the last place he was * safe.) */ -static bool playermove(token_t verb, int motion) +static bool playermove( int motion) { int scratchloc, travel_entry = tkey[game.loc]; game.newloc = game.loc; @@ -598,7 +595,6 @@ static bool playermove(token_t verb, int motion) if (T_TERMINATE(travel[travel_entry]) || travel[travel_entry].motion == motion) break; if (travel[travel_entry].stop) { - /* FIXME: Magic numbers! */ /* Couldn't find an entry matching the motion word passed * in. Various messages depending on word given. */ int spk = CANT_APPLY; @@ -610,8 +606,6 @@ static bool playermove(token_t verb, int motion) spk = UNSURE_FACING; if (motion == OUTSIDE || motion == INSIDE) spk = NO_INOUT_HERE; - if (verb == FIND || verb == INVENTORY) - spk = NEARBY; if (motion == XYZZY || motion == PLUGH) spk = NOTHING_HAPPENS; if (motion == CRAWL) @@ -998,7 +992,7 @@ static bool do_command() rspeak(TAME_BEAR); speak(msg); if (FORCED(game.loc)) { - if (playermove(command.verb, 1)) + if (playermove(HERE)) return true; else continue; /* back to top of main interpreter loop */ @@ -1132,7 +1126,7 @@ Lookup: kmod = MOD(defn, 1000); switch (defn / 1000) { case 0: - if (playermove(command.verb, kmod)) + if (playermove(kmod)) return true; else continue; /* back to top of main interpreter loop */ @@ -1156,7 +1150,7 @@ Laction: case GO_TERMINATE: return true; case GO_MOVE: - playermove(command.verb, NUL); + playermove(NUL); return true; case GO_TOP: continue; /* back to top of main interpreter loop */