UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
cp_radar.h
Go to the documentation of this file.
1
4
5
/*
6
Copyright (C) 2002-2025 UFO: Alien Invasion.
7
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License
10
as published by the Free Software Foundation; either version 2
11
of the License, or (at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
17
See the GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23
*/
24
25
#pragma once
26
27
#define MAX_UFOONGEOSCAPE 8
28
29
extern
bool
radarOverlayWasSet
;
30
31
extern
const
float
RADAR_BASERANGE
;
32
extern
const
float
RADAR_BASETRACKINGRANGE
;
33
34
typedef
struct
radar_s {
35
int
range
;
36
int
trackingRange
;
37
const
struct
aircraft_s*
ufos
[
MAX_UFOONGEOSCAPE
];
38
int
numUFOs
;
39
float
ufoDetectionProbability
;
45
46
}
radar_t
;
47
48
void
RADAR_UpdateStaticRadarCoverage
(
void
);
49
void
RADAR_UpdateWholeRadarOverlay
(
void
);
50
void
RADAR_DeactivateRadarOverlay
(
void
);
51
void
RADAR_NotifyUFORemoved
(
const
struct
aircraft_s* ufo,
bool
destroyed);
52
void
RADAR_Initialise
(
radar_t
*
radar
,
float
range,
float
trackingRange,
float
level
,
bool
updateSourceRadarMap);
53
void
RADAR_InitialiseUFOs
(
radar_t
*
radar
);
54
void
RADAR_UpdateBaseRadarCoverage_f
(
void
);
55
void
RADAR_UpdateInstallationRadarCoverage
(
struct
installation_s* installation,
const
float
radarRange,
const
float
trackingRadarRange);
56
void
RADAR_AddDetectedUFOToEveryRadar
(
const
struct
aircraft_s* ufo);
57
bool
RADAR_CheckRadarSensored
(
const
vec2_t
pos);
58
bool
RADAR_CheckUFOSensored
(
radar_t
*
radar
,
const
vec2_t
posRadar,
const
struct
aircraft_s* ufo,
bool
detected);
59
void
RADAR_SetRadarAfterLoading
(
void
);
RADAR_BASETRACKINGRANGE
const float RADAR_BASETRACKINGRANGE
Definition
cp_radar.cpp:40
RADAR_BASERANGE
const float RADAR_BASERANGE
Definition
cp_radar.cpp:39
radarOverlayWasSet
bool radarOverlayWasSet
Definition
cp_radar.cpp:36
RADAR_DeactivateRadarOverlay
void RADAR_DeactivateRadarOverlay(void)
Deactivate Radar overlay if there is no more UFO on geoscape.
Definition
cp_radar.cpp:106
RADAR_Initialise
void RADAR_Initialise(radar_t *radar, float range, float trackingRange, float level, bool updateSourceRadarMap)
Set radar range to new value.
Definition
cp_radar.cpp:239
RADAR_UpdateWholeRadarOverlay
void RADAR_UpdateWholeRadarOverlay(void)
Update radar overlay of base, installation and aircraft range.
Definition
cp_radar.cpp:89
RADAR_InitialiseUFOs
void RADAR_InitialiseUFOs(radar_t *radar)
Reset UFO sensored on radar.
Definition
cp_radar.cpp:265
RADAR_AddDetectedUFOToEveryRadar
void RADAR_AddDetectedUFOToEveryRadar(const struct aircraft_s *ufo)
RADAR_UpdateStaticRadarCoverage
void RADAR_UpdateStaticRadarCoverage(void)
Update every static radar drawing (radar that don't move: base and installation radar).
Definition
cp_radar.cpp:49
RADAR_CheckUFOSensored
bool RADAR_CheckUFOSensored(radar_t *radar, const vec2_t posRadar, const struct aircraft_s *ufo, bool detected)
MAX_UFOONGEOSCAPE
#define MAX_UFOONGEOSCAPE
Definition
cp_radar.h:27
RADAR_CheckRadarSensored
bool RADAR_CheckRadarSensored(const vec2_t pos)
Check if the specified position is within base radar range.
Definition
cp_radar.cpp:377
RADAR_SetRadarAfterLoading
void RADAR_SetRadarAfterLoading(void)
Set radar to proper values after loading.
Definition
cp_radar.cpp:453
RADAR_UpdateInstallationRadarCoverage
void RADAR_UpdateInstallationRadarCoverage(struct installation_s *installation, const float radarRange, const float trackingRadarRange)
RADAR_NotifyUFORemoved
void RADAR_NotifyUFORemoved(const struct aircraft_s *ufo, bool destroyed)
RADAR_UpdateBaseRadarCoverage_f
void RADAR_UpdateBaseRadarCoverage_f(void)
Update radar coverage when building/destroying new radar.
Definition
cp_radar.cpp:277
level
level_locals_t level
Definition
g_main.cpp:38
radar_t
Definition
cp_radar.h:34
radar_t::trackingRange
int trackingRange
Definition
cp_radar.h:36
radar_t::numUFOs
int numUFOs
Definition
cp_radar.h:38
radar_t::ufos
const struct aircraft_s * ufos[MAX_UFOONGEOSCAPE]
Definition
cp_radar.h:37
radar_t::range
int range
Definition
cp_radar.h:35
radar_t::ufoDetectionProbability
float ufoDetectionProbability
Definition
cp_radar.h:39
vec2_t
vec_t vec2_t[2]
Definition
ufotypes.h:38
radar
static hudRadar_t radar
Definition
ui_node_radar.cpp:81
src
client
cgame
campaign
cp_radar.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0