Loading [MathJax]/extensions/MathZoom.js
Cytopia  0.3
A city building simulation game
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
tileData.hxx File Reference
#include <string>
#include <vector>
#include "enums.hxx"
+ Include dependency graph for tileData.hxx:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TileSize
 How many tiles are occupied by a building. More...
 
struct  std::hash< TileSize >
 
struct  TileData
 Holds all releavted information to this specific tile. More...
 

Namespaces

 std
 

Macros

#define TD_PRICE_MIN   0
 min and max values for tileData More...
 
#define TD_PRICE_MAX   100000
 
#define TD_UPKEEP_MIN   -10000
 
#define TD_UPKEEP_MAX   10000
 
#define TD_POWER_MIN   -100
 
#define TD_POWER_MAX   1000
 
#define TD_WATER_MIN   -100
 
#define TD_WATER_MAX   1000
 
#define TD_EDUCATION_MIN   -100
 
#define TD_EDUCATION_MAX   100
 
#define TD_POLLUTION_MIN   -100
 
#define TD_POLLUTION_MAX   100
 
#define TD_CRIME_MIN   -100
 
#define TD_CRIME_MAX   100
 
#define TD_HABITANTS_MIN   0
 
#define TD_HABITANTS_MAX   10000
 
#define TD_FIREDANGER_MIN   -100
 
#define TD_FIREDANGER_MAX   100
 
#define TD_HAPPINESS_MIN   -100
 
#define TD_HAPPINESS_MAX   100
 
#define TD_TITLE_MAX_CHARS   100
 
#define TD_DESCRIPTION_MAX_CHARS   100
 
#define TD_BIOME_MAX_CHARS   100
 
#define TD_AUTHOR_MAX_CHARS   100
 
#define TD_ID_MAX_CHARS   100
 
#define TD_CATEGORY_MAX_CHARS   40
 
#define TD_SUBCATEGORY_MAX_CHARS   40
 
#define TD_REQUIREDTILES_MIN   1
 
#define TD_REQUIREDTILES_MAX   20
 

Functions

 BETTER_ENUM (TileType, int, DEFAULT, FLORA, TERRAIN, WATER, BLUEPRINT, AUTOTILE, ZONE, ROAD, POWERLINE, GROUNDDECORATION, UNDERGROUND, RCI) BETTER_ENUM(ZoneDensity
 
HIGH BETTER_ENUM (Style, int, ALL, ASIAN, EUROPEAN, US) struct TileSetData
 < High density More...
 

Variables

 int
 
 LOW
 Low density. More...
 
 MEDIUM
 Medium density. More...
 

Macro Definition Documentation

◆ TD_AUTHOR_MAX_CHARS

#define TD_AUTHOR_MAX_CHARS   100

Definition at line 32 of file tileData.hxx.

◆ TD_BIOME_MAX_CHARS

#define TD_BIOME_MAX_CHARS   100

Definition at line 31 of file tileData.hxx.

◆ TD_CATEGORY_MAX_CHARS

#define TD_CATEGORY_MAX_CHARS   40

Definition at line 34 of file tileData.hxx.

◆ TD_CRIME_MAX

#define TD_CRIME_MAX   100

Definition at line 22 of file tileData.hxx.

◆ TD_CRIME_MIN

#define TD_CRIME_MIN   -100

Definition at line 21 of file tileData.hxx.

◆ TD_DESCRIPTION_MAX_CHARS

#define TD_DESCRIPTION_MAX_CHARS   100

Definition at line 30 of file tileData.hxx.

◆ TD_EDUCATION_MAX

#define TD_EDUCATION_MAX   100

Definition at line 18 of file tileData.hxx.

◆ TD_EDUCATION_MIN

#define TD_EDUCATION_MIN   -100

Definition at line 17 of file tileData.hxx.

◆ TD_FIREDANGER_MAX

#define TD_FIREDANGER_MAX   100

Definition at line 26 of file tileData.hxx.

◆ TD_FIREDANGER_MIN

#define TD_FIREDANGER_MIN   -100

Definition at line 25 of file tileData.hxx.

◆ TD_HABITANTS_MAX

#define TD_HABITANTS_MAX   10000

Definition at line 24 of file tileData.hxx.

◆ TD_HABITANTS_MIN

#define TD_HABITANTS_MIN   0

Definition at line 23 of file tileData.hxx.

◆ TD_HAPPINESS_MAX

#define TD_HAPPINESS_MAX   100

Definition at line 28 of file tileData.hxx.

◆ TD_HAPPINESS_MIN

#define TD_HAPPINESS_MIN   -100

Definition at line 27 of file tileData.hxx.

◆ TD_ID_MAX_CHARS

#define TD_ID_MAX_CHARS   100

Definition at line 33 of file tileData.hxx.

◆ TD_POLLUTION_MAX

#define TD_POLLUTION_MAX   100

Definition at line 20 of file tileData.hxx.

◆ TD_POLLUTION_MIN

#define TD_POLLUTION_MIN   -100

Definition at line 19 of file tileData.hxx.

◆ TD_POWER_MAX

#define TD_POWER_MAX   1000

Definition at line 14 of file tileData.hxx.

◆ TD_POWER_MIN

#define TD_POWER_MIN   -100

Definition at line 13 of file tileData.hxx.

◆ TD_PRICE_MAX

#define TD_PRICE_MAX   100000

Definition at line 10 of file tileData.hxx.

◆ TD_PRICE_MIN

#define TD_PRICE_MIN   0

min and max values for tileData

Definition at line 9 of file tileData.hxx.

◆ TD_REQUIREDTILES_MAX

#define TD_REQUIREDTILES_MAX   20

Definition at line 37 of file tileData.hxx.

◆ TD_REQUIREDTILES_MIN

#define TD_REQUIREDTILES_MIN   1

Definition at line 36 of file tileData.hxx.

◆ TD_SUBCATEGORY_MAX_CHARS

#define TD_SUBCATEGORY_MAX_CHARS   40

Definition at line 35 of file tileData.hxx.

◆ TD_TITLE_MAX_CHARS

#define TD_TITLE_MAX_CHARS   100

Definition at line 29 of file tileData.hxx.

◆ TD_UPKEEP_MAX

#define TD_UPKEEP_MAX   10000

Definition at line 12 of file tileData.hxx.

◆ TD_UPKEEP_MIN

#define TD_UPKEEP_MIN   -10000

Definition at line 11 of file tileData.hxx.

◆ TD_WATER_MAX

#define TD_WATER_MAX   1000

Definition at line 16 of file tileData.hxx.

◆ TD_WATER_MIN

#define TD_WATER_MIN   -100

Definition at line 15 of file tileData.hxx.

Function Documentation

◆ BETTER_ENUM() [1/2]

HIGH BETTER_ENUM ( Style  ,
int  ,
ALL  ,
ASIAN  ,
EUROPEAN  ,
US   
)

< High density

This struct holds all data related to the TileSet (Spritesheet)

< the filename of the spritesheet

< number of images that are in the tile set. This is for things that will have a random tile chosen from their set.

< the width of the clipRect. (Where the tile will be clipped from the spritesheet)

< the height of the clipRect. (Where the tile will be clipped from the spritesheet)

< where the first image in this tileset is, so a file could contain multiple tilesets and offset would define where to start this tileset and count would define how many images it has. offset = 0 is the first image, offset = 3 is the 4th tile.

< determines if a random tile of the tileset should be used, if set to true

< number of rotations that exist in this tileset (for buildings). this is not applicable for terrain and roads, their orientation is figured out differently. For buildings that have multiple orientations, this isn't implemented yet but it prevents buildings with multiple orientations from being placed with a random image (that might be the wrong size).

Definition at line 63 of file tileData.hxx.

72 {
73  std::string fileName;
74  int count =
75  1;
76  int clippingWidth = 0;
77  int clippingHeight = 0;
78  int offset =
79  0;
80  bool pickRandomTile = false;
81  int rotations =
82  1;
83 };

◆ BETTER_ENUM() [2/2]

BETTER_ENUM ( TileType  ,
int  ,
DEFAULT  ,
FLORA  ,
TERRAIN  ,
WATER  ,
BLUEPRINT  ,
AUTOTILE  ,
ZONE  ,
ROAD  ,
POWERLINE  ,
GROUNDDECORATION  ,
UNDERGROUND  ,
RCI   
)

Variable Documentation

◆ int

int
Examples
tests/util/MessageQueue.cxx.

Definition at line 57 of file tileData.hxx.

◆ LOW

LOW

Low density.

Definition at line 58 of file tileData.hxx.

◆ MEDIUM

MEDIUM

Medium density.

Definition at line 59 of file tileData.hxx.

string
std::string string
Definition: AudioConfig.hxx:14