Draws a glowing cone of light
| 675 | |
| 676 | // Draws a glowing cone of light |
| 677 | void DrawGlowEffect(vector *pos, float r, float g, float b, vector *norm, float size) { |
| 678 | if (!UseHardware) |
| 679 | return; // No software stuff here! |
| 680 | |
| 681 | if (Polymodel_use_effect && Polymodel_effect.type & PEF_NO_GLOWS) |
| 682 | return; |
| 683 | |
| 684 | rend_SetZBufferWriteMask(0); |
| 685 | rend_SetAlphaType(AT_SATURATE_TEXTURE); |
| 686 | rend_SetAlphaValue(.8 * 255); |
| 687 | rend_SetLighting(LS_GOURAUD); |
| 688 | rend_SetColorModel(CM_RGB); |
| 689 | |
| 690 | ddgr_color color = GR_RGB(r * 255, g * 255, b * 255); |
| 691 | int bm_handle = Fireballs[GRADIENT_BALL_INDEX].bm_handle; |
| 692 | |
| 693 | rend_SetZBias(-size); |
| 694 | g3_DrawBitmap(pos, size, (size * bm_h(bm_handle, 0)) / bm_w(bm_handle, 0), bm_handle, color); |
| 695 | |
| 696 | rend_SetZBias(0.0); |
| 697 | rend_SetZBufferWriteMask(1); |
| 698 | } |
| 699 | |
| 700 | void RenderSubmodelFacesSorted(poly_model *pm, bsp_info *sm) { |
| 701 | int i, t; |
no test coverage detected