mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Inline krand() when not using KRANDDEBUG. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4744 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
272ac9abe6
commit
9b91aac48c
2 changed files with 12 additions and 4 deletions
|
@ -1200,7 +1200,18 @@ extern const int16_t *chsecptr_onextwall;
|
||||||
int32_t checksectorpointer(int16_t i, int16_t sectnum);
|
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
|
||||||
|
FORCE_INLINE int32_t krand(void)
|
||||||
|
{
|
||||||
|
// randomseed = (randomseed*27584621)+1;
|
||||||
|
randomseed = (randomseed * 1664525ul) + 221297ul;
|
||||||
|
return ((uint32_t) randomseed)>>16;
|
||||||
|
}
|
||||||
|
#else
|
||||||
int32_t krand(void);
|
int32_t krand(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
int32_t ksqrt(uint32_t num);
|
int32_t ksqrt(uint32_t num);
|
||||||
int32_t __fastcall getangle(int32_t xvect, int32_t yvect);
|
int32_t __fastcall getangle(int32_t xvect, int32_t yvect);
|
||||||
|
|
||||||
|
|
|
@ -14358,8 +14358,6 @@ int32_t krd_print(const char *filename)
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif // KRANDDEBUG
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// krand
|
// krand
|
||||||
|
@ -14369,17 +14367,16 @@ int32_t krand(void)
|
||||||
// randomseed = (randomseed*27584621)+1;
|
// randomseed = (randomseed*27584621)+1;
|
||||||
randomseed = (randomseed * 1664525ul) + 221297ul;
|
randomseed = (randomseed * 1664525ul) + 221297ul;
|
||||||
|
|
||||||
#if 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
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue