X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=misc.c;h=c2512cb0ac5a5b78493142f966ed9b653a94d9be;hb=7dc3482c5b4ab8e0bc44b3c553fdcd4e527b3736;hp=c6733d5fe285f6cc419122c594e93f9f60bea673;hpb=569a39aa7c4429c27f074b86a71c1d540491d19f;p=open-adventure.git diff --git a/misc.c b/misc.c index c6733d5..c2512cb 100644 --- a/misc.c +++ b/misc.c @@ -699,7 +699,7 @@ bool tstbit(int mask, int bit) } void set_seed(int32_t seedval) -/* Set the LCG seed */ +/* Set the LCG1 seed */ { game.lcg_x = seedval % LCG_M; if (game.lcg_x < 0) { @@ -718,6 +718,9 @@ static int32_t get_next_lcg_value(void) { int32_t old_x = game.lcg_x; game.lcg_x = (LCG_A * game.lcg_x + LCG_C) % LCG_M; + if (settings.debug) { + printf("# random %d\n", old_x); // LCOV_EXCL_LINE + } return old_x; }