[Scummvm-cvs-logs] SF.net SVN: scummvm:[41422] scummvm/branches/gsoc2009-draci/common
sev at users.sourceforge.net
sev at users.sourceforge.net
Wed Jun 10 12:28:46 CEST 2009
Revision: 41422
http://scummvm.svn.sourceforge.net/scummvm/?rev=41422&view=rev
Author: sev
Date: 2009-06-10 10:28:43 +0000 (Wed, 10 Jun 2009)
Log Message:
-----------
Backport debugCN() as it is needed for Draci engine
Modified Paths:
--------------
scummvm/branches/gsoc2009-draci/common/debug.cpp
scummvm/branches/gsoc2009-draci/common/debug.h
Modified: scummvm/branches/gsoc2009-draci/common/debug.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/common/debug.cpp 2009-06-10 10:11:24 UTC (rev 41421)
+++ scummvm/branches/gsoc2009-draci/common/debug.cpp 2009-06-10 10:28:43 UTC (rev 41422)
@@ -227,6 +227,19 @@
va_end(va);
}
+void debugCN(int level, uint32 debugChannels, const char *s, ...) {
+ va_list va;
+
+ // Debug level 11 turns on all special debug level messages
+ if (gDebugLevel != 11)
+ if (level > gDebugLevel || !(Common::gDebugLevelsEnabled & debugChannels))
+ return;
+
+ va_start(va, s);
+ debugHelper(s, va, false);
+ va_end(va);
+}
+
void debugC(uint32 debugChannels, const char *s, ...) {
va_list va;
@@ -240,4 +253,17 @@
va_end(va);
}
+void debugCN(uint32 debugChannels, const char *s, ...) {
+ va_list va;
+
+ // Debug level 11 turns on all special debug level messages
+ if (gDebugLevel != 11)
+ if (!(Common::gDebugLevelsEnabled & debugChannels))
+ return;
+
+ va_start(va, s);
+ debugHelper(s, va, false);
+ va_end(va);
+}
+
#endif
Modified: scummvm/branches/gsoc2009-draci/common/debug.h
===================================================================
--- scummvm/branches/gsoc2009-draci/common/debug.h 2009-06-10 10:11:24 UTC (rev 41421)
+++ scummvm/branches/gsoc2009-draci/common/debug.h 2009-06-10 10:28:43 UTC (rev 41422)
@@ -106,6 +106,8 @@
inline void debugN(int level, const char *s, ...) {}
inline void debugC(int level, uint32 engine_level, const char *s, ...) {}
inline void debugC(uint32 engine_level, const char *s, ...) {}
+inline void debugCN(int level, uint32 engine_level, const char *s, ...) {}
+inline void debugCN(uint32 engine_level, const char *s, ...) {}
#else
@@ -146,6 +148,17 @@
/**
* Print a debug message to the text console (stdout), but only if
+ * the specified level does not exceed the value of gDebugLevel OR
+ * if the specified special debug level is active.
+ * As a rule of thumb, the more important the message, the lower the level.
+ * Does not append a newline automatically.
+ *
+ * @see enableDebugChannel
+ */
+void debugCN(int level, uint32 debugChannels, const char *s, ...) GCC_PRINTF(3, 4);
+
+/**
+ * Print a debug message to the text console (stdout), but only if
* the specified special debug level is active.
* Automatically appends a newline.
*
@@ -153,6 +166,14 @@
*/
void debugC(uint32 debugChannels, const char *s, ...) GCC_PRINTF(2, 3);
+/**
+ * Print a debug message to the text console (stdout), but only if
+ * the specified special debug level is active.
+ * Does not append a newline automatically.
+ *
+ * @see enableDebugChannel
+ */
+void debugCN(uint32 debugChannels, const char *s, ...) GCC_PRINTF(2, 3);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list