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

Method rotate

src/Geoscape/Globe.cpp:1054–1061  ·  view source on GitHub ↗

* Rotates the globe by a set amount. Necessary * since the globe keeps rotating while a button * is pressed down. */

Source from the content-addressed store, hash-verified

1052 * is pressed down.
1053 */
1054void Globe::rotate()
1055{
1056 _cenLon += _rotLon * ((110 - Options::geoScrollSpeed) / 100.0) / (_zoom+1);
1057 _cenLat += _rotLat * ((110 - Options::geoScrollSpeed) / 100.0) / (_zoom+1);
1058 _game->getSavedGame()->setGlobeLongitude(_cenLon);
1059 _game->getSavedGame()->setGlobeLatitude(_cenLat);
1060 invalidate();
1061}
1062
1063/**
1064 * Draws the whole globe, part by part.

Callers

nothing calls this directly

Calls 3

setGlobeLongitudeMethod · 0.80
getSavedGameMethod · 0.80
setGlobeLatitudeMethod · 0.80

Tested by

no test coverage detected