aboutsummaryrefslogtreecommitdiff
path: root/dep/include/g3dlite/G3D/debug.h
diff options
context:
space:
mode:
authorclick <none@none>2010-06-05 00:59:25 +0200
committerclick <none@none>2010-06-05 00:59:25 +0200
commite77716188861d4aa83b227a90e04a66b63baeb1f (patch)
treece72764181a760314ec851f7535052dcf75649db /dep/include/g3dlite/G3D/debug.h
parent1426c2970f42a2d065198806f750bf5dd28d580b (diff)
HIGHLY EXPERIMENTAL - USE AT YOUR OWN RISK
Implement the use of the new vmap3-format by Lynx3d (mad props to you for this, and thanks for the talks earlier) + reduced Vmap size to less than one third, and improve precision + indoor/outdoor check which allows automatic unmounting of players + additional area information from WMOAreaTable.dbc, removed existing "hacks" + WMO liquid information for swimming and fishing correctly in buildings/cities/caves/instances (lava and slime WILL hurt from now on!) - buildfiles for windows are not properly done, and will need to be sorted out NOTE: Do NOT annoy Lynx3d about this, any issues with this "port" is entirely our fault ! THIS REVISION IS CONSIDERED UNSTABLE AND CONTAINS WORK IN PROGRESS - USE AT YOUR OWN RISK! --HG-- branch : trunk
Diffstat (limited to 'dep/include/g3dlite/G3D/debug.h')
-rw-r--r--dep/include/g3dlite/G3D/debug.h66
1 files changed, 60 insertions, 6 deletions
diff --git a/dep/include/g3dlite/G3D/debug.h b/dep/include/g3dlite/G3D/debug.h
index 408dd3ea146..a7697fe9c01 100644
--- a/dep/include/g3dlite/G3D/debug.h
+++ b/dep/include/g3dlite/G3D/debug.h
@@ -1,12 +1,66 @@
+/**
+ @file debug.h
-#ifndef G3D_LITE_DEBUG_H
-#define G3D_LITE_DEBUG_H
+ @maintainer Morgan McGuire, http://graphics.cs.williams.edu
-#define debugStatement(x)
-#define debugAssert(x)
-#define debugAssertM(x, y)
-#define alwaysAssertM(x, y)
+ @created 2001-08-26
+ @edited 2006-02-16
+ Copyright 2000-2006, Morgan McGuire.
+ All rights reserved.
+*/
+
+#ifndef G3D_DEBUG_H
+#define G3D_DEBUG_H
+
+#include "G3D/platform.h"
+#ifdef _MSC_VER
+ #include <crtdbg.h>
+#endif
+
+#include "G3D/debugPrintf.h"
+#include "G3D/debugAssert.h"
+
+namespace G3D {
+
+#ifdef _MSC_VER
+ // Turn off 64-bit warnings
+# pragma warning(push)
+# pragma warning( disable : 4312)
+# pragma warning( disable : 4267)
+# pragma warning( disable : 4311)
#endif
+/**
+ Useful for debugging purposes.
+ */
+inline bool isValidHeapPointer(const void* x) {
+ #ifdef _MSC_VER
+ return
+ (x != (void*)0xcccccccc) && (x != (void*)0xdeadbeef) && (x != (void*)0xfeeefeee);
+ #else
+ return x != NULL;
+ #endif
+}
+
+/**
+ Returns true if the pointer is likely to be
+ a valid pointer (instead of an arbitrary number).
+ Useful for debugging purposes.
+ */
+inline bool isValidPointer(const void* x) {
+ #ifdef _MSC_VER
+ return x != ((void*)0xcccccccc) && (x != (void*)0xdeadbeef) && (x != (void*)0xfeeefeee);
+ #else
+ return x != NULL;
+ #endif
+}
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+}
+
+#endif