summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle K <kylek389@gmail.com>2011-07-18 18:41:49 -0500
committerKamil Kaminski <kamilkss@gmail.com>2011-07-18 18:41:49 -0500
commitc36922caef3098f9a1f62712d57012822ee2145a (patch)
treea99456a3f705c85cd44bdbcb0dc1a627aac112bb
parent881ada4374bc0bd52ea3d99f989a16c5436ce65d (diff)
downloadGLPyramid-c36922caef3098f9a1f62712d57012822ee2145a.tar.gz
GLPyramid-c36922caef3098f9a1f62712d57012822ee2145a.tar.bz2
GLPyramid-c36922caef3098f9a1f62712d57012822ee2145a.zip
sdl: forgot to zero out client struct
-rw-r--r--sdl/Makefile11
-rw-r--r--sdl/gldraw.c1
-rw-r--r--sdl/pyramid.c3
3 files changed, 8 insertions, 7 deletions
diff --git a/sdl/Makefile b/sdl/Makefile
index 66e2d84..67e297d 100644
--- a/sdl/Makefile
+++ b/sdl/Makefile
@@ -21,7 +21,8 @@ OBJ_FILES = $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(subst .c,,$(SRC))))
$(BIN): $(OBJ_DIR) $(OBJ_FILES)
$(CC) $(LDFLAGS) $(SDL_LDFLAGS) $(SDL_image_LDFLAGS) $(OBJ_FILES) -o $@
-$(OBJ_DIR)/pyramid.o: $(OBJ_DIR)/%.o: %.c gldraw.h glframe.h gltools.h luatools.h math3d.h platform.h sdltools.h window.h client.h
+$(OBJ_DIR)/pyramid.o: $(OBJ_DIR)/%.o: %.c gldraw.h glframe.h gltools.h \
+ luatools.h math3d.h platform.h sdltools.h window.h client.h
$(CC) -c $(CFLAGS) $(SDL_CFLAGS) $(SDL_image_CFLAGS) $< -o $@
$(OBJ_DIR)/math3d.o: $(OBJ_DIR)/%.o: %.c %.h
@@ -30,7 +31,8 @@ $(OBJ_DIR)/math3d.o: $(OBJ_DIR)/%.o: %.c %.h
$(OBJ_DIR)/gltools.o: $(OBJ_DIR)/%.o: %.c %.h
$(CC) -c $(CFLAGS) $< -o $@
-$(OBJ_DIR)/glframe.o: $(OBJ_DIR)/%.o: %.c %.h math3d.h glframe.h luatools.h gldraw.h gltools.h luatools.h sdltools.h
+$(OBJ_DIR)/glframe.o: $(OBJ_DIR)/%.o: %.c %.h math3d.h glframe.h luatools.h \
+ gldraw.h gltools.h luatools.h sdltools.h
$(CC) -c $(CFLAGS) $< -o $@
$(OBJ_DIR)/shader.o: $(OBJ_DIR)/%.o: %.c %.h
@@ -48,10 +50,11 @@ $(OBJ_DIR)/gldraw.o: $(OBJ_DIR)/%.o: %.c %.h math3d.h
$(OBJ_DIR)/sdltools.o: $(OBJ_DIR)/%.o: %.c %.h math3d.h glframe.h
$(CC) -c $(CFLAGS) $< -o $@
-$(OBJ_DIR)/luatools.o: $(OBJ_DIR)/%.o: %.c %.h math3d.h
+$(OBJ_DIR)/luatools.o: $(OBJ_DIR)/%.o: %.c %.h
$(CC) -c $(CFLAGS) $< -o $@
-$(OBJ_DIR)/event.o: $(OBJ_DIR)/%.o: %.c %.h math3d.h client.h glframe.h platform.h window.h
+$(OBJ_DIR)/event.o: $(OBJ_DIR)/%.o: %.c %.h client.h glframe.h platform.h \
+ window.h
$(CC) -c $(CFLAGS) $< -o $@
$(OBJ_DIR):
diff --git a/sdl/gldraw.c b/sdl/gldraw.c
index 5430009..b4e3be7 100644
--- a/sdl/gldraw.c
+++ b/sdl/gldraw.c
@@ -7,7 +7,6 @@
#include <GL/glew.h>
#include <GL/freeglut.h>
-#include <math.h>
#include "math3d.h"
#include "gldraw.h"
diff --git a/sdl/pyramid.c b/sdl/pyramid.c
index ff40dff..1e14ebb 100644
--- a/sdl/pyramid.c
+++ b/sdl/pyramid.c
@@ -14,8 +14,6 @@
*
* it might be time to split the code, and make a shader version...
*
- * ToDo: on linux, update the makefile dependencies, and check out lua-config
- *
*/
#include <SDL/SDL.h>
@@ -133,6 +131,7 @@ int main(int argc, char **argv)
/* setup client platform */
struct client c;
+ memset(&c, 0, sizeof(c));
p.c = &c;
p.client_init = &client_init;
p.client_destroy = &client_destroy;