use car tDriveType in tgfdata/cars
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8069 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 6c6deb7346b625a45d287c51e259c93e440d9a71 Former-commit-id: 1d2cffb3f1529d7bbe9a7f908213d88352201959
This commit is contained in:
parent
fa899d2111
commit
3b54533ef2
3 changed files with 10 additions and 12 deletions
|
@ -280,15 +280,13 @@ void GfCar::load(void* hparmCar)
|
|||
|
||||
// Drive train.
|
||||
const std::string strDriveTrain =
|
||||
GfParmGetStr(hparmCar, SECT_DRIVETRAIN, PRM_TYPE, "");
|
||||
GfParmGetStr(hparmCar, SECT_DRIVETRAIN, PRM_TYPE, VAL_TRANS_RWD);
|
||||
if (strDriveTrain == VAL_TRANS_RWD)
|
||||
_eDriveTrain = eRWD;
|
||||
_eDriveTrain = TRANS_RWD;
|
||||
else if (strDriveTrain == VAL_TRANS_FWD)
|
||||
_eDriveTrain = eFWD;
|
||||
_eDriveTrain = TRANS_FWD;
|
||||
else if (strDriveTrain == VAL_TRANS_4WD)
|
||||
_eDriveTrain = e4WD;
|
||||
else
|
||||
_eDriveTrain = eNDriveTrains;
|
||||
_eDriveTrain = TRANS_4WD;
|
||||
|
||||
// Number of gears.
|
||||
std::ostringstream ossSpecPath;
|
||||
|
@ -488,7 +486,7 @@ const std::string& GfCar::getDescriptorFileName() const
|
|||
return _strDescFile;
|
||||
}
|
||||
|
||||
GfCar::EDriveTrain GfCar::getDriveTrain() const
|
||||
tDriveType GfCar::getDriveTrain() const
|
||||
{
|
||||
return _eDriveTrain;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include <tgf.h>
|
||||
#include <car.h>
|
||||
|
||||
#include "tgfdata.h"
|
||||
|
||||
|
@ -46,8 +47,7 @@ public:
|
|||
const std::string& getCategoryName() const;
|
||||
const std::string& getDescriptorFileName() const;
|
||||
|
||||
enum EDriveTrain { eRWD, eFWD, e4WD, eNDriveTrains };
|
||||
EDriveTrain getDriveTrain() const;
|
||||
tDriveType getDriveTrain() const;
|
||||
|
||||
unsigned getGearsCount() const;
|
||||
|
||||
|
@ -85,7 +85,7 @@ protected:
|
|||
std::string _strCatName; // User friendly category name (ex: "Long day Series GT1").
|
||||
std::string _strDescFile; // Path-name of the XML descriptor file.
|
||||
|
||||
EDriveTrain _eDriveTrain;
|
||||
tDriveType _eDriveTrain;
|
||||
unsigned _nGears; // Number of gears.
|
||||
bool _bTurboCharged; // TODO: Move to an enum (Turbo, Compressor, ...)
|
||||
tdble _fEngineCapacity; // litres
|
||||
|
|
|
@ -261,8 +261,8 @@ GfCar* RmGarageMenu::resetCarModelComboBox(const std::string& strCatName,
|
|||
|
||||
void RmGarageMenu::resetCarDataSheet(const std::string& strSelCarId)
|
||||
{
|
||||
static const char* pszDriveWheels[GfCar::eNDriveTrains+1] =
|
||||
{ "Rear", "Front", "4", "?" };
|
||||
static const char* pszDriveWheels[3] =
|
||||
{ "Rear", "Front", "4" };
|
||||
static const char* pszEnginePosition[GfCar::eNEnginePositions+1] =
|
||||
{ "Front", "Front-mid", "Mid", "Rear-mid", "Rear", "?" };
|
||||
static const char* pszEngineShape[GfCar::eNEngineShapes+1] =
|
||||
|
|
Loading…
Reference in a new issue