|
UFO: Alien Invasion
|
#include "ui_node_radar.h"#include "ui_node_abstractnode.h"#include "../ui_render.h"#include "../ui_main.h"#include "../ui_behaviour.h"#include "../ui_input.h"#include "../../client.h"#include "../../battlescape/cl_hud.h"#include "../../renderer/r_draw.h"#include "../../../shared/parse.h"#include "../../../common/scripts_lua.h"
Go to the source code of this file.
Data Structures | |
| struct | hudRadarImage_t |
| Each maptile must have an entry in the images array. More... | |
| struct | hudRadar_t |
Functions | |
| static void | UI_FreeRadarImages (void) |
| static void | UI_BuildRadarImageList (const char *tiles, const char *pos) |
| Reads the tiles and position config strings and convert them into a linked list that holds the imagename (mapname), the x and the y position (screencoordinates) More... | |
| static void | UI_GetRadarWidth (const uiNode_t *node, vec2_t gridSize) |
| Get the width of radar. More... | |
| static bool | UI_CheckRadarImage (const char *imageName, const int level) |
| static void | UI_InitRadar (const uiNode_t *node) |
| Calculate some radar values that won't change during a mission. More... | |
| static void | UI_RadarNodeGetActorColor (const le_t *le, vec4_t color) |
| static void | UI_RadarNodeDrawArrays (const vec4_t color, vec2_t coords[4], vec2_t vertices[4], const image_t *image) |
| static void | UI_RadarNodeDrawItem (const le_t *le, const vec3_t pos) |
| static void | UI_RadarNodeDrawActor (const le_t *le, const vec3_t pos) |
| void | UI_RegisterRadarNode (uiBehaviour_t *behaviour) |
Variables | |
| static hudRadar_t | radar |
| static char const *const | imageExtensions [] |
|
static |
Reads the tiles and position config strings and convert them into a linked list that holds the imagename (mapname), the x and the y position (screencoordinates)
| [in] | tiles | The configstring with the tiles (map tiles) |
| [in] | pos | The position string, only used in case of random map assembly |
Definition at line 103 of file ui_node_radar.cpp.
References hudRadar_t::base, cl, Com_Error(), Com_Parse(), Com_Printf(), Com_sprintf(), ERR_DROP, AABB::getWidthX(), AABB::getWidthY(), hudRadar_t::gridMin, hudRadarImage_t::gridX, hudRadarImage_t::gridY, i, hudRadar_t::images, hudRadarImage_t::isTile, mapData_t::mapBox, clientBattleScape_t::mapData, hudRadarImage_t::mapX, hudRadarImage_t::mapY, MAX_VAR, Mem_StrDup, name, hudRadarImage_t::name, hudRadar_t::numImages, Q_strncpyz(), radar, and UNIT_SIZE.
Referenced by UI_InitRadar().
|
static |
Definition at line 247 of file ui_node_radar.cpp.
References FS_CheckFile(), imageExtensions, and level.
Referenced by UI_InitRadar().
Definition at line 83 of file ui_node_radar.cpp.
References i, hudRadar_t::images, hudRadarImage_t::maxlevel, Mem_Free, hudRadarImage_t::name, hudRadar_t::numImages, OBJZERO, hudRadarImage_t::path, and radar.
Referenced by UI_InitRadar().
Get the width of radar.
| [in] | node | Node description of the radar |
| [in] | gridSize | size of the radar picture, in grid units. |
< Contains the width of the first and the last tile of the first line (in screen unit)
< Contains the height of the first and the last tile of the first column (in screen unit)
< Contains the grid X position of 2nd tiles in first line
< Contains the grid Y position of 2nd tiles in first column
< ratio conversion between screen coordinates and grid coordinates
< Number of pixel to remove to avoid rounding errors (and lines between tiles) We remove pixel because this is much nicer if tiles overlap a little bit rather than if they are too distant one from the other
Definition at line 164 of file ui_node_radar.cpp.
References hudRadar_t::gridMax, hudRadar_t::gridMin, hudRadarImage_t::gridX, hudRadarImage_t::gridY, hudRadar_t::h, hudRadarImage_t::height, hudRadar_t::images, hudRadar_t::numImages, radar, Vector2Set, hudRadar_t::w, and hudRadarImage_t::width.
Referenced by UI_InitRadar().
Calculate some radar values that won't change during a mission.
< Size of the whole grid (in tiles units)
Definition at line 265 of file ui_node_radar.cpp.
References hudRadar_t::a, hudRadar_t::b, uiNode_t::box, hudRadar_t::c, cl, CL_GetConfigString(), Com_Printf(), Com_sprintf(), CS_POSITIONS, CS_TILES, AABB::getMaxY(), AABB::getMinX(), AABB::getMinY(), AABB::getWidthX(), AABB::getWidthY(), hudRadarImage_t::gridHeight, hudRadar_t::gridHeight, hudRadar_t::gridMin, hudRadarImage_t::gridWidth, hudRadar_t::gridWidth, hudRadarImage_t::gridX, hudRadarImage_t::gridY, hudRadar_t::h, image_t::height, hudRadarImage_t::height, i, hudRadar_t::images, hudRadarImage_t::isTile, it_pic, MAP_SIZE_OFFSET, mapData_t::mapBox, clientBattleScape_t::mapData, hudRadarImage_t::mapHeight, hudRadarImage_t::mapWidth, hudRadarImage_t::mapX, hudRadarImage_t::mapY, MAX_QPATH, hudRadarImage_t::maxlevel, AABB::maxs, Mem_StrDup, AABB::mins, hudRadarImage_t::name, hudRadar_t::numImages, hudRadarImage_t::path, PATHFINDING_HEIGHT, R_FindImage(), radar, uiBox_t::size, UI_BuildRadarImageList(), UI_CheckRadarImage(), UI_FreeRadarImages(), UI_GetNodeAbsPos(), UI_GetRadarWidth(), UNIT_SIZE, va(), Vector2Copy, Vector2Dist, VectorAdd, VectorSet, VectorSubtract, hudRadar_t::w, image_t::width, hudRadarImage_t::width, hudRadarImage_t::x, hudRadar_t::x, hudRadarImage_t::y, and hudRadar_t::y.
Referenced by uiRadarNode::draw().
Definition at line 421 of file ui_node_radar.cpp.
References le_t::angle, directionAngles, i, LE_IsDead, LE_IsSelected, M_PI, torad, UI_LoadImage(), UI_RadarNodeDrawArrays(), and UI_RadarNodeGetActorColor().
Referenced by uiRadarNode::draw().
|
static |
Definition at line 410 of file ui_node_radar.cpp.
References R_Color(), and R_DrawImageArray().
Referenced by UI_RadarNodeDrawActor().
Definition at line 417 of file ui_node_radar.cpp.
Referenced by uiRadarNode::draw().
Definition at line 385 of file ui_node_radar.cpp.
References cl_worldlevel, cls, cvar_t::integer, LE_IsCivilian, LE_IsDead, le_t::pos, le_t::team, client_static_t::team, and Vector4Set.
Referenced by UI_RadarNodeDrawActor().
| void UI_RegisterRadarNode | ( | uiBehaviour_t * | behaviour | ) |
Definition at line 677 of file ui_node_radar.cpp.
References uiBehaviour_t::lua_SWIG_typeinfo, uiBehaviour_t::manager, uiBehaviour_t::name, and UI_SWIG_TypeQuery().
|
static |
Definition at line 243 of file ui_node_radar.cpp.
Referenced by UI_CheckRadarImage().
|
static |
Definition at line 81 of file ui_node_radar.cpp.
Referenced by uiRadarNode::draw(), GEO_DrawRadarInMap(), GEO_DrawRadarLineCoverage(), RADAR_AddDetectedUFOToEveryRadar(), RADAR_AddUFO(), RADAR_CheckRadarSensored(), RADAR_CheckUFOSensored(), RADAR_DrawCoverage(), RADAR_Initialise(), RADAR_InitialiseUFOs(), RADAR_IsUFOSensored(), RADAR_NotifyUFORemovedFromOneRadar(), RADAR_RemoveUFO(), UI_BuildRadarImageList(), UI_FreeRadarImages(), UI_GetRadarWidth(), and UI_InitRadar().