Geoscape/Map management. More...
#include "../client.h"
#include "../renderer/r_image.h"
#include "../renderer/r_framebuffer.h"
#include "../renderer/r_draw.h"
#include "../renderer/r_geoscape.h"
#include "../ui/ui_main.h"
#include "../ui/ui_font.h"
#include "../ui/ui_render.h"
#include "../ui/node/ui_node_abstractnode.h"
#include "../ui/node/ui_node_map.h"
#include "cp_overlay.h"
#include "cp_campaign.h"
#include "cp_popup.h"
#include "cp_mapfightequip.h"
#include "cp_map.h"
#include "cp_missions.h"
#include "cp_ufo.h"
#include "cp_time.h"
#include "cp_xvi.h"
Go to the source code of this file.
Data Structures | |
struct | multiSelect_s |
Structure to manage the multi selection. More... | |
Defines | |
#define | ZOOM_LIMIT 2.5f |
#define | MULTISELECT_MAXSELECT 6 |
#define | UI_MAP_DIST_SELECTION 15 |
maximum distance (in pixel) to get a valid mouse click | |
#define | GLOBE_RADIUS EARTH_RADIUS * (ccs.zoom / STANDARD_3D_ZOOM) |
radius of the globe in screen coordinates | |
#define | CIRCLE_DRAW_POINTS 60 |
#define | SMOOTHING_STEP_2D 0.02f |
#define | BULLET_SIZE 1 |
#define | SELECT_CIRCLE_RADIUS 1.5f + 3.0f / ccs.zoom |
Typedefs | |
typedef struct multiSelect_s | multiSelect_t |
Structure to manage the multi selection. | |
Enumerations | |
enum | { GEOSCAPE_IMAGE_MISSION, GEOSCAPE_IMAGE_MISSION_SELECTED, GEOSCAPE_IMAGE_MISSION_ACTIVE, GEOSCAPE_IMAGE_BASE, GEOSCAPE_IMAGE_BASE_ATTACK, GEOSCAPE_IMAGE_MAX } |
enum | multiSelectType_t { MULTISELECT_TYPE_BASE, MULTISELECT_TYPE_INSTALLATION, MULTISELECT_TYPE_MISSION, MULTISELECT_TYPE_AIRCRAFT, MULTISELECT_TYPE_UFO, MULTISELECT_TYPE_NONE } |
Types of elements that can be selected in map. More... | |
Functions | |
CASSERT (lengthof(geoscapeImageNames)==GEOSCAPE_IMAGE_MAX) | |
static qboolean | MAP_IsMapPositionSelected (const uiNode_t *node, const vec2_t pos, int x, int y) |
Tell if the specified position is considered clicked. | |
static void | MAP3D_ScreenToMap (const uiNode_t *node, int x, int y, vec2_t pos) |
Return longitude and latitude of a point of the screen for 3D geoscape (globe). | |
static void | MAP_ScreenToMap (const uiNode_t *node, int x, int y, vec2_t pos) |
Return longitude and latitude of a point of the screen for 2D geoscape. | |
static void | MAP_MultiSelectListAddItem (multiSelectType_t itemType, int itemID, const char *itemDescription, const char *itemName) |
Add an element in the multiselection list. | |
static void | MAP_MultiSelectExecuteAction_f (void) |
Execute action for 1 element of the multi selection Param Cmd_Argv(1) is the element selected in the popup_multi_selection menu. | |
void | MAP_MapClick (uiNode_t *node, int x, int y) |
Click on the map/geoscape. | |
static qboolean | MAP_3DMapToScreen (const uiNode_t *node, const vec2_t pos, int *x, int *y, int *z) |
Transform a 2D position on the map to screen coordinates. | |
qboolean | MAP_MapToScreen (const uiNode_t *node, const vec2_t pos, int *x, int *y) |
Transform a 2D position on the map to screen coordinates. | |
qboolean | MAP_AllMapToScreen (const uiNode_t *node, const vec2_t pos, int *x, int *y, int *z) |
Call either MAP_MapToScreen or MAP_3DMapToScreen depending on the geoscape you're using. | |
void | MAP_Draw3DMarkerIfVisible (const uiNode_t *node, const vec2_t pos, float theta, const char *model, int skin) |
Draws a 3D marker on geoscape if the player can see it. | |
void | MAP_MapCalcLine (const vec2_t start, const vec2_t end, mapline_t *line) |
Calculate the shortest way to go from start to end on a sphere. | |
static void | MAP_MapDrawLine (const uiNode_t *node, const mapline_t *line) |
Draw a path on a menu node (usually the 2D geoscape map). | |
static void | MAP_3DMapDrawLine (const uiNode_t *node, const mapline_t *line) |
Draw a path on a menu node (usually the 3Dgeoscape map). | |
void | MAP_MapDrawEquidistantPoints (const uiNode_t *node, const vec2_t center, const float angle, const vec4_t color) |
Draw equidistant points from a given point on a menu node. | |
static float | MAP_AngleOfPath3D (const vec3_t start, const vec2_t end, vec3_t direction, vec3_t ortVector) |
Return the angle of a model given its position and destination, on 3D geoscape. | |
static float | MAP_AngleOfPath2D (const vec3_t start, const vec2_t end, vec3_t direction, vec3_t ortVector) |
Return the angle of a model given its position and destination, on 2D geoscape. | |
float | MAP_AngleOfPath (const vec3_t start, const vec2_t end, vec3_t direction, vec3_t ortVector) |
Select which function should be used for calculating the direction of model on 2D or 3D geoscape. | |
static void | MAP_ConvertObjectPositionToGeoscapePosition (float *vector, const vec2_t objectPos) |
Will set the vector for the geoscape position. | |
static void | MAP_GetMissionAngle (float *vector, int id) |
center to a mission | |
static void | MAP_GetUFOAngle (float *vector, int idx) |
center to an ufo | |
static void | MAP_StartCenter (void) |
Start center to the selected point. | |
static void | MAP_SelectObject_f (void) |
Center the view and select an object from the geoscape. | |
static void | MAP_GetGeoscapeAngle (float *vector) |
Returns position of the model corresponding to centerOnEventIdx. | |
void | MAP_CenterOnPoint_f (void) |
Switch to next model on 2D and 3D geoscape. | |
static void | MAP3D_SmoothRotate (void) |
smooth rotation of the 3D geoscape | |
void | MAP_StopSmoothMovement (void) |
stop smooth translation on geoscape | |
static void | MAP_SmoothTranslate (void) |
smooth translation of the 2D geoscape | |
static void | MAP_DrawBullets (const uiNode_t *node, const vec3_t pos) |
Draws on bunch of bullets on the geoscape map. | |
static void | MAP_DrawBeam (const uiNode_t *node, const vec3_t start, const vec3_t end, const vec4_t color) |
Draws an energy beam on the geoscape map (laser/particle). | |
static void | MAP_DrawMapOneMission (const uiNode_t *node, const mission_t *ms) |
Draws one mission on the geoscape map (2D and 3D). | |
static void | MAP_DrawMapOneInstallation (const uiNode_t *node, const installation_t *installation, qboolean oneUFOVisible, const char *font) |
Draws one installation on the geoscape map (2D and 3D). | |
static void | MAP_DrawMapOneBase (const uiNode_t *node, const base_t *base, qboolean oneUFOVisible, const char *font) |
Draws one base on the geoscape map (2D and 3D). | |
static void | MAP_DrawAircraftHealthBar (const uiNode_t *node, const aircraft_t *aircraft) |
Draws health bar for an aircraft (either phalanx or ufo). | |
static void | MAP_DrawMapOnePhalanxAircraft (const uiNode_t *node, aircraft_t *aircraft, qboolean oneUFOVisible) |
Draws one Phalanx aircraft on the geoscape map (2D and 3D). | |
static const char * | MAP_GetMissionText (char *buffer, size_t size, const mission_t *mission) |
Assembles a string for a mission that is on the geoscape. | |
static const char * | MAP_GetShortMissionText (char *buffer, size_t size, const mission_t *mission) |
Assembles a short string for a mission that is on the geoscape. | |
static const char * | MAP_GetAircraftText (char *buffer, size_t size, const aircraft_t *aircraft) |
Assembles a string for an aircraft that is on the geoscape. | |
static const char * | MAP_GetUFOText (char *buffer, size_t size, const aircraft_t *ufo) |
Assembles a string for an UFO that is on the geoscape. | |
void | MAP_UpdateGeoscapeDock (void) |
Will add missions and UFOs to the geoscape dock panel. | |
static void | MAP_DrawMapMarkers (const uiNode_t *node) |
Draws all ufos, aircraft, bases and so on to the geoscape map (2D and 3D). | |
void | MAP_DrawMap (const uiNode_t *node) |
Draw the geoscape. | |
void | MAP_ResetAction (void) |
No more special action in geoscape. | |
void | MAP_SelectUFO (aircraft_t *ufo) |
Select the specified ufo in geoscape. | |
void | MAP_SelectAircraft (aircraft_t *aircraft) |
Select the specified aircraft in geoscape. | |
void | MAP_SelectMission (mission_t *mission) |
Selected the specified mission. | |
void | MAP_NotifyMissionRemoved (const mission_t *mission) |
Notify that a mission has been removed. | |
void | MAP_NotifyUFORemoved (const aircraft_t *ufo, qboolean destroyed) |
Notify that a UFO has been removed. | |
void | MAP_NotifyAircraftRemoved (const aircraft_t *aircraft) |
Notify that an aircraft has been removed from game. | |
nation_t * | MAP_GetNation (const vec2_t pos) |
Translate nation map color to nation. | |
const char * | MAP_GetTerrainType (const byte *const color) |
Translate color value to terrain type. | |
static const char * | MAP_GetCultureType (const byte *color) |
Translate color value to culture type. | |
static const char * | MAP_GetPopulationType (const byte *color) |
Translate color value to population type. | |
static const char * | MAP_GetTerrainTypeByPos (const vec2_t pos) |
Determine the terrain type under a given position. | |
static const char * | MAP_GetCultureTypeByPos (const vec2_t pos) |
Determine the culture type under a given position. | |
static const char * | MAP_GetPopulationTypeByPos (const vec2_t pos) |
Determine the population type under a given position. | |
int | MAP_GetCivilianNumberByPosition (const vec2_t pos) |
Get number of civilian on a map at given position. | |
void | MAP_PrintParameterStringByPos (const vec2_t pos) |
Prints positions parameter in console. | |
void | MAP_CheckPositionBoundaries (float *pos) |
Check that a position (in latitude / longitude) is within boundaries. | |
qboolean | MAP_IsNight (const vec2_t pos) |
Check whether given position is Day or Night. | |
byte * | MAP_GetColor (const vec2_t pos, mapType_t type) |
Returns the color value from geoscape of a certain mask (terrain, culture or population) at a given position. | |
base_t * | MAP_PositionCloseToBase (const vec2_t pos) |
Check if given pos is close to an existing base. | |
qboolean | MAP_PositionFitsTCPNTypes (const vec2_t pos, const linkedList_t *terrainTypes, const linkedList_t *cultureTypes, const linkedList_t *populationTypes, const linkedList_t *nations) |
Checks for a given location, if it fulfills all criteria given via parameters (terrain, culture, population, nation type). | |
void | MAP_Init (void) |
void | MAP_NotifyUFODisappear (const aircraft_t *ufo) |
Notify that a UFO disappears on radars. | |
void | MAP_Zoom_f (void) |
Command binding for map zooming. | |
void | MAP_Scroll_f (void) |
Command binding for map scrolling. | |
void | MAP_SetOverlay (const char *overlayID) |
Switch overlay (turn on / off). | |
static void | MAP_SetOverlay_f (void) |
Console command to call MAP_SetOverlay. | |
void | MAP_DeactivateOverlay (const char *overlayID) |
Remove overlay. | |
static void | MAP_DeactivateOverlay_f (void) |
Console command to call MAP_DeactivateOverlay. | |
qboolean | MAP_IsRadarOverlayActivated (void) |
qboolean | MAP_IsNationOverlayActivated (void) |
qboolean | MAP_IsXVIOverlayActivated (void) |
void | MAP_InitStartup (void) |
Initialise MAP/Geoscape. | |
Variables | |
cvar_t * | cl_3dmap |
static cvar_t * | cl_3dmapAmbient |
cvar_t * | cl_mapzoommax |
cvar_t * | cl_mapzoommin |
cvar_t * | cl_geoscape_overlay |
image_t * | r_dayandnightTexture |
image_t * | r_radarTexture |
image_t * | r_xviTexture |
static const char * | geoscapeImageNames [] |
static image_t * | geoscapeImages [GEOSCAPE_IMAGE_MAX] |
static multiSelect_t | multiSelect |
static char | textStandard [2048] |
static int | centerOnEventIdx |
static const vec4_t | green = {0.0f, 1.0f, 0.0f, 0.8f} |
static const vec4_t | yellow = {1.0f, 0.874f, 0.294f, 1.0f} |
static const vec4_t | red = {1.0f, 0.0f, 0.0f, 0.8f} |
static qboolean | smoothRotation = qfalse |
static vec3_t | smoothFinalGlobeAngle = {0, GLOBE_ROTATE, 0} |
static vec2_t | smoothFinal2DGeoscapeCenter = {0.5, 0.5} |
static float | smoothDeltaLength = 0.0f |
static float | smoothFinalZoom = 0.0f |
static float | smoothDeltaZoom = 0.0f |
static const float | smoothAcceleration = 0.06f |
static float | curZoomSpeed = 0.0f |
static float | curRotationSpeed = 0.0f |
static const float | defaultBaseAngle = 90.0f |
static byte * | terrainPic |
static int | terrainWidth |
static int | terrainHeight |
static byte * | culturePic |
static int | cultureWidth |
static int | cultureHeight |
static byte * | populationPic |
static int | populationWidth |
static int | populationHeight |
static byte * | nationsPic |
static int | nationsWidth |
static int | nationsHeight |
const float | STANDARD_3D_ZOOM = 40.0f |
Typical zoom to use in 3D geoscape to use same zoom values for both 2D and 3D geoscape. | |
static const float | MIN_DIST_BASE = 4.0f |
Minimum distance between a new mission and an existing base. |
Geoscape/Map management.
Definition in file cp_map.c.
#define BULLET_SIZE 1 |
Definition at line 1359 of file cp_map.c.
Referenced by MAP_DrawBullets().
#define CIRCLE_DRAW_POINTS 60 |
Definition at line 803 of file cp_map.c.
Referenced by MAP_MapDrawEquidistantPoints().
#define GLOBE_RADIUS EARTH_RADIUS * (ccs.zoom / STANDARD_3D_ZOOM) |
radius of the globe in screen coordinates
Definition at line 436 of file cp_map.c.
Referenced by MAP3D_ScreenToMap(), MAP_3DMapToScreen(), and MAP_Draw3DMarkerIfVisible().
#define MULTISELECT_MAXSELECT 6 |
Maximal count of elements that can be selected at once
Definition at line 89 of file cp_map.c.
Referenced by MAP_MapClick().
#define SELECT_CIRCLE_RADIUS 1.5f + 3.0f / ccs.zoom |
Definition at line 1396 of file cp_map.c.
Referenced by MAP_DrawMapMarkers(), MAP_DrawMapOneMission(), and MAP_DrawMapOnePhalanxAircraft().
#define SMOOTHING_STEP_2D 0.02f |
Definition at line 1332 of file cp_map.c.
Referenced by MAP_SmoothTranslate().
#define UI_MAP_DIST_SELECTION 15 |
maximum distance (in pixel) to get a valid mouse click
Definition at line 413 of file cp_map.c.
Referenced by MAP_IsMapPositionSelected().
#define ZOOM_LIMIT 2.5f |
Definition at line 60 of file cp_map.c.
Referenced by MAP_StartCenter().
typedef struct multiSelect_s multiSelect_t |
Structure to manage the multi selection.
anonymous enum |
enum multiSelectType_t |
CASSERT | ( | lengthof(geoscapeImageNames) | = =GEOSCAPE_IMAGE_MAX |
) |
Return longitude and latitude of a point of the screen for 3D geoscape (globe).
[in] | node | The current menuNode we was clicking into (3dmap or map) |
[in] | x | X coordinate on the screen that was clicked to |
[in] | y | Y coordinate on the screen that was clicked to |
[out] | pos | vec2_t was filled with longitude and latitude |
Definition at line 593 of file cp_map.c.
References ccs_s::angles, ccs, GLOBE_RADIUS, ccs_s::mapPos, ccs_s::mapSize, PITCH, RotatePointAroundVector(), VecToPolar(), Vector2Set, VectorNormalize(), VectorSet, and YAW.
Referenced by MAP_MapClick().
static void MAP3D_SmoothRotate | ( | void | ) | [static] |
smooth rotation of the 3D geoscape
Definition at line 1273 of file cp_map.c.
References ccs_s::angles, ccs, curRotationSpeed, curZoomSpeed, f, qfalse, smoothAcceleration, smoothDeltaLength, smoothDeltaZoom, smoothFinalGlobeAngle, smoothFinalZoom, smoothRotation, VectorAdd, VectorCopy, VectorLength(), VectorScale, VectorSubtract, and ccs_s::zoom.
Referenced by MAP_DrawMap().
Draw a path on a menu node (usually the 3Dgeoscape map).
[in] | node | The menu node which will be used for drawing dimensions. This is usually the 3Dgeoscape menu node. |
[in] | line | The path which is to be drawn |
Definition at line 781 of file cp_map.c.
References i, LINE_MAXPTS, MAP_3DMapToScreen(), mapline_s::numPoints, mapline_s::point, R_Color(), R_DrawLineStrip(), screenPoint_t::x, and screenPoint_t::y.
Referenced by MAP_DrawMapMarkers(), and MAP_DrawMapOnePhalanxAircraft().
static qboolean MAP_3DMapToScreen | ( | const uiNode_t * | node, | |
const vec2_t | pos, | |||
int * | x, | |||
int * | y, | |||
int * | z | |||
) | [static] |
Transform a 2D position on the map to screen coordinates.
[in] | node | Menu node |
[in] | pos | vector that holds longitude and latitude |
[out] | x | normalized (rotated and scaled) x value of mouseclick |
[out] | y | normalized (rotated and scaled) y value of mouseclick |
[out] | z | z value of the given latitude and longitude - might also be NULL if not needed |
Definition at line 450 of file cp_map.c.
References ccs_s::angles, ccs, GLOBE_RADIUS, int(), ccs_s::mapPos, ccs_s::mapSize, PITCH, PolarToVec(), qfalse, qtrue, RotatePointAroundVector(), Vector2Set, VectorSet, and YAW.
Referenced by MAP_3DMapDrawLine(), and MAP_AllMapToScreen().
Call either MAP_MapToScreen or MAP_3DMapToScreen depending on the geoscape you're using.
[in] | node | Menu node |
[in] | pos | Position on the map described by longitude and latitude |
[out] | x | Pointer to the X coordinate on the screen |
[out] | y | Pointer to the Y coordinate on the screen |
[out] | z | Pointer to the Z coordinate on the screen (may be NULL if not needed) |
Definition at line 532 of file cp_map.c.
References cvar_s::integer, MAP_3DMapToScreen(), and MAP_MapToScreen().
Referenced by MAP_Draw3DMarkerIfVisible(), MAP_DrawAircraftHealthBar(), MAP_DrawBeam(), MAP_DrawBullets(), MAP_DrawMapMarkers(), MAP_DrawMapOneBase(), MAP_DrawMapOneInstallation(), MAP_DrawMapOneMission(), MAP_DrawMapOnePhalanxAircraft(), MAP_IsMapPositionSelected(), MAP_MapDrawEquidistantPoints(), and RADAR_DrawInMap().
Select which function should be used for calculating the direction of model on 2D or 3D geoscape.
[in] | start | Latitude and longitude of the position of the model. |
[in] | end | Latitude and longitude of aimed point. |
[in] | direction | vec3_t giving current direction of the model (NULL if the model is idle). |
[out] | ortVector | If not NULL, this will be filled with the normalized vector around which rotation allows to go toward direction . |
start
going toward end
. Zero value is the direction of North pole. Definition at line 992 of file cp_map.c.
References cvar_s::integer, MAP_AngleOfPath2D(), and MAP_AngleOfPath3D().
Referenced by AIRFIGHT_GetNextPointInPath(), MAP_DrawMapMarkers(), and MAP_DrawMapOnePhalanxAircraft().
static float MAP_AngleOfPath2D | ( | const vec3_t | start, | |
const vec2_t | end, | |||
vec3_t | direction, | |||
vec3_t | ortVector | |||
) | [static] |
Return the angle of a model given its position and destination, on 2D geoscape.
[in] | start | Latitude and longitude of the position of the model. |
[in] | end | Latitude and longitude of aimed point. |
[in] | direction | vec3_t giving current direction of the model (NULL if the model is idle). |
[out] | ortVector | If not NULL, this will be filled with the normalized vector around which rotation allows to go toward direction . |
start
going toward end
. Zero value is the direction of North pole. Definition at line 934 of file cp_map.c.
References CrossProduct(), f, PolarToVec(), RotatePointAroundVector(), todeg, VectorCopy, VectorLength(), VectorNormalize(), VectorSet, and VectorSubtract.
Referenced by MAP_AngleOfPath().
static float MAP_AngleOfPath3D | ( | const vec3_t | start, | |
const vec2_t | end, | |||
vec3_t | direction, | |||
vec3_t | ortVector | |||
) | [static] |
Return the angle of a model given its position and destination, on 3D geoscape.
[in] | start | Latitude and longitude of the position of the model. |
[in] | end | Latitude and longitude of aimed point. |
[in] | direction | vec3_t giving current direction of the model (NULL if the model is idle). |
[out] | ortVector | If not NULL, this will be filled with the normalized vector around which rotation allows to go toward direction . |
start
going toward end
. Zero value is the direction of North pole. < Position of the north pole (used to know where is the 'up' side
Definition at line 872 of file cp_map.c.
References CrossProduct(), DotProduct, PolarToVec(), RotatePointAroundVector(), todeg, VectorCopy, VectorLength(), VectorNormalize(), and VectorSubtract.
Referenced by MAP_AngleOfPath().
void MAP_CenterOnPoint_f | ( | void | ) |
Switch to next model on 2D and 3D geoscape.
smoothRotation
to qtrue
to allow a smooth rotation in MAP_DrawMap. Definition at line 1253 of file cp_map.c.
References centerOnEventIdx, cvar_s::integer, MAP_GetGeoscapeAngle(), MAP_StartCenter(), smoothFinal2DGeoscapeCenter, smoothFinalGlobeAngle, and UI_GetActiveWindowName().
void MAP_CheckPositionBoundaries | ( | float * | pos | ) |
Check that a position (in latitude / longitude) is within boundaries.
[in,out] | pos | Pointer to the 2 elements vector giving the position. |
Definition at line 2329 of file cp_map.c.
Referenced by AIR_AircraftMakeMove(), AIR_Move(), and UFO_CampaignRunUFOs().
static void MAP_ConvertObjectPositionToGeoscapePosition | ( | float * | vector, | |
const vec2_t | objectPos | |||
) | [static] |
Will set the vector for the geoscape position.
[out] | vector | The output vector. A two-dim vector for the flat geoscape, and a three-dim vector for the 3d geoscape |
[in] | objectPos | The position vector of the object to transform. |
Definition at line 1009 of file cp_map.c.
References cvar_s::integer, Vector2Set, and VectorSet.
Referenced by MAP_GetGeoscapeAngle(), MAP_GetMissionAngle(), and MAP_GetUFOAngle().
void MAP_DeactivateOverlay | ( | const char * | overlayID | ) |
Remove overlay.
[in] | overlayID | Name of the overlay you want to turn off. |
Definition at line 2725 of file cp_map.c.
References MAP_IsNationOverlayActivated(), MAP_IsRadarOverlayActivated(), MAP_IsXVIOverlayActivated(), and MAP_SetOverlay().
Referenced by MAP_DeactivateOverlay_f(), and MAP_ResetAction().
static void MAP_DeactivateOverlay_f | ( | void | ) | [static] |
Console command to call MAP_DeactivateOverlay.
Definition at line 2750 of file cp_map.c.
References Cmd_Argc(), Cmd_Argv(), Com_Printf(), and MAP_DeactivateOverlay().
Referenced by MAP_InitStartup().
void MAP_Draw3DMarkerIfVisible | ( | const uiNode_t * | node, | |
const vec2_t | pos, | |||
float | theta, | |||
const char * | model, | |||
int | skin | |||
) |
Draws a 3D marker on geoscape if the player can see it.
[in] | node | Menu node. |
[in] | pos | Longitude and latitude of the marker to draw. |
[in] | theta | Angle (degree) of the model to the horizontal. |
[in] | model | The name of the model of the marker. |
[in] | skin | Number of modelskin to draw on marker |
Definition at line 551 of file cp_map.c.
References ccs_s::angles, ccs, GLOBE_RADIUS, cvar_s::integer, MAP_AllMapToScreen(), ccs_s::mapPos, ccs_s::mapSize, R_Draw2DMapMarkers(), R_Draw3DMapMarkers(), and VectorSet.
Referenced by MAP_DrawMapMarkers(), MAP_DrawMapOneBase(), MAP_DrawMapOneInstallation(), MAP_DrawMapOneMission(), and MAP_DrawMapOnePhalanxAircraft().
static void MAP_DrawAircraftHealthBar | ( | const uiNode_t * | node, | |
const aircraft_t * | aircraft | |||
) | [static] |
Draws health bar for an aircraft (either phalanx or ufo).
[in] | node | Pointer to the meunode to draw in |
[in] | aircraft | Pointer to the aircraft to draw for |
Definition at line 1547 of file cp_map.c.
References AIR_STATS_DAMAGE, ccs, aircraft_s::damage, green, MAP_AllMapToScreen(), aircraft_s::pos, R_DrawFill(), R_DrawRect(), red, aircraft_s::stats, Vector4Copy, yellow, and ccs_s::zoom.
Referenced by MAP_DrawMapMarkers(), and MAP_DrawMapOnePhalanxAircraft().
static void MAP_DrawBeam | ( | const uiNode_t * | node, | |
const vec3_t | start, | |||
const vec3_t | end, | |||
const vec4_t | color | |||
) | [static] |
Draws an energy beam on the geoscape map (laser/particle).
[in] | node | Pointer to the node in which you want to draw. |
[in] | start | Start position of the shot (on geoscape) |
[in] | end | End position of the shot (on geoscape) |
[in] | color | color of the beam |
Definition at line 1382 of file cp_map.c.
References MAP_AllMapToScreen(), R_Color(), and R_DrawLine().
Referenced by MAP_DrawMapMarkers().
Draws on bunch of bullets on the geoscape map.
[in] | node | Pointer to the node in which you want to draw the bullets. |
[in] | pos |
Definition at line 1366 of file cp_map.c.
References BULLET_SIZE, MAP_AllMapToScreen(), R_DrawFill(), and yellow.
Referenced by MAP_DrawMapMarkers().
void MAP_DrawMap | ( | const uiNode_t * | node | ) |
Draw the geoscape.
[in] | node | The map menu node |
Definition at line 1946 of file cp_map.c.
References _, AIR_IsAircraftInBase(), ccs_s::angles, ccs, ccs_s::center, Com_sprintf(), CP_CalcAndUploadDayAndNightTexture(), ccs_s::curCampaign, ccs_s::date, date_s::day, DAYS_PER_YEAR, cvar_s::integer, lengthof, MA_BASEATTACK, MA_INTERCEPT, MA_NEWBASE, MA_NEWINSTALLATION, MA_NONE, MA_UFORADAR, campaign_s::map, MAP3D_SmoothRotate(), MAP_DrawMapMarkers(), MAP_GetAircraftText(), MAP_GetMissionText(), MAP_GetUFOText(), MAP_IsNationOverlayActivated(), MAP_IsRadarOverlayActivated(), MAP_IsXVIOverlayActivated(), MAP_ResetAction(), MAP_SmoothTranslate(), ccs_s::mapAction, ccs_s::mapPos, ccs_s::mapSize, ccs_s::overallInterest, pos, qfalse, qtrue, R_Draw3DGlobe(), R_DrawBloom(), R_DrawFlatGeoscape(), R_EnableRenderbuffer(), date_s::sec, SECONDS_PER_DAY, SECONDS_PER_HOUR, ccs_s::selectedAircraft, ccs_s::selectedMission, ccs_s::selectedUFO, uiNode_s::size, smoothRotation, TEXT_STANDARD, textStandard, UI_GetNodeAbsPos(), UI_MAPEXTRADATACONST, UI_RegisterText(), UI_ResetData(), cvar_s::value, Vector2Copy, and ccs_s::zoom.
Referenced by UI_MapNodeDraw().
static void MAP_DrawMapMarkers | ( | const uiNode_t * | node | ) | [static] |
Draws all ufos, aircraft, bases and so on to the geoscape map (2D and 3D).
[in] | node | The menu node which will be used for drawing markers. |
Definition at line 1772 of file cp_map.c.
References _, aircraftProjectile_s::aimedAircraft, AIR_GetNextFromBase(), AIR_IsAircraftOnGeoscape(), aircraftProjectile_s::aircraftItem, ALIGN_UC, aircraftProjectile_s::angle, aircraftProjectile_s::attackerPos, aircraftProjectile_s::attackingAircraft, B_GetFoundedBaseByIDX(), aircraftProjectile_s::beam, craftitem_s::beamColor, aircraftProjectile_s::bullets, ccs, cls, uiNode_s::color, CP_IsXVIResearched(), objDef_s::craftitem, Cvar_GetInteger(), Cvar_Set(), linkedList_s::data, aircraft_s::direction, f, client_static_s::frametime, ccs_s::gameTimeScale, GEOSCAPE_IMAGE_MISSION_SELECTED, geoscapeImages, aircraftProjectile_s::hasMoved, image_s::height, i, aircraftProjectile_s::idleTarget, INS_GetFoundedInstallationByIDX(), cvar_s::integer, LinearInterpolation, MAP_3DMapDrawLine(), MAP_AllMapToScreen(), MAP_AngleOfPath(), MAP_Draw3DMarkerIfVisible(), MAP_DrawAircraftHealthBar(), MAP_DrawBeam(), MAP_DrawBullets(), MAP_DrawMapOneBase(), MAP_DrawMapOneInstallation(), MAP_DrawMapOneMission(), MAP_DrawMapOnePhalanxAircraft(), MAP_MapDrawEquidistantPoints(), MAP_MapDrawLine(), MAX_BASES, MAX_INSTALLATIONS, ccs_s::missions, objDef_s::model, aircraft_s::model, nation_s::name, ccs_s::nations, linkedList_s::next, aircraftProjectile_s::numInterpolationPoints, ccs_s::numNations, mapline_s::numPoints, ccs_s::numProjectiles, ccs_s::numUFOs, aircraft_s::oldDrawPos, mission_s::onGeoscape, mapline_s::point, nation_s::pos, aircraftProjectile_s::pos, aircraft_s::pos, aircraftProjectile_s::projectedPos, ccs_s::projectiles, Q_strcat(), qfalse, qtrue, R_Color(), R_DrawImage(), aircraft_s::route, RS_IsResearched_ptr(), SELECT_CIRCLE_RADIUS, ccs_s::selectedUFO, nation_s::stats, aircraft_s::tech, TEXT_XVI, UFO_IsUFOSeenOnGeoscape(), ccs_s::ufos, UI_DrawString(), UI_GetFontFromNode(), UI_RegisterText(), UI_ResetData(), va(), VectorCopy, white, image_s::width, nationInfo_s::xviInfection, and yellow.
Referenced by MAP_DrawMap().
static void MAP_DrawMapOneBase | ( | const uiNode_t * | node, | |
const base_t * | base, | |||
qboolean | oneUFOVisible, | |||
const char * | font | |||
) | [static] |
Draws one base on the geoscape map (2D and 3D).
[in] | node | The menu node which will be used for drawing markers. |
[in] | base | Pointer to the base to draw. |
[in] | oneUFOVisible | Is there at least one UFO visible on the geoscape? |
[in] | font | Default font. |
Definition at line 1491 of file cp_map.c.
References AII_BaseCanShoot(), AIR_STATS_WRANGE, ALIGN_UL, aircraftSlot_s::ammo, aircraftSlot_s::ammoLeft, BASE_UNDER_ATTACK, base_s::baseStatus, base_s::batteries, objDef_s::craftitem, defaultBaseAngle, GEOSCAPE_IMAGE_BASE, GEOSCAPE_IMAGE_BASE_ATTACK, geoscapeImages, image_s::height, i, aircraftSlot_s::installationTime, cvar_s::integer, aircraftSlot_s::item, base_s::lasers, MAP_AllMapToScreen(), MAP_Draw3DMarkerIfVisible(), MAP_IsRadarOverlayActivated(), MAP_MapDrawEquidistantPoints(), MAP_MapToScreen(), base_s::name, base_s::numBatteries, base_s::numLasers, base_s::pos, qfalse, R_DrawImage(), base_s::radar, RADAR_DrawInMap(), red, baseWeapon_s::slot, craftitem_s::stats, UI_DrawString(), and image_s::width.
Referenced by MAP_DrawMapMarkers().
static void MAP_DrawMapOneInstallation | ( | const uiNode_t * | node, | |
const installation_t * | installation, | |||
qboolean | oneUFOVisible, | |||
const char * | font | |||
) | [static] |
Draws one installation on the geoscape map (2D and 3D).
[in] | node | The menu node which will be used for drawing markers. |
[in] | installation | Pointer to the installation to draw. |
[in] | oneUFOVisible | Is there at least one UFO visible on the geoscape? |
[in] | font | Default font. |
Definition at line 1448 of file cp_map.c.
References AII_InstallationCanShoot(), AIR_STATS_WRANGE, ALIGN_UL, aircraftSlot_s::ammo, aircraftSlot_s::ammoLeft, installation_s::batteries, objDef_s::craftitem, defaultBaseAngle, image_s::height, i, installationTemplate_s::image, installation_s::installationTemplate, aircraftSlot_s::installationTime, cvar_s::integer, it_pic, aircraftSlot_s::item, MAP_AllMapToScreen(), MAP_Draw3DMarkerIfVisible(), MAP_IsRadarOverlayActivated(), MAP_MapDrawEquidistantPoints(), MAP_MapToScreen(), installationTemplate_s::maxBatteries, installationTemplate_s::model, installation_s::name, installation_s::pos, qfalse, R_DrawImage(), R_FindImage(), installation_s::radar, RADAR_DrawInMap(), red, baseWeapon_s::slot, craftitem_s::stats, UI_DrawString(), and image_s::width.
Referenced by MAP_DrawMapMarkers().
Draws one mission on the geoscape map (2D and 3D).
[in] | node | The menu node which will be used for drawing markers. |
[in] | ms | Pointer to the mission to draw. |
Definition at line 1403 of file cp_map.c.
References _, mission_s::active, ALIGN_UL, ccs, Cvar_Set(), defaultBaseAngle, GEOSCAPE_IMAGE_MISSION, GEOSCAPE_IMAGE_MISSION_ACTIVE, GEOSCAPE_IMAGE_MISSION_SELECTED, geoscapeImages, image_s::height, cvar_s::integer, mission_s::location, MAP_AllMapToScreen(), MAP_Draw3DMarkerIfVisible(), MAP_GetMissionModel(), MAP_IsNight(), MAP_MapDrawEquidistantPoints(), mission_s::pos, qfalse, R_DrawImage(), SELECT_CIRCLE_RADIUS, ccs_s::selectedMission, UI_DrawString(), image_s::width, and yellow.
Referenced by MAP_DrawMapMarkers().
static void MAP_DrawMapOnePhalanxAircraft | ( | const uiNode_t * | node, | |
aircraft_t * | aircraft, | |||
qboolean | oneUFOVisible | |||
) | [static] |
Draws one Phalanx aircraft on the geoscape map (2D and 3D).
[in] | node | The menu node which will be used for drawing markers. |
[in] | aircraft | Pointer to the aircraft to draw. |
[in] | oneUFOVisible | Is there at least one UFO visible on the geoscape? |
Definition at line 1581 of file cp_map.c.
References AIR_STATS_WRANGE, AIR_TRANSIT, AIR_UFO, aircraft_s::aircraftTarget, ccs, Cvar_GetInteger(), aircraft_s::direction, GEOSCAPE_IMAGE_MISSION, geoscapeImages, image_s::height, cvar_s::integer, MAP_3DMapDrawLine(), MAP_AllMapToScreen(), MAP_AngleOfPath(), MAP_Draw3DMarkerIfVisible(), MAP_DrawAircraftHealthBar(), MAP_IsRadarOverlayActivated(), MAP_MapDrawEquidistantPoints(), MAP_MapDrawLine(), aircraft_s::model, mapline_s::numPoints, aircraft_s::oldDrawPos, mapline_s::point, aircraft_s::point, aircraft_s::pos, R_DrawImage(), aircraft_s::radar, RADAR_DrawInMap(), red, aircraft_s::route, SELECT_CIRCLE_RADIUS, ccs_s::selectedAircraft, aircraft_s::stats, aircraft_s::status, VectorCopy, image_s::width, and yellow.
Referenced by MAP_DrawMapMarkers().
static const char* MAP_GetAircraftText | ( | char * | buffer, | |
size_t | size, | |||
const aircraft_t * | aircraft | |||
) | [static] |
Assembles a string for an aircraft that is on the geoscape.
[in] | aircraft | The aircraft to get the description for |
[out] | buffer | The target buffer to store the text in |
[in] | size | The size of the target buffer |
Definition at line 1690 of file cp_map.c.
References _, AIR_AircraftStatusToName(), AIR_GetTeamSize(), AIR_IDLE, AIR_STATS_FUELSIZE, AIR_STATS_SPEED, AIR_UFO, aircraft_s::aircraftTarget, CL_AircraftMenuStatsValues(), CL_SecondConvert(), Com_sprintf(), aircraft_s::fuel, GetDistanceOnGlobe(), aircraft_s::maxTeamSize, aircraft_s::name, mapline_s::numPoints, mapline_s::point, aircraft_s::pos, Q_strcat(), aircraft_s::route, SECONDS_PER_HOUR, aircraft_s::stats, aircraft_s::status, and va().
Referenced by MAP_DrawMap().
int MAP_GetCivilianNumberByPosition | ( | const vec2_t | pos | ) |
Get number of civilian on a map at given position.
[in] | pos | Position where the mission takes place. |
Definition at line 2290 of file cp_map.c.
References byte, Com_Error(), ERR_DROP, MAP_GetColor(), MapIsNopopulation, MapIsRural, MapIsSuburban, MapIsUrban, MapIsVillage, MapIsWater, and MAPTYPE_POPULATION.
Referenced by CP_CreateCivilianTeam().
Returns the color value from geoscape of a certain mask (terrain, culture or population) at a given position.
[in] | pos | vec2_t Value of position on map to get the color value from. pos is longitude and latitude |
[in] | type | determine the map to get the color from (there are different masks) one for the climazone (bases made use of this - there are grass, ice and desert base tiles available) and one for the nations |
Definition at line 2374 of file cp_map.c.
References byte, Com_Error(), cultureHeight, culturePic, cultureWidth, ERR_DROP, MAPTYPE_CULTURE, MAPTYPE_NATIONS, MAPTYPE_POPULATION, MAPTYPE_TERRAIN, nationsHeight, nationsPic, nationsWidth, populationHeight, populationPic, populationWidth, terrainHeight, terrainPic, and terrainWidth.
Referenced by AIRFIGHT_ActionsAfterAirfight(), CP_ChooseMap(), CP_CreateBattleParameters(), CP_GetRandomPosOnGeoscape(), CP_UpdateNationXVIInfection(), MAP_GetCivilianNumberByPosition(), MAP_GetCultureTypeByPos(), MAP_GetNation(), MAP_GetPopulationTypeByPos(), MAP_GetTerrainTypeByPos(), MAP_MapClick(), and MAP_PositionFitsTCPNTypes().
static const char* MAP_GetCultureType | ( | const byte * | color | ) | [static] |
Translate color value to culture type.
[in] | color | the color value from the culture mask |
Definition at line 2207 of file cp_map.c.
References MapIsAfrican, MapIsEastern, MapIsOriental, MapIsWater, and MapIsWestern.
Referenced by MAP_GetCultureTypeByPos().
static const char* MAP_GetCultureTypeByPos | ( | const vec2_t | pos | ) | [inline, static] |
Determine the culture type under a given position.
[in] | pos | Map Coordinates to get the culture type from |
Definition at line 2266 of file cp_map.c.
References byte, MAP_GetColor(), MAP_GetCultureType(), and MAPTYPE_CULTURE.
Referenced by MAP_PositionFitsTCPNTypes(), and MAP_PrintParameterStringByPos().
static void MAP_GetGeoscapeAngle | ( | float * | vector | ) | [static] |
Returns position of the model corresponding to centerOnEventIdx.
[out] | vector | Latitude and longitude of the model (finalAngle[2] is always 0). |
Definition at line 1126 of file cp_map.c.
References AIR_GetNextFromBase(), AIR_IsAircraftOnGeoscape(), B_GetFoundedBaseByIDX(), ccs_s::bases, ccs, centerOnEventIdx, CP_CountMissionOnGeoscape(), mission_s::data, INS_GetFoundedInstallationByIDX(), ccs_s::installations, MAP_ConvertObjectPositionToGeoscapePosition(), MAP_SelectAircraft(), MAP_SelectMission(), MAP_SelectUFO(), MAX_BASES, MAX_INSTALLATIONS, ccs_s::missions, linkedList_s::next, ccs_s::numBases, ccs_s::numInstallations, ccs_s::numUFOs, mission_s::onGeoscape, aircraft_s::pos, installation_s::pos, base_s::pos, mission_s::pos, mission_s::stage, STAGE_NOT_ACTIVE, STAGE_OVER, UFO_IsUFOSeenOnGeoscape(), ccs_s::ufos, and vec2_origin.
Referenced by MAP_CenterOnPoint_f().
static void MAP_GetMissionAngle | ( | float * | vector, | |
int | id | |||
) | [static] |
center to a mission
Definition at line 1020 of file cp_map.c.
References MAP_ConvertObjectPositionToGeoscapePosition(), MAP_GetMissionByIDX(), MAP_SelectMission(), and mission_s::pos.
Referenced by MAP_SelectObject_f().
static const char* MAP_GetMissionText | ( | char * | buffer, | |
size_t | size, | |||
const mission_t * | mission | |||
) | [static] |
Assembles a string for a mission that is on the geoscape.
[in] | mission | The mission to get the description for |
[out] | buffer | The target buffer to store the text in |
[in] | size | The size of the target buffer |
Definition at line 1654 of file cp_map.c.
References _, Com_sprintf(), CP_MissionToTypeString(), mapDef_s::description, mission_s::location, and mission_s::mapDef.
Referenced by MAP_DrawMap().
Translate nation map color to nation.
[in] | pos | Map Coordinates to get the nation from |
Definition at line 2154 of file cp_map.c.
References byte, ccs, nation_s::color, Com_DPrintf(), DEBUG_CLIENT, i, MAP_GetColor(), MAPTYPE_NATIONS, ccs_s::nations, ccs_s::numNations, and VectorCompare.
Referenced by AB_BaseSearchedByNations(), B_BuildBase_f(), CP_BuildBaseGovernmentLeave(), CP_ChangeNationHappiness_f(), CP_CreateCivilianTeam(), CP_HarvestMissionGo(), CP_ReconMissionGroundGo(), CP_SpawnCrashSiteMission(), CP_SpawnRescueMission(), CP_UpdateNationXVIInfection(), INS_BuildInstallation_f(), MAP_PositionFitsTCPNTypes(), and NAT_UpdateHappinessForAllNations().
static const char* MAP_GetPopulationType | ( | const byte * | color | ) | [static] |
Translate color value to population type.
[in] | color | the color value from the population mask |
Definition at line 2230 of file cp_map.c.
References MapIsNopopulation, MapIsRural, MapIsSuburban, MapIsUrban, MapIsVillage, and MapIsWater.
Referenced by MAP_GetPopulationTypeByPos().
static const char* MAP_GetPopulationTypeByPos | ( | const vec2_t | pos | ) | [inline, static] |
Determine the population type under a given position.
[in] | pos | Map Coordinates to get the population type from |
Definition at line 2278 of file cp_map.c.
References byte, MAP_GetColor(), MAP_GetPopulationType(), and MAPTYPE_POPULATION.
Referenced by MAP_PositionFitsTCPNTypes(), and MAP_PrintParameterStringByPos().
static const char* MAP_GetShortMissionText | ( | char * | buffer, | |
size_t | size, | |||
const mission_t * | mission | |||
) | [static] |
Assembles a short string for a mission that is on the geoscape.
[in] | mission | The mission to get the description for |
[out] | buffer | The target buffer to store the text in |
[in] | size | The size of the target buffer |
Definition at line 1671 of file cp_map.c.
References _, Com_sprintf(), CP_MissionToTypeString(), mapDef_s::description, mission_s::location, and mission_s::mapDef.
Referenced by MAP_UpdateGeoscapeDock().
const char* MAP_GetTerrainType | ( | const byte *const | color | ) |
Translate color value to terrain type.
[in] | color | the color value from the terrain mask |
Definition at line 2180 of file cp_map.c.
References MapIsArctic, MapIsCold, MapIsDesert, MapIsMountain, MapIsTropical, MapIsWasted, and MapIsWater.
Referenced by AIRFIGHT_ActionsAfterAirfight(), CP_CreateBattleParameters(), and MAP_GetTerrainTypeByPos().
static const char* MAP_GetTerrainTypeByPos | ( | const vec2_t | pos | ) | [inline, static] |
Determine the terrain type under a given position.
[in] | pos | Map Coordinates to get the terrain type from |
Definition at line 2254 of file cp_map.c.
References byte, MAP_GetColor(), MAP_GetTerrainType(), and MAPTYPE_TERRAIN.
Referenced by MAP_PositionFitsTCPNTypes(), and MAP_PrintParameterStringByPos().
static void MAP_GetUFOAngle | ( | float * | vector, | |
int | idx | |||
) | [static] |
center to an ufo
Definition at line 1031 of file cp_map.c.
References ccs, aircraft_s::idx, MAP_ConvertObjectPositionToGeoscapePosition(), MAP_SelectUFO(), ccs_s::numUFOs, aircraft_s::pos, UFO_IsUFOSeenOnGeoscape(), and ccs_s::ufos.
Referenced by MAP_SelectObject_f().
static const char* MAP_GetUFOText | ( | char * | buffer, | |
size_t | size, | |||
const aircraft_t * | ufo | |||
) | [static] |
Assembles a string for an UFO that is on the geoscape.
[in] | ufo | The UFO to get the description for |
[out] | buffer | The target buffer to store the text in |
[in] | size | The size of the target buffer |
Definition at line 1725 of file cp_map.c.
References _, AIR_STATS_SPEED, CL_AircraftMenuStatsValues(), Com_sprintf(), Q_strcat(), aircraft_s::stats, UFO_AircraftToIDOnGeoscape(), and va().
Referenced by MAP_DrawMap(), and MAP_UpdateGeoscapeDock().
void MAP_Init | ( | void | ) |
Definition at line 2489 of file cp_map.c.
References ccs, Com_Error(), cultureHeight, culturePic, cultureWidth, ccs_s::curCampaign, ERR_DROP, campaign_s::map, MAP_ResetAction(), MAP_UpdateGeoscapeDock(), Mem_Free, nationsHeight, nationsPic, nationsWidth, populationHeight, populationPic, populationWidth, R_LoadImage(), terrainHeight, terrainPic, terrainWidth, and va().
Referenced by CP_CampaignInit(), and CP_LoadXML().
void MAP_InitStartup | ( | void | ) |
Initialise MAP/Geoscape.
Definition at line 2781 of file cp_map.c.
References Cmd_AddCommand(), Com_Error(), CVAR_ARCHIVE, CVAR_DEVELOPER, Cvar_Get(), ERR_DROP, GEOSCAPE_IMAGE_MAX, geoscapeImageNames, geoscapeImages, i, it_pic, MAP_DeactivateOverlay_f(), MAP_MultiSelectExecuteAction_f(), MAP_ResetAction(), MAP_SelectObject_f(), MAP_SetOverlay_f(), R_FindImage(), and r_noTexture.
Referenced by CP_InitStartup().
static qboolean MAP_IsMapPositionSelected | ( | const uiNode_t * | node, | |
const vec2_t | pos, | |||
int | x, | |||
int | y | |||
) | [static] |
Tell if the specified position is considered clicked.
Definition at line 417 of file cp_map.c.
References MAP_AllMapToScreen(), qfalse, qtrue, and UI_MAP_DIST_SELECTION.
Referenced by MAP_MapClick().
qboolean MAP_IsNationOverlayActivated | ( | void | ) |
Definition at line 2768 of file cp_map.c.
References cvar_s::integer, and OVERLAY_NATION.
Referenced by MAP_DeactivateOverlay(), MAP_DrawMap(), and MAP_SetOverlay().
Check whether given position is Day or Night.
[in] | pos | Given position. |
Definition at line 2346 of file cp_map.c.
References ccs, COS_ALPHA, ccs_s::date, date_s::day, DAYS_PER_YEAR_AVG, date_s::sec, SECONDS_PER_DAY, SIN_ALPHA, and torad.
Referenced by B_AssembleMap(), CP_StartMissionMap(), and MAP_DrawMapOneMission().
qboolean MAP_IsRadarOverlayActivated | ( | void | ) |
Definition at line 2763 of file cp_map.c.
References cvar_s::integer, and OVERLAY_RADAR.
Referenced by B_BuildBase_f(), B_SelectBase(), CL_CampaignRunAircraft(), CP_CheckNewMissionDetectedOnGeoscape(), INS_BuildInstallation_f(), INS_SelectInstallation(), MAP_DeactivateOverlay(), MAP_DrawMap(), MAP_DrawMapOneBase(), MAP_DrawMapOneInstallation(), MAP_DrawMapOnePhalanxAircraft(), MAP_SetOverlay(), MAP_SetOverlay_f(), RADAR_DeactivateRadarOverlay(), and UFO_DetectNewUFO().
qboolean MAP_IsXVIOverlayActivated | ( | void | ) |
Definition at line 2773 of file cp_map.c.
References cvar_s::integer, and OVERLAY_XVI.
Referenced by MAP_DeactivateOverlay(), and MAP_DrawMap().
Calculate the shortest way to go from start to end on a sphere.
[in] | start | The point you start from |
[in] | end | The point you go to |
[out] | line | Contains the shortest path to go from start to end |
Definition at line 646 of file cp_map.c.
References CrossProduct(), mapline_s::distance, i, LINE_MAXPTS, LINE_MAXSEG, mapline_s::numPoints, mapline_s::point, PolarToVec(), todeg, torad, UFO_EPSILON, VecToPolar(), Vector2Set, VectorCompareEps(), VectorNormalize(), and VectorSet.
Referenced by AIR_AircraftReturnToBase(), AIR_SendAircraftPursuingUFO(), AIR_SendAircraftToMission(), MAP_MapClick(), UFO_SendPursuingAircraft(), and UFO_SendToDestination().
void MAP_MapClick | ( | uiNode_t * | node, | |
int | x, | |||
int | y | |||
) |
Click on the map/geoscape.
Definition at line 282 of file cp_map.c.
References _, AIR_AircraftHasEnoughFuel(), AIR_GetNextFromBase(), AIR_IsAircraftOnGeoscape(), AIR_TRANSIT, B_GetFoundedBaseByIDX(), ccs, CL_GameTimeStop(), Cmd_ExecuteString(), CP_MissionToTypeString(), Cvar_GetInteger(), linkedList_s::data, aircraft_s::fuel, i, aircraft_s::idx, INS_GetFoundedInstallationByIDX(), cvar_s::integer, mission_s::location, MA_NEWBASE, MA_NEWINSTALLATION, MA_UFORADAR, MAP3D_ScreenToMap(), MAP_GetColor(), MAP_GetIDXByMission(), MAP_IsMapPositionSelected(), MAP_MapCalcLine(), MAP_MultiSelectListAddItem(), MAP_ResetAction(), MAP_ScreenToMap(), ccs_s::mapAction, MapIsWater, MAPTYPE_TERRAIN, MAX_BASES, MAX_INSTALLATIONS, ccs_s::missions, MULTISELECT_MAXSELECT, MULTISELECT_TYPE_AIRCRAFT, MULTISELECT_TYPE_BASE, MULTISELECT_TYPE_INSTALLATION, MULTISELECT_TYPE_MISSION, MULTISELECT_TYPE_UFO, installation_s::name, aircraft_s::name, base_s::name, multiSelect_s::nbSelect, newBasePos, linkedList_s::next, ccs_s::numBases, ccs_s::numInstallations, ccs_s::numUFOs, mission_s::onGeoscape, aircraft_s::point, multiSelect_s::popupText, installation_s::pos, aircraft_s::pos, base_s::pos, mission_s::pos, pos, aircraft_s::route, ccs_s::selectedAircraft, mission_s::stage, STAGE_NOT_ACTIVE, aircraft_s::status, TEXT_MULTISELECTION, aircraft_s::time, UFO_AircraftToIDOnGeoscape(), UFO_IsUFOSeenOnGeoscape(), ccs_s::ufos, UI_PushWindow(), UI_RegisterText(), and Vector2Copy.
Referenced by UI_RegisterMapNode().
void MAP_MapDrawEquidistantPoints | ( | const uiNode_t * | node, | |
const vec2_t | center, | |||
const float | angle, | |||
const vec4_t | color | |||
) |
Draw equidistant points from a given point on a menu node.
[in] | node | The menu node which will be used for drawing dimensions. This is usually the geoscape menu node. |
[in] | center | The latitude and longitude of center point |
[in] | angle | The angle defining the distance of the equidistant points to center |
[in] | color | The color for drawing |
Definition at line 813 of file cp_map.c.
References CIRCLE_DRAW_POINTS, i, cvar_s::integer, MAP_AllMapToScreen(), PerpendicularVector(), PolarToVec(), qfalse, qtrue, R_Color(), R_DrawLineStrip(), RotatePointAroundVector(), VecToPolar(), screenPoint_t::x, and screenPoint_t::y.
Referenced by MAP_DrawMapMarkers(), MAP_DrawMapOneBase(), MAP_DrawMapOneInstallation(), MAP_DrawMapOneMission(), MAP_DrawMapOnePhalanxAircraft(), and RADAR_DrawLineCoverage().
Draw a path on a menu node (usually the 2D geoscape map).
[in] | node | The menu node which will be used for drawing dimensions. This is usually the geoscape menu node. |
[in] | line | The path which is to be drawn |
Definition at line 732 of file cp_map.c.
References ccs, i, LINE_MAXPTS, MAP_MapToScreen(), ccs_s::mapSize, mapline_s::numPoints, mapline_s::point, R_Color(), R_DrawLineStrip(), screenPoint_t::x, screenPoint_t::y, and ccs_s::zoom.
Referenced by MAP_DrawMapMarkers(), and MAP_DrawMapOnePhalanxAircraft().
Transform a 2D position on the map to screen coordinates.
[in] | node | Menu node |
[in] | pos | Position on the map described by longitude and latitude |
[out] | x | X coordinate on the screen |
[out] | y | Y coordinate on the screen |
Definition at line 498 of file cp_map.c.
References ccs, ccs_s::center, ccs_s::mapPos, ccs_s::mapSize, qfalse, qtrue, and ccs_s::zoom.
Referenced by MAP_AllMapToScreen(), MAP_DrawMapOneBase(), MAP_DrawMapOneInstallation(), and MAP_MapDrawLine().
static void MAP_MultiSelectExecuteAction_f | ( | void | ) | [static] |
Execute action for 1 element of the multi selection Param Cmd_Argv(1) is the element selected in the popup_multi_selection menu.
Definition at line 190 of file cp_map.c.
References AIR_AircraftGetFromIDX(), B_GetFoundedBaseByIDX(), B_SelectBase(), ccs, CL_DisplayPopupAircraft(), CL_DisplayPopupInterceptMission(), CL_DisplayPopupInterceptUFO(), Cmd_Argc(), Cmd_Argv(), Com_DPrintf(), DEBUG_CLIENT, id, INS_GetFoundedInstallationByIDX(), INS_SelectInstallation(), MA_INTERCEPT, MAP_GetMissionByIDX(), MAP_ResetAction(), MAP_SelectAircraft(), MAP_SelectMission(), MAP_SelectUFO(), ccs_s::mapAction, MULTISELECT_TYPE_AIRCRAFT, MULTISELECT_TYPE_BASE, MULTISELECT_TYPE_INSTALLATION, MULTISELECT_TYPE_MISSION, MULTISELECT_TYPE_NONE, MULTISELECT_TYPE_UFO, multiSelect_s::nbSelect, ccs_s::numBases, ccs_s::numInstallations, ccs_s::numUFOs, qfalse, qtrue, ccs_s::selectedAircraft, ccs_s::selectedMission, ccs_s::selectedUFO, multiSelect_s::selectId, multiSelect_s::selectType, ccs_s::ufos, and UI_PopWindow().
Referenced by MAP_InitStartup().
static void MAP_MultiSelectListAddItem | ( | multiSelectType_t | itemType, | |
int | itemID, | |||
const char * | itemDescription, | |||
const char * | itemName | |||
) | [static] |
Add an element in the multiselection list.
Definition at line 177 of file cp_map.c.
References multiSelect_s::nbSelect, multiSelect_s::popupText, Q_strcat(), multiSelect_s::selectId, multiSelect_s::selectType, and va().
Referenced by MAP_MapClick().
void MAP_NotifyAircraftRemoved | ( | const aircraft_t * | aircraft | ) |
Notify that an aircraft has been removed from game.
[in] | aircraft | Pointer to the aircraft has been removed |
[in] | destroyed | True if the UFO has been destroyed, false if it's been only set invisible (landed) |
Definition at line 2139 of file cp_map.c.
References ccs, ccs_s::interceptAircraft, MAP_ResetAction(), and ccs_s::selectedAircraft.
Referenced by AIR_DeleteAircraft().
void MAP_NotifyMissionRemoved | ( | const mission_t * | mission | ) |
Notify that a mission has been removed.
Definition at line 2106 of file cp_map.c.
References ccs, MAP_ResetAction(), MAP_UpdateGeoscapeDock(), and ccs_s::selectedMission.
Referenced by CP_BaseAttackMissionIsFailure(), and CP_MissionRemoveFromGeoscape().
void MAP_NotifyUFODisappear | ( | const aircraft_t * | ufo | ) |
Notify that a UFO disappears on radars.
Definition at line 2534 of file cp_map.c.
References ccs, MAP_ResetAction(), MAP_UpdateGeoscapeDock(), and ccs_s::selectedUFO.
Referenced by UFO_CampaignCheckEvents().
void MAP_NotifyUFORemoved | ( | const aircraft_t * | ufo, | |
qboolean | destroyed | |||
) |
Notify that a UFO has been removed.
[in] | ufo | Pointer to the ufo has been removed |
[in] | destroyed | True if the UFO has been destroyed, false if it's been only set invisible (landed) |
Definition at line 2120 of file cp_map.c.
References ccs, MAP_ResetAction(), MAP_UpdateGeoscapeDock(), and ccs_s::selectedUFO.
Referenced by CP_UFORemoveFromGeoscape().
Check if given pos is close to an existing base.
Definition at line 2437 of file cp_map.c.
References B_GetFoundedBaseByIDX(), GetDistanceOnGlobe(), MAX_BASES, MIN_DIST_BASE, and base_s::pos.
Referenced by AB_SetAlienBasePosition(), CP_HarvestMissionGo(), CP_ReconMissionGroundGo(), and CP_TerrorMissionGo().
qboolean MAP_PositionFitsTCPNTypes | ( | const vec2_t | pos, | |
const linkedList_t * | terrainTypes, | |||
const linkedList_t * | cultureTypes, | |||
const linkedList_t * | populationTypes, | |||
const linkedList_t * | nations | |||
) |
Checks for a given location, if it fulfills all criteria given via parameters (terrain, culture, population, nation type).
[in] | pos | Location to be tested |
[in] | terrainTypes | A linkedList_t containing a list of strings determining the terrain types to be tested for (e.g. "grass") may be NULL |
[in] | cultureTypes | A linkedList_t containing a list of strings determining the culture types to be tested for (e.g. "western") may be NULL |
[in] | populationTypes | A linkedList_t containing a list of strings determining the population types to be tested for (e.g. "suburban") may be NULL |
[in] | nations | A linkedList_t containing a list of strings determining the nations to be tested for (e.g. "asia") may be NULL |
Definition at line 2464 of file cp_map.c.
References nation_s::id, LIST_ContainsString(), MAP_GetColor(), MAP_GetCultureTypeByPos(), MAP_GetNation(), MAP_GetPopulationTypeByPos(), MAP_GetTerrainTypeByPos(), MapIsWater, MAPTYPE_TERRAIN, qfalse, and qtrue.
Referenced by CP_GetRandomPosOnGeoscapeWithParameters(), CP_MapIsSelectable(), and NAT_ScriptSanityCheck().
void MAP_PrintParameterStringByPos | ( | const vec2_t | pos | ) |
Prints positions parameter in console.
[in] | pos | Location (latitude, longitude) where you want to check parameters. |
Definition at line 2316 of file cp_map.c.
References Com_Printf(), MAP_GetCultureTypeByPos(), MAP_GetPopulationTypeByPos(), and MAP_GetTerrainTypeByPos().
Referenced by NAT_ScriptSanityCheck().
void MAP_ResetAction | ( | void | ) |
No more special action in geoscape.
Definition at line 2058 of file cp_map.c.
References ccs, ccs_s::interceptAircraft, MA_NONE, MAP_DeactivateOverlay(), ccs_s::mapAction, ccs_s::numBases, radarOverlayWasSet, ccs_s::selectedAircraft, ccs_s::selectedMission, and ccs_s::selectedUFO.
Referenced by B_SelectBase(), CL_GameAutoGo(), CL_PopupInterceptRClick_f(), INS_SelectInstallation(), MAP_DrawMap(), MAP_Init(), MAP_InitStartup(), MAP_MapClick(), MAP_MultiSelectExecuteAction_f(), MAP_NotifyAircraftRemoved(), MAP_NotifyMissionRemoved(), MAP_NotifyUFODisappear(), MAP_NotifyUFORemoved(), MAP_SelectAircraft(), MAP_SelectMission(), and MAP_SelectUFO().
Return longitude and latitude of a point of the screen for 2D geoscape.
[in] | node | The current menuNode we was clicking into (3dmap or map) |
[in] | x | X coordinate on the screen that was clicked to |
[in] | y | Y coordinate on the screen that was clicked to |
[out] | pos | vec2_t was filled with longitude and latitude |
Definition at line 574 of file cp_map.c.
References ccs, ccs_s::center, ccs_s::mapPos, ccs_s::mapSize, and ccs_s::zoom.
Referenced by MAP_MapClick().
void MAP_Scroll_f | ( | void | ) |
Command binding for map scrolling.
Definition at line 2591 of file cp_map.c.
References ccs_s::angles, ccs, ccs_s::center, Cmd_Argc(), Cmd_Argv(), Com_Printf(), i, cvar_s::integer, ccs_s::mapSize, PITCH, qtrue, ROTATE_SPEED, smoothDeltaLength, smoothDeltaZoom, smoothFinalGlobeAngle, smoothFinalZoom, smoothRotation, VectorCopy, VectorLength(), VectorSubtract, YAW, and ccs_s::zoom.
void MAP_SelectAircraft | ( | aircraft_t * | aircraft | ) |
Select the specified aircraft in geoscape.
Definition at line 2085 of file cp_map.c.
References ccs, MAP_ResetAction(), and ccs_s::selectedAircraft.
Referenced by AIM_AircraftStart_f(), AIR_MoveAircraftIntoNewHomebase(), CL_DisplayHomebasePopup(), MAP_GetGeoscapeAngle(), and MAP_MultiSelectExecuteAction_f().
void MAP_SelectMission | ( | mission_t * | mission | ) |
Selected the specified mission.
Definition at line 2094 of file cp_map.c.
References ccs, MA_INTERCEPT, MAP_ResetAction(), ccs_s::mapAction, and ccs_s::selectedMission.
Referenced by AIR_Move(), CP_BaseAttackStartMission(), MAP_GetGeoscapeAngle(), MAP_GetMissionAngle(), and MAP_MultiSelectExecuteAction_f().
static void MAP_SelectObject_f | ( | void | ) | [static] |
Center the view and select an object from the geoscape.
Definition at line 1085 of file cp_map.c.
References Cmd_Argc(), Cmd_Argv(), Com_Printf(), cvar_s::integer, MAP_GetMissionAngle(), MAP_GetUFOAngle(), MAP_StartCenter(), smoothFinal2DGeoscapeCenter, smoothFinalGlobeAngle, and type.
Referenced by MAP_InitStartup().
void MAP_SelectUFO | ( | aircraft_t * | ufo | ) |
Select the specified ufo in geoscape.
Definition at line 2076 of file cp_map.c.
References ccs, MAP_ResetAction(), and ccs_s::selectedUFO.
Referenced by MAP_GetGeoscapeAngle(), MAP_GetUFOAngle(), and MAP_MultiSelectExecuteAction_f().
void MAP_SetOverlay | ( | const char * | overlayID | ) |
Switch overlay (turn on / off).
[in] | overlayID | Name of the overlay you want to switch. |
Definition at line 2673 of file cp_map.c.
References ccs, cvar_s::integer, MAP_IsNationOverlayActivated(), MAP_IsRadarOverlayActivated(), ccs_s::numBases, ccs_s::numInstallations, OVERLAY_NATION, OVERLAY_RADAR, OVERLAY_XVI, and RADAR_UpdateWholeRadarOverlay().
Referenced by B_BuildBase_f(), B_SelectBase(), CP_CheckNewMissionDetectedOnGeoscape(), INS_BuildInstallation_f(), INS_SelectInstallation(), MAP_DeactivateOverlay(), MAP_SetOverlay_f(), RADAR_DeactivateRadarOverlay(), and UFO_DetectNewUFO().
static void MAP_SetOverlay_f | ( | void | ) | [static] |
Console command to call MAP_SetOverlay.
Definition at line 2704 of file cp_map.c.
References Cmd_Argc(), Cmd_Argv(), Com_Printf(), MAP_IsRadarOverlayActivated(), MAP_SetOverlay(), and radarOverlayWasSet.
Referenced by MAP_InitStartup().
static void MAP_SmoothTranslate | ( | void | ) | [static] |
smooth translation of the 2D geoscape
Definition at line 1340 of file cp_map.c.
References ccs, ccs_s::center, qfalse, smoothFinal2DGeoscapeCenter, smoothFinalZoom, SMOOTHING_STEP_2D, smoothRotation, and ccs_s::zoom.
Referenced by MAP_DrawMap().
static void MAP_StartCenter | ( | void | ) | [static] |
Start center to the selected point.
Definition at line 1054 of file cp_map.c.
References ccs_s::angles, ccs, ccs_s::center, f, GLOBE_ROTATE, cvar_s::integer, qtrue, smoothDeltaLength, smoothDeltaZoom, smoothFinal2DGeoscapeCenter, smoothFinalGlobeAngle, smoothFinalZoom, smoothRotation, Vector2Set, VectorLength(), VectorSubtract, ccs_s::zoom, and ZOOM_LIMIT.
Referenced by MAP_CenterOnPoint_f(), and MAP_SelectObject_f().
void MAP_StopSmoothMovement | ( | void | ) |
stop smooth translation on geoscape
Definition at line 1327 of file cp_map.c.
References qfalse, and smoothRotation.
Referenced by UI_MapNodeMouseDown(), and UI_MapNodeZoom().
void MAP_UpdateGeoscapeDock | ( | void | ) |
Will add missions and UFOs to the geoscape dock panel.
Definition at line 1735 of file cp_map.c.
References ccs, linkedList_s::data, mission_s::idx, mission_s::location, MAP_GetMissionModel(), MAP_GetShortMissionText(), MAP_GetUFOText(), ccs_s::missions, aircraft_s::model, linkedList_s::next, ccs_s::numUFOs, mission_s::onGeoscape, UFO_IsUFOSeenOnGeoscape(), ccs_s::ufos, and UI_ExecuteConfunc().
Referenced by CP_MissionAddToGeoscape(), MAP_Init(), MAP_NotifyMissionRemoved(), MAP_NotifyUFODisappear(), MAP_NotifyUFORemoved(), RADAR_SetRadarAfterLoading(), and UFO_DetectNewUFO().
void MAP_Zoom_f | ( | void | ) |
Command binding for map zooming.
Definition at line 2546 of file cp_map.c.
References ccs_s::angles, ccs, ccs_s::center, Cmd_Argc(), Cmd_Argv(), Com_Printf(), cvar_s::integer, qtrue, smoothDeltaLength, smoothDeltaZoom, smoothFinalGlobeAngle, smoothFinalZoom, smoothRotation, cvar_s::value, VectorCopy, and ccs_s::zoom.
int centerOnEventIdx [static] |
Current Event centered on 3D geoscape
Definition at line 130 of file cp_map.c.
Referenced by MAP_CenterOnPoint_f(), and MAP_GetGeoscapeAngle().
3D geoscape or flat geoscape
Definition at line 46 of file cp_map.c.
Referenced by UI_MapNodeMouseDown(), and UI_MapNodeZoom().
cvar_t* cl_3dmapAmbient [static] |
Definition at line 50 of file cp_map.c.
Referenced by CP_CampaignExit(), CP_LoadXML(), and CP_SaveXML().
Definition at line 48 of file cp_map.c.
Referenced by UI_MapNodeCapturedMouseMove(), and UI_MapNodeZoom().
Definition at line 49 of file cp_map.c.
Referenced by UI_MapNodeCapturedMouseMove(), and UI_MapNodeZoom().
int cultureHeight [static] |
the width and height for the culture pic.
Definition at line 157 of file cp_map.c.
Referenced by MAP_GetColor(), and MAP_Init().
byte* culturePic [static] |
this is the mask for separating the culture zone and water by different color values
Definition at line 155 of file cp_map.c.
Referenced by MAP_GetColor(), and MAP_Init().
int cultureWidth [static] |
Definition at line 157 of file cp_map.c.
Referenced by MAP_GetColor(), and MAP_Init().
float curRotationSpeed = 0.0f [static] |
The current rotation speed. Used for smooth rotating.
Definition at line 146 of file cp_map.c.
Referenced by MAP3D_SmoothRotate().
float curZoomSpeed = 0.0f [static] |
The current zooming speed. Used for smooth zooming.
Definition at line 145 of file cp_map.c.
Referenced by MAP3D_SmoothRotate().
const float defaultBaseAngle = 90.0f [static] |
Default angle value for 3D models like bases
Definition at line 149 of file cp_map.c.
Referenced by MAP_DrawMapOneBase(), MAP_DrawMapOneInstallation(), and MAP_DrawMapOneMission().
const char* geoscapeImageNames[] [static] |
{ "pics/geoscape/mission", "pics/geoscape/circle", "pics/geoscape/circleactive", "pics/geoscape/base", "pics/geoscape/baseattack" }
Definition at line 72 of file cp_map.c.
Referenced by MAP_InitStartup().
image_t* geoscapeImages[GEOSCAPE_IMAGE_MAX] [static] |
Definition at line 81 of file cp_map.c.
Referenced by MAP_DrawMapMarkers(), MAP_DrawMapOneBase(), MAP_DrawMapOneMission(), MAP_DrawMapOnePhalanxAircraft(), and MAP_InitStartup().
Definition at line 133 of file cp_map.c.
Referenced by LoadTGA(), MAP_DrawAircraftHealthBar(), and TR_TransferAliensFromMission_f().
const float MIN_DIST_BASE = 4.0f [static] |
Minimum distance between a new mission and an existing base.
Definition at line 2431 of file cp_map.c.
Referenced by MAP_PositionCloseToBase().
multiSelect_t multiSelect [static] |
int nationsHeight [static] |
the width and height for the nation pic.
Definition at line 165 of file cp_map.c.
Referenced by MAP_GetColor(), and MAP_Init().
byte* nationsPic [static] |
this is the nation mask - separated by colors given in nations.ufo.
Definition at line 163 of file cp_map.c.
Referenced by MAP_GetColor(), and MAP_Init().
int nationsWidth [static] |
Definition at line 165 of file cp_map.c.
Referenced by MAP_GetColor(), and MAP_Init().
int populationHeight [static] |
the width and height for the population pic.
Definition at line 161 of file cp_map.c.
Referenced by MAP_GetColor(), and MAP_Init().
byte* populationPic [static] |
this is the mask for separating the population rate zone and water by different color values
Definition at line 159 of file cp_map.c.
Referenced by MAP_GetColor(), and MAP_Init().
int populationWidth [static] |
Definition at line 161 of file cp_map.c.
Referenced by MAP_GetColor(), and MAP_Init().
this is the mask that is used to display day/night on (2d-)geoscape
Definition at line 46 of file cp_overlay.c.
radar texture
Definition at line 47 of file cp_overlay.c.
XVI alpha mask texture
Definition at line 48 of file cp_overlay.c.
Definition at line 135 of file cp_map.c.
Referenced by LoadTGA(), MAP_DrawAircraftHealthBar(), MAP_DrawMapOneBase(), MAP_DrawMapOneInstallation(), MAP_DrawMapOnePhalanxAircraft(), TR_TransferAliensFromMission_f(), UI_RadarNodeDraw(), and UI_TodoNodeDraw().
const float smoothAcceleration = 0.06f [static] |
the acceleration to use during a smooth motion (This affects the speed of the smooth motion)
Definition at line 144 of file cp_map.c.
Referenced by MAP3D_SmoothRotate().
float smoothDeltaLength = 0.0f [static] |
angle/position difference that we need to change when smoothing
Definition at line 141 of file cp_map.c.
Referenced by MAP3D_SmoothRotate(), MAP_Scroll_f(), MAP_StartCenter(), and MAP_Zoom_f().
float smoothDeltaZoom = 0.0f [static] |
zoom difference that we need to change when smoothing
Definition at line 143 of file cp_map.c.
Referenced by MAP3D_SmoothRotate(), MAP_Scroll_f(), MAP_StartCenter(), and MAP_Zoom_f().
vec2_t smoothFinal2DGeoscapeCenter = {0.5, 0.5} [static] |
value of ccs.center for a smooth change of position (see MAP_CenterOnPoint)
Definition at line 140 of file cp_map.c.
Referenced by MAP_CenterOnPoint_f(), MAP_SelectObject_f(), MAP_SmoothTranslate(), and MAP_StartCenter().
vec3_t smoothFinalGlobeAngle = {0, GLOBE_ROTATE, 0} [static] |
value of finale ccs.angles for a smooth change of angle (see MAP_CenterOnPoint)
Definition at line 139 of file cp_map.c.
Referenced by MAP3D_SmoothRotate(), MAP_CenterOnPoint_f(), MAP_Scroll_f(), MAP_SelectObject_f(), MAP_StartCenter(), and MAP_Zoom_f().
float smoothFinalZoom = 0.0f [static] |
value of finale ccs.zoom for a smooth change of angle (see MAP_CenterOnPoint)
Definition at line 142 of file cp_map.c.
Referenced by MAP3D_SmoothRotate(), MAP_Scroll_f(), MAP_SmoothTranslate(), MAP_StartCenter(), and MAP_Zoom_f().
qboolean smoothRotation = qfalse [static] |
qtrue if the rotation of 3D geoscape must me smooth
Definition at line 138 of file cp_map.c.
Referenced by MAP3D_SmoothRotate(), MAP_DrawMap(), MAP_Scroll_f(), MAP_SmoothTranslate(), MAP_StartCenter(), MAP_StopSmoothMovement(), and MAP_Zoom_f().
const float STANDARD_3D_ZOOM = 40.0f |
Typical zoom to use in 3D geoscape to use same zoom values for both 2D and 3D geoscape.
Definition at line 433 of file cp_map.c.
Referenced by R_Draw3DGlobe().
int terrainHeight [static] |
the width and height for the terrain pic.
Definition at line 153 of file cp_map.c.
Referenced by MAP_GetColor(), and MAP_Init().
byte* terrainPic [static] |
this is the terrain mask for separating the clima zone and water by different color values
Definition at line 151 of file cp_map.c.
Referenced by MAP_GetColor(), and MAP_Init().
int terrainWidth [static] |
Definition at line 153 of file cp_map.c.
Referenced by MAP_GetColor(), and MAP_Init().
char textStandard[2048] [static] |
Buffer to display standard text in geoscape
Definition at line 129 of file cp_map.c.
Referenced by MAP_DrawMap().
Definition at line 134 of file cp_map.c.
Referenced by MAP_DrawAircraftHealthBar(), MAP_DrawBullets(), MAP_DrawMapMarkers(), MAP_DrawMapOneMission(), MAP_DrawMapOnePhalanxAircraft(), and TR_TransferAliensFromMission_f().