Cytopia  0.3
A city building simulation game
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TileManager.hxx File Reference
#include <SDL.h>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <optional>
#include "tileData.hxx"
#include "json.hxx"
#include "Singleton.hxx"
#include "../common/enums.hxx"
#include "basics/Point.hxx"
+ Include dependency graph for TileManager.hxx:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TileManager
 This class holds all the information about tileIDs gathered from TileData.json. More...
 

Enumerations

enum  TileMap : size_t { DEFAULT, SLOPES, SHORE }
 
enum  TileSlopes : size_t {
  N, W, E, S,
  NW, NE, SW, SE,
  N_AND_W, N_AND_E, S_AND_W, S_AND_E,
  BETWEEN, DEFAULT_ORIENTATION
}
 
enum  TileOrientation : size_t {
  TILE_DEFAULT_ORIENTATION, TILE_E, TILE_N, TILE_N_AND_E,
  TILE_W, TILE_E_AND_W, TILE_N_AND_W, TILE_N_AND_E_AND_W,
  TILE_S, TILE_S_AND_E, TILE_N_AND_S, TILE_N_AND_E_AND_S,
  TILE_S_AND_W, TILE_S_AND_E_AND_W, TILE_N_AND_S_AND_W, TILE_ALL_DIRECTIONS,
  TILE_N_AND_E_RECT, TILE_S_AND_W_RECT, TILE_S_AND_E_RECT, TILE_N_AND_W_RECT,
  TILE_E_AND_W_CROSS, TILE_N_AND_S_CROSS
}
 

Enumeration Type Documentation

◆ TileMap

enum TileMap : size_t
Enumerator
DEFAULT 
SLOPES 
SHORE 

Definition at line 16 of file TileManager.hxx.

16  : size_t
17 {
18  DEFAULT,
19  SLOPES,
20  SHORE
21 };

◆ TileOrientation

enum TileOrientation : size_t
Enumerator
TILE_DEFAULT_ORIENTATION 
TILE_E 
TILE_N 
TILE_N_AND_E 
TILE_W 
TILE_E_AND_W 
TILE_N_AND_W 
TILE_N_AND_E_AND_W 
TILE_S 
TILE_S_AND_E 
TILE_N_AND_S 
TILE_N_AND_E_AND_S 
TILE_S_AND_W 
TILE_S_AND_E_AND_W 
TILE_N_AND_S_AND_W 
TILE_ALL_DIRECTIONS 
TILE_N_AND_E_RECT 
TILE_S_AND_W_RECT 
TILE_S_AND_E_RECT 
TILE_N_AND_W_RECT 
TILE_E_AND_W_CROSS 
TILE_N_AND_S_CROSS 

Definition at line 41 of file TileManager.hxx.

41  : size_t
42 {
44  TILE_E,
45  TILE_N,
47  TILE_W,
51  TILE_S,
63  TILE_E_AND_W_CROSS, // special handling for tiles that can be placed on each other and then autotile differently (e.g. Power Lines on Roads or Water)
64  TILE_N_AND_S_CROSS // support powerlines cross low terrain (eg, roads and water)
65 };

◆ TileSlopes

enum TileSlopes : size_t
Enumerator
NW 
NE 
SW 
SE 
N_AND_W 
N_AND_E 
S_AND_W 
S_AND_E 
BETWEEN 
DEFAULT_ORIENTATION 

Definition at line 23 of file TileManager.hxx.

23  : size_t
24 {
25  N,
26  W,
27  E,
28  S,
29  NW,
30  NE,
31  SW,
32  SE,
33  N_AND_W,
34  N_AND_E,
35  S_AND_W,
36  S_AND_E,
37  BETWEEN,
39 };
DEFAULT
@ DEFAULT
Definition: TileManager.hxx:18
TILE_S
@ TILE_S
Definition: TileManager.hxx:51
TILE_N_AND_W
@ TILE_N_AND_W
Definition: TileManager.hxx:49
TILE_S_AND_E_RECT
@ TILE_S_AND_E_RECT
Definition: TileManager.hxx:61
TILE_ALL_DIRECTIONS
@ TILE_ALL_DIRECTIONS
Definition: TileManager.hxx:58
TILE_N
@ TILE_N
Definition: TileManager.hxx:45
TILE_S_AND_E_AND_W
@ TILE_S_AND_E_AND_W
Definition: TileManager.hxx:56
BETWEEN
@ BETWEEN
Definition: TileManager.hxx:37
SW
@ SW
Definition: TileManager.hxx:31
TILE_N_AND_S_CROSS
@ TILE_N_AND_S_CROSS
Definition: TileManager.hxx:64
W
@ W
Definition: TileManager.hxx:26
TILE_E
@ TILE_E
Definition: TileManager.hxx:44
TILE_N_AND_E
@ TILE_N_AND_E
Definition: TileManager.hxx:46
TILE_N_AND_W_RECT
@ TILE_N_AND_W_RECT
Definition: TileManager.hxx:62
TILE_E_AND_W
@ TILE_E_AND_W
Definition: TileManager.hxx:48
S_AND_W
@ S_AND_W
Definition: TileManager.hxx:35
TILE_E_AND_W_CROSS
@ TILE_E_AND_W_CROSS
Definition: TileManager.hxx:63
SHORE
@ SHORE
Definition: TileManager.hxx:20
N_AND_W
@ N_AND_W
Definition: TileManager.hxx:33
TILE_S_AND_E
@ TILE_S_AND_E
Definition: TileManager.hxx:52
TILE_N_AND_S_AND_W
@ TILE_N_AND_S_AND_W
Definition: TileManager.hxx:57
DEFAULT_ORIENTATION
@ DEFAULT_ORIENTATION
Definition: TileManager.hxx:38
NE
@ NE
Definition: TileManager.hxx:30
TILE_S_AND_W_RECT
@ TILE_S_AND_W_RECT
Definition: TileManager.hxx:60
E
@ E
Definition: TileManager.hxx:27
N_AND_E
@ N_AND_E
Definition: TileManager.hxx:34
TILE_S_AND_W
@ TILE_S_AND_W
Definition: TileManager.hxx:55
TILE_W
@ TILE_W
Definition: TileManager.hxx:47
SE
@ SE
Definition: TileManager.hxx:32
TILE_N_AND_S
@ TILE_N_AND_S
Definition: TileManager.hxx:53
NW
@ NW
Definition: TileManager.hxx:29
S
@ S
Definition: TileManager.hxx:28
N
@ N
Definition: TileManager.hxx:25
TILE_N_AND_E_RECT
@ TILE_N_AND_E_RECT
Definition: TileManager.hxx:59
S_AND_E
@ S_AND_E
Definition: TileManager.hxx:36
TILE_DEFAULT_ORIENTATION
@ TILE_DEFAULT_ORIENTATION
Definition: TileManager.hxx:43
TILE_N_AND_E_AND_S
@ TILE_N_AND_E_AND_S
Definition: TileManager.hxx:54
TILE_N_AND_E_AND_W
@ TILE_N_AND_E_AND_W
Definition: TileManager.hxx:50
SLOPES
@ SLOPES
Definition: TileManager.hxx:19