forked from Error323/E323AI
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCThreatMap.h
50 lines (40 loc) · 978 Bytes
/
CThreatMap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef THREATMAP_H
#define THREATMAP_H
#include "headers/Defines.h"
#include "headers/HEngine.h"
class AIClasses;
class CGroup;
enum ThreatMapType {
TMT_NONE = 0,
TMT_AIR,
TMT_SURFACE,
TMT_LAST,
TMT_UNDERWATER
};
class CThreatMap {
public:
CThreatMap(AIClasses *ai);
~CThreatMap();
void update(int frame);
float getThreat(float3 ¢er, float radius, ThreatMapType type = TMT_SURFACE);
float getThreat(float3 ¢er, float radius, CGroup *group);
float *getMap(ThreatMapType);
bool switchDebugMode();
int X, Z;
int RES;
private:
AIClasses *ai;
int *units;
float REAL;
ThreatMapType drawMap;
std::map<ThreatMapType, float> maxPower;
std::map<ThreatMapType, float*> maps;
#if !defined(BUILDING_AI_FOR_SPRING_0_81_2)
std::map<ThreatMapType, int> handles;
// for visual debuggin purposes
#endif
float gauss(float x, float sigma, float mu);
void reset();
void visualizeMap(ThreatMapType type = TMT_SURFACE);
};
#endif