diff options
author | pixel <pixel> | 2003-03-26 17:19:23 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-03-26 17:19:23 +0000 |
commit | be0486797260377246c1ea1229cca27c19c64ad2 (patch) | |
tree | 2d6f03e0e8cad191250239b69205c727c5551323 /include/glsprite.h | |
parent | c00cd54ca5ed959cbccff7aa7261fb5025d1832c (diff) |
bleh
Diffstat (limited to 'include/glsprite.h')
-rw-r--r-- | include/glsprite.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/include/glsprite.h b/include/glsprite.h new file mode 100644 index 0000000..3f481c5 --- /dev/null +++ b/include/glsprite.h @@ -0,0 +1,45 @@ +#ifndef __GLSPRITE_H__ +#define __GLSPRITE_H__ + +#include <vector> +#include <Exceptions.h> +#include <Handle.h> +#include <glcolor.h> +#include "gltexture.h" +#include "sprite.h" + +namespace mogltk { + class glSprite : public Sprite { + public: + glSprite(Handle *, int, int); + glSprite(Uint8 *, int, int); + virtual ~glSprite(); + virtual void draw(int, int, ColorP = WHITE); + private: + class TexList : public Base { + public: + TexList(int); + virtual ~TexList(); + glSprite * sprheader; + const texture * GetTex() const; + texture * GetTex(); + static const TexList * GetHead(); + const TexList * GetNext() const; + TexList * GetNext(); + void Bind() const; + private: + texture * tex; + static TexList * header; + TexList * next, * prev; + }; + glSprite * next, * prev; + TexList * tlist; + int sx, sy, posx, posy; + void alloc(); + bool canfit(int, int, int, int) const; + bool intersect(int, int, int, int) const; + }; + +}; + +#endif |