summaryrefslogtreecommitdiff
path: root/glpong3d.h
diff options
context:
space:
mode:
Diffstat (limited to 'glpong3d.h')
-rw-r--r--glpong3d.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/glpong3d.h b/glpong3d.h
index 352ba0c..55ac799 100644
--- a/glpong3d.h
+++ b/glpong3d.h
@@ -4,6 +4,24 @@
#include "SDL.h"
#include "SDL_opengl.h"
+#define GLPONG_WIDTH 800.0f
+#define GLPONG_HEIGHT 600.0f
+
+#define GLPONG_NOACTION 0
+#define GLPONG_EXIT 1
+
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+#define RMASK 0xff000000
+#define GMASK 0x00ff0000
+#define BMASK 0x0000ff00
+#define AMASK 0x000000ff
+#else
+#define RMASK 0x000000ff
+#define GMASK 0x0000ff00
+#define BMASK 0x00ff0000
+#define AMASK 0xff000000
+#endif
+
GLuint background;
GLuint paddle_texture;
@@ -32,17 +50,13 @@ typedef struct {
} GLC_t;
struct {
- SDL_Event Event;
SDL_Surface * Surface;
Ball_t Ball;
Paddle_t Front;
Paddle_t Back;
Mouse_t Mouse;
GLC_t GLC;
- GLfloat w;
- GLfloat h;
GLfloat fps;
- Sint8 done;
} GLPong;
void GLPong_Collide(Ball_t * ball, const Paddle_t * paddle);