|
UFO: Alien Invasion
|
Geoscape/Map management. More...
#include "../../DateTime.h"#include "../../cl_shared.h"#include "../../ui/ui_dataids.h"#include "../../ui/node/ui_node_geoscape.h"#include "cp_overlay.h"#include "cp_campaign.h"#include "cp_geoscape.h"#include "cp_popup.h"#include "cp_mapfightequip.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.
Macros | |
| #define | GLOBE_ROTATE -90 |
| #define | ZOOM_LIMIT 2.5f |
| #define | UI_MAP_DIST_SELECTION 15 |
| maximum distance (in pixel) to get a valid mouse click | |
| #define | CIRCLE_DRAW_POINTS 60 |
| #define | BULLET_SIZE 1 |
| #define | SELECT_CIRCLE_RADIUS 1.5f + 3.0f / UI_MAPEXTRADATACONST(node).zoom |
Functions | |
| static bool | GEO_IsPositionSelected (const uiNode_t *node, const vec2_t pos, int x, int y) |
| Tell if the specified position is considered clicked. | |
| bool | GEO_IsRadarOverlayActivated (void) |
| static bool | GEO_IsNationOverlayActivated (void) |
| static bool | GEO_IsXVIOverlayActivated (void) |
| bool | GEO_Click (const uiNode_t *node, int x, int y, const vec2_t pos) |
| Click on the map/geoscape. | |
| static bool | GEO_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. | |
| static bool | GEO_MapToScreen (const uiNode_t *node, const vec2_t pos, int *x, int *y) |
| Transform a 2D position on the map to screen coordinates. | |
| static bool | GEO_AllMapToScreen (const uiNode_t *node, const vec2_t pos, int *x, int *y, int *z) |
| Call either GEO_MapToScreen or GEO_3DMapToScreen depending on the geoscape you're using. | |
| static void | GEO_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 | GEO_CalcLine (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 | GEO_MapDrawLine (const uiNode_t *node, const mapline_t *line) |
| Draw a path on a menu node (usually the 2D geoscape map). | |
| static void | GEO_3DMapDrawLine (const uiNode_t *node, const mapline_t *line) |
| Draw a path on a menu node (usually the 3Dgeoscape map). | |
| static void | GEO_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 | GEO_AngleOfPath3D (const vec2_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 | GEO_AngleOfPath2D (const vec2_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 | GEO_AngleOfPath (const vec2_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 | GEO_ConvertObjectPositionToGeoscapePosition (bool flatgeoscape, float *vector, const vec2_t objectPos) |
| Will set the vector for the geoscape position. | |
| static void | GEO_GetMissionAngle (bool flatgeoscape, float *vector, int id) |
| center to a mission | |
| static void | GEO_GetUFOAngle (bool flatgeoscape, float *vector, int idx) |
| center to a ufo | |
| static void | GEO_StartCenter (uiNode_t *node) |
| Start center to the selected point. | |
| void | GEO_CenterPosition (const vec2_t pos) |
| Start to rotate or shift the globe to the given position. | |
| static void | GEO_SelectObject_f (void) |
| Center the view and select an object from the geoscape. | |
| static void | GEO_GetGeoscapeAngle (vec2_t pos) |
| Returns position of the model corresponding to centerOnEventIdx. | |
| void | GEO_CenterOnPoint_f (void) |
| Switch to next model on 2D and 3D geoscape. | |
| static void | GEO_DrawBullets (const uiNode_t *node, const vec3_t pos) |
| Draws a bunch of bullets on the geoscape map. | |
| static void | GEO_DrawBeam (const uiNode_t *node, const vec3_t start, const vec3_t end, const vec4_t color) |
| Draws a energy beam on the geoscape map (laser/particle). | |
| static void | GEO_RenderImage (int x, int y, const char *image) |
| static void | GEO_DrawMapOneMission (const uiNode_t *node, const mission_t *mission) |
| Draws one mission on the geoscape map (2D and 3D). | |
| static void | GEO_DrawRadarLineCoverage (const uiNode_t *node, const radar_t *radar, const vec2_t pos) |
| Draw only the "wire" Radar coverage. | |
| static void | GEO_DrawRadarInMap (const uiNode_t *node, const radar_t *radar, const vec2_t pos) |
| Draw only the "wire" part of the radar coverage in geoscape. | |
| static void | GEO_DrawMapOneInstallation (const uiNode_t *node, const installation_t *installation, bool oneUFOVisible, const char *font) |
| Draws one installation on the geoscape map (2D and 3D). | |
| static void | GEO_DrawMapOneBase (const uiNode_t *node, const base_t *base, bool oneUFOVisible, const char *font) |
| Draws one base on the geoscape map (2D and 3D). | |
| static void | GEO_DrawAircraftHealthBar (const uiNode_t *node, const aircraft_t *aircraft) |
| Draws health bar for an aircraft (either phalanx or ufo). | |
| static void | GEO_DrawMapOnePhalanxAircraft (const uiNode_t *node, aircraft_t *aircraft, bool oneUFOVisible) |
| Draws one Phalanx aircraft on the geoscape map (2D and 3D). | |
| static const char * | GEO_GetMissionText (char *buffer, size_t size, const mission_t *mission) |
| Assembles a string for a mission that is on the geoscape. | |
| static const char * | GEO_GetAircraftText (char *buffer, size_t size, const aircraft_t *aircraft) |
| Assembles a string for an aircraft that is on the geoscape. | |
| static const char * | GEO_GetUFOText (char *buffer, size_t size, const aircraft_t *ufo) |
| Assembles a string for a UFO that is on the geoscape. | |
| void | GEO_UpdateGeoscapeDock (void) |
| Will add missions and UFOs to the geoscape dock panel. | |
| void | GEO_DrawMarkers (const uiNode_t *node) |
| Draws all ufos, aircraft, bases and so on to the geoscape map (2D and 3D). | |
| void | GEO_Draw (geoscapeData_t *data) |
| Draw the geoscape. | |
| void | GEO_ResetAction (void) |
| No more special action on the geoscape. | |
| void | GEO_SelectUFO (aircraft_t *ufo) |
| Select the specified ufo on the geoscape. | |
| void | GEO_SelectAircraft (aircraft_t *aircraft) |
| Select the specified aircraft on the geoscape. | |
| mission_t * | GEO_SelectMission (mission_t *mission) |
| Select the specified mission. | |
| void | GEO_NotifyMissionRemoved (const mission_t *mission) |
| Notify that a mission has been removed. | |
| void | GEO_NotifyUFORemoved (const aircraft_t *ufo, bool destroyed) |
| Notify that a UFO has been removed. | |
| void | GEO_NotifyAircraftRemoved (const aircraft_t *aircraft) |
| Notify that an aircraft has been removed from game. | |
| nation_t * | GEO_GetNation (const vec2_t pos) |
| Translate nation map color to nation. | |
| static const char * | GEO_GetCultureType (const byte *color) |
| Translate color value to culture type. | |
| static const char * | GEO_GetPopulationType (const byte *color) |
| Translate color value to population type. | |
| static const char * | GEO_GetTerrainTypeByPos (const vec2_t pos, bool *coast) |
| Determine the terrain type under a given position. | |
| static const char * | GEO_GetCultureTypeByPos (const vec2_t pos) |
| Determine the culture type under a given position. | |
| static const char * | GEO_GetPopulationTypeByPos (const vec2_t pos) |
| Determine the population type under a given position. | |
| int | GEO_GetCivilianNumberByPosition (const vec2_t pos) |
| Get number of civilian on a map at given position. | |
| void | GEO_PrintParameterStringByPos (const vec2_t pos) |
| Prints positions parameter in console. | |
| void | GEO_CheckPositionBoundaries (float *pos) |
| Check that a position (in latitude / longitude) is within boundaries. | |
| bool | GEO_IsNight (const vec2_t pos) |
| Check whether given position is Day or Night. | |
| const byte * | GEO_GetColor (const vec2_t pos, mapType_t type, bool *coast) |
| Returns the color value from geoscape of a certain mask (terrain, culture or population) at a given position. | |
| base_t * | GEO_PositionCloseToBase (const vec2_t pos) |
| Check if given pos is close to an existing base. | |
| bool | GEO_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 | CP_GetRandomPosOnGeoscape (vec2_t pos, bool noWater) |
| Determines a random position on geoscape. | |
| bool | CP_GetRandomPosOnGeoscapeWithParameters (vec2_t pos, const linkedList_t *terrainTypes, const linkedList_t *cultureTypes, const linkedList_t *populationTypes, const linkedList_t *nations) |
| Determines a random position on geoscape that fulfills certain criteria given via parameters. | |
| void | GEO_Shutdown (void) |
| void | GEO_Init (const char *map) |
| void | GEO_Reset (const char *map) |
| void | GEO_NotifyUFODisappear (const aircraft_t *ufo) |
| Notify that a UFO disappears on radars. | |
| void | GEO_SetOverlay (const char *overlayID, int status) |
| Turn overlay on/off. | |
| static void | GEO_SetOverlay_f (void) |
| Console command to call GEO_SetOverlay. | |
| void | GEO_InitStartup (void) |
| Initialise MAP/Geoscape. | |
Variables | |
| static uiNode_t * | geoscapeNode |
| 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 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 |
| 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_geoscape.cpp.
| #define BULLET_SIZE 1 |
Definition at line 988 of file cp_geoscape.cpp.
Referenced by GEO_DrawBullets().
| #define CIRCLE_DRAW_POINTS 60 |
Definition at line 531 of file cp_geoscape.cpp.
Referenced by GEO_MapDrawEquidistantPoints().
| #define GLOBE_ROTATE -90 |
Definition at line 45 of file cp_geoscape.cpp.
Referenced by GEO_StartCenter(), and uiGeoscapeNode::onLoading().
| #define SELECT_CIRCLE_RADIUS 1.5f + 3.0f / UI_MAPEXTRADATACONST(node).zoom |
Definition at line 1030 of file cp_geoscape.cpp.
Referenced by GEO_DrawMapOneMission(), GEO_DrawMapOnePhalanxAircraft(), and GEO_DrawMarkers().
| #define UI_MAP_DIST_SELECTION 15 |
maximum distance (in pixel) to get a valid mouse click
Definition at line 325 of file cp_geoscape.cpp.
Referenced by GEO_IsPositionSelected().
| #define ZOOM_LIMIT 2.5f |
Definition at line 46 of file cp_geoscape.cpp.
Referenced by GEO_StartCenter().
Determines a random position on geoscape.
| [out] | pos | The position that will be overwritten. pos[0] is within -180, +180. pos[1] within -90, +90. |
| [in] | noWater | True if the position should not be on water |
Definition at line 2085 of file cp_geoscape.cpp.
References cgi, DEBUG_CLIENT, frand(), GEO_GetColor(), MapIsWater, MAPTYPE_TERRAIN, and todeg.
Referenced by AB_SetAlienBasePosition(), CP_AttackUFOCarrier_f(), UFO_SetRandomDest(), and UFO_SetRandomPos().
| bool CP_GetRandomPosOnGeoscapeWithParameters | ( | vec2_t | pos, |
| const linkedList_t * | terrainTypes, | ||
| const linkedList_t * | cultureTypes, | ||
| const linkedList_t * | populationTypes, | ||
| const linkedList_t * | nations ) |
Determines a random position on geoscape that fulfills certain criteria given via parameters.
| [out] | pos | The position that will be overwritten with the random point fulfilling the criteria. pos[0] is within -180, +180. pos[1] within -90, +90. |
| [in] | terrainTypes | A linkedList_t containing a list of strings determining the acceptable terrain types (e.g. "grass") May be nullptr. |
| [in] | cultureTypes | A linkedList_t containing a list of strings determining the acceptable culture types (e.g. "western") May be nullptr. |
| [in] | populationTypes | A linkedList_t containing a list of strings determining the acceptable population types (e.g. "suburban") May be nullptr. |
| [in] | nations | A linkedList_t containing a list of strings determining the acceptable nations (e.g. "asia"). May be nullptr |
Definition at line 2109 of file cp_geoscape.cpp.
References cgi, DEBUG_CLIENT, frand(), GEO_PositionFitsTCPNTypes(), RASTER, todeg, and Vector2Set.
Referenced by CP_HarvestMissionGo(), CP_ReconMissionGroundGo(), and TEST_F().
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 508 of file cp_geoscape.cpp.
References cgi, GEO_3DMapToScreen(), i, LINE_MAXPTS, mapline_t::numPoints, mapline_t::point, screenPoint_t::x, and screenPoint_t::y.
Referenced by GEO_DrawMapOnePhalanxAircraft(), and GEO_DrawMarkers().
|
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 nullptr if not needed |
Definition at line 229 of file cp_geoscape.cpp.
References data, GLOBE_RADIUS, int(), PITCH, PolarToVec(), RotatePointAroundVector(), UI_MAPEXTRADATACONST, v, Vector2Set, VectorSet, and YAW.
Referenced by GEO_3DMapDrawLine(), GEO_AllMapToScreen(), and GEO_DrawAircraftHealthBar().
|
static |
Call either GEO_MapToScreen or GEO_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 nullptr if not needed) |
Definition at line 310 of file cp_geoscape.cpp.
References data, GEO_3DMapToScreen(), GEO_MapToScreen(), and UI_MAPEXTRADATACONST.
Referenced by GEO_Draw3DMarkerIfVisible(), GEO_DrawAircraftHealthBar(), GEO_DrawBeam(), GEO_DrawBullets(), GEO_DrawMapOneBase(), GEO_DrawMapOneInstallation(), GEO_DrawMapOneMission(), GEO_DrawMapOnePhalanxAircraft(), GEO_DrawMarkers(), GEO_DrawRadarInMap(), GEO_IsPositionSelected(), and GEO_MapDrawEquidistantPoints().
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 (nullptr if the model is idle). |
| [out] | ortVector | If not nullptr, 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 717 of file cp_geoscape.cpp.
References data, GEO_AngleOfPath2D(), GEO_AngleOfPath3D(), geoscapeNode, and UI_MAPEXTRADATA.
Referenced by AIRFIGHT_GetNextPointInPath(), GEO_DrawMapOnePhalanxAircraft(), and GEO_DrawMarkers().
|
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 (nullptr if the model is idle). |
| [out] | ortVector | If not nullptr, 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 661 of file cp_geoscape.cpp.
References CrossProduct(), PolarToVec(), RotatePointAroundVector(), todeg, v, VectorCopy, VectorLength(), VectorNormalize(), VectorSet, and VectorSubtract.
Referenced by GEO_AngleOfPath().
|
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 (nullptr if the model is idle). |
| [out] | ortVector | If not nullptr, 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 the 'up' side is)
Definition at line 601 of file cp_geoscape.cpp.
References CrossProduct(), DotProduct, PolarToVec(), RotatePointAroundVector(), todeg, v, VectorCopy, VectorLength(), VectorNormalize(), and VectorSubtract.
Referenced by GEO_AngleOfPath().
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 372 of file cp_geoscape.cpp.
References CrossProduct(), mapline_t::distance, i, LINE_MAXPTS, LINE_MAXSEG, M_PI, mapline_t::numPoints, mapline_t::point, PolarToVec(), todeg, torad, v, VecToPolar(), Vector2Set, VectorEqual, VectorNormalize(), and VectorSet.
Referenced by AIR_AircraftReturnToBase(), AIR_SendAircraftPursuingUFO(), AIR_SendAircraftToMission(), GEO_Click(), UFO_SearchAircraftTarget(), UFO_SendPursuingAircraft(), and UFO_SendToDestination().
Switch to next model on 2D and 3D geoscape.
smoothRotation to true to allow a smooth rotation in GEO_Draw. Definition at line 972 of file cp_geoscape.cpp.
References centerOnEventIdx, cgi, GEO_CenterPosition(), GEO_GetGeoscapeAngle(), geoscapeNode, and Q_streq.
Start to rotate or shift the globe to the given position.
| [in] | pos | Longitude and latitude of the position to center on |
Definition at line 811 of file cp_geoscape.cpp.
References data, GEO_ConvertObjectPositionToGeoscapePosition(), GEO_StartCenter(), geoscapeNode, and UI_MAPEXTRADATA.
Referenced by CP_SpawnUFOCarrier_f(), and GEO_CenterOnPoint_f().
| void GEO_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 1891 of file cp_geoscape.cpp.
Referenced by AIR_AircraftMakeMove(), AIR_Move(), and UFO_CampaignRunUFOs().
Click on the map/geoscape.
| [in] | node | UI Node of the geoscape map |
| [in] | x,y | Mouse click coordinates |
| [in] | pos | Geoscape (longitude, latitude) coordinate of the click |
Definition at line 107 of file cp_geoscape.cpp.
References AIR_AircraftHasEnoughFuel(), AIR_Foreach, AIR_IsAircraftOnGeoscape(), AIR_TRANSIT, aircraft_t::aircraftTarget, B_GetCount(), B_GetNext(), ccs, cgi, CP_GameTimeStop(), GEO_CalcLine(), GEO_GetColor(), GEO_GetSelectedAircraft, GEO_IsPositionSelected(), GEO_ResetAction(), base_t::idx, INS_Foreach, MA_NEWBASE, MA_NEWINSTALLATION, MapIsWater, MAPTYPE_TERRAIN, MAX_BASES, MIS_Foreach, MIS_GetIdx(), MIS_GetName(), base_t::name, aircraft_t::point, aircraft_t::pos, base_t::pos, aircraft_t::route, STAGE_NOT_ACTIVE, aircraft_t::status, aircraft_t::time, UFO_GetGeoscapeIDX, UFO_GetName(), UFO_GetNextOnGeoscape(), and Vector2Copy.
Referenced by GetCGameAPI().
|
static |
Will set the vector for the geoscape position.
| [in] | flatgeoscape | True for 2D geoscape |
| [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 735 of file cp_geoscape.cpp.
References Vector2Set, and VectorSet.
Referenced by GEO_CenterPosition(), GEO_GetMissionAngle(), and GEO_GetUFOAngle().
| void GEO_Draw | ( | geoscapeData_t * | data | ) |
Draw the geoscape.
| [in] | data | Geoscape status data structure |
Definition at line 1589 of file cp_geoscape.cpp.
References _, AIR_IsAircraftInBase(), ccs, cgi, Com_sprintf(), CP_IsRunning(), data, GEO_GetAircraftText(), GEO_GetMissionText(), GEO_GetSelectedAircraft, GEO_GetSelectedMission, GEO_GetSelectedUFO, GEO_GetUFOText(), GEO_IsNationOverlayActivated(), GEO_IsRadarOverlayActivated(), GEO_IsXVIOverlayActivated(), GEO_ResetAction(), geoscapeNode, cvar_t::integer, lengthof, MA_NEWBASE, MA_NEWINSTALLATION, MA_NONE, TEXT_STANDARD, and textStandard.
Referenced by GetCGameAPI().
|
static |
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 349 of file cp_geoscape.cpp.
References cgi, data, GEO_AllMapToScreen(), GLOBE_RADIUS, UI_MAPEXTRADATACONST, and VectorSet.
Referenced by GEO_DrawMapOneBase(), GEO_DrawMapOneInstallation(), GEO_DrawMapOneMission(), GEO_DrawMapOnePhalanxAircraft(), and GEO_DrawMarkers().
|
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 1225 of file cp_geoscape.cpp.
References AIR_STATS_DAMAGE, cgi, aircraft_t::damage, data, GEO_3DMapToScreen(), GEO_AllMapToScreen(), green, aircraft_t::pos, red, aircraft_t::stats, UI_MAPEXTRADATACONST, Vector4Copy, and yellow.
Referenced by GEO_DrawMapOnePhalanxAircraft(), and GEO_DrawMarkers().
|
static |
Draws a 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 1011 of file cp_geoscape.cpp.
References cgi, and GEO_AllMapToScreen().
Referenced by GEO_DrawMarkers().
Draws a 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 995 of file cp_geoscape.cpp.
References BULLET_SIZE, cgi, GEO_AllMapToScreen(), and yellow.
Referenced by GEO_DrawMarkers().
|
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 1173 of file cp_geoscape.cpp.
References AII_BaseCanShoot(), AIR_STATS_WRANGE, ALIGN_UL, aircraftSlot_t::ammo, aircraftSlot_t::ammoLeft, B_IsUnderAttack, base_t::batteries, cgi, objDef_t::craftitem, defaultBaseAngle, GEO_AllMapToScreen(), GEO_Draw3DMarkerIfVisible(), GEO_DrawRadarInMap(), GEO_IsRadarOverlayActivated(), GEO_MapDrawEquidistantPoints(), GEO_MapToScreen(), GEO_RenderImage(), i, aircraftSlot_t::installationTime, aircraftSlot_t::item, base_t::lasers, base_t::name, base_t::numBatteries, base_t::numLasers, base_t::pos, base_t::radar, red, baseWeapon_t::slot, craftItem::stats, and UI_MAPEXTRADATACONST.
Referenced by GEO_DrawMarkers().
|
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 1133 of file cp_geoscape.cpp.
References AII_InstallationCanShoot(), AIR_STATS_WRANGE, ALIGN_UL, aircraftSlot_t::ammo, aircraftSlot_t::ammoLeft, installation_t::batteries, cgi, objDef_t::craftitem, defaultBaseAngle, GEO_AllMapToScreen(), GEO_Draw3DMarkerIfVisible(), GEO_DrawRadarInMap(), GEO_IsRadarOverlayActivated(), GEO_MapDrawEquidistantPoints(), GEO_MapToScreen(), GEO_RenderImage(), i, installationTemplate_t::image, installation_t::installationTemplate, aircraftSlot_t::installationTime, aircraftSlot_t::item, installationTemplate_t::maxBatteries, installationTemplate_t::model, installation_t::name, installation_t::pos, installation_t::radar, red, baseWeapon_t::slot, craftItem::stats, and UI_MAPEXTRADATACONST.
Referenced by GEO_DrawMarkers().
Draws one mission on the geoscape map (2D and 3D).
| [in] | node | The menu node which will be used for drawing markers. |
| [in] | mission | Pointer to the mission to draw. |
Definition at line 1037 of file cp_geoscape.cpp.
References _, mission_t::active, ALIGN_UL, cgi, data, defaultBaseAngle, GEO_AllMapToScreen(), GEO_Draw3DMarkerIfVisible(), GEO_IsMissionSelected, GEO_IsNight(), GEO_MapDrawEquidistantPoints(), GEO_RenderImage(), MIS_GetModel(), MIS_GetName(), mission_t::pos, SELECT_CIRCLE_RADIUS, UI_MAPEXTRADATACONST, and yellow.
Referenced by GEO_DrawMarkers().
|
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 1266 of file cp_geoscape.cpp.
References AIR_STATS_WRANGE, AIR_TRANSIT, AIR_UFO, aircraft_t::aircraftTarget, cgi, data, aircraft_t::direction, GEO_3DMapDrawLine(), GEO_AllMapToScreen(), GEO_AngleOfPath(), GEO_Draw3DMarkerIfVisible(), GEO_DrawAircraftHealthBar(), GEO_DrawRadarInMap(), GEO_IsAircraftSelected, GEO_IsRadarOverlayActivated(), GEO_MapDrawEquidistantPoints(), GEO_MapDrawLine(), GEO_RenderImage(), aircraft_t::model, mapline_t::numPoints, aircraft_t::point, mapline_t::point, aircraft_t::pos, aircraft_t::radar, red, aircraft_t::route, SELECT_CIRCLE_RADIUS, aircraft_t::stats, aircraft_t::status, UI_MAPEXTRADATACONST, and yellow.
Referenced by GEO_DrawMarkers().
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 1432 of file cp_geoscape.cpp.
References _, aircraftProjectile_t::aimedAircraft, AIR_Foreach, AIR_IsAircraftOnGeoscape(), aircraftProjectile_t::aircraftItem, ALIGN_UC, aircraftProjectile_t::angle, aircraftProjectile_t::attackerPos, aircraftProjectile_t::attackingAircraft, B_GetNext(), aircraftProjectile_t::beam, craftItem::beamColor, aircraftProjectile_t::bullets, ccs, cgi, uiNode_t::color, CP_IsXVIVisible(), objDef_t::craftitem, data, aircraft_t::direction, GEO_3DMapDrawLine(), GEO_AllMapToScreen(), GEO_AngleOfPath(), GEO_Draw3DMarkerIfVisible(), GEO_DrawAircraftHealthBar(), GEO_DrawBeam(), GEO_DrawBullets(), GEO_DrawMapOneBase(), GEO_DrawMapOneInstallation(), GEO_DrawMapOneMission(), GEO_DrawMapOnePhalanxAircraft(), GEO_IsUFOSelected, GEO_MapDrawEquidistantPoints(), GEO_MapDrawLine(), GEO_RenderImage(), aircraftProjectile_t::hasMoved, i, aircraftProjectile_t::idleTarget, INS_Foreach, LinearInterpolation, MIS_Foreach, aircraft_t::model, objDef_t::model, NAT_Foreach, NAT_GetCurrentMonthInfo(), aircraftProjectile_t::numInterpolationPoints, mapline_t::numPoints, mapline_t::point, aircraft_t::pos, aircraftProjectile_t::pos, aircraftProjectile_t::projectedPos, Q_strcat(), aircraft_t::route, RS_IsResearched_ptr(), SELECT_CIRCLE_RADIUS, aircraft_t::tech, TEXT_XVI, UFO_GetNextOnGeoscape(), UI_MAPEXTRADATACONST, VectorCopy, nationInfo_t::xviInfection, and yellow.
Referenced by GetCGameAPI().
Draw only the "wire" part of the radar coverage in geoscape.
| [in] | node | The menu node where radar coverage will be drawn. |
| [in] | radar | Pointer to the radar that will be drawn. |
| [in] | pos | Position of the radar. |
Definition at line 1092 of file cp_geoscape.cpp.
References cgi, GEO_AllMapToScreen(), GEO_DrawRadarLineCoverage(), i, aircraft_t::pos, radar, UFO_IsUFOSeenOnGeoscape(), screenPoint_t::x, and screenPoint_t::y.
Referenced by GEO_DrawMapOneBase(), GEO_DrawMapOneInstallation(), and GEO_DrawMapOnePhalanxAircraft().
|
static |
Draw only the "wire" Radar coverage.
| [in] | node | The menu node where radar coverage will be drawn. |
| [in] | radar | Pointer to the radar that will be drawn. |
| [in] | pos | Position of the radar. |
Definition at line 1079 of file cp_geoscape.cpp.
References GEO_MapDrawEquidistantPoints(), and radar.
Referenced by GEO_DrawRadarInMap().
|
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 1351 of file cp_geoscape.cpp.
References _, AIR_AircraftMenuStatsValues(), AIR_AircraftStatusToName(), AIR_GetTeamSize(), AIR_IDLE, AIR_STATS_DAMAGE, AIR_STATS_FUELSIZE, AIR_STATS_SPEED, AIR_UFO, aircraft_t::aircraftTarget, Com_sprintf(), CP_SecondConvert(), aircraft_t::damage, aircraft_t::fuel, GetDistanceOnGlobe(), aircraft_t::maxTeamSize, aircraft_t::name, mapline_t::numPoints, mapline_t::point, aircraft_t::pos, Q_strcat(), aircraft_t::route, DateTime::SECONDS_PER_HOUR, aircraft_t::stats, and aircraft_t::status.
Referenced by GEO_Draw().
Get number of civilian on a map at given position.
| [in] | pos | Position where the mission takes place. |
Definition at line 1849 of file cp_geoscape.cpp.
References cgi, ERR_DROP, GEO_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 climatezone (bases made use of this - there are grass, ice and desert base tiles available) and one for the nations |
| [out] | coast | The function will set this to true if the given position is a coast line. This can be nullptr if you are not interested in this fact. |
Definition at line 1935 of file cp_geoscape.cpp.
References cgi, cultureHeight, culturePic, cultureWidth, ERR_DROP, MapIsWater, MAPTYPE_CULTURE, MAPTYPE_NATIONS, MAPTYPE_POPULATION, MAPTYPE_TERRAIN, nationsHeight, nationsPic, nationsWidth, populationHeight, populationPic, populationWidth, terrainHeight, terrainPic, terrainWidth, and type.
Referenced by AIR_PilotSurvivedCrash(), AIRFIGHT_ActionsAfterAirfight(), B_MoveAircraftOnGeoscapeToOtherBases(), CP_ChooseMap(), CP_CreateBattleParameters(), CP_GetRandomPosOnGeoscape(), CP_SpawnUFOCarrier_f(), CP_UpdateNationXVIInfection(), GEO_Click(), GEO_GetCivilianNumberByPosition(), GEO_GetCultureTypeByPos(), GEO_GetNation(), GEO_GetPopulationTypeByPos(), GEO_GetTerrainTypeByPos(), GEO_PositionFitsTCPNTypes(), NAT_ScriptSanityCheck(), and TEST_F().
|
static |
Translate color value to culture type.
| [in] | color | the color value from the culture mask |
Definition at line 1769 of file cp_geoscape.cpp.
References MapIsAfrican, MapIsEastern, MapIsOriental, MapIsWater, and MapIsWestern.
Referenced by GEO_GetCultureTypeByPos().
|
inlinestatic |
Determine the culture type under a given position.
| [in] | pos | Map Coordinates to get the culture type from |
Definition at line 1825 of file cp_geoscape.cpp.
References GEO_GetColor(), GEO_GetCultureType(), and MAPTYPE_CULTURE.
Referenced by GEO_PositionFitsTCPNTypes(), and GEO_PrintParameterStringByPos().
Returns position of the model corresponding to centerOnEventIdx.
| [out] | pos | the position of the object |
Definition at line 868 of file cp_geoscape.cpp.
References AIR_Foreach, AIR_ForeachFromBase, AIR_IsAircraftOnGeoscape(), B_GetCount(), B_GetNext(), centerOnEventIdx, CP_CountMissionOnGeoscape(), GEO_SelectAircraft(), GEO_SelectMission(), GEO_SelectUFO(), INS_Foreach, INS_GetCount(), MIS_Foreach, aircraft_t::pos, base_t::pos, UFO_GetNextOnGeoscape(), vec2_origin, and Vector2Copy.
Referenced by GEO_CenterOnPoint_f().
center to a mission
Definition at line 746 of file cp_geoscape.cpp.
References GEO_ConvertObjectPositionToGeoscapePosition(), GEO_SelectMission(), MIS_GetByIdx(), and mission_t::pos.
Referenced by GEO_SelectObject_f().
|
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 1336 of file cp_geoscape.cpp.
References _, Com_sprintf(), mapDef_t::description, mission_t::mapDef, and MIS_GetName().
Referenced by GEO_Draw().
Translate nation map color to nation.
| [in] | pos | Map Coordinates to get the nation from |
Definition at line 1745 of file cp_geoscape.cpp.
References cgi, DEBUG_CLIENT, GEO_GetColor(), MAPTYPE_NATIONS, NAT_Foreach, and VectorEqualEpsilon.
Referenced by AB_BaseSearchedByNations(), B_BuildBase_f(), CP_BuildBaseGovernmentLeave(), CP_ChangeNationHappiness_f(), CP_CreateCivilianTeam(), CP_MissionGetMessage(), CP_UpdateNationXVIInfection(), GEO_PositionFitsTCPNTypes(), INS_BuildInstallation_f(), INS_FillUFOYardData_f(), MIS_GetName(), NAT_UpdateHappinessForAllNations(), and US_FillUFOTransfer_f().
|
static |
Translate color value to population type.
| [in] | color | the color value from the population mask |
Definition at line 1791 of file cp_geoscape.cpp.
References MapIsRural, MapIsSuburban, MapIsUrban, MapIsVillage, and MapIsWater.
Referenced by GEO_GetPopulationTypeByPos().
|
inlinestatic |
Determine the population type under a given position.
| [in] | pos | Map Coordinates to get the population type from |
Definition at line 1837 of file cp_geoscape.cpp.
References GEO_GetColor(), GEO_GetPopulationType(), and MAPTYPE_POPULATION.
Referenced by GEO_PositionFitsTCPNTypes(), and GEO_PrintParameterStringByPos().
|
inlinestatic |
Determine the terrain type under a given position.
| [in] | pos | Map Coordinates to get the terrain type from |
| [out] | coast | GEO_GetColor will set this to true if the given position is a coast line. |
Definition at line 1813 of file cp_geoscape.cpp.
References cgi, GEO_GetColor(), and MAPTYPE_TERRAIN.
Referenced by GEO_PositionFitsTCPNTypes(), and GEO_PrintParameterStringByPos().
center to a ufo
Definition at line 758 of file cp_geoscape.cpp.
References GEO_ConvertObjectPositionToGeoscapePosition(), GEO_SelectUFO(), aircraft_t::idx, aircraft_t::pos, and UFO_GetNextOnGeoscape().
Referenced by GEO_SelectObject_f().
|
static |
Assembles a string for a 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 1388 of file cp_geoscape.cpp.
References _, AIR_AircraftMenuStatsValues(), AIR_STATS_SPEED, Com_sprintf(), Q_strcat(), aircraft_t::stats, and UFO_GetName().
Referenced by GEO_Draw(), and GEO_UpdateGeoscapeDock().
| void GEO_Init | ( | const char * | map | ) |
Definition at line 2202 of file cp_geoscape.cpp.
References cgi, cultureHeight, culturePic, cultureWidth, ERR_DROP, nationsHeight, nationsPic, nationsWidth, populationHeight, populationPic, populationWidth, terrainHeight, terrainPic, terrainWidth, and va().
Referenced by GEO_Reset(), and CampaignTest::SetUp().
Initialise MAP/Geoscape.
Definition at line 2294 of file cp_geoscape.cpp.
References cgi, CVAR_DEVELOPER, GEO_ResetAction(), GEO_SelectObject_f(), and GEO_SetOverlay_f().
Referenced by CP_InitStartup().
|
inlinestatic |
| bool GEO_IsNight | ( | const vec2_t | pos | ) |
Check whether given position is Day or Night.
| [in] | pos | Given position. |
Definition at line 1908 of file cp_geoscape.cpp.
References ccs, COS_ALPHA, DateTime::DAYS_PER_YEAR_AVG, M_PI, DateTime::SECONDS_PER_DAY, SIN_ALPHA, and torad.
Referenced by B_AssembleMap_f(), BATTLE_Start(), and GEO_DrawMapOneMission().
Tell if the specified position is considered clicked.
Definition at line 329 of file cp_geoscape.cpp.
References GEO_AllMapToScreen(), and UI_MAP_DIST_SELECTION.
Referenced by GEO_Click().
| bool GEO_IsRadarOverlayActivated | ( | void | ) |
Definition at line 85 of file cp_geoscape.cpp.
References cgi.
Referenced by AIR_CampaignRun(), B_BuildBase_f(), B_SelectBase(), GEO_Draw(), GEO_DrawMapOneBase(), GEO_DrawMapOneInstallation(), GEO_DrawMapOnePhalanxAircraft(), GEO_SetOverlay(), GEO_SetOverlay_f(), INS_BuildInstallation_f(), INS_SelectType_f(), RADAR_DeactivateRadarOverlay(), and UFO_DetectNewUFO().
|
inlinestatic |
|
static |
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 541 of file cp_geoscape.cpp.
References cgi, CIRCLE_DRAW_POINTS, data, GEO_AllMapToScreen(), i, PerpendicularVector(), PolarToVec(), RotatePointAroundVector(), UI_MAPEXTRADATACONST, VecToPolar(), screenPoint_t::x, and screenPoint_t::y.
Referenced by GEO_DrawMapOneBase(), GEO_DrawMapOneInstallation(), GEO_DrawMapOneMission(), GEO_DrawMapOnePhalanxAircraft(), GEO_DrawMarkers(), and GEO_DrawRadarLineCoverage().
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 458 of file cp_geoscape.cpp.
References cgi, data, GEO_MapToScreen(), i, LINE_MAXPTS, mapline_t::numPoints, mapline_t::point, UI_MAPEXTRADATACONST, screenPoint_t::x, and screenPoint_t::y.
Referenced by GEO_DrawMapOnePhalanxAircraft(), and GEO_DrawMarkers().
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 279 of file cp_geoscape.cpp.
References data, and UI_MAPEXTRADATACONST.
Referenced by GEO_AllMapToScreen(), GEO_DrawMapOneBase(), GEO_DrawMapOneInstallation(), and GEO_MapDrawLine().
| void GEO_NotifyAircraftRemoved | ( | const aircraft_t * | aircraft | ) |
Notify that an aircraft has been removed from game.
| [in] | aircraft | Pointer to the aircraft that has been removed |
Definition at line 1730 of file cp_geoscape.cpp.
References GEO_IsAircraftSelected, GEO_IsInterceptorSelected, and GEO_ResetAction().
Referenced by AIR_DeleteAircraft().
Notify that a mission has been removed.
Definition at line 1697 of file cp_geoscape.cpp.
References GEO_IsMissionSelected, GEO_ResetAction(), and GEO_UpdateGeoscapeDock().
Referenced by CP_BaseAttackMissionIsFailure(), and CP_MissionRemoveFromGeoscape().
| void GEO_NotifyUFODisappear | ( | const aircraft_t * | ufo | ) |
Notify that a UFO disappears on radars.
Definition at line 2236 of file cp_geoscape.cpp.
References GEO_IsUFOSelected, GEO_ResetAction(), and GEO_UpdateGeoscapeDock().
Referenced by UFO_CampaignCheckEvents().
| void GEO_NotifyUFORemoved | ( | const aircraft_t * | ufo, |
| bool | 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 1711 of file cp_geoscape.cpp.
References ccs, GEO_GetSelectedUFO, GEO_IsUFOSelected, GEO_ResetAction(), and GEO_UpdateGeoscapeDock().
Referenced by CP_UFORemoveFromGeoscape().
Check if given pos is close to an existing base.
Definition at line 2030 of file cp_geoscape.cpp.
References B_GetNext(), GetDistanceOnGlobe(), MIN_DIST_BASE, and base_t::pos.
Referenced by AB_SetAlienBasePosition(), CP_HarvestMissionGo(), CP_ReconMissionGroundGo(), and CP_TerrorMissionGo().
| bool GEO_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 nullptr |
| [in] | cultureTypes | A linkedList_t containing a list of strings determining the culture types to be tested for (e.g. "western") may be nullptr |
| [in] | populationTypes | A linkedList_t containing a list of strings determining the population types to be tested for (e.g. "suburban") may be nullptr |
| [in] | nations | A linkedList_t containing a list of strings determining the nations to be tested for (e.g. "asia") may be nullptr |
Definition at line 2050 of file cp_geoscape.cpp.
References cgi, GEO_GetColor(), GEO_GetCultureTypeByPos(), GEO_GetNation(), GEO_GetPopulationTypeByPos(), GEO_GetTerrainTypeByPos(), nation_t::id, MapIsWater, and MAPTYPE_TERRAIN.
Referenced by CP_GetRandomPosOnGeoscapeWithParameters(), CP_MapIsSelectable(), and NAT_ScriptSanityCheck().
Prints positions parameter in console.
| [in] | pos | Location (latitude, longitude) where you want to check |
Definition at line 1876 of file cp_geoscape.cpp.
References cgi, GEO_GetCultureTypeByPos(), GEO_GetPopulationTypeByPos(), and GEO_GetTerrainTypeByPos().
Referenced by NAT_ScriptSanityCheck().
Definition at line 1025 of file cp_geoscape.cpp.
References cgi.
Referenced by GEO_DrawMapOneBase(), GEO_DrawMapOneInstallation(), GEO_DrawMapOneMission(), GEO_DrawMapOnePhalanxAircraft(), and GEO_DrawMarkers().
| void GEO_Reset | ( | const char * | map | ) |
Definition at line 2225 of file cp_geoscape.cpp.
References GEO_Init(), GEO_ResetAction(), GEO_Shutdown(), and GEO_UpdateGeoscapeDock().
Referenced by CP_CampaignInit(), and CP_LoadXML().
No more special action on the geoscape.
Definition at line 1647 of file cp_geoscape.cpp.
References B_AtLeastOneExists, ccs, GEO_SetInterceptorAircraft, GEO_SetOverlay(), GEO_SetSelectedAircraft, GEO_SetSelectedMission, GEO_SetSelectedUFO, MA_NONE, and radarOverlayWasSet.
Referenced by B_SelectBase(), CL_PopupInterceptRClick_f(), GEO_Click(), GEO_Draw(), GEO_InitStartup(), GEO_NotifyAircraftRemoved(), GEO_NotifyMissionRemoved(), GEO_NotifyUFODisappear(), GEO_NotifyUFORemoved(), GEO_Reset(), GEO_SelectAircraft(), GEO_SelectMission(), GEO_SelectUFO(), and INS_SelectType_f().
| void GEO_SelectAircraft | ( | aircraft_t * | aircraft | ) |
Select the specified aircraft on the geoscape.
Definition at line 1674 of file cp_geoscape.cpp.
References GEO_ResetAction(), and GEO_SetSelectedAircraft.
Referenced by AIM_AircraftStart_f(), AIR_GeoSelectAircraft_f(), AIR_MoveAircraftIntoNewHomebase(), CL_DisplayHomebasePopup(), and GEO_GetGeoscapeAngle().
Select the specified mission.
| [in] | mission | Pointer to the mission to select |
Definition at line 1685 of file cp_geoscape.cpp.
References GEO_GetSelectedMission, GEO_IsMissionSelected, GEO_ResetAction(), and GEO_SetSelectedMission.
Referenced by AIR_Move(), CP_BaseAttackPrepareBattle(), GEO_GetGeoscapeAngle(), GEO_GetMissionAngle(), and MIS_GeoSelectMission_f().
Center the view and select an object from the geoscape.
Definition at line 831 of file cp_geoscape.cpp.
References cgi, data, GEO_GetMissionAngle(), GEO_GetUFOAngle(), GEO_StartCenter(), geoscapeNode, Q_streq, type, and UI_MAPEXTRADATA.
Referenced by GEO_InitStartup().
| void GEO_SelectUFO | ( | aircraft_t * | ufo | ) |
Select the specified ufo on the geoscape.
Definition at line 1665 of file cp_geoscape.cpp.
References GEO_ResetAction(), and GEO_SetSelectedUFO.
Referenced by GEO_GetGeoscapeAngle(), GEO_GetUFOAngle(), and UFO_GeoSelectUFO_f().
Turn overlay on/off.
| [in] | overlayID | Name of the overlay you want to switch. |
| [in] | status | On/Off status to set |
Definition at line 2250 of file cp_geoscape.cpp.
References B_AtLeastOneExists, cgi, GEO_IsRadarOverlayActivated(), Q_streq, and RADAR_UpdateWholeRadarOverlay().
Referenced by B_BuildBase_f(), B_SelectBase(), GEO_ResetAction(), GEO_SetOverlay_f(), INS_BuildInstallation_f(), INS_SelectType_f(), RADAR_DeactivateRadarOverlay(), and UFO_DetectNewUFO().
Console command to call GEO_SetOverlay.
Definition at line 2274 of file cp_geoscape.cpp.
References cgi, GEO_IsRadarOverlayActivated(), GEO_SetOverlay(), Q_streq, and radarOverlayWasSet.
Referenced by GEO_InitStartup().
Definition at line 2187 of file cp_geoscape.cpp.
References cgi, culturePic, nationsPic, populationPic, and terrainPic.
Referenced by CP_Shutdown(), GEO_Reset(), and CampaignTest::SetUp().
Start center to the selected point.
Definition at line 777 of file cp_geoscape.cpp.
References data, GLOBE_ROTATE, UI_MAPEXTRADATA, Vector2Set, VectorLength(), VectorSubtract, and ZOOM_LIMIT.
Referenced by GEO_CenterPosition(), and GEO_SelectObject_f().
Will add missions and UFOs to the geoscape dock panel.
Definition at line 1398 of file cp_geoscape.cpp.
References _, cgi, GEO_GetUFOText(), MIS_Foreach, MIS_GetModel(), MIS_GetName(), aircraft_t::model, UFO_GetGeoscapeIDX, and UFO_GetNextOnGeoscape().
Referenced by CP_MissionAddToGeoscape(), GEO_NotifyMissionRemoved(), GEO_NotifyUFODisappear(), GEO_NotifyUFORemoved(), GEO_Reset(), RADAR_SetRadarAfterLoading(), and UFO_DetectNewUFO().
|
static |
Current Event centered on 3D geoscape
Definition at line 53 of file cp_geoscape.cpp.
Referenced by GEO_CenterOnPoint_f(), and GEO_GetGeoscapeAngle().
|
static |
the width and height for the culture pic.
Definition at line 68 of file cp_geoscape.cpp.
Referenced by GEO_GetColor(), and GEO_Init().
|
static |
this is the mask for separating the culture zone and water by different color values
Definition at line 66 of file cp_geoscape.cpp.
Referenced by GEO_GetColor(), GEO_Init(), and GEO_Shutdown().
|
static |
Definition at line 68 of file cp_geoscape.cpp.
Referenced by GEO_GetColor(), and GEO_Init().
|
static |
Default angle value for 3D models like bases
Definition at line 60 of file cp_geoscape.cpp.
Referenced by GEO_DrawMapOneBase(), GEO_DrawMapOneInstallation(), and GEO_DrawMapOneMission().
|
static |
Definition at line 39 of file cp_geoscape.cpp.
Referenced by uiGeoscapeNode::draw(), GEO_AngleOfPath(), GEO_CenterOnPoint_f(), GEO_CenterPosition(), GEO_Draw(), GEO_SelectObject_f(), UI_GeoscapeNodeScroll_f(), and UI_GeoscapeNodeZoom_f().
Definition at line 56 of file cp_geoscape.cpp.
Referenced by CL_AddArrow(), TerrainDefs::findByColor(), GEO_DrawAircraftHealthBar(), and PR_RequirementsInfo().
|
static |
Minimum distance between a new mission and an existing base.
Definition at line 2024 of file cp_geoscape.cpp.
Referenced by GEO_PositionCloseToBase().
|
static |
the width and height for the nation pic.
Definition at line 76 of file cp_geoscape.cpp.
Referenced by GEO_GetColor(), and GEO_Init().
|
static |
this is the nation mask - separated by colors given in nations.ufo.
Definition at line 74 of file cp_geoscape.cpp.
Referenced by GEO_GetColor(), GEO_Init(), and GEO_Shutdown().
|
static |
Definition at line 76 of file cp_geoscape.cpp.
Referenced by GEO_GetColor(), and GEO_Init().
|
static |
the width and height for the population pic.
Definition at line 72 of file cp_geoscape.cpp.
Referenced by GEO_GetColor(), and GEO_Init().
|
static |
this is the mask for separating the population rate zone and water by different color values
Definition at line 70 of file cp_geoscape.cpp.
Referenced by GEO_GetColor(), GEO_Init(), and GEO_Shutdown().
|
static |
Definition at line 72 of file cp_geoscape.cpp.
Referenced by GEO_GetColor(), and GEO_Init().
Definition at line 58 of file cp_geoscape.cpp.
Referenced by CL_AddArrow(), uiRadarNode::draw(), uiEditorNode::drawOverWindow(), TerrainDefs::findByColor(), GEO_DrawAircraftHealthBar(), GEO_DrawMapOneBase(), GEO_DrawMapOneInstallation(), and GEO_DrawMapOnePhalanxAircraft().
|
static |
the width and height for the terrain pic.
Definition at line 64 of file cp_geoscape.cpp.
Referenced by GEO_GetColor(), and GEO_Init().
|
static |
this is the terrain mask for separating the climate zone and water by different color values
Definition at line 62 of file cp_geoscape.cpp.
Referenced by GEO_GetColor(), GEO_Init(), and GEO_Shutdown().
|
static |
Definition at line 64 of file cp_geoscape.cpp.
Referenced by GEO_GetColor(), and GEO_Init().
|
static |
Buffer to display standard text on the geoscape
Definition at line 52 of file cp_geoscape.cpp.
Referenced by GEO_Draw().
Definition at line 57 of file cp_geoscape.cpp.
Referenced by GEO_DrawAircraftHealthBar(), GEO_DrawBullets(), GEO_DrawMapOneMission(), GEO_DrawMapOnePhalanxAircraft(), GEO_DrawMarkers(), and PR_RequirementsInfo().