60 static const float magicCoef = 0.351f;
61 const float mapWidth =
cl.mapData->mapBox.getWidthX();
62 const float mapHeight =
cl.mapData->mapBox.getWidthY();
66 const int x2 = (
viddef.context.width / 2) + (mapWidth * magicCoef * 0.5);
67 const int y2 = (
viddef.context.height / 2) + (mapHeight * magicCoef * 0.5) + 1;
68 *x = (
viddef.context.width / 2) - (mapWidth * magicCoef * 0.5);
69 *y = (
viddef.context.height / 2) - (mapHeight * magicCoef * 0.5);
76 int x, y, width, height;
85 y =
viddef.virtualHeight - y - height;
103 int x, y, width, height;
108 R_ScreenShot(x - border, y - border, width + border * 2, height + border * 2,
filename,
nullptr);
113 const int level = (
timer->calledTime - 1) / 2;
114 const int mode = (
timer->calledTime - 1) % 2;
133 const int delay = 1000;
static void CL_BattlescapeRadarClose_f(void)
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_BattlescapeRadarGenerate_f(void)
Take a screen shot of the map with the position of the radar.
void CL_BattlescapeRadarInit(void)
static void CL_BattlescapeRadarGenerateAllRelease_f(void)
static void CL_BattlescapeRadarMapInFrameBuffer(int *x, int *y, int *width, int *height)
static void CL_BattlescapeRadarOpen_f(void)
static void CL_BattlescapeRadarGenPreview_f(void)
Battlescape radar header.
Primary header for client.
void Cmd_ExecuteString(const char *text,...)
A complete command line has been parsed, so try to execute it.
void Cmd_AddCommand(const char *cmdName, xcommand_t function, const char *desc)
Add a new command to the script interface.
void Cbuf_AddText(const char *format,...)
Adds command text at the end of the buffer.
void Cvar_SetValue(const char *varName, float value)
Expands value to a string and calls Cvar_Set.
int Cvar_GetInteger(const char *varName)
Returns the int value of a cvar.
const char * Cvar_GetString(const char *varName)
Returns the value of cvar as string.
void R_ScreenShot(int x, int y, int width, int height, const char *filename, const char *ext)
const char * va(const char *format,...)
does a varargs printf into a temp buffer, so I don't need to have varargs versions of all text functi...
Atomic structure used to define most of the UI.
static const char * mapName
void UI_ExecuteConfunc(const char *fmt,...)
Executes confunc - just to identify those confuncs in the code - in this frame.
uiTimer_t * UI_AllocTimer(uiNode_t *node, int firstDelay, timerCallback_t callback)
Allocate a new time for a node.
void UI_TimerStart(uiTimer_t *timer)
Restart a timer.
void UI_TimerRelease(uiTimer_t *timer)
Release the timer. It no more exists.
uiNode_t * UI_PushWindow(const char *name, const char *parentName, linkedList_t *params)
Push a window onto the window stack.
void UI_CloseWindow(const char *name)