From 11f44e36d5f02f8309fc463f9a2c6cd81b42c3ce Mon Sep 17 00:00:00 2001 From: pixel Date: Sat, 7 Dec 2002 00:42:14 +0000 Subject: Whoups --- include/engine.h | 16 ++++++++++++++++ include/glbase.h | 29 +++++++++++++++++++++++++++++ include/glfont.h | 25 +++++++++++++++++++++++++ include/gltexture.h | 26 ++++++++++++++++++++++++++ 4 files changed, 96 insertions(+) create mode 100644 include/engine.h create mode 100644 include/glbase.h create mode 100644 include/glfont.h create mode 100644 include/gltexture.h (limited to 'include') diff --git a/include/engine.h b/include/engine.h new file mode 100644 index 0000000..2b8af3c --- /dev/null +++ b/include/engine.h @@ -0,0 +1,16 @@ +#ifndef __ENGINE_H__ +#define __ENGINE_H__ + +#include + +namespace mogltk { + class engine : public Base { + public: + static int setup() throw(GeneralException); + static int GetInited(); + private: + static int inited; + }; +}; + +#endif diff --git a/include/glbase.h b/include/glbase.h new file mode 100644 index 0000000..1852250 --- /dev/null +++ b/include/glbase.h @@ -0,0 +1,29 @@ +#ifndef __GLBASE_H__ +#define __GLBASE_H__ + +#include +#include +#include + +namespace mogltk { + class glbase : public Base { + public: + static int setup(int w = 640, int h = 480, int flags = 0) throw(GeneralException); + static int GetWidth(void); + static int GetHeight(void); + static int GetInited(void); + static void Enter2DMode(void); + static void Leave2DMode(void); + static void Flip(void); + static bool is2D(void); + static void glVertex(GLdouble, GLdouble, GLdouble = 0.0, GLdouble = 1.0); + static void glVertex(GLfloat, GLfloat, GLfloat = 0.0, GLfloat = 1.0); + static void glVertex(GLint, GLint, GLint = 0, GLint = 1); + static void glVertex(GLshort, GLshort, GLshort = 0, GLshort = 1); + private: + static int width, height, inited, twoD; + static SDL_Surface * surface; + }; +}; + +#endif diff --git a/include/glfont.h b/include/glfont.h new file mode 100644 index 0000000..de4ef63 --- /dev/null +++ b/include/glfont.h @@ -0,0 +1,25 @@ +#ifndef __GLFONT_H__ +#define __GLFONT_H__ + +#include +#include +#include +#include "gltexture.h" + +namespace mogltk { + class font : public Base { + public: + font(const String & = "font.bin"); + virtual ~font(); + void drawentry(Uint16, Color = Color(255, 255, 255), int = -1, int = -1); + + private: + Uint8 * sizes; + Uint16 nbentries, nbcT, nbT; + Uint8 flags, maxX, maxY, nbcU, nbcV; + texture ** fonttex; + Uint16 * corresp; + }; +}; + +#endif diff --git a/include/gltexture.h b/include/gltexture.h new file mode 100644 index 0000000..c18e6ec --- /dev/null +++ b/include/gltexture.h @@ -0,0 +1,26 @@ +#ifndef __GLTEXTURE_H__ +#define __GLTEXTURE_H__ + +#include +#include +#include + +namespace mogltk { + class texture : public Base { + public: + texture(int = 256, int = 256, bool = false) throw (GeneralException); + virtual ~texture(); + SDL_Surface * GetSurface() throw (GeneralException); + void Generate() throw (GeneralException); + void Bind(bool = true) throw (GeneralException); + GLuint GetWidth(); + GLuint GetHeight(); + static void Unbind(void); + private: + GLuint width, height, tex; + SDL_Surface * surface; + bool planar; + }; +}; + +#endif -- cgit v1.2.3