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

Function DrawWireframeSky

Descent3/terrainrender.cpp:1851–1887  ·  view source on GitHub ↗

Draws the sky textures

Source from the content-addressed store, hash-verified

1849
1850// Draws the sky textures
1851void DrawWireframeSky(void) {
1852 int t, k, tw, i;
1853 g3Point pnt[6];
1854
1855 // Draw top part
1856 for (t = 0; t < MAX_HORIZON_PIECES; t++) {
1857 tw = (t + 1) % MAX_HORIZON_PIECES;
1858 pnt[0].p3_vec = Temp_sky_vectors[t][0];
1859 pnt[1].p3_vec = Temp_sky_vectors[tw][1];
1860 pnt[2].p3_vec = Temp_sky_vectors[t][1];
1861
1862 for (k = 0; k < 3; k++) {
1863 g3_CodePoint(&pnt[k]);
1864 pnt[k].p3_flags = 0;
1865 }
1866
1867 for (k = 0; k < 3; k++)
1868 g3_DrawLine(GR_RGB(255, 255, 255), &pnt[k], &pnt[(k + 1) % 3]);
1869 }
1870 // Draw bottom parts
1871 for (i = 1; i < 5; i++) {
1872 for (t = 0; t < MAX_HORIZON_PIECES; t++) {
1873 tw = (t + 1) % MAX_HORIZON_PIECES;
1874 pnt[0].p3_vec = Temp_sky_vectors[t][i];
1875 pnt[1].p3_vec = Temp_sky_vectors[tw][i];
1876 pnt[2].p3_vec = Temp_sky_vectors[tw][i + 1];
1877 pnt[3].p3_vec = Temp_sky_vectors[t][i + 1];
1878 for (k = 0; k < 4; k++) {
1879 g3_CodePoint(&pnt[k]);
1880 pnt[k].p3_flags = 0;
1881 }
1882
1883 for (k = 0; k < 4; k++)
1884 g3_DrawLine(GR_RGB(255, 255, 255), &pnt[k], &pnt[(k + 1) % 4]);
1885 }
1886 }
1887}
1888// Draws the atmosphere over a satellite
1889void DrawAtmosphereBlend(vector *pos, angle rotAngle, float w, float h, int bm, float r, float g, float b) {
1890 g3Point pnt;

Callers 1

DrawSkyFunction · 0.85

Calls 3

g3_CodePointFunction · 0.85
g3_DrawLineFunction · 0.85
GR_RGBFunction · 0.50

Tested by

no test coverage detected