Skip to content

Commit

Permalink
Whitespace fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yankes committed Apr 18, 2015
1 parent 5f275b4 commit 3261c25
Show file tree
Hide file tree
Showing 24 changed files with 58 additions and 58 deletions.
2 changes: 1 addition & 1 deletion src/Basescape/BaseInfoState.cpp
Expand Up @@ -195,7 +195,7 @@ BaseInfoState::BaseInfoState(Base *base, BasescapeState *state) : _base(base), _

_edtBase->setBig();
_edtBase->onChange((ActionHandler)&BaseInfoState::edtBaseChange);

_txtPersonnel->setText(tr("STR_PERSONNEL_AVAILABLE_PERSONNEL_TOTAL"));

_txtSoldiers->setText(tr("STR_SOLDIERS"));
Expand Down
4 changes: 2 additions & 2 deletions src/Basescape/CraftArmorState.cpp
Expand Up @@ -153,7 +153,7 @@ void CraftArmorState::btnOkClick(Action *)
* @param action Pointer to an action.
*/
void CraftArmorState::lstSoldiersClick(Action *action)
{
{
Soldier *s = _base->getSoldiers()->at(_lstSoldiers->getSelectedRow());
if (!(s->getCraft() && s->getCraft()->getStatus() == "STR_OUT"))
{
Expand All @@ -178,7 +178,7 @@ void CraftArmorState::lstSoldiersClick(Action *action)
{
_base->getItems()->removeItem(a->getStoreItem());
}

s->setArmor(a);
_lstSoldiers->setCellText(_lstSoldiers->getSelectedRow(), 2, tr(a->getType()));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Basescape/CraftInfoState.cpp
Expand Up @@ -298,7 +298,7 @@ void CraftInfoState::init()
/**
* Turns an amount of time into a
* day/hour string.
* @param total
* @param total
*/
std::wstring CraftInfoState::formatTime(int total)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Basescape/ManageAlienContainmentState.cpp
Expand Up @@ -197,7 +197,7 @@ void ManageAlienContainmentState::btnOkClick(Action *)
_game->getSavedGame()->setFunds(_game->getSavedGame()->getFunds() + _game->getRuleset()->getItem(_aliens[i])->getSellCost() * _qtys[i]);
}
else
{
{
// add the corpses
_base->getItems()->addItem(
_game->getRuleset()->getArmor(
Expand Down
2 changes: 1 addition & 1 deletion src/Basescape/ManufactureStartState.cpp
Expand Up @@ -116,7 +116,7 @@ ManufactureStartState::ManufactureStartState(Base * base, RuleManufacture * item

_lstRequiredItems->setColumns(3, 140, 75, 55);
_lstRequiredItems->setBackground(_window);

ItemContainer * itemContainer (base->getItems());
int row = 0;
for (std::map<std::string, int>::const_iterator iter = requiredItems.begin();
Expand Down
2 changes: 1 addition & 1 deletion src/Basescape/ManufactureState.cpp
Expand Up @@ -105,7 +105,7 @@ ManufactureState::ManufactureState(Base *base) : _base(base)

_txtProduced->setText(tr("STR_UNITS_PRODUCED"));
_txtProduced->setWordWrap(true);

_txtCost->setText(tr("STR_COST__PER__UNIT"));
_txtCost->setWordWrap(true);

Expand Down
2 changes: 1 addition & 1 deletion src/Basescape/SoldierArmorState.cpp
Expand Up @@ -152,7 +152,7 @@ void SoldierArmorState::lstArmorClick(Action *)
SavedGame *_save;
_save = _game->getSavedGame();
_save->setLastSelectedArmor(_armors[_lstArmor->getSelectedRow()]->getType());

_game->popState();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Battlescape/AbortMissionState.cpp
Expand Up @@ -55,7 +55,7 @@ AbortMissionState::AbortMissionState(SavedBattleGame *battleGame, BattlescapeSta

// Set palette
_battleGame->setPaletteByDepth(this);

add(_window, "messageWindowBorder", "battlescape");
add(_txtInExit, "messageWindows", "battlescape");
add(_txtOutsideExit, "messageWindows", "battlescape");
Expand Down
2 changes: 1 addition & 1 deletion src/Battlescape/BriefingState.cpp
Expand Up @@ -127,7 +127,7 @@ BriefingState::BriefingState(Craft *craft, Base *base)
_txtCraft->setText(s);

_txtBriefing->setWordWrap(true);

_txtTitle->setText(tr(mission));
std::ostringstream briefingtext;
briefingtext << mission.c_str() << "_BRIEFING";
Expand Down
4 changes: 2 additions & 2 deletions src/Battlescape/InventoryState.cpp
Expand Up @@ -139,7 +139,7 @@ InventoryState::InventoryState(bool tu, BattlescapeState *parent) : _tu(tu), _pa
centerAllSurfaces();



_txtName->setBig();
_txtName->setHighContrast(true);

Expand Down Expand Up @@ -735,7 +735,7 @@ void InventoryState::_refreshMouse()
int x, y;
SDL_GetMouseState(&x, &y);
SDL_WarpMouse(x+1, y);

// move the mouse back to avoid cursor creep
SDL_WarpMouse(x, y);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Battlescape/UnitInfoState.cpp
Expand Up @@ -255,7 +255,7 @@ UnitInfoState::UnitInfoState(BattleUnit *unit, BattlescapeState *parent, bool fr
_exit->onMouseClick((ActionHandler)&UnitInfoState::exitClick);
_exit->onKeyboardPress((ActionHandler)&UnitInfoState::exitClick, Options::keyCancel);
_exit->onKeyboardPress((ActionHandler)&UnitInfoState::exitClick, Options::keyBattleStats);

Uint8 color = _game->getRuleset()->getInterface("stats")->getElement("text")->color;
Uint8 color2 = _game->getRuleset()->getInterface("stats")->getElement("text")->color2;

Expand Down
6 changes: 3 additions & 3 deletions src/Geoscape/AlienBaseState.cpp
Expand Up @@ -62,7 +62,7 @@ AlienBaseState::AlienBaseState(AlienBase *base, GeoscapeState *state) : _state(s

// Set up objects
_window->setBackground(_game->getResourcePack()->getSurface("BACK13.SCR"));

_btnOk->setText(tr("STR_OK"));
_btnOk->onMouseClick((ActionHandler)&AlienBaseState::btnOkClick);
_btnOk->onKeyboardPress((ActionHandler)&AlienBaseState::btnOkClick, Options::keyOk);
Expand All @@ -76,15 +76,15 @@ AlienBaseState::AlienBaseState(AlienBase *base, GeoscapeState *state) : _state(s
std::wstring region, country;
for (std::vector<Country*>::iterator i = _game->getSavedGame()->getCountries()->begin(); i != _game->getSavedGame()->getCountries()->end(); ++i)
{
if ((*i)->getRules()->insideCountry(_base->getLongitude(), _base->getLatitude()))
if ((*i)->getRules()->insideCountry(_base->getLongitude(), _base->getLatitude()))
{
country = tr((*i)->getRules()->getType());
break;
}
}
for (std::vector<Region*>::iterator i = _game->getSavedGame()->getRegions()->begin(); i != _game->getSavedGame()->getRegions()->end(); ++i)
{
if ((*i)->getRules()->insideRegion(_base->getLongitude(), _base->getLatitude()))
if ((*i)->getRules()->insideRegion(_base->getLongitude(), _base->getLatitude()))
{
region = tr((*i)->getRules()->getType());
break;
Expand Down
8 changes: 4 additions & 4 deletions src/Geoscape/AllocatePsiTrainingState.cpp
Expand Up @@ -77,16 +77,16 @@ AllocatePsiTrainingState::AllocatePsiTrainingState(Base *base) : _sel(0)
_btnOk->setText(tr("STR_OK"));
_btnOk->onMouseClick((ActionHandler)&AllocatePsiTrainingState::btnOkClick);
_btnOk->onKeyboardPress((ActionHandler)&AllocatePsiTrainingState::btnOkClick, Options::keyCancel);

_txtTitle->setBig();
_txtTitle->setAlign(ALIGN_CENTER);
_txtTitle->setText(tr("STR_PSIONIC_TRAINING"));

_labSpace = base->getAvailablePsiLabs() - base->getUsedPsiLabs();
_txtRemaining->setText(tr("STR_REMAINING_PSI_LAB_CAPACITY").arg(_labSpace));

_txtName->setText(tr("STR_NAME"));

_txtPsiStrength->setText(tr("STR_PSIONIC__STRENGTH"));

_txtPsiSkill->setText(tr("STR_PSIONIC_SKILL_IMPROVEMENT"));
Expand Down
8 changes: 4 additions & 4 deletions src/Geoscape/BaseDefenseState.cpp
Expand Up @@ -119,7 +119,7 @@ void BaseDefenseState::nextStep()
{
if (_thinkcycles == -1)
return;

++_thinkcycles;

if (_thinkcycles == 1)
Expand Down Expand Up @@ -172,11 +172,11 @@ void BaseDefenseState::nextStep()
_attacks = 0;
return;
}



BaseFacility* def = _base->getDefenses()->at(_attacks);

switch (_action)
{
case BDA_NONE:
Expand Down
2 changes: 1 addition & 1 deletion src/Geoscape/BaseDestroyedState.cpp
Expand Up @@ -61,7 +61,7 @@ BaseDestroyedState::BaseDestroyedState(Base *base) : _base(base)
_btnOk->onMouseClick((ActionHandler)&BaseDestroyedState::btnOkClick);
_btnOk->onKeyboardPress((ActionHandler)&BaseDestroyedState::btnOkClick, Options::keyOk);
_btnOk->onKeyboardPress((ActionHandler)&BaseDestroyedState::btnOkClick, Options::keyCancel);

_txtMessage->setAlign(ALIGN_CENTER);
_txtMessage->setBig();
_txtMessage->setWordWrap(true);
Expand Down
2 changes: 1 addition & 1 deletion src/Geoscape/BuildNewBaseState.cpp
Expand Up @@ -118,7 +118,7 @@ BuildNewBaseState::BuildNewBaseState(Base *base, Globe *globe, bool first) : _ba
_btnZoomOut->onMouseClick((ActionHandler)&BuildNewBaseState::btnZoomOutLeftClick, SDL_BUTTON_LEFT);
_btnZoomOut->onMouseClick((ActionHandler)&BuildNewBaseState::btnZoomOutRightClick, SDL_BUTTON_RIGHT);
_btnZoomOut->onKeyboardPress((ActionHandler)&BuildNewBaseState::btnZoomOutLeftClick, Options::keyGeoZoomOut);

// dirty hacks to get the rotate buttons to work in "classic" style
_btnRotateLeft->setListButton();
_btnRotateRight->setListButton();
Expand Down
2 changes: 1 addition & 1 deletion src/Geoscape/ConfirmCydoniaState.cpp
Expand Up @@ -89,7 +89,7 @@ void ConfirmCydoniaState::btnYesClick(Action *)
{
_game->popState();
_game->popState();

SavedBattleGame *bgame = new SavedBattleGame();
_game->getSavedGame()->setBattleGame(bgame);
BattlescapeGenerator bgen = BattlescapeGenerator(_game);
Expand Down
26 changes: 13 additions & 13 deletions src/Geoscape/DogfightState.cpp
Expand Up @@ -54,10 +54,10 @@ namespace OpenXcom
{

// UFO blobs graphics ...
const int DogfightState::_ufoBlobs[8][13][13] =
const int DogfightState::_ufoBlobs[8][13][13] =
{
/*0 STR_VERY_SMALL */
{
/*0 STR_VERY_SMALL */
{
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
Expand Down Expand Up @@ -187,7 +187,7 @@ const int DogfightState::_ufoBlobs[8][13][13] =
};

// Projectile blobs
const int DogfightState::_projectileBlobs[4][6][3] =
const int DogfightState::_projectileBlobs[4][6][3] =
{
/*0 STR_STINGRAY_MISSILE ?*/
{
Expand Down Expand Up @@ -247,7 +247,7 @@ DogfightState::DogfightState(Globe *globe, Craft *craft, Ufo *ufo) : _globe(glob
_weapon2 = new InteractiveSurface(15, 17, _x + 64, _y + 52);
_range2 = new Surface(21, 74, _x + 43, _y + 3);
_damage = new Surface(22, 25, _x + 93, _y + 40);

_btnMinimize = new InteractiveSurface(12, 12, _x, _y);
_preview = new InteractiveSurface(160, 96, _x, _y);
_btnStandoff = new ImageButton(36, 15, _x + 83, _y + 4);
Expand Down Expand Up @@ -415,7 +415,7 @@ DogfightState::DogfightState(Globe *globe, Craft *craft, Ufo *ufo) : _globe(glob

// Draw weapon icon
frame = set->getFrame(w->getRules()->getSprite() + 5);

frame->setX(0);
frame->setY(0);
frame->blit(weapon);
Expand Down Expand Up @@ -675,7 +675,7 @@ void DogfightState::animate()
{
drawProjectile((*it));
}

// Clears text after a while
if (_timeout == 0)
{
Expand Down Expand Up @@ -793,7 +793,7 @@ void DogfightState::update()
// If UFOs ever fire anything but beams, those positions need to be adjust here though.
}

_currentDist += distanceChange;
_currentDist += distanceChange;

std::wostringstream ss;
ss << _currentDist;
Expand Down Expand Up @@ -883,7 +883,7 @@ void DogfightState::update()
}
}
}

// Remove projectiles that hit or missed their target.
for (std::vector<CraftWeaponProjectile*>::iterator it = _projectiles.begin(); it != _projectiles.end();)
{
Expand Down Expand Up @@ -917,7 +917,7 @@ void DogfightState::update()
}

// Handle weapon firing
if (wTimer == 0 && _currentDist <= w->getRules()->getRange() * 8 && w->getAmmo() > 0 && _mode != _btnStandoff
if (wTimer == 0 && _currentDist <= w->getRules()->getRange() * 8 && w->getAmmo() > 0 && _mode != _btnStandoff
&& _mode != _btnDisengage && !_ufo->isCrashed() && !_craft->isDestroyed())
{
if (i == 0)
Expand Down Expand Up @@ -1008,7 +1008,7 @@ void DogfightState::update()
_destroyCraft = true;
_ufo->setShootingAt(0);
}

// End dogfight if UFO is crashed or destroyed.
if (_ufo->isCrashed())
{
Expand Down Expand Up @@ -1484,7 +1484,7 @@ void DogfightState::drawUfo()
/*
* Draws projectiles on the radar screen.
* Depending on what type of projectile it is, it's
* shape will be different. Currently works for
* shape will be different. Currently works for
* original sized blobs 3 x 6 pixels.
*/
void DogfightState::drawProjectile(const CraftWeaponProjectile* p)
Expand Down Expand Up @@ -1675,7 +1675,7 @@ void DogfightState::calculateWindowPosition()

_minimizedIconX = 5;
_minimizedIconY = (5 * _interceptionNumber) + (16 * (_interceptionNumber - 1));

if (_interceptionsCount == 1)
{
_x = 80;
Expand Down
6 changes: 3 additions & 3 deletions src/Geoscape/GeoscapeState.cpp
Expand Up @@ -397,7 +397,7 @@ GeoscapeState::~GeoscapeState()
delete _zoomOutEffectTimer;
delete _dogfightStartTimer;
delete _dogfightTimer;

std::list<DogfightState*>::iterator it = _dogfights.begin();
for (; it != _dogfights.end();)
{
Expand Down Expand Up @@ -1566,7 +1566,7 @@ void GeoscapeState::time1Day()
{
for (std::vector<ResearchProject*>::const_iterator iter2 = (*j)->getResearch().begin(); iter2 != (*j)->getResearch().end(); ++iter2)
{
if ((*iter)->getRules()->getName() == (*iter2)->getRules()->getName() &&
if ((*iter)->getRules()->getName() == (*iter2)->getRules()->getName() &&
_game->getRuleset()->getUnit((*iter2)->getRules()->getName()) == 0)
{
(*j)->removeResearch(*iter2);
Expand Down Expand Up @@ -2267,7 +2267,7 @@ void GeoscapeState::resize(int &dX, int &dY)
dY = 0;
return;
}

Options::baseXResolution = std::max(Screen::ORIGINAL_WIDTH, Options::displayWidth / divisor);
Options::baseYResolution = std::max(Screen::ORIGINAL_HEIGHT, (int)(Options::displayHeight / pixelRatioY / divisor));

Expand Down

0 comments on commit 3261c25

Please sign in to comment.