MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / recenter

Method recenter

src/Engine/State.cpp:408–415  ·  view source on GitHub ↗

* Re-orients all the surfaces in the state. * @param dX delta of X; * @param dY delta of Y; */

Source from the content-addressed store, hash-verified

406 * @param dY delta of Y;
407 */
408void State::recenter(int dX, int dY)
409{
410 for (std::vector<Surface*>::const_iterator i = _surfaces.begin(); i != _surfaces.end(); ++i)
411 {
412 (*i)->setX((*i)->getX() + dX / 2);
413 (*i)->setY((*i)->getY() + dY / 2);
414 }
415}
416
417}

Callers

nothing calls this directly

Calls 4

setXMethod · 0.45
getXMethod · 0.45
setYMethod · 0.45
getYMethod · 0.45

Tested by

no test coverage detected