Go to the source code of this file.
Data Structures | |
struct | radar_s |
Defines | |
#define | MAX_UFOONGEOSCAPE 8 |
Typedefs | |
typedef struct radar_s | radar_t |
Functions | |
void | RADAR_UpdateStaticRadarCoverage (void) |
Update every static radar drawing (radar that don't move: base and installation radar). | |
void | RADAR_UpdateWholeRadarOverlay (void) |
Update radar overlay of base, installation and aircraft range. | |
void | RADAR_DrawInMap (const struct uiNode_s *node, const radar_t *radar, const vec2_t pos) |
void | RADAR_DeactivateRadarOverlay (void) |
Deactivate Radar overlay if there is no more UFO on geoscape. | |
void | RADAR_NotifyUFORemoved (const struct aircraft_s *ufo, qboolean destroyed) |
void | RADAR_Initialise (radar_t *radar, float range, float trackingRange, float level, qboolean updateSourceRadarMap) |
Set radar range to new value. | |
void | RADAR_InitialiseUFOs (radar_t *radar) |
Reset UFO sensored on radar. | |
void | RADAR_UpdateBaseRadarCoverage_f (void) |
Update radar coverage when building/destroying new radar. | |
void | RADAR_UpdateInstallationRadarCoverage (struct installation_s *installation, const float radarRange, const float trackingRadarRange) |
Update radar coverage when building/destroying new radar. | |
void | RADAR_AddDetectedUFOToEveryRadar (const struct aircraft_s const *ufo) |
qboolean | RADAR_CheckRadarSensored (const vec2_t pos) |
Check if the specified position is within base radar range. | |
qboolean | RADAR_CheckUFOSensored (radar_t *radar, const vec2_t posRadar, const struct aircraft_s *ufo, qboolean detected) |
void | RADAR_SetRadarAfterLoading (void) |
Set radar to proper values after loading. | |
Variables | |
qboolean | radarOverlayWasSet |
const float | RADAR_BASERANGE |
const float | RADAR_BASERTRACKINGANGE |
const float | RADAR_AIRCRAFTRANGE |
const float | RADAR_AIRCRAFTTRACKINGRANGE |
Definition in file cp_radar.h.
#define MAX_UFOONGEOSCAPE 8 |
Definition at line 28 of file cp_radar.h.
Referenced by AIR_LoadXML(), AIR_SaveXML(), RADAR_AddUFO(), RADAR_RemoveUFO(), UFO_AddToGeoscape(), and UFO_GetByIDX().
void RADAR_AddDetectedUFOToEveryRadar | ( | const struct aircraft_s const * | ufo | ) |
Check if the specified position is within base radar range.
Definition at line 480 of file cp_radar.c.
References B_GetFoundedBaseByIDX(), GetDistanceOnGlobe(), INS_GetFoundedInstallationByIDX(), MAX_BASES, MAX_INSTALLATIONS, installation_s::pos, base_s::pos, qfalse, qtrue, and radar.
Referenced by AIRFIGHT_ExecuteActions(), CP_CheckMissionVisibleOnGeoscape(), and CP_UFORemoveFromGeoscape().
qboolean RADAR_CheckUFOSensored | ( | radar_t * | radar, | |
const vec2_t | posRadar, | |||
const struct aircraft_s * | ufo, | |||
qboolean | detected | |||
) |
void RADAR_DeactivateRadarOverlay | ( | void | ) |
Deactivate Radar overlay if there is no more UFO on geoscape.
Definition at line 180 of file cp_radar.c.
References AIR_GetNextFromBase(), B_GetFoundedBaseByIDX(), INS_GetFoundedInstallationByIDX(), MAP_IsRadarOverlayActivated(), MAP_SetOverlay(), MAX_BASES, MAX_INSTALLATIONS, radar_s::numUFOs, installation_s::radar, aircraft_s::radar, base_s::radar, and radarOverlayWasSet.
Referenced by RADAR_NotifyUFORemovedFromOneRadar(), RADAR_RemoveUFO(), and UFO_CampaignCheckEvents().
void RADAR_Initialise | ( | radar_t * | radar, | |
float | range, | |||
float | trackingRange, | |||
float | level, | |||
qboolean | updateSourceRadarMap | |||
) |
Set radar range to new value.
[in,out] | radar | The radar to update/initialize |
[in] | range | New range of the radar |
[in] | trackingRange | New tracking range of the radar |
[in] | level | The tech level of the radar |
[in] | updateSourceRadarMap | if the radar overlay should be updated. |
Definition at line 332 of file cp_radar.c.
References radar_s::numUFOs, RADAR_UpdateStaticRadarCoverage(), RADAR_UpdateWholeRadarOverlay(), RADAR_UPGRADE_MULTIPLIER, radar_s::range, and radar_s::trackingRange.
Referenced by AIR_NewAircraft(), B_LoadXML(), B_SetUpBase(), INS_LoadXML(), INS_SetUpInstallation(), RADAR_UpdateBaseRadarCoverage_f(), and RADAR_UpdateInstallationRadarCoverage().
void RADAR_InitialiseUFOs | ( | radar_t * | radar | ) |
Reset UFO sensored on radar.
[out] | radar | The radar to initialize. |
Definition at line 356 of file cp_radar.c.
References radar_s::numUFOs, and radar_s::ufos.
Referenced by AIR_LoadAircraftXML(), AIR_ParseAircraft(), B_AircraftReturnedToHomeBase(), B_LoadXML(), B_SetUpBase(), and INS_LoadXML().
void RADAR_NotifyUFORemoved | ( | const struct aircraft_s * | ufo, | |
qboolean | destroyed | |||
) |
void RADAR_SetRadarAfterLoading | ( | void | ) |
Set radar to proper values after loading.
Definition at line 572 of file cp_radar.c.
References ccs, aircraft_s::detected, MAP_UpdateGeoscapeDock(), ccs_s::numUFOs, RADAR_AddDetectedUFOToEveryRadar(), and UFO_GetByIDX().
Referenced by SAV_GameActionsAfterLoad().
void RADAR_UpdateBaseRadarCoverage_f | ( | void | ) |
Update radar coverage when building/destroying new radar.
Definition at line 368 of file cp_radar.c.
References B_GetFoundedBaseByIDX(), B_GetMaxBuildingLevel(), B_RADAR, Cmd_Argc(), Cmd_Argv(), Com_Printf(), CP_UpdateMissionVisibleOnGeoscape(), level, MAX_BASES, qtrue, base_s::radar, RADAR_BASERANGE, RADAR_BASETRACKINGRANGE, and RADAR_Initialise().
void RADAR_UpdateInstallationRadarCoverage | ( | installation_t * | installation, | |
const float | radarRange, | |||
const float | trackingRadarRange | |||
) |
Update radar coverage when building/destroying new radar.
[in,out] | installation | The radartower to update |
[in] | radarRange | New range of the radar |
[in] | trackingRadarRange | New tracking range of the radar |
Definition at line 402 of file cp_radar.c.
References Com_Error(), CP_UpdateMissionVisibleOnGeoscape(), ERR_DROP, installation_s::founded, INSTALLATION_WORKING, installation_s::installationStatus, installation_s::installationTemplate, qtrue, installation_s::radar, RADAR_Initialise(), RADAR_INSTALLATIONLEVEL, installationTemplate_s::radarRange, and installationTemplate_s::trackingRange.
Referenced by INS_DestroyInstallation(), INS_FinishInstallation(), and INS_LoadXML().
void RADAR_UpdateStaticRadarCoverage | ( | void | ) |
Update every static radar drawing (radar that don't move: base and installation radar).
Definition at line 55 of file cp_radar.c.
References B_GetFoundedBaseByIDX(), CP_AddRadarCoverage(), CP_InitializeRadarOverlay(), CP_UploadRadarCoverage(), installation_s::founded, INS_GetFoundedInstallationByIDX(), INSTALLATION_WORKING, installation_s::installationStatus, MAX_BASES, MAX_INSTALLATIONS, installation_s::pos, base_s::pos, qfalse, qtrue, installation_s::radar, base_s::radar, radar_s::range, and radar_s::trackingRange.
Referenced by RADAR_Initialise().
void RADAR_UpdateWholeRadarOverlay | ( | void | ) |
Update radar overlay of base, installation and aircraft range.
Definition at line 97 of file cp_radar.c.
References AIR_GetNextFromBase(), AIR_IsAircraftOnGeoscape(), B_GetFoundedBaseByIDX(), CP_InitializeRadarOverlay(), CP_UploadRadarCoverage(), MAX_BASES, aircraft_s::pos, qfalse, aircraft_s::radar, and RADAR_DrawCoverage().
Referenced by AIR_DeleteAircraft(), CL_CampaignRunAircraft(), MAP_SetOverlay(), and RADAR_Initialise().
const float RADAR_AIRCRAFTRANGE |
Definition at line 45 of file cp_radar.c.
Referenced by AIR_NewAircraft().
const float RADAR_AIRCRAFTTRACKINGRANGE |
Definition at line 46 of file cp_radar.c.
Referenced by AIR_NewAircraft().
const float RADAR_BASERANGE |
Definition at line 43 of file cp_radar.c.
Referenced by RADAR_UpdateBaseRadarCoverage_f().
const float RADAR_BASERTRACKINGANGE |
used to store the previous configuration of overlay before radar is automatically turned on (e.g when creating base or when UFO appears)
Definition at line 40 of file cp_radar.c.
Referenced by CP_LoadXML(), CP_SaveXML(), MAP_ResetAction(), MAP_SetOverlay_f(), and RADAR_DeactivateRadarOverlay().