Draws an alpha blended polygon over the entire 3d rendering scene The r,g,b floats specify the color
| 1376 | // Draws an alpha blended polygon over the entire 3d rendering scene |
| 1377 | // The r,g,b floats specify the color |
| 1378 | void DrawAlphaBlendedScreen(float r, float g, float b, float alpha) { |
| 1379 | g3Point *pntlist[4], points[4]; |
| 1380 | ddgr_color color; |
| 1381 | int i; |
| 1382 | |
| 1383 | color = GR_RGB(r * 255, g * 255, b * 255); |
| 1384 | |
| 1385 | // Set our four corners to cover the screen |
| 1386 | points[0].p3_sx = 0; |
| 1387 | points[0].p3_sy = 0; |
| 1388 | points[1].p3_sx = Game_window_w; |
| 1389 | points[1].p3_sy = 0; |
| 1390 | points[2].p3_sx = Game_window_w; |
| 1391 | points[2].p3_sy = Game_window_h; |
| 1392 | points[3].p3_sx = 0; |
| 1393 | points[3].p3_sy = Game_window_h; |
| 1394 | |
| 1395 | for (i = 0; i < 4; i++) { |
| 1396 | points[i].p3_z = 0; |
| 1397 | points[i].p3_flags = PF_PROJECTED; |
| 1398 | pntlist[i] = &points[i]; |
| 1399 | } |
| 1400 | |
| 1401 | rend_SetZBufferState(0); |
| 1402 | rend_SetTextureType(TT_FLAT); |
| 1403 | rend_SetAlphaType(AT_CONSTANT); |
| 1404 | rend_SetAlphaValue(alpha * 255); |
| 1405 | rend_SetLighting(LS_NONE); |
| 1406 | rend_SetFlatColor(color); |
| 1407 | |
| 1408 | rend_DrawPolygon2D(0, pntlist, 4); |
| 1409 | rend_SetZBufferState(1); |
| 1410 | } |
| 1411 | |
| 1412 | // Retreives the weapon in the weapon array based off of an 'index' from 0-19 (non-mapped |
| 1413 | // primary and secondaries) |
no test coverage detected