mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +00:00
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:
parent
b65ae1b741
commit
cb606b0a11
2 changed files with 6 additions and 6 deletions
|
@ -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)));
|
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)
|
FORCE_INLINE int32_t krand(void)
|
||||||
{
|
{
|
||||||
// randomseed = (randomseed*27584621)+1;
|
|
||||||
randomseed = (randomseed * 1664525ul) + 221297ul;
|
randomseed = (randomseed * 1664525ul) + 221297ul;
|
||||||
return ((uint32_t) randomseed)>>16;
|
return ((uint32_t) randomseed)>>16;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14356,7 +14356,9 @@ int32_t krd_print(const char *filename)
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif // KRANDDEBUG
|
||||||
|
|
||||||
|
#if KRANDDEBUG || defined LUNATIC
|
||||||
//
|
//
|
||||||
// krand
|
// krand
|
||||||
//
|
//
|
||||||
|
@ -14364,18 +14366,17 @@ int32_t krand(void)
|
||||||
{
|
{
|
||||||
// randomseed = (randomseed*27584621)+1;
|
// randomseed = (randomseed*27584621)+1;
|
||||||
randomseed = (randomseed * 1664525ul) + 221297ul;
|
randomseed = (randomseed * 1664525ul) + 221297ul;
|
||||||
|
#ifdef KRANDDEBUG
|
||||||
if (krd_enabled)
|
if (krd_enabled)
|
||||||
if (krd_numcalls < KRD_MAXCALLS)
|
if (krd_numcalls < KRD_MAXCALLS)
|
||||||
{
|
{
|
||||||
backtrace(krd_fromwhere[krd_numcalls], KRD_DEPTH);
|
backtrace(krd_fromwhere[krd_numcalls], KRD_DEPTH);
|
||||||
krd_numcalls++;
|
krd_numcalls++;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return ((uint32_t)randomseed)>>16;
|
return ((uint32_t)randomseed)>>16;
|
||||||
}
|
}
|
||||||
#endif // KRANDDEBUG
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// getzrange
|
// getzrange
|
||||||
|
|
Loading…
Reference in a new issue