diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
commit | 838baf3f99ec5ab81b063eb5449a3381d860f377 (patch) | |
tree | dd31abcfde08ca92e4623b8f50b3d762a87c997a /konquest/gamecore.cc | |
parent | 2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff) | |
download | tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip |
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konquest/gamecore.cc')
-rw-r--r-- | konquest/gamecore.cc | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/konquest/gamecore.cc b/konquest/gamecore.cc index 3706cf68..df8ba86e 100644 --- a/konquest/gamecore.cc +++ b/konquest/gamecore.cc @@ -94,7 +94,7 @@ Map::populateMap( PlayerList &players, Player *neutral, Freeze(); int index = 0; - TQString names( "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*(),.<>;:[]{}/?-+\\|" ); + TQString names( "ABCDEFGHIJKLMNOPTQRSTUVWXYZ1234567890!@#$%^&*(),.<>;:[]{}/?-+\\|" ); // Create a planet for each player Player *plr; @@ -242,16 +242,16 @@ const int Map::getColumns() const //--------------------------------------------------------------------------- Sector::Sector() -: TQObject(0,0), planet( NULL ), parentMap(NULL ), x(0), y(0) +: TQObject(0,0), planet( NULL ), tqparentMap(NULL ), x(0), y(0) {} Sector::Sector( Map *newParentMap, int xPos, int yPos ) -: TQObject(0,0), planet(NULL), parentMap( newParentMap ), x(xPos), y(yPos) +: TQObject(0,0), planet(NULL), tqparentMap( newParentMap ), x(xPos), y(yPos) { } Sector::Sector( const Sector & other ) -: TQObject(0,0), planet(other.planet), parentMap(other.parentMap), x(other.x), y(other.y) +: TQObject(0,0), planet(other.planet), tqparentMap(other.tqparentMap), x(other.x), y(other.y) { } @@ -294,7 +294,7 @@ Sector::operator=( const Sector &other ) x = other.x; y = other.y; planet = other.planet; - parentMap = other.parentMap; + tqparentMap = other.tqparentMap; return *this; } @@ -302,7 +302,7 @@ Sector::operator=( const Sector &other ) void Sector::select() { - parentMap->setSelectedSector( x, y ); + tqparentMap->setSelectedSector( x, y ); emit selected(); } @@ -322,29 +322,29 @@ int Sector::getColumn() Planet::Planet( TQString planetName, Sector &newParentSector, Player *initialOwner, int newProd, double newKillP, double newMorale ) - : TQObject(0,0), name(planetName), owner(initialOwner), parentSector(newParentSector), + : TQObject(0,0), name(planetName), owner(initialOwner), tqparentSector(newParentSector), homeFleet( this, newProd ), killPercentage(newKillP), morale( newMorale ), productionRate(newProd) { - parentSector.setPlanet( this ); + tqparentSector.setPlanet( this ); } Planet::~Planet() {} Planet * -Planet::createPlayerPlanet( Sector &parentSector, Player *initialOwner, TQString planetName ) +Planet::createPlayerPlanet( Sector &tqparentSector, Player *initialOwner, TQString planetName ) { CoreLogic clogic; double morale = clogic.generateMorale(); - return new Planet( planetName, parentSector, initialOwner, + return new Planet( planetName, tqparentSector, initialOwner, 10, 0.400, morale ); } Planet * -Planet::createNeutralPlanet( Sector &parentSector, Player *initialOwner, TQString planetName ) +Planet::createNeutralPlanet( Sector &tqparentSector, Player *initialOwner, TQString planetName ) { CoreLogic clogic; double morale = clogic.generateMorale(); @@ -353,7 +353,7 @@ Planet::createNeutralPlanet( Sector &parentSector, Player *initialOwner, TQStrin int productionRate = (int)clogic.generatePlanetProduction(); - return new Planet( planetName, parentSector, + return new Planet( planetName, tqparentSector, initialOwner, productionRate, killP, morale ); } @@ -398,7 +398,7 @@ Planet::setProduction( int newProduction ) void Planet::select() { - parentSector.select(); + tqparentSector.select(); emit selected(); } @@ -423,7 +423,7 @@ Planet::getName() const Sector & Planet::getSector() const { - return parentSector; + return tqparentSector; } void @@ -479,10 +479,10 @@ Player::getName() return name; } -QString +TQString Player::getColoredName() { - return TQString("<font color=\"%1\">%2</font>").arg(color.name(), name); + return TQString("<font color=\"%1\">%2</font>").tqarg(color.name(), name); } Player *Player::createPlayer( TQString newName, TQColor color, int playerNum, bool isAi ) @@ -492,7 +492,7 @@ Player *Player::createPlayer( TQString newName, TQColor color, int playerNum, bo Player *Player::createNeutralPlayer() { - return new Player( TQString::null, gray, NEUTRAL_PLAYER_NUMBER, false ); + return new Player( TQString(), gray, NEUTRAL_PLAYER_NUMBER, false ); } TQColor &Player::getColor() |