Tileson
1.4.0
A helpful json parser for Tiled maps
Loading...
Searching...
No Matches
include
common
Enums.hpp
Go to the documentation of this file.
1
//
2
// Created by robin on 22.03.2020.
3
//
4
5
#ifndef TILESON_ENUMS_HPP
6
#define TILESON_ENUMS_HPP
7
#include <cstdint>
8
#include "
EnumBitflags.hpp
"
9
10
namespace
tson
11
{
15
enum class
Type
: uint8_t
16
{
17
Undefined
= 0,
18
Color
= 1,
19
File
= 2,
20
Int
= 3,
21
Boolean
= 4,
22
Float
= 5,
23
String
= 6,
24
Class
= 7,
25
Enum
= 8,
26
Object
= 9
27
};
28
33
enum class
LayerType
: uint8_t
34
{
35
Undefined
= 0,
36
TileLayer
= 1,
37
ObjectGroup
= 2,
38
ImageLayer
= 3,
39
Group
= 4
40
};
41
45
enum class
ParseStatus
: uint8_t
46
{
47
OK
= 0,
//OK unless otherwise stated
48
FileNotFound
= 1,
49
ParseError
= 2,
50
MissingData
= 3,
51
DecompressionError
= 4
52
};
53
57
enum class
ObjectType
: uint8_t
58
{
59
Undefined
= 0,
60
Object
= 1,
61
Ellipse
= 2,
62
Rectangle
= 3,
63
Point
= 4,
64
Polygon
= 5,
65
Polyline
= 6,
66
Text
= 7,
67
Template
= 8
68
};
69
70
static
constexpr
uint32_t FLIPPED_HORIZONTALLY_FLAG = 0x80000000;
71
static
constexpr
uint32_t FLIPPED_VERTICALLY_FLAG = 0x40000000;
72
static
constexpr
uint32_t FLIPPED_DIAGONALLY_FLAG = 0x20000000;
76
enum class
TileFlipFlags
: uint32_t
77
{
78
None
= 0,
79
Diagonally
= FLIPPED_DIAGONALLY_FLAG,
80
Vertically
= FLIPPED_VERTICALLY_FLAG,
81
Horizontally
= FLIPPED_HORIZONTALLY_FLAG
82
};
83
87
enum class
ObjectAlignment
: uint8_t
88
{
89
Unspecified
= 0,
//unspecified
90
TopLeft
= 1,
//topleft
91
Top
= 2,
//top
92
TopRight
= 3,
//topright
93
Left
= 4,
//left
94
Center
= 5,
//center
95
Right
= 6,
//right
96
BottomLeft
= 7,
//bottomleft
97
Bottom
= 8,
//bottom
98
BottomRight
= 9
//bottomright
99
};
100
104
enum class
TextAlignment
: uint8_t
105
{
106
Unresolved
= 0,
107
Left
= 1,
//left
108
Center
= 2,
//center
109
Right
= 3,
//right
110
Justify
= 4,
//justify
111
Top
= 5,
//top
112
Bottom
= 6
//bottom
113
};
114
118
enum class
TileRenderSize
: uint8_t
119
{
120
Undefined
= 0,
121
Tile
= 1,
//tile (default)
122
Grid
= 2
//grid
123
};
124
128
enum class
FillMode
: uint8_t
129
{
130
Undefined
= 0,
131
Stretch
= 1,
//stretch (default)
132
PreserveAspectFit
= 2
//preserve-aspect-fit
133
};
134
135
enum class
EnumStorageType
: uint8_t
136
{
137
Unspecified
= 0,
138
Int
= 1,
139
String
= 2
140
};
141
142
ENABLE_BITMASK_OPERATORS
(
TileFlipFlags
)
143
}
144
145
#endif
//TILESON_ENUMS_HPP
EnumBitflags.hpp
ENABLE_BITMASK_OPERATORS
#define ENABLE_BITMASK_OPERATORS(x)
Definition
EnumBitflags.hpp:18
tson::Color
Definition
Color.hpp:17
tson::Grid
Definition
Grid.hpp:15
tson::Object
Definition
Object.hpp:21
tson::Text
Definition
Text.hpp:13
tson::Tile
Definition
Tile.hpp:23
tson
Definition
Base64.hpp:12
tson::Type
Type
Definition
Enums.hpp:16
tson::Type::File
@ File
tson::Type::Int
@ Int
tson::Type::Float
@ Float
tson::Type::String
@ String
tson::Type::Boolean
@ Boolean
tson::Type::Class
@ Class
tson::Type::Enum
@ Enum
tson::Type::Undefined
@ Undefined
tson::TileRenderSize
TileRenderSize
Definition
Enums.hpp:119
tson::TextAlignment
TextAlignment
Definition
Enums.hpp:105
tson::TextAlignment::Unresolved
@ Unresolved
tson::TextAlignment::Justify
@ Justify
tson::ObjectType
ObjectType
Definition
Enums.hpp:58
tson::ObjectType::Ellipse
@ Ellipse
tson::ObjectType::Template
@ Template
tson::ObjectType::Point
@ Point
tson::ObjectType::Polygon
@ Polygon
tson::ObjectType::Rectangle
@ Rectangle
tson::ObjectType::Polyline
@ Polyline
tson::ParseStatus
ParseStatus
Definition
Enums.hpp:46
tson::ParseStatus::FileNotFound
@ FileNotFound
tson::ParseStatus::DecompressionError
@ DecompressionError
tson::ParseStatus::OK
@ OK
tson::ParseStatus::ParseError
@ ParseError
tson::ParseStatus::MissingData
@ MissingData
tson::FillMode
FillMode
Definition
Enums.hpp:129
tson::FillMode::PreserveAspectFit
@ PreserveAspectFit
tson::FillMode::Stretch
@ Stretch
tson::EnumStorageType
EnumStorageType
Definition
Enums.hpp:136
tson::TileFlipFlags
TileFlipFlags
Definition
Enums.hpp:77
tson::TileFlipFlags::Vertically
@ Vertically
tson::TileFlipFlags::None
@ None
tson::TileFlipFlags::Horizontally
@ Horizontally
tson::TileFlipFlags::Diagonally
@ Diagonally
tson::LayerType
LayerType
Definition
Enums.hpp:34
tson::LayerType::Group
@ Group
tson::LayerType::ObjectGroup
@ ObjectGroup
tson::LayerType::ImageLayer
@ ImageLayer
tson::LayerType::TileLayer
@ TileLayer
tson::ObjectAlignment
ObjectAlignment
Definition
Enums.hpp:88
tson::ObjectAlignment::TopRight
@ TopRight
tson::ObjectAlignment::Bottom
@ Bottom
tson::ObjectAlignment::Center
@ Center
tson::ObjectAlignment::Unspecified
@ Unspecified
tson::ObjectAlignment::BottomRight
@ BottomRight
tson::ObjectAlignment::Right
@ Right
tson::ObjectAlignment::Left
@ Left
tson::ObjectAlignment::BottomLeft
@ BottomLeft
tson::ObjectAlignment::Top
@ Top
tson::ObjectAlignment::TopLeft
@ TopLeft
Generated by
1.9.8