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

Method centerAllSurfaces

src/Engine/State.cpp:234–241  ·  view source on GitHub ↗

* centers all the surfaces on the screen. */

Source from the content-addressed store, hash-verified

232 * centers all the surfaces on the screen.
233 */
234void State::centerAllSurfaces()
235{
236 for (std::vector<Surface*>::iterator i = _surfaces.begin(); i != _surfaces.end(); ++i)
237 {
238 (*i)->setX((*i)->getX() + _game->getScreen()->getDX());
239 (*i)->setY((*i)->getY() + _game->getScreen()->getDY());
240 }
241}
242
243/**
244 * drop all the surfaces by half the screen height

Callers

nothing calls this directly

Calls 7

getDXMethod · 0.80
getScreenMethod · 0.80
getDYMethod · 0.80
setXMethod · 0.45
getXMethod · 0.45
setYMethod · 0.45
getYMethod · 0.45

Tested by

no test coverage detected