From dd51ec0f1fadd719f5ee298c1c40890f6db1815b Mon Sep 17 00:00:00 2001 From: TravisBot <> Date: Thu, 12 Oct 2017 13:59:45 +0000 Subject: Rebuilding documentation --- spritesheet_8h_source.html | 144 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 115 insertions(+), 29 deletions(-) (limited to 'spritesheet_8h_source.html') diff --git a/spritesheet_8h_source.html b/spritesheet_8h_source.html index 4e21ff8c..01b22a87 100644 --- a/spritesheet_8h_source.html +++ b/spritesheet_8h_source.html @@ -3,22 +3,23 @@ - - + YAGE: yage/base/spritesheet.h Source File - - + @@ -27,7 +28,7 @@ -
+
YAGE  v0.1.1
@@ -38,19 +39,40 @@
- + - - - - + +
+ All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
@@ -85,29 +107,93 @@ $(document).ready(function(){initNavTree('spritesheet_8h_source.html','');});
spritesheet.h
-Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * spritesheet.h
3  *
4  * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
5  * MIT License, see LICENSE file for more details.
6  * ----------------------------------------------------------------------------
7  */
8 
9 #ifndef YAGE_SPRITESHEET_H
10 #define YAGE_SPRITESHEET_H
11 
12 #include "texture.h"
13 
14 #include <rapidjson/reader.h>
15 
16 #include <map>
17 #include <string>
18 
19 namespace yage
20 {
21 
22 namespace details
23 {
24 
25 struct Coordinate {
26  int x;
27  int y;
28  int width;
29  int height;
30 
31  Coordinate() = default;
32 
33  Coordinate(int x_i, int y_i, int width_i, int height_i)
34  : x(x_i), y(y_i), width(width_i), height(height_i)
35  {
36  }
37 };
38 
39 typedef std::map<std::string, details::Coordinate> SpriteMap;
40 
41 } // namespace details
42 
44 {
45 public:
46  SpriteSheet(std::string pngFileName, std::string jsonFileName);
47 
48  void sprite(std::string spriteName) const;
49  std::string fileContent(std::string jsonFileName) const;
50 
51 private:
54 
55  details::SpriteMap parseJson(int &width, int &height, const std::string &jsonContent) const;
56 };
57 
58 } // namespace yage
59 
60 #endif
Definition: spritesheet.h:43
-
Coordinate(int x_i, int y_i, int width_i, int height_i)
Definition: spritesheet.h:33
+Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
+
2  * spritesheet.h
+
3  *
+
4  * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
+
5  * MIT License, see LICENSE file for more details.
+
6  * ----------------------------------------------------------------------------
+
7  */
+
8 
+
12 #ifndef YAGE_SPRITESHEET_H
+
13 #define YAGE_SPRITESHEET_H
+
14 
+
15 #include "texture.h"
+
16 
+
17 #include <rapidjson/reader.h>
+
18 
+
19 #include <map>
+
20 #include <string>
+
21 
+
22 namespace yage
+
23 {
+
24 
+
25 namespace details
+
26 {
+
27 
+
28 struct Coordinate {
+
29  int x;
+
30  int y;
+
31  int width;
+
32  int height;
+
33 
+
34  Coordinate() = default;
+
35 
+
36  Coordinate(int x_i, int y_i, int width_i, int height_i)
+
37  : x(x_i), y(y_i), width(width_i), height(height_i)
+
38  {
+
39  }
+
40 };
+
41 
+
42 typedef std::map<std::string, details::Coordinate> SpriteMap;
+
43 
+
44 } // namespace details
+
45 
+ +
47 {
+
48 public:
+
49  SpriteSheet(std::string pngFileName, std::string jsonFileName);
+
50 
+
51  void sprite(std::string spriteName) const;
+
52  std::string fileContent(std::string jsonFileName) const;
+
53 
+
54 private:
+ + +
57 
+
58  details::SpriteMap parseJson(int &width, int &height,
+
59  std::string jsonContent) const;
+
60 };
+
61 
+
62 } // namespace yage
+
63 
+
64 #endif
+
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: texture.h:17
-
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
-- cgit