45 lines
1005 B
C++
45 lines
1005 B
C++
|
|
#include "xcommoninfo.h"
|
||
|
|
|
||
|
|
XCommonInfo::XCommonInfo() {}
|
||
|
|
|
||
|
|
XCommonInfo::XCommonInfo(const XGame &aGame, const XPlatform &aPlatform)
|
||
|
|
: mGame(aGame)
|
||
|
|
, mPlatform(aPlatform) {}
|
||
|
|
|
||
|
|
XGame XCommonInfo::GetGame() const
|
||
|
|
{
|
||
|
|
return mGame;
|
||
|
|
}
|
||
|
|
|
||
|
|
QString XCommonInfo::GetGameString() const
|
||
|
|
{
|
||
|
|
if (mGame == GAME_NONE) return "UNKNOWN";
|
||
|
|
else if (mGame == GAME_COD7_5) return "COD7.5";
|
||
|
|
return QString("COD%1").arg(mGame);
|
||
|
|
}
|
||
|
|
|
||
|
|
void XCommonInfo::SetGame(XGame newGame)
|
||
|
|
{
|
||
|
|
mGame = newGame;
|
||
|
|
}
|
||
|
|
|
||
|
|
XPlatform XCommonInfo::GetPlatform() const
|
||
|
|
{
|
||
|
|
return mPlatform;
|
||
|
|
}
|
||
|
|
|
||
|
|
QString XCommonInfo::GetPlatformString() const
|
||
|
|
{
|
||
|
|
if (mPlatform == PLATFORM_XBOX) return "Xbox";
|
||
|
|
else if (mPlatform == PLATFORM_PS3) return "PS3";
|
||
|
|
else if (mPlatform == PLATFORM_PC) return "PC";
|
||
|
|
else if (mPlatform == PLATFORM_WII) return "Wii";
|
||
|
|
else if (mPlatform == PLATFORM_WIIU) return "Wii U";
|
||
|
|
return "UNKNOWN";
|
||
|
|
}
|
||
|
|
|
||
|
|
void XCommonInfo::SetPlatform(XPlatform newPlatform)
|
||
|
|
{
|
||
|
|
mPlatform = newPlatform;
|
||
|
|
}
|