From 054738ff7c07cf86e72fa7fb6d4136349eef5b1c Mon Sep 17 00:00:00 2001 From: pixel Date: Mon, 17 Feb 2003 09:10:04 +0000 Subject: Forgot a .h.... tsk tsk tsk... --- include/sprite.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 include/sprite.h (limited to 'include/sprite.h') diff --git a/include/sprite.h b/include/sprite.h new file mode 100644 index 0000000..803bd4a --- /dev/null +++ b/include/sprite.h @@ -0,0 +1,43 @@ +#ifndef __SPRITE_H__ +#define __SPRITE_H__ + +#include +#include +#include +#include +#include "gltexture.h" + +namespace mogltk { + + class Sprite : public Base { + public: + Sprite(Handle *, int, int); + Sprite(Uint8 *, int, int); + virtual ~Sprite(); + void draw(int, int, Color = WHITE); + private: + class TexList : public Base { + public: + TexList(int); + virtual ~TexList(); + Sprite * sprheader; + const texture * GetTex() const; + static const TexList * GetHead() const; + const TexList * GetNext() const; + void Bind() const; + private: + texture * tex; + static TexList * header; + TexList * next, * prev; + }; + Sprite * next, * prev; + TexList * tlist; + int sx, sy, posx, posy; + void alloc() const; + bool canfit(int, int, int, int) const; + bool intersect(int, int, int, int) const; + }; + +}; + +#endif -- cgit v1.2.3