summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2010-01-21 14:57:49 -0500
committerMatt Turner <mattst88@gmail.com>2011-04-04 17:14:35 -0400
commit8be6ba5efd36c67b0486b313603bf3085c5f328a (patch)
treebc0e955a6b9bb66f1948fb23d41a3e6386b6d476
parent965fdd704e97ce96bd1a0eaffa5f9c2546d86441 (diff)
Make functions static.
Signed-off-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--glpong3d.c16
-rw-r--r--glpong3d.h5
2 files changed, 11 insertions, 10 deletions
diff --git a/glpong3d.c b/glpong3d.c
index 0037b4f..f642168 100644
--- a/glpong3d.c
+++ b/glpong3d.c
@@ -10,6 +10,12 @@
#include "glpong3d.h"
+static void GLPong_Init(void);
+static void GLPong_HandleEvents(void);
+static void GLPong_Draw(void);
+static void GLPong_CleanUp(void);
+static void GLPong_Move(void);
+
GLuint box;
int main(int argc, char * argv[]) {
@@ -41,7 +47,7 @@ int main(int argc, char * argv[]) {
return 0;
}
-void GLPong_Init() {
+void GLPong_Init(void) {
SDL_Surface * temp = NULL;
int i;
int count;
@@ -166,7 +172,7 @@ void GLPong_Init() {
glPointSize(10.0f);
}
-void GLPong_HandleEvents() {
+void GLPong_HandleEvents(void) {
Uint8 * key;
int x = 0, y = 0;
if (SDL_PollEvent(&GLPong.Event) != 0) {
@@ -204,7 +210,7 @@ void GLPong_HandleEvents() {
/*printf("SDL x,y: %d,%d; OpenGL x,y: %f,%f\n", x, y, GLPong.Mouse.x, GLPong.Mouse.y);*/
}
-void GLPong_Move() {
+void GLPong_Move(void) {
GLPong.Ball.x += GLPong.Ball.xv;
if (GLPong.Ball.x > 1.0f) {
GLPong.Ball.x = 1.0f;
@@ -236,7 +242,7 @@ void GLPong_Move() {
GLPong_Collide(&GLPong.Ball, &GLPong.Front);
}
-void GLPong_Draw() {
+void GLPong_Draw(void) {
char buffer[10];
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -447,7 +453,7 @@ void GLPong_Collide(Ball_t * ball, const Paddle_t * paddle) {
}
}
-void GLPong_CleanUp() {
+void GLPong_CleanUp(void) {
}
diff --git a/glpong3d.h b/glpong3d.h
index dafdee7..352ba0c 100644
--- a/glpong3d.h
+++ b/glpong3d.h
@@ -45,11 +45,6 @@ struct {
Sint8 done;
} GLPong;
-void GLPong_Init();
-void GLPong_HandleEvents();
-void GLPong_Draw();
-void GLPong_CleanUp();
-void GLPong_Move();
void GLPong_Collide(Ball_t * ball, const Paddle_t * paddle);
GLuint SDL_GL_SurfaceToTexture(SDL_Surface * surface);