summaryrefslogtreecommitdiff
path: root/common/system.h
diff options
context:
space:
mode:
authorleo2005-10-23 00:35:25 +0000
committerleo2005-10-23 00:35:25 +0000
commit02cd88bb158b7a6d66ff2a662223121ecfcddbe0 (patch)
treea8d79fc1c24bef624a29e9eb3e999c5a66377d5c /common/system.h
parentf1264b9f8b6266a1153e77d8e497d58e2aad2509 (diff)
Added a new rotate camera interface,
Added an assert macro, Added support for multiple keywords to the pieces tree. git-svn-id: http://svn.leocad.org/trunk@431 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'common/system.h')
-rwxr-xr-xcommon/system.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/common/system.h b/common/system.h
index f8161ae..dc3005c 100755
--- a/common/system.h
+++ b/common/system.h
@@ -4,6 +4,27 @@
#include "defines.h"
#include "typedefs.h"
+// Assert macros.
+#ifdef LC_DEBUG
+
+extern bool lcAssert(const char* FileName, int Line, const char* Expression, const char* Description);
+
+#define LC_ASSERT(Expr, Desc) \
+do \
+{ \
+ static bool Ignore = false; \
+ if (!Expr && !Ignore) \
+ Ignore = lcAssert(__FILE__, __LINE__, #Expr, Desc); \
+} while (0)
+
+#define LC_ASSERT_FALSE(Desc) LC_ASSERT(0, Desc)
+
+#else
+
+#define LC_ASSERT(expr, desc) do { } while(0)
+
+#endif
+
// Profile functions
bool Sys_ProfileSaveInt (const char *section, const char *key, int value);
bool Sys_ProfileSaveString (const char *section, const char *key, const char *value);