Merge branch 'floatcvt' of https://github.com/rheit/zdoom into floatcvt

# Conflicts:
#	src/r_defs.h
This commit is contained in:
Christoph Oelckers 2016-03-24 12:48:05 +01:00
commit 609defe078
96 changed files with 1325 additions and 1456 deletions

View file

@ -468,7 +468,7 @@ static void CALLBACK TimerTicked(UINT id, UINT msg, DWORD_PTR user, DWORD_PTR dw
//
//==========================================================================
fixed_t I_GetTimeFrac(uint32 *ms)
double I_GetTimeFrac(uint32 *ms)
{
DWORD now = timeGetTime();
if (ms != NULL)
@ -478,12 +478,11 @@ fixed_t I_GetTimeFrac(uint32 *ms)
DWORD step = TicNext - TicStart;
if (step == 0)
{
return FRACUNIT;
return 1.;
}
else
{
fixed_t frac = clamp<fixed_t> ((now - TicStart)*FRACUNIT/step, 0, FRACUNIT);
return frac;
return clamp<double>(double(now - TicStart) / step, 0, 1);
}
}
@ -727,7 +726,7 @@ void CalculateCPUSpeed()
PerfToMillisec = PerfToSec * 1000.0;
}
if (!batchrun) Printf ("CPU _f_speed(): %.0f MHz\n", 0.001 / PerfToMillisec);
if (!batchrun) Printf ("CPU speed: %.0f MHz\n", 0.001 / PerfToMillisec);
}
//==========================================================================