diff options
Diffstat (limited to 'konquest/gamecore.cc')
-rw-r--r-- | konquest/gamecore.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/konquest/gamecore.cc b/konquest/gamecore.cc index df8ba86e..e02c115f 100644 --- a/konquest/gamecore.cc +++ b/konquest/gamecore.cc @@ -242,16 +242,16 @@ const int Map::getColumns() const //--------------------------------------------------------------------------- Sector::Sector() -: TQObject(0,0), planet( NULL ), tqparentMap(NULL ), x(0), y(0) +: TQObject(0,0), planet( NULL ), parentMap(NULL ), x(0), y(0) {} Sector::Sector( Map *newParentMap, int xPos, int yPos ) -: TQObject(0,0), planet(NULL), tqparentMap( newParentMap ), x(xPos), y(yPos) +: TQObject(0,0), planet(NULL), parentMap( newParentMap ), x(xPos), y(yPos) { } Sector::Sector( const Sector & other ) -: TQObject(0,0), planet(other.planet), tqparentMap(other.tqparentMap), x(other.x), y(other.y) +: TQObject(0,0), planet(other.planet), parentMap(other.parentMap), x(other.x), y(other.y) { } @@ -294,7 +294,7 @@ Sector::operator=( const Sector &other ) x = other.x; y = other.y; planet = other.planet; - tqparentMap = other.tqparentMap; + parentMap = other.parentMap; return *this; } @@ -302,7 +302,7 @@ Sector::operator=( const Sector &other ) void Sector::select() { - tqparentMap->setSelectedSector( x, y ); + parentMap->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), tqparentSector(newParentSector), + : TQObject(0,0), name(planetName), owner(initialOwner), parentSector(newParentSector), homeFleet( this, newProd ), killPercentage(newKillP), morale( newMorale ), productionRate(newProd) { - tqparentSector.setPlanet( this ); + parentSector.setPlanet( this ); } Planet::~Planet() {} Planet * -Planet::createPlayerPlanet( Sector &tqparentSector, Player *initialOwner, TQString planetName ) +Planet::createPlayerPlanet( Sector &parentSector, Player *initialOwner, TQString planetName ) { CoreLogic clogic; double morale = clogic.generateMorale(); - return new Planet( planetName, tqparentSector, initialOwner, + return new Planet( planetName, parentSector, initialOwner, 10, 0.400, morale ); } Planet * -Planet::createNeutralPlanet( Sector &tqparentSector, Player *initialOwner, TQString planetName ) +Planet::createNeutralPlanet( Sector &parentSector, Player *initialOwner, TQString planetName ) { CoreLogic clogic; double morale = clogic.generateMorale(); @@ -353,7 +353,7 @@ Planet::createNeutralPlanet( Sector &tqparentSector, Player *initialOwner, TQStr int productionRate = (int)clogic.generatePlanetProduction(); - return new Planet( planetName, tqparentSector, + return new Planet( planetName, parentSector, initialOwner, productionRate, killP, morale ); } @@ -398,7 +398,7 @@ Planet::setProduction( int newProduction ) void Planet::select() { - tqparentSector.select(); + parentSector.select(); emit selected(); } @@ -423,7 +423,7 @@ Planet::getName() const Sector & Planet::getSector() const { - return tqparentSector; + return parentSector; } void |