34 : x(x_i), y(y_i), width(width_i), height(height_i)
+
+
+
+
+
+
+
+
12 #ifndef YAGE_SPRITESHEET_H
+
13 #define YAGE_SPRITESHEET_H
+
+
+
+
17 #include <rapidjson/reader.h>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
42 typedef std::map<std::string, details::Coordinate>
SpriteMap;
+
+
+
+
+
+
+
49 SpriteSheet(std::string pngFileName, std::string jsonFileName);
+
+
51 void sprite(std::string spriteName)
const;
+
52 std::string
fileContent(std::string jsonFileName)
const;
+
+
+
+
+
+
+
59 std::string jsonContent)
const;
+
+
+
+
+
+
Definition: spritesheet.h:46
+
Coordinate(int x_i, int y_i, int width_i, int height_i)
Definition: spritesheet.h:36
+
SpriteSheet(std::string pngFileName, std::string jsonFileName)
Definition: spritesheet.cpp:29
-
int x
Definition: spritesheet.h:26
+
int x
Definition: spritesheet.h:29
-
std::map< std::string, details::Coordinate > SpriteMap
Definition: spritesheet.h:39
-
Texture texture_
Definition: spritesheet.h:52
-
int width
Definition: spritesheet.h:28
-
int height
Definition: spritesheet.h:29
+
std::map< std::string, details::Coordinate > SpriteMap
Definition: spritesheet.h:42
+
Texture texture_
Definition: spritesheet.h:55
+
int width
Definition: spritesheet.h:31
+
void sprite(std::string spriteName) const
+
int height
Definition: spritesheet.h:32
+
std::string fileContent(std::string jsonFileName) const
Definition: spritesheet.cpp:42
-
Definition: spritesheet.h:25
-
int y
Definition: spritesheet.h:27
-
Project namespace.
Definition: camera2d.cpp:13
-
details::SpriteMap fileLocations_
Definition: spritesheet.h:53
+
Definition: spritesheet.h:28
+
int y
Definition: spritesheet.h:30
+
details::SpriteMap parseJson(int &width, int &height, std::string jsonContent) const
Definition: spritesheet.cpp:52
+
details::SpriteMap fileLocations_
Definition: spritesheet.h:56