From 8a2b508eff6a9fc11c9e91316c8c3f8e9410848a Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Wed, 20 Sep 2017 00:54:51 +0100 Subject: Working on SpriteSheet --- yage/base/spritesheet.h | 8 +++++--- yage/math/matrix.h | 18 +++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/yage/base/spritesheet.h b/yage/base/spritesheet.h index dbde07c0..763ad2d5 100644 --- a/yage/base/spritesheet.h +++ b/yage/base/spritesheet.h @@ -17,7 +17,7 @@ namespace yage { -namespace +namespace details { struct Coordinate { @@ -32,16 +32,18 @@ struct Coordinate { } }; -} // namespace +} // namespace details class SpriteSheet { public: SpriteSheet(std::string pngFileName, std::string jsonFileName); + void sprite(std::string spriteName) const; + private: Texture texture_; - std::map fileLocations_; + std::map fileLocations_; }; } // namespace yage diff --git a/yage/math/matrix.h b/yage/math/matrix.h index 7810d202..3df1509d 100644 --- a/yage/math/matrix.h +++ b/yage/math/matrix.h @@ -27,12 +27,12 @@ class Matrix; /** @internal Namespace for internal details. * - * Detail Namespace + * Details Namespace * ================ * - * This is the namespace used for implementation detail. + * This is the namespace used for implementation details. */ -namespace detail +namespace details { /** @internal Internal Row class used by the Matrix class to return the @@ -68,7 +68,7 @@ public: } }; -} // namespace detail +} // namespace details /** Base Matrix class used by other similar classes. */ @@ -76,7 +76,7 @@ template class Matrix { // friended with the row class so that it can access protected member data. - friend class detail::Row; + friend class details::Row; protected: /// Vector containing the data of the matrix. @@ -158,14 +158,14 @@ public: return ss.str(); } - detail::Row operator[](int row) + details::Row operator[](int row) { - return detail::Row(this, row); + return details::Row(this, row); } - detail::Row operator[](int row) const + details::Row operator[](int row) const { - return detail::Row((Matrix *)this, + return details::Row((Matrix *)this, row); } -- cgit