From 9628bb86f9f31f6186b473ea3b386286c0e92623 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Tue, 9 Feb 2010 18:54:57 -0500 Subject: Add Paddle/Ball collision detection. Signed-off-by: Matt Turner --- glpong3d.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'glpong3d.h') 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 @@ -25,23 +28,12 @@ #define AMASK 0xff000000 #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 -- cgit v1.2.3