Commit 17f13934 authored by NY00123's avatar NY00123 Committed by Richard Gobeille

Engine: Adjust krand for removal of LUNATIC

parent eb1a8353
......@@ -1289,7 +1289,7 @@ int32_t checksectorpointer(int16_t i, int16_t sectnum);
void mouseGetValues(int32_t *mousx, int32_t *mousy, int32_t *bstatus) ATTRIBUTE((nonnull(1,2,3)));
#if !KRANDDEBUG && !defined LUNATIC
#if !KRANDDEBUG
static FORCE_INLINE int32_t krand(void)
{
randomseed = (randomseed * 1664525ul) + 221297ul;
......
......@@ -12357,7 +12357,7 @@ int32_t krd_print(const char *filename)
}
#endif // KRANDDEBUG
#if KRANDDEBUG || defined LUNATIC
#if KRANDDEBUG
//
// krand
//
......@@ -12365,14 +12365,12 @@ int32_t krand(void)
{
// randomseed = (randomseed*27584621)+1;
randomseed = (randomseed * 1664525ul) + 221297ul;
#ifdef KRANDDEBUG
if (krd_enabled)
if (krd_numcalls < KRD_MAXCALLS)
{
backtrace(krd_fromwhere[krd_numcalls], KRD_DEPTH);
krd_numcalls++;
}
#endif
return ((uint32_t)randomseed)>>16;
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment