diff --git a/dists/msvc7/residual.vcproj b/dists/msvc7/residual.vcproj
index 936e1e32624..bb1fcd5d690 100644
--- a/dists/msvc7/residual.vcproj
+++ b/dists/msvc7/residual.vcproj
@@ -587,12 +587,6 @@
-
-
-
-
diff --git a/dists/msvc71/residual.vcproj b/dists/msvc71/residual.vcproj
index d1621a9d359..523839c12ff 100644
--- a/dists/msvc71/residual.vcproj
+++ b/dists/msvc71/residual.vcproj
@@ -601,12 +601,6 @@
-
-
-
-
diff --git a/dists/msvc8/residual.vcproj b/dists/msvc8/residual.vcproj
index 712ac425d0d..f41e3e8d59a 100644
--- a/dists/msvc8/residual.vcproj
+++ b/dists/msvc8/residual.vcproj
@@ -822,14 +822,6 @@
RelativePath="..\..\engine\tinygl\misc.cpp"
>
-
-
-
-
diff --git a/dists/msvc9/residual.vcproj b/dists/msvc9/residual.vcproj
index 107ea648f2b..a6aa0bc1518 100644
--- a/dists/msvc9/residual.vcproj
+++ b/dists/msvc9/residual.vcproj
@@ -827,14 +827,6 @@
RelativePath="..\..\engine\tinygl\misc.cpp"
>
-
-
-
-
diff --git a/dists/xcode/residual.xcodeproj/project.pbxproj b/dists/xcode/residual.xcodeproj/project.pbxproj
index fa074632347..7a271e8d6c3 100644
--- a/dists/xcode/residual.xcodeproj/project.pbxproj
+++ b/dists/xcode/residual.xcodeproj/project.pbxproj
@@ -93,7 +93,6 @@
289EEF230D8921F600521A80 /* matrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 289EEEBF0D8921F600521A80 /* matrix.cpp */; };
289EEF240D8921F600521A80 /* memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 289EEEC00D8921F600521A80 /* memory.cpp */; };
289EEF250D8921F600521A80 /* misc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 289EEEC10D8921F600521A80 /* misc.cpp */; };
- 289EEF260D8921F600521A80 /* msghandling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 289EEEC20D8921F600521A80 /* msghandling.cpp */; };
289EEF270D8921F600521A80 /* select.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 289EEEC60D8921F600521A80 /* select.cpp */; };
289EEF280D8921F600521A80 /* specbuf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 289EEEC70D8921F600521A80 /* specbuf.cpp */; };
289EEF290D8921F600521A80 /* texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 289EEEC90D8921F600521A80 /* texture.cpp */; };
@@ -303,8 +302,6 @@
289EEEBF0D8921F600521A80 /* matrix.cpp */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.cpp.cpp; path = matrix.cpp; sourceTree = ""; };
289EEEC00D8921F600521A80 /* memory.cpp */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.cpp.cpp; path = memory.cpp; sourceTree = ""; };
289EEEC10D8921F600521A80 /* misc.cpp */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.cpp.cpp; path = misc.cpp; sourceTree = ""; };
- 289EEEC20D8921F600521A80 /* msghandling.cpp */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.cpp.cpp; path = msghandling.cpp; sourceTree = ""; };
- 289EEEC30D8921F600521A80 /* msghandling.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = msghandling.h; sourceTree = ""; };
289EEEC40D8921F600521A80 /* opinfo.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = opinfo.h; sourceTree = ""; };
289EEEC50D8921F600521A80 /* README.residual */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = README.residual; sourceTree = ""; };
289EEEC60D8921F600521A80 /* select.cpp */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.cpp.cpp; path = select.cpp; sourceTree = ""; };
@@ -681,8 +678,6 @@
289EEEBF0D8921F600521A80 /* matrix.cpp */,
289EEEC00D8921F600521A80 /* memory.cpp */,
289EEEC10D8921F600521A80 /* misc.cpp */,
- 289EEEC20D8921F600521A80 /* msghandling.cpp */,
- 289EEEC30D8921F600521A80 /* msghandling.h */,
289EEEC40D8921F600521A80 /* opinfo.h */,
289EEEC50D8921F600521A80 /* README.residual */,
289EEEC60D8921F600521A80 /* select.cpp */,
@@ -875,7 +870,6 @@
289EEF230D8921F600521A80 /* matrix.cpp in Sources */,
289EEF240D8921F600521A80 /* memory.cpp in Sources */,
289EEF250D8921F600521A80 /* misc.cpp in Sources */,
- 289EEF260D8921F600521A80 /* msghandling.cpp in Sources */,
289EEF270D8921F600521A80 /* select.cpp in Sources */,
289EEF280D8921F600521A80 /* specbuf.cpp in Sources */,
289EEF290D8921F600521A80 /* texture.cpp in Sources */,
diff --git a/engine/tinygl/misc.cpp b/engine/tinygl/misc.cpp
index 651e5ba3f8d..55cc04a8951 100644
--- a/engine/tinygl/misc.cpp
+++ b/engine/tinygl/misc.cpp
@@ -28,7 +28,6 @@ void glopViewport(GLContext *c, TGLParam *p) {
gl_fatal_error("glViewport: size too small");
}
- tgl_trace("glViewport: %d %d %d %d", xmin, ymin, xsize, ysize);
c->viewport.xmin = xmin;
c->viewport.ymin = ymin;
c->viewport.xsize = xsize;
diff --git a/engine/tinygl/module.mk b/engine/tinygl/module.mk
index e7a530d9e6a..0dc140a45ce 100644
--- a/engine/tinygl/module.mk
+++ b/engine/tinygl/module.mk
@@ -14,7 +14,6 @@ MODULE_OBJS := \
matrix.o \
memory.o \
misc.o \
- msghandling.o \
select.o \
specbuf.o \
texture.o \
diff --git a/engine/tinygl/msghandling.cpp b/engine/tinygl/msghandling.cpp
deleted file mode 100644
index 20fce2640c9..00000000000
--- a/engine/tinygl/msghandling.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-
-#include "engine/tinygl/zgl.h"
-
-#ifndef TINYGL_DEBUG
-//#define TINYGL_DEBUG
-#endif
-
-// Use this function to output messages when something unexpected
-// happens (which might be an indication of an error). *Don't* use it
-// when there's internal errors in the code - these should be handled
-// by asserts.
-#ifndef TINYGL_DEBUG
-void tgl_warning(const char *, ...) { }
-#else
-void tgl_warning(const char *format, ...) {
- va_list args;
- va_start(args, format);
- fprintf(stderr, "*WARNING* ");
- vfprintf(stderr, format, args);
- va_end(args);
-}
-#endif
-
-// This function should be used for debug output only.
-#ifndef TINYGL_DEBUG
-void tgl_trace(const char *, ...) { }
-#else
-void tgl_trace(const char *format, ...) {
- va_list args;
- va_start(args, format);
- fprintf(stderr, "*DEBUG* ");
- vfprintf(stderr, format, args);
- va_end(args);
-}
-#endif
-
-// Use this function to output info about things in the code which
-// should be fixed (missing handling of special cases, important
-// features not implemented, known bugs/buglets, ...).
-#ifndef TINYGL_DEBUG
-void tgl_fixme(const char *, ...) { }
-#else
-void tgl_fixme(const char *format, ...) {
- va_list args;
- va_start(args, format);
- fprintf(stderr, "*FIXME* ");
- vfprintf(stderr, format, args);
- va_end(args);
-}
-#endif
-
diff --git a/engine/tinygl/msghandling.h b/engine/tinygl/msghandling.h
deleted file mode 100644
index 086acb858c0..00000000000
--- a/engine/tinygl/msghandling.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _msghandling_h_
-#define _msghandling_h_
-
-extern void tgl_warning(const char *text, ...);
-extern void tgl_trace(const char *text, ...);
-extern void tgl_fixme(const char *text, ...);
-
-#endif // _msghandling_h_
diff --git a/engine/tinygl/specbuf.cpp b/engine/tinygl/specbuf.cpp
index e5a3c2af83b..b4e43b9bba6 100644
--- a/engine/tinygl/specbuf.cpp
+++ b/engine/tinygl/specbuf.cpp
@@ -40,7 +40,6 @@ GLSpecBuf *specbuf_get_buffer(GLContext *c, const int shininess_i, const float s
return buf;
}
//overwrite the lru buffer
- //tgl_trace("overwriting spec buffer :(");
oldest->shininess_i = shininess_i;
oldest->last_used = c->specbuf_used_counter++;
calc_buf(oldest, shininess);
diff --git a/engine/tinygl/zgl.h b/engine/tinygl/zgl.h
index 115ccd48b16..798ef21bca1 100644
--- a/engine/tinygl/zgl.h
+++ b/engine/tinygl/zgl.h
@@ -1,10 +1,7 @@
#ifndef _tgl_zgl_h_
#define _tgl_zgl_h_
-#include
-#include
-#include
-#include
+#include "common/debug.h"
#include "engine/tinygl/gl.h"
#include "engine/tinygl/zbuffer.h"
@@ -14,7 +11,7 @@ enum {
#define ADD_OP(a,b,c) OP_ ## a ,
-#include "opinfo.h"
+#include "engine/tinygl/opinfo.h"
};