diff --git a/common/debug.cpp b/common/debug.cpp index 52ff4307dd4..b718b7917fa 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -190,6 +190,14 @@ void debug(int level, const char *s, ...) { } +void debugN(const char *s, ...) { + va_list va; + + va_start(va, s); + debugHelper(s, va, false); + va_end(va); +} + void debugN(int level, const char *s, ...) { va_list va; diff --git a/common/debug.h b/common/debug.h index 2068a1314a8..06f897f1031 100644 --- a/common/debug.h +++ b/common/debug.h @@ -43,6 +43,7 @@ void setDebugOutputFormatter(OutputFormatter f); inline void debug(const char *s, ...) {} inline void debug(int level, const char *s, ...) {} +inline void debugN(const char *s, ...) {} inline void debugN(int level, const char *s, ...) {} inline void debugC(int level, uint32 engineChannel, const char *s, ...) {} inline void debugC(uint32 engineChannel, const char *s, ...) {} @@ -67,6 +68,12 @@ void debug(const char *s, ...) GCC_PRINTF(1, 2); */ void debug(int level, const char *s, ...) GCC_PRINTF(2, 3); +/** + * Print a debug message to the text console (stdout). + * Does not append a newline. + */ +void debugN(const char *s, ...) GCC_PRINTF(1, 2); + /** * Print a debug message to the text console (stdout), but only if * the gDebugLevel equals at least the specified level.