1 #ifndef SSPRITEFILE_HPP 2 #define SSPRITEFILE_HPP 6 #include <unordered_map> 16 #include "athena/SakuraGlobal.hpp" 80 SpriteFile(atUint32 width, atUint32 height,
float originX,
float originY);
90 SpriteFile(
const QSize& size,
const QPoint& origin);
106 void setSize(atUint32 width, atUint32 height);
112 #ifndef ATHENA_USE_QT 115 void setSize(
const QSize& size);
122 #ifndef ATHENA_USE_QT 132 atUint32 width()
const;
138 atUint32 height()
const;
145 void setOrigin(
const float x,
const float y);
151 #ifndef ATHENA_USE_QT 154 void setOrigin(
const QPoint& origin);
161 #ifndef ATHENA_USE_QT 164 QPoint origin()
const;
172 float originX()
const;
178 float originY()
const;
190 void removeTexture(
int id);
199 #ifndef ATHENA_USE_QT 200 std::vector<STexture*> textures()
const;
202 QList<STexture*> textures()
const;
204 atUint32 textureCount()
const;
210 #ifndef ATHENA_USE_QT 211 void setTextures(std::vector<STexture*> textures);
213 void setTextures(QList<STexture*> textures);
216 void addSprite(
Sprite* sprite);
218 #ifndef ATHENA_USE_QT 219 void removeSprite(
const std::string& name);
221 void removeSprite(
const QString& name);
223 void removeSprite(
Sprite* sprite);
225 #ifndef ATHENA_USE_QT 226 void setSprites(std::unordered_map<std::string, Sprite*> sprites);
228 void setSprites(QMap<QString, Sprite*> sprites);
230 #ifndef ATHENA_USE_QT 231 Sprite* sprite(
const std::string& name);
232 std::unordered_map<std::string, Sprite*> sprites()
const;
234 Sprite* sprite(
const QString& name);
235 QMap<QString, Sprite*> sprites()
const;
238 atUint32 spriteCount()
const;
242 void originChanged(QPoint);
243 void sizeChanged(QSize);
246 #ifndef ATHENA_USE_QT 247 std::vector<STexture*> m_textures;
250 std::unordered_map<std::string, Sprite*> m_sprites;
252 QList<STexture*> m_textures;
255 QMap<QString, Sprite*> m_sprites;
265 #endif // SSPRITE_HPP static const atUint32 Version
Version.
static const atUint32 Revision
Revision.
static const atUint32 Major
Major.
static const atUint32 Minor
Minor.
static const atUint32 Build
Patch.
static const atUint32 Magic
Magic.