28#define KILOMETER_PER_DEGREE 111.2
32#define MapIsWater(color) (color[0] == 0 && color[1] == 0 && color[2] == 64)
35#define MapIsWestern(color) (color[0] == 128 && color[1] == 255 && color[2] == 255)
36#define MapIsEastern(color) (color[0] == 255 && color[1] == 128 && color[2] == 0)
37#define MapIsOriental(color) (color[0] == 255 && color[1] == 0 && color[2] == 0)
38#define MapIsAfrican(color) (color[0] == 128 && color[1] == 128 && color[2] == 255)
41#define MapIsUrban(color) (color[0] == 128 && color[1] == 255 && color[2] == 255)
42#define MapIsSuburban(color) (color[0] == 255 && color[1] == 128 && color[2] == 0)
43#define MapIsVillage(color) (color[0] == 255 && color[1] == 0 && color[2] == 0)
44#define MapIsRural(color) (color[0] == 128 && color[1] == 128 && color[2] == 255)
45#define MapIsNopopulation(color) (color[0] == 128 && color[1] == 255 && color[2] == 0)
51#define GEO_IsAircraftSelected(aircraft) ((aircraft) == ccs.geoscape.selectedAircraft)
52#define GEO_IsInterceptorSelected(aircraft) ((aircraft) == ccs.geoscape.interceptAircraft)
53#define GEO_IsUFOSelected(ufo) ((ufo) == ccs.geoscape.selectedUFO)
54#define GEO_IsMissionSelected(mission) ((mission) == ccs.geoscape.selectedMission)
56#define GEO_GetSelectedAircraft() (ccs.geoscape.selectedAircraft)
57#define GEO_GetInterceptorAircraft() (ccs.geoscape.interceptAircraft)
58#define GEO_GetSelectedUFO() (ccs.geoscape.selectedUFO)
59#define GEO_GetSelectedMission() (ccs.geoscape.selectedMission)
60#define GEO_GetMissionAircraft() (ccs.geoscape.missionAircraft)
62#define GEO_SetSelectedAircraft(aircraft) (ccs.geoscape.selectedAircraft = (aircraft))
63#define GEO_SetInterceptorAircraft(interceptor) (ccs.geoscape.interceptAircraft = (interceptor))
64#define GEO_SetSelectedUFO(ufo) (ccs.geoscape.selectedUFO = (ufo))
65#define GEO_SetSelectedMission(mission) (ccs.geoscape.selectedMission = (mission))
66#define GEO_SetMissionAircraft(aircraft) (ccs.geoscape.missionAircraft = (aircraft))
bool GEO_IsNight(const vec2_t pos)
Check whether given position is Day or Night.
void GEO_Reset(const char *map)
nation_t * GEO_GetNation(const vec2_t pos)
Translate nation map color to nation.
void GEO_Init(const char *map)
void GEO_DrawMarkers(const uiNode_t *node)
Draws all ufos, aircraft, bases and so on to the geoscape map (2D and 3D).
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_NotifyUFORemoved(const aircraft_t *ufo, bool destroyed)
Notify that a UFO has been removed.
bool GEO_Click(const uiNode_t *node, int x, int y, const vec2_t pos)
Click on the map/geoscape.
void GEO_SetOverlay(const char *overlayID, int status)
Turn overlay on/off.
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 p...
void GEO_NotifyAircraftRemoved(const aircraft_t *aircraft)
Notify that an aircraft has been removed from game.
void GEO_InitStartup(void)
Initialise MAP/Geoscape.
void GEO_SelectAircraft(aircraft_t *aircraft)
Select the specified aircraft on the geoscape.
bool GEO_PositionFitsTCPNTypes(const vec2_t posT, 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,...
bool GEO_IsRadarOverlayActivated(void)
void GEO_CenterPosition(const vec2_t pos)
Start to rotate or shift the globe to the given position.
void GEO_CenterOnPoint_f(void)
Switch to next model on 2D and 3D geoscape.
void GEO_UpdateGeoscapeDock(void)
Will add missions and UFOs to the geoscape dock panel.
void GEO_SelectUFO(aircraft_t *ufo)
Select the specified ufo on the geoscape.
void GEO_PrintParameterStringByPos(const vec2_t pos)
Prints positions parameter in console.
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.
base_t * GEO_PositionCloseToBase(const vec2_t pos)
Check if given pos is close to an existing base.
int GEO_GetCivilianNumberByPosition(const vec2_t pos)
Get number of civilian on a map at given position.
struct mission_s * GEO_SelectMission(struct mission_s *mission)
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.
void CP_GetRandomPosOnGeoscape(vec2_t pos, bool noWater)
Determines a random position on geoscape.
void GEO_NotifyUFODisappear(const aircraft_t *ufo)
Notify that a UFO disappears on radars.
void GEO_CheckPositionBoundaries(float *pos)
Check that a position (in latitude / longitude) is within boundaries.
void GEO_NotifyMissionRemoved(const struct mission_s *mission)
void GEO_ResetAction(void)
No more special action on the geoscape.
void GEO_Draw(geoscapeData_t *data)
Draw the geoscape.
QGL_EXTERN GLsizei const GLvoid * data
QGL_EXTERN GLint GLenum type
An aircraft with all it's data.
A base with all it's data.
A path on the map described by 2D points.
Atomic structure used to define most of the UI.