File: map.h

package info (click to toggle)
openssn 1.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 7,340 kB
  • sloc: cpp: 10,973; makefile: 80
file content (54 lines) | stat: -rw-r--r-- 1,006 bytes parent folder | download | duplicates (3)
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
51
52
53
54
#ifndef MAP_HEADER_FILE__
#define MAP_HEADER_FILE__

/*
This file contains definitions for dealing with the depth of the
water and placing of thermal layers.
*/

#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif

#define MAX_DEPTH 5000      // deepest part of the ocean
#define MIN_DEPTH 0          // most shallow point of the ocean
#define MAX_THERMALS 3
#define MAX_THERMAL_DEPTH 900
#define THERMAL_FILTER 0.15

// MAP_MIN and MAP_MAX are also defined in the coord class
#ifndef MAP_MIN 
#define MAP_MIN 0
#endif
#ifndef MAP_MAX
#define MAP_MAX 300000
#endif

class MAP
{
public:
  int thermals[MAX_THERMALS];

  MAP();
  ~MAP();
  int Init();
  int Create_Thermal_Layers(int how_many);
 
  int Get_Ocean_Depth(int x, int y);
  int Thermals_Between(int depth_1, int depth_2);
  int Next_Up(int current_depth);    // find thermal from our position
  int Next_Down(int current_depth);  // find thermal from our position

  #ifdef DEBUGMAP
  void Test_Map();
  #endif

};



#endif