From 39ca43ca3b24dcae76e1283ec8af4a16c845e2b7 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Wed, 20 Sep 2017 00:29:45 +0100 Subject: More tests and adding spritesheet support --- yage/base/spritesheet.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'yage/base/spritesheet.h') diff --git a/yage/base/spritesheet.h b/yage/base/spritesheet.h index 2b70ad8b..dbde07c0 100644 --- a/yage/base/spritesheet.h +++ b/yage/base/spritesheet.h @@ -11,13 +11,37 @@ #include "texture.h" +#include +#include + namespace yage { +namespace +{ + +struct Coordinate { + int x; + int y; + int width; + int height; + + Coordinate(int x_i, int y_i, int width_i, int height_i) + : x(x_i), y(y_i), width(width_i), height(height_i) + { + } +}; + +} // namespace + class SpriteSheet { +public: + SpriteSheet(std::string pngFileName, std::string jsonFileName); + private: - Texture texture_; + Texture texture_; + std::map fileLocations_; }; } // namespace yage -- cgit