mirror of
https://gitlab.com/shinovon/re3-symbian.git
synced 2026-05-23 01:57:21 +03:00
Logs
This commit is contained in:
parent
feefe2e742
commit
2c441fbede
2 changed files with 15 additions and 7 deletions
|
|
@ -354,7 +354,7 @@ __inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function
|
||||||
#else
|
#else
|
||||||
#define debug(f, ...) re3_debug("[DBG]: " f, ## __VA_ARGS__)
|
#define debug(f, ...) re3_debug("[DBG]: " f, ## __VA_ARGS__)
|
||||||
#define Error(f, ...) re3_debug("[ERROR]: " f, ## __VA_ARGS__)
|
#define Error(f, ...) re3_debug("[ERROR]: " f, ## __VA_ARGS__)
|
||||||
#ifndef MASTER
|
#if !defined MASTER || defined LOGS
|
||||||
#define TRACE(f, ...) re3_trace(__FILE__, __LINE__, __FUNCTION__, f, ## __VA_ARGS__)
|
#define TRACE(f, ...) re3_trace(__FILE__, __LINE__, __FUNCTION__, f, ## __VA_ARGS__)
|
||||||
#define USERERROR(f, ...) re3_usererror(f, ## __VA_ARGS__)
|
#define USERERROR(f, ...) re3_usererror(f, ## __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
|
|
@ -367,7 +367,7 @@ __inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function
|
||||||
#undef ASSERT
|
#undef ASSERT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MASTER
|
#if !defined MASTER || defined LOGS
|
||||||
#define assert(_Expression) (void)( (!!(_Expression)) || (re3_assert(#_Expression, __FILE__, __LINE__, __FUNCTION__), 0) )
|
#define assert(_Expression) (void)( (!!(_Expression)) || (re3_assert(#_Expression, __FILE__, __LINE__, __FUNCTION__), 0) )
|
||||||
#else
|
#else
|
||||||
#define assert(_Expression) (_Expression)
|
#define assert(_Expression) (_Expression)
|
||||||
|
|
|
||||||
|
|
@ -1105,12 +1105,12 @@ extern bool gbRenderWorld2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __MWERKS__
|
#ifndef __MWERKS__
|
||||||
#ifndef MASTER
|
#if !defined MASTER || defined LOGS
|
||||||
const int re3_buffsize = 1024;
|
const int re3_buffsize = 1024;
|
||||||
static char re3_buff[re3_buffsize];
|
static char re3_buff[re3_buffsize];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MASTER
|
#if !defined MASTER || defined LOGS
|
||||||
void re3_assert(const char *expr, const char *filename, unsigned int lineno, const char *func)
|
void re3_assert(const char *expr, const char *filename, unsigned int lineno, const char *func)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
@ -1166,9 +1166,13 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef LOGS_RDEBUG
|
||||||
|
extern "C" void RDebug_Printf(const char*, ...);
|
||||||
|
#endif
|
||||||
|
|
||||||
void re3_debug(const char *format, ...)
|
void re3_debug(const char *format, ...)
|
||||||
{
|
{
|
||||||
#ifndef MASTER
|
#if !defined MASTER || defined LOGS
|
||||||
va_list va;
|
va_list va;
|
||||||
va_start(va, format);
|
va_start(va, format);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
@ -1179,11 +1183,15 @@ void re3_debug(const char *format, ...)
|
||||||
va_end(va);
|
va_end(va);
|
||||||
|
|
||||||
printf("%s", re3_buff);
|
printf("%s", re3_buff);
|
||||||
|
#ifdef LOGS_RDEBUG
|
||||||
|
RDebug_Printf("%s", re3_buff);
|
||||||
|
#else
|
||||||
CDebug::DebugAddText(re3_buff);
|
CDebug::DebugAddText(re3_buff);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef MASTER
|
#if !defined MASTER || defined LOGS
|
||||||
void re3_trace(const char *filename, unsigned int lineno, const char *func, const char *format, ...)
|
void re3_trace(const char *filename, unsigned int lineno, const char *func, const char *format, ...)
|
||||||
{
|
{
|
||||||
char buff[re3_buffsize *2];
|
char buff[re3_buffsize *2];
|
||||||
|
|
@ -1205,7 +1213,7 @@ void re3_trace(const char *filename, unsigned int lineno, const char *func, cons
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MASTER
|
#if !defined MASTER || defined LOGS
|
||||||
void re3_usererror(const char *format, ...)
|
void re3_usererror(const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list va;
|
va_list va;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue