style fixes
This commit is contained in:
1 parent
7504922d7b
commit
74bd670c7c
5 files changed
+32
-31
No files matched your search
+1
-1
@@ -993,7 +993,6 @@ void D_SRB2Loop(void)
|
||||
Discord_RunCallbacks();
|
||||
}
|
||||
#endif
|
||||
|
||||
// Fully completed frame made.
|
||||
finishprecise = I_GetPreciseTime();
|
||||
|
||||
@@ -1031,6 +1030,7 @@ void D_SRB2Loop(void)
|
||||
I_SleepDuration(capbudget - elapsed);
|
||||
}
|
||||
}
|
||||
|
||||
// Capture the time once more to get the real delta time.
|
||||
finishprecise = I_GetPreciseTime();
|
||||
deltasecs = (double)((INT64)(finishprecise - enterprecise)) / I_GetPrecisePrecision();
|
||||
|
||||
+2
-2
@@ -1845,11 +1845,11 @@ void G_Ticker(boolean run)
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; i++) // read/write demo and check turbo cheat
|
||||
{
|
||||
cmd = &players[i].cmd;
|
||||
|
||||
if (!playeringame[i])
|
||||
continue;
|
||||
|
||||
cmd = &players[i].cmd;
|
||||
|
||||
//@TODO all this throwdir stuff shouldn't be here! But it stays for now to maintain 1.0.4 compat...
|
||||
// Remove for 1.1!
|
||||
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ ATTRINLINE static fixed_t FUNCINLINE __internal_prng__(void)
|
||||
randomseed ^= randomseed >> 13;
|
||||
randomseed ^= randomseed >> 11;
|
||||
randomseed ^= randomseed << 21;
|
||||
return ( (randomseed*36548569) >> 4) & (FRACUNIT-1);
|
||||
return ((randomseed*36548569) >> 4) & (FRACUNIT-1);
|
||||
}
|
||||
|
||||
/** Provides a random fixed point number. Distribution is uniform.
|
||||
|
||||
+25
-25
@@ -1735,33 +1735,33 @@ static void P_CreateBlockMap(void)
|
||||
|
||||
// Now we simply iterate block-by-block until we reach the end block.
|
||||
for (curblockx = bxstart; curblockx <= bxend; curblockx++)
|
||||
for (curblocky = bystart; curblocky <= byend; curblocky++)
|
||||
{
|
||||
size_t b = curblocky * bmapwidth + curblockx;
|
||||
|
||||
if (b >= tot)
|
||||
continue;
|
||||
|
||||
if (!straight && !(LineInBlock((fixed_t)x, (fixed_t)y, (fixed_t)v2x, (fixed_t)v2y, (fixed_t)(curblockx << MAPBTOFRAC), (fixed_t)(curblocky << MAPBTOFRAC))))
|
||||
continue;
|
||||
|
||||
// Increase size of allocated list if necessary
|
||||
if (bmap[b].n >= bmap[b].nalloc)
|
||||
for (curblocky = bystart; curblocky <= byend; curblocky++)
|
||||
{
|
||||
// Graue 02-29-2004: make code more readable, don't realloc a null pointer
|
||||
// (because it crashes for me, and because the comp.lang.c FAQ says so)
|
||||
if (bmap[b].nalloc == 0)
|
||||
bmap[b].nalloc = 8;
|
||||
else
|
||||
bmap[b].nalloc *= 2;
|
||||
bmap[b].list = Z_Realloc(bmap[b].list, bmap[b].nalloc * sizeof (*bmap->list), PU_CACHE, &bmap[b].list);
|
||||
if (!bmap[b].list)
|
||||
I_Error("Out of Memory in P_CreateBlockMap");
|
||||
}
|
||||
size_t b = curblocky * bmapwidth + curblockx;
|
||||
|
||||
// Add linedef to end of list
|
||||
bmap[b].list[bmap[b].n++] = (INT32)i;
|
||||
}
|
||||
if (b >= tot)
|
||||
continue;
|
||||
|
||||
if (!straight && !(LineInBlock((fixed_t)x, (fixed_t)y, (fixed_t)v2x, (fixed_t)v2y, (fixed_t)(curblockx << MAPBTOFRAC), (fixed_t)(curblocky << MAPBTOFRAC))))
|
||||
continue;
|
||||
|
||||
// Increase size of allocated list if necessary
|
||||
if (bmap[b].n >= bmap[b].nalloc)
|
||||
{
|
||||
// Graue 02-29-2004: make code more readable, don't realloc a null pointer
|
||||
// (because it crashes for me, and because the comp.lang.c FAQ says so)
|
||||
if (bmap[b].nalloc == 0)
|
||||
bmap[b].nalloc = 8;
|
||||
else
|
||||
bmap[b].nalloc *= 2;
|
||||
bmap[b].list = Z_Realloc(bmap[b].list, bmap[b].nalloc * sizeof (*bmap->list), PU_CACHE, &bmap[b].list);
|
||||
if (!bmap[b].list)
|
||||
I_Error("Out of Memory in P_CreateBlockMap");
|
||||
}
|
||||
|
||||
// Add linedef to end of list
|
||||
bmap[b].list[bmap[b].n++] = (INT32)i;
|
||||
}
|
||||
}
|
||||
|
||||
// Compute the total size of the blockmap.
|
||||
|
||||
+3
-2
@@ -648,7 +648,8 @@ static inline void P_ResetSpriteStuff(void)
|
||||
|
||||
mo = (mobj_t *)th;
|
||||
|
||||
if (!mo || (mo->sprite == SPR_NULL) || (mo->flags2 & MF2_DONTDRAW) || (mo->type == MT_SHADOW))
|
||||
if (!mo || (mo->sprite == SPR_NULL)
|
||||
|| (mo->flags2 & MF2_DONTDRAW) || (mo->type == MT_SHADOW))
|
||||
continue;
|
||||
|
||||
mo->spritexscale = mo->realxscale;
|
||||
@@ -725,9 +726,9 @@ void P_Ticker(boolean run)
|
||||
if (playeringame[i])
|
||||
G_WriteDemoTiccmd(&players[i].cmd, i);
|
||||
}
|
||||
|
||||
if (demo.playback)
|
||||
{
|
||||
|
||||
#ifdef DEMO_COMPAT_100
|
||||
if (demo.version == 0x0001)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user