Re #307 (code cleanup) Fixed MSVC warnings
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@3284 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: fa2607c6d87b2138184914f05721497eb20efbf1 Former-commit-id: 17721df15ca01734550eba1c7ae4fd8de14eede0
This commit is contained in:
parent
61926974f5
commit
1f803d2110
4 changed files with 6 additions and 10 deletions
|
@ -63,7 +63,6 @@ ReTrackInit(void)
|
|||
|
||||
const char *trackName;
|
||||
const char *catName;
|
||||
const char *raceName;
|
||||
|
||||
ReInfo->_reRaceName = ReGetCurrentRaceName();
|
||||
|
||||
|
@ -194,7 +193,6 @@ reTrackDump(const tTrack *track, int verbose)
|
|||
void
|
||||
reTrackInitTimeOfDay(void)
|
||||
{
|
||||
char buf[256];
|
||||
static const char *TimeOfDayValues[] = RM_VALS_TIME;
|
||||
static const int NTimeOfDayValues = sizeof(TimeOfDayValues) / sizeof(const char*);
|
||||
|
||||
|
@ -265,8 +263,6 @@ reTrackInitTimeOfDay(void)
|
|||
void
|
||||
reTrackInitWeather(void)
|
||||
{
|
||||
char buf[256];
|
||||
|
||||
static const char* CloudsValues[] = RM_VALS_CLOUDS;
|
||||
static const int NCloudsValues = sizeof(CloudsValues) / sizeof(const char*);
|
||||
|
||||
|
|
|
@ -950,5 +950,5 @@ int GfNearestPow2 (int x)
|
|||
void
|
||||
GfSleep(double seconds)
|
||||
{
|
||||
SDL_Delay(seconds*1000); // ms.
|
||||
SDL_Delay((Uint32)(seconds*1000)); // ms.
|
||||
}
|
||||
|
|
|
@ -393,9 +393,9 @@ void GfCar::load(void* hparmCar)
|
|||
GfParmGetNum(hparmCar, SECT_FRNTAXLE, PRM_XPOS, 0, 0.0f);
|
||||
const tdble fRearAxleXpos =
|
||||
GfParmGetNum(hparmCar, SECT_REARAXLE, PRM_XPOS, 0, 0.0f);
|
||||
const tdble fGCXpos = _fFrontRearMassRatio * fFrontAxleXpos + (1.0 - _fFrontRearMassRatio) * fRearAxleXpos;
|
||||
const tdble fTotalFrontClift = 2 * fFrontClift + 4.92 * fFrontWingArea * sin(fFrontWingAngle);
|
||||
const tdble fTotalRearClift = 2 * fRearClift + 4.92 * fRearWingArea * sin(fRearWingAngle);
|
||||
const tdble fGCXpos = _fFrontRearMassRatio * fFrontAxleXpos + (1.0f - _fFrontRearMassRatio) * fRearAxleXpos;
|
||||
const tdble fTotalFrontClift = 2 * fFrontClift + 4.92f * fFrontWingArea * sin(fFrontWingAngle);
|
||||
const tdble fTotalRearClift = 2 * fRearClift + 4.92f * fRearWingArea * sin(fRearWingAngle);
|
||||
const tdble fFrontAeroLoad = fRefCarSpeed2 *
|
||||
(fTotalFrontClift * (fFrontWingXpos - fRearAxleXpos) + fTotalRearClift * (fRearWingXpos - fRearAxleXpos))
|
||||
/(fFrontAxleXpos - fRearAxleXpos);
|
||||
|
@ -407,7 +407,7 @@ void GfCar::load(void* hparmCar)
|
|||
+ ((1.0 - _fFrontRearMassRatio) * _fMass * G + fRearAeroLoad) * fMuRear) / _fMass;
|
||||
|
||||
// Cornering: axle distance divided by the inertia around the Z axis.
|
||||
const tdble fMassRepCoef = GfParmGetNum(hparmCar, SECT_CAR, PRM_CENTR, 0, 1.0);
|
||||
const tdble fMassRepCoef = GfParmGetNum(hparmCar, SECT_CAR, PRM_CENTR, 0, 1.0f);
|
||||
const tdble fCarLength = GfParmGetNum(hparmCar, SECT_CAR, PRM_LEN, 0, 4.7f);
|
||||
const tdble fCarWidth = GfParmGetNum(hparmCar, SECT_CAR, PRM_WIDTH, 0, 1.9f);
|
||||
_fInvertedZAxisInertia = // Stolen from Simu V2.1, car.cpp, SimCarConfig()
|
||||
|
|
|
@ -150,7 +150,7 @@ GetTrackHeader(void *TrackHandle)
|
|||
local->littlerainlkhood = GfParmGetNum(TrackHandle, TRK_SECT_LOCAL, TRK_ATT_LITTLERAINLKHD, (char*)NULL, 0);
|
||||
local->mediumrainlkhood = GfParmGetNum(TrackHandle, TRK_SECT_LOCAL, TRK_ATT_MEDIUMRAINLKHD, (char*)NULL, 0);
|
||||
|
||||
local->timeofday = (int)(GfParmGetNum(TrackHandle, TRK_SECT_LOCAL, TRK_ATT_TIMEOFDAY, (char*)NULL, (float)(15 * 3600 + 0 * 60 + 0))); // 15:00:00
|
||||
local->timeofday = GfParmGetNum(TrackHandle, TRK_SECT_LOCAL, TRK_ATT_TIMEOFDAY, (char*)NULL, (tdble)(15 * 3600 + 0 * 60 + 0)); // 15:00:00
|
||||
local->sunascension = GfParmGetNum(TrackHandle, TRK_SECT_LOCAL, TRK_ATT_SUN_ASCENSION, (char*)NULL, 0.0f);
|
||||
|
||||
/* Graphic part */
|
||||
|
|
Loading…
Reference in a new issue