UFO: Alien Invasion
Loading...
Searching...
No Matches
cl_radar.cpp File Reference

Battlescape radar code. More...

#include "../client.h"
#include "cl_radar.h"
#include "../renderer/r_draw.h"
#include "../renderer/r_misc.h"
#include "../cl_video.h"
#include "../ui/ui_main.h"
#include "../ui/ui_timer.h"
#include "cl_localentity.h"
#include "cl_camera.h"
#include "cl_battlescape.h"
Include dependency graph for cl_radar.cpp:

Go to the source code of this file.

Functions

static void CL_BattlescapeRadarOpen_f (void)
static void CL_BattlescapeRadarClose_f (void)
static void CL_BattlescapeRadarMapInFrameBuffer (int *x, int *y, int *width, int *height)
static void CL_BattlescapeRadarGenPreview_f (void)
static void CL_BattlescapeRadarGenerate_f (void)
 Take a screen shot of the map with the position of the radar.
static void CL_BattlescapeRadarGenerateAll (uiNode_t *node, uiTimer_t *timer)
static void CL_BattlescapeRadarGenerateAll_f (void)
 Take all screenshots from lower to upper map level. Use a timer to delay each capture.
static void CL_BattlescapeRadarGenerateAllRelease_f (void)
void CL_BattlescapeRadarInit (void)

Variables

static uiTimer_ttimer

Detailed Description

Battlescape radar code.

Definition in file cl_radar.cpp.

Function Documentation

◆ CL_BattlescapeRadarClose_f()

void CL_BattlescapeRadarClose_f ( void )
static

Definition at line 44 of file cl_radar.cpp.

References UI_CloseWindow().

Referenced by CL_BattlescapeRadarInit().

◆ CL_BattlescapeRadarGenerate_f()

void CL_BattlescapeRadarGenerate_f ( void )
static

Take a screen shot of the map with the position of the radar.

We add 1 pixel into the border to easy check the result: the screen shot must have a border of 1 black pixel

Definition at line 96 of file cl_radar.cpp.

References CL_BattlescapeRadarMapInFrameBuffer(), Cvar_GetInteger(), Cvar_GetString(), level, mapName, R_ScreenShot(), and va().

Referenced by CL_BattlescapeRadarInit().

◆ CL_BattlescapeRadarGenerateAll()

void CL_BattlescapeRadarGenerateAll ( uiNode_t * node,
uiTimer_t * timer )
static

Definition at line 111 of file cl_radar.cpp.

References Cbuf_AddText(), cl, Cmd_ExecuteString(), Cvar_SetValue(), and level.

Referenced by CL_BattlescapeRadarGenerateAll_f().

◆ CL_BattlescapeRadarGenerateAll_f()

void CL_BattlescapeRadarGenerateAll_f ( void )
static

Take all screenshots from lower to upper map level. Use a timer to delay each capture.

Definition at line 131 of file cl_radar.cpp.

References CL_BattlescapeRadarGenerateAll(), UI_AllocTimer(), and UI_TimerStart().

Referenced by CL_BattlescapeRadarInit().

◆ CL_BattlescapeRadarGenerateAllRelease_f()

void CL_BattlescapeRadarGenerateAllRelease_f ( void )
static
Todo
allow to call UI_TimerRelease into timer callback

Definition at line 141 of file cl_radar.cpp.

References UI_ExecuteConfunc(), and UI_TimerRelease().

Referenced by CL_BattlescapeRadarInit().

◆ CL_BattlescapeRadarGenPreview_f()

void CL_BattlescapeRadarGenPreview_f ( void )
static

Definition at line 74 of file cl_radar.cpp.

References CL_BattlescapeRadarMapInFrameBuffer(), UI_ExecuteConfunc(), and viddef.

Referenced by CL_BattlescapeRadarInit().

◆ CL_BattlescapeRadarInit()

◆ CL_BattlescapeRadarMapInFrameBuffer()

void CL_BattlescapeRadarMapInFrameBuffer ( int * x,
int * y,
int * width,
int * height )
static
Parameters
[out]xX position of the rect in the frame buffer (from bottom-to-top according to the screen)
[out]yY position of the rect in the frame buffer (from bottom-to-top according to the screen)
[out]widthWidth of the rect in the frame buffer (from bottom-to-top according to the screen)
[out]heightHeight of the rect in the frame buffer (from bottom-to-top according to the screen)
Returns
the rect where the radarmap should be, when we generate radar images
Todo
fix that function, map is not well captured
Todo
viddef.context should be removed

Definition at line 57 of file cl_radar.cpp.

References cl, and viddef.

Referenced by CL_BattlescapeRadarGenerate_f(), and CL_BattlescapeRadarGenPreview_f().

◆ CL_BattlescapeRadarOpen_f()

void CL_BattlescapeRadarOpen_f ( void )
static

Definition at line 39 of file cl_radar.cpp.

References UI_PushWindow().

Referenced by CL_BattlescapeRadarInit().

Variable Documentation

◆ timer

uiTimer_t* timer
static

Definition at line 37 of file cl_radar.cpp.