summaryrefslogtreecommitdiff
path: root/glpong3d.h
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2010-02-09 18:54:57 -0500
committerMatt Turner <mattst88@gmail.com>2011-04-04 17:14:36 -0400
commit9628bb86f9f31f6186b473ea3b386286c0e92623 (patch)
tree86ce401818879ecf886d1a30e4c165c66454a23a /glpong3d.h
parentc13c49df034b292652017e35b3bf4fa6b9fe6af7 (diff)
Add Paddle/Ball collision detection.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'glpong3d.h')
-rw-r--r--glpong3d.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/glpong3d.h b/glpong3d.h
index 13615db..1952131 100644
--- a/glpong3d.h
+++ b/glpong3d.h
@@ -4,6 +4,9 @@
#include "SDL.h"
#include "SDL_opengl.h"
+#include "ball.h"
+#include "paddle.h"
+
#define GLPONG_WIDTH 800.0f
#define GLPONG_HEIGHT 600.0f
@@ -26,22 +29,11 @@
#endif
typedef struct {
- GLfloat x, y, z;
-} Coord_t;
-
-typedef struct {
- Coord_t coord;
- GLfloat w, h;
- GLfloat r, g, b;
-} Paddle_t;
-
-typedef struct {
Paddle_t front_paddle;
Paddle_t back_paddle;
+ Ball_t ball;
} GLPong_t;
-GLPong_t GLPong;
-
GLuint box;
#endif