renders missile reticle
| 2059 | |
| 2060 | // renders missile reticle |
| 2061 | void RenderZoomReticle() { |
| 2062 | // Crosshair reticle |
| 2063 | int cx = Game_window_w / 2; |
| 2064 | int cy = Game_window_h / 2; |
| 2065 | int text_height = grfont_GetHeight(HUD_FONT); |
| 2066 | char str[255]; |
| 2067 | |
| 2068 | RenderHUDTextFlags(HUDTEXT_CENTERED, GR_RED, HUD_ALPHA, 0, 10, cy - 50, TXT_HUD_ZOOM); |
| 2069 | |
| 2070 | snprintf(str, sizeof(str), TXT_HUD_ZOOM_UNITS, Players[Player_num].zoom_distance); |
| 2071 | |
| 2072 | RenderHUDTextFlags(HUDTEXT_CENTERED, GR_RED, HUD_ALPHA, 0, 10, cy - 50 + text_height, str); |
| 2073 | grtext_Flush(); |
| 2074 | |
| 2075 | rend_SetZBufferState(0); |
| 2076 | |
| 2077 | if (Players[Player_num].flags & PLAYER_FLAGS_BULLSEYE) |
| 2078 | rend_SetFlatColor(GR_RED); |
| 2079 | else |
| 2080 | rend_SetFlatColor(GR_GREEN); |
| 2081 | |
| 2082 | rend_DrawLine(cx - 8, cy, cx + 8, cy); |
| 2083 | rend_DrawLine(cx, cy - 8, cx, cy + 8); |
| 2084 | } |
| 2085 | |
| 2086 | /* |
| 2087 | // HUD FILE FUNCTIONS |
no test coverage detected