In Lunatic build, make krand() a proper function again, called from Lua/FFI.

DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4759 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-11-22 18:37:24 +00:00
parent b65ae1b741
commit cb606b0a11
2 changed files with 6 additions and 6 deletions

View file

@ -1201,10 +1201,9 @@ int32_t checksectorpointer(int16_t i, int16_t sectnum);
void getmousevalues(int32_t *mousx, int32_t *mousy, int32_t *bstatus) ATTRIBUTE((nonnull(1,2,3)));
#if !KRANDDEBUG
#if !KRANDDEBUG && !defined LUNATIC
FORCE_INLINE int32_t krand(void)
{
// randomseed = (randomseed*27584621)+1;
randomseed = (randomseed * 1664525ul) + 221297ul;
return ((uint32_t) randomseed)>>16;
}

View file

@ -14356,7 +14356,9 @@ int32_t krd_print(const char *filename)
fclose(fp);
return 0;
}
#endif // KRANDDEBUG
#if KRANDDEBUG || defined LUNATIC
//
// krand
//
@ -14364,18 +14366,17 @@ 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 // KRANDDEBUG
#endif
//
// getzrange