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

Method resize

src/Geoscape/Globe.cpp:2085–2103  ·  view source on GitHub ↗

* Resizes the geoscape. */

Source from the content-addressed store, hash-verified

2083 * Resizes the geoscape.
2084 */
2085void Globe::resize()
2086{
2087 Surface *surfaces[4] = {this, _markers, _countries, _radars};
2088 int width = Options::baseXGeoscape - 64;
2089 int height = Options::baseYGeoscape;
2090
2091 for (int i = 0; i < 4; ++i)
2092 {
2093 surfaces[i]->setWidth(width);
2094 surfaces[i]->setHeight(height);
2095 surfaces[i]->invalidate();
2096 }
2097 _clipper->Wxrig = width;
2098 _clipper->Wybot = height;
2099 _cenX = width / 2;
2100 _cenY = height / 2;
2101 setupRadii(width, height);
2102 invalidate();
2103}
2104
2105/*
2106 * Set up the Radius of earth at the various zoom levels.

Callers 2

GlobeMethod · 0.45
setupRadiiMethod · 0.45

Calls 3

invalidateMethod · 0.80
setWidthMethod · 0.45
setHeightMethod · 0.45

Tested by

no test coverage detected