X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=main.c;h=ecc9ca03a2f1a13ccc522d464249e67d58692a77;hb=73c9b595079be9494f33370709a1befdd2a94de8;hp=90f60033d883790734dc94c6bebe51107540eb63;hpb=7af0c7b059bf372ca645ff97dead180c7c56c880;p=open-adventure.git diff --git a/main.c b/main.c index 90f6003..ecc9ca0 100644 --- a/main.c +++ b/main.c @@ -46,7 +46,6 @@ FILE *logfp; bool oldstyle = false; bool editline = true; bool prompt = true; -lcg_state lcgstate; extern void initialise(); extern void score(long); @@ -114,9 +113,9 @@ int main(int argc, char *argv[]) /* Initialize our LCG PRNG with parameters tested against * Knuth vol. 2. by the original authors */ - lcgstate.a = 1093; - lcgstate.c = 221587; - lcgstate.m = 1048576; + game.lcg_a = 1093; + game.lcg_c = 221587; + game.lcg_m = 1048576; srand(time(NULL)); long seedval = (long)rand(); set_seed(seedval); @@ -861,10 +860,9 @@ static void listobjects(void) * get full score. */ { if (!DARK(game.loc)) { - long obj; ++game.abbrev[game.loc]; for (int i=game.atloc[game.loc]; i != 0; i=game.link[i]) { - obj=i; + long obj=i; if (obj > NOBJECTS)obj=obj-NOBJECTS; if (obj == STEPS && TOTING(NUGGET)) continue;