1234567891011121314151617181920212223242526272829303132333435363738 |
- /*!
- * \file include/Sprite.h
- * \brief World Sprite
- *
- * \author xythobuz
- */
-
- #ifndef _SPRITE_H_
- #define _SPRITE_H_
-
- #include "system/Shader.h"
-
- class Sprite {
- public:
- Sprite(int tile, int x, int y, int width, int height);
- void display(glm::mat4 MVP);
-
- private:
- int texture;
- ShaderBuffer vertices, uvs;
- };
-
- class SpriteSequence {
- public:
- SpriteSequence(int objectID, int offset, int size)
- : id(objectID), start(offset), length(size) { }
- void display(glm::mat4 MVP, int index);
-
- int getID() { return id; }
-
- private:
- int id;
- int start;
- int length;
- };
-
- #endif
|