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

Method drawLand

src/Geoscape/Globe.cpp:1101–1118  ·  view source on GitHub ↗

* Renders the land, taking all the visible world polygons * and texturing and shading them accordingly. */

Source from the content-addressed store, hash-verified

1099 * and texturing and shading them accordingly.
1100 */
1101void Globe::drawLand()
1102{
1103 Sint16 x[4], y[4];
1104
1105 for (std::list<Polygon*>::iterator i = _cacheLand.begin(); i != _cacheLand.end(); ++i)
1106 {
1107 // Convert coordinates
1108 for (int j = 0; j < (*i)->getPoints(); ++j)
1109 {
1110 x[j] = (*i)->getX(j);
1111 y[j] = (*i)->getY(j);
1112 }
1113
1114 // Apply textures according to zoom and shade
1115 int zoom = (2 - (int)floor(_zoom / 2.0)) * NUM_TEXTURES;
1116 drawTexturedPolygon(x, y, (*i)->getPoints(), _texture->getFrame((*i)->getTexture() + zoom), 0, 0);
1117 }
1118}
1119
1120/**
1121 * Get position of sun from point on globe

Callers

nothing calls this directly

Calls 5

getFrameMethod · 0.80
getTextureMethod · 0.80
getPointsMethod · 0.45
getXMethod · 0.45
getYMethod · 0.45

Tested by

no test coverage detected