* Renders the land, taking all the visible world polygons * and texturing and shading them accordingly. */
| 1099 | * and texturing and shading them accordingly. |
| 1100 | */ |
| 1101 | void 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 |
nothing calls this directly
no test coverage detected