From c0d9ecdf3fff5c9efcc12f0f6d9d8f2643cd1163 Mon Sep 17 00:00:00 2001 From: aap Date: Wed, 10 Jun 2015 22:52:59 +0200 Subject: [PATCH] clean up; gl test compiles under freebsd (but see makefile) --- src/clump.cpp | 1 + src/geometry.cpp | 1 + src/gtaplg.cpp | 2 ++ src/image.cpp | 2 ++ src/ogl.cpp | 1 + src/plugins.cpp | 2 ++ src/ps2.cpp | 1 + src/rwbase.cpp | 1 + src/rwbase.h | 23 +++++++++++------------ tests/gl/Makefile | 3 +++ 10 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/clump.cpp b/src/clump.cpp index d4c84d5..7d4929d 100644 --- a/src/clump.cpp +++ b/src/clump.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include diff --git a/src/geometry.cpp b/src/geometry.cpp index 31917cc..516cbd8 100644 --- a/src/geometry.cpp +++ b/src/geometry.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include diff --git a/src/gtaplg.cpp b/src/gtaplg.cpp index adf07a0..297ff69 100644 --- a/src/gtaplg.cpp +++ b/src/gtaplg.cpp @@ -2,6 +2,8 @@ #include #include #include +#include + #include #include "rwbase.h" diff --git a/src/image.cpp b/src/image.cpp index 6663d9d..1e74cff 100755 --- a/src/image.cpp +++ b/src/image.cpp @@ -2,6 +2,8 @@ #include #include #include +#include + #include #include "rwbase.h" diff --git a/src/ogl.cpp b/src/ogl.cpp index 9f391e9..df4b908 100644 --- a/src/ogl.cpp +++ b/src/ogl.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include diff --git a/src/plugins.cpp b/src/plugins.cpp index 3bc2a8c..546fc6c 100644 --- a/src/plugins.cpp +++ b/src/plugins.cpp @@ -2,6 +2,8 @@ #include #include #include +#include + #include #include "rwbase.h" diff --git a/src/ps2.cpp b/src/ps2.cpp index 793865e..ac7a016 100644 --- a/src/ps2.cpp +++ b/src/ps2.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include diff --git a/src/rwbase.cpp b/src/rwbase.cpp index 509321a..4d51db6 100644 --- a/src/rwbase.cpp +++ b/src/rwbase.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include diff --git a/src/rwbase.h b/src/rwbase.h index 5656699..783c4ba 100644 --- a/src/rwbase.h +++ b/src/rwbase.h @@ -1,22 +1,21 @@ namespace rw { -typedef char int8; -typedef short int16; -typedef int int32; -typedef long long int64; -typedef unsigned char uint8; -typedef unsigned short uint16; -typedef unsigned int uint32; -typedef unsigned long long uint64; +/* get rid of the stupid _t */ +typedef int8_t int8; +typedef int16_t int16; +typedef int32_t int32; +typedef int64_t int64; +typedef uint8_t uint8; +typedef uint16_t uint16; +typedef uint32_t uint32; +typedef uint64_t uint64; +typedef uintptr_t uintptr; + typedef float float32; typedef int32 bool32; typedef uint8 byte; typedef uint32 uint; -#if __WORDSIZE == 64 typedef uint64 uintptr; -#else -typedef uint32 uintptr; -#endif class Stream { diff --git a/tests/gl/Makefile b/tests/gl/Makefile index 4bead5c..d89aa76 100755 --- a/tests/gl/Makefile +++ b/tests/gl/Makefile @@ -3,10 +3,13 @@ SRC = main.cpp glshader.cpp math.cpp camera.cpp OBJ = $(patsubst %.cpp, $(BUILDDIR)/%.o, $(SRC)) DEP = $(patsubst %.cpp, $(BUILDDIR)/%.d, $(SRC)) RWDIR=$(HOME)/src/librw + #LDLIBS=-pthread -lX11 -lXrandr -lXi -lXxf86vm -lGL -lGLEW -lm #STATICLIBS= $(RWDIR)/librw-opengl.a /usr/local/lib/libglfw3.a + LDLIBS=-pthread -lGL -lGLEW -lglfw STATICLIBS=$(RWDIR)/librw-opengl.a + CFLAGS=-g -I$(RWDIR) -Wall -Wextra rwtest: $(OBJ) $(STATICLIBS)