inline G_TicsTo stuff
theyre smol and get called often
This commit is contained in:
1 parent
439a2811b1
commit
2b988d404f
2 files changed
+26
-35
No files matched your search
@@ -7845,7 +7845,6 @@ void G_DoneLevelLoad(void)
|
||||
// Stops metal sonic's demo. Separate from other functions because metal + replays can coexist
|
||||
void G_StopMetalDemo(void)
|
||||
{
|
||||
|
||||
// Metal Sonic finishing doesn't end the game, dammit.
|
||||
Z_Free(metalbuffer);
|
||||
metalbuffer = NULL;
|
||||
@@ -8180,32 +8179,3 @@ boolean G_GetRetryFlag(void)
|
||||
{
|
||||
return retrying;
|
||||
}
|
||||
|
||||
// Time utility functions
|
||||
INT32 G_TicsToHours(tic_t tics)
|
||||
{
|
||||
return tics/(3600*TICRATE);
|
||||
}
|
||||
|
||||
INT32 G_TicsToMinutes(tic_t tics, boolean full)
|
||||
{
|
||||
if (full)
|
||||
return tics/(60*TICRATE);
|
||||
else
|
||||
return tics/(60*TICRATE)%60;
|
||||
}
|
||||
|
||||
INT32 G_TicsToSeconds(tic_t tics)
|
||||
{
|
||||
return (tics/TICRATE)%60;
|
||||
}
|
||||
|
||||
INT32 G_TicsToCentiseconds(tic_t tics)
|
||||
{
|
||||
return (INT32)((tics%TICRATE) * (100.00f/TICRATE));
|
||||
}
|
||||
|
||||
INT32 G_TicsToMilliseconds(tic_t tics)
|
||||
{
|
||||
return (INT32)((tics%TICRATE) * (1000.00f/TICRATE));
|
||||
}
|
||||
+26
-5
@@ -432,11 +432,32 @@ void G_ClearRecords(void);
|
||||
|
||||
tic_t G_GetBestTime(INT16 map);
|
||||
|
||||
FUNCMATH INT32 G_TicsToHours(tic_t tics);
|
||||
FUNCMATH INT32 G_TicsToMinutes(tic_t tics, boolean full);
|
||||
FUNCMATH INT32 G_TicsToSeconds(tic_t tics);
|
||||
FUNCMATH INT32 G_TicsToCentiseconds(tic_t tics);
|
||||
FUNCMATH INT32 G_TicsToMilliseconds(tic_t tics);
|
||||
// Time utility functions
|
||||
|
||||
FUNCINLINE static ATTRINLINE FUNCMATH INT32 G_TicsToHours(tic_t tics)
|
||||
{
|
||||
return tics/(3600*TICRATE);
|
||||
}
|
||||
|
||||
FUNCINLINE static ATTRINLINE FUNCMATH INT32 G_TicsToMinutes(tic_t tics, boolean full)
|
||||
{
|
||||
return full ? (tics/(60*TICRATE)) : (tics/(60*TICRATE)%60);
|
||||
}
|
||||
|
||||
FUNCINLINE static ATTRINLINE FUNCMATH INT32 G_TicsToSeconds(tic_t tics)
|
||||
{
|
||||
return (tics/TICRATE)%60;
|
||||
}
|
||||
|
||||
FUNCINLINE static ATTRINLINE FUNCMATH INT32 G_TicsToCentiseconds(tic_t tics)
|
||||
{
|
||||
return (INT32)((tics%TICRATE) * (100.00f/TICRATE));
|
||||
}
|
||||
|
||||
FUNCINLINE static ATTRINLINE FUNCMATH INT32 G_TicsToMilliseconds(tic_t tics)
|
||||
{
|
||||
return (INT32)((tics%TICRATE) * (1000.00f/TICRATE));
|
||||
}
|
||||
|
||||
// Don't split up TOL handling
|
||||
INT16 G_TOLFlag(INT32 pgametype);
|
||||
|
||||
Reference in new issue
Block a user