MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / DrawFogLayer

Function DrawFogLayer

Descent3/terrainrender.cpp:1248–1273  ·  view source on GitHub ↗

Draws a flat fog layer

Source from the content-addressed store, hash-verified

1246#define FOG_LAYER_HEIGHT (TERRAIN_HEIGHT_INCREMENT * 30.5f)
1247// Draws a flat fog layer
1248void DrawFogLayer() {
1249 vector worldvec[4];
1250 g3Point pnt[4], *pntlist[6];
1251 rend_SetFlatColor(GR_RGB(132, 132, 255));
1252 rend_SetAlphaValue(64);
1253 rend_SetAlphaType(AT_CONSTANT);
1254 rend_SetTextureType(TT_FLAT);
1255 rend_SetLighting(LS_NONE);
1256 worldvec[0].x = 0;
1257 worldvec[0].y = FOG_LAYER_HEIGHT;
1258 worldvec[0].z = 0;
1259 worldvec[1].x = 0;
1260 worldvec[1].y = FOG_LAYER_HEIGHT;
1261 worldvec[1].z = TERRAIN_DEPTH * TERRAIN_SIZE;
1262 worldvec[2].x = TERRAIN_WIDTH * TERRAIN_SIZE;
1263 worldvec[2].y = FOG_LAYER_HEIGHT;
1264 worldvec[2].z = TERRAIN_DEPTH * TERRAIN_SIZE;
1265 worldvec[3].x = TERRAIN_WIDTH * TERRAIN_SIZE;
1266 worldvec[3].y = FOG_LAYER_HEIGHT;
1267 worldvec[3].z = 0;
1268 for (int i = 0; i < 4; i++) {
1269 g3_RotatePoint(&pnt[i], &worldvec[i]);
1270 pntlist[i] = &pnt[i];
1271 }
1272 g3_DrawPoly(4, pntlist, 0);
1273}
1274#define CLOUD_LAYER_HEIGHT (TERRAIN_HEIGHT_INCREMENT * 320.0f)
1275// Draws a flat fog layer
1276void DrawCloudLayer() {

Callers

nothing calls this directly

Calls 8

g3_RotatePointFunction · 0.85
g3_DrawPolyFunction · 0.85
rend_SetFlatColorFunction · 0.50
GR_RGBFunction · 0.50
rend_SetAlphaValueFunction · 0.50
rend_SetAlphaTypeFunction · 0.50
rend_SetTextureTypeFunction · 0.50
rend_SetLightingFunction · 0.50

Tested by

no test coverage detected