// // G A M E.O.N.E - LOW LEVEL LIB V1.0 // Copyright (C) 2001 LEVEL ONE ENTERTAINMENT, // Licensed under the terms of LGPL. //:--------------------------------------------------------------------------- //:Description // // FRAMEWORK // Debug.h: Schnittstelle für die Klasse CDebug. // ////////////////////////////////////////////////////////////////////// #if !defined(_DEBUG_H) #define _DEBUG_H #define LOGFILE "debug.log" #undef _DEBUG #undef DEBUG #if defined(_DEBUG) || defined(DEBUG) #define DebugOut CDebug::Write #define DebugOutLn CDebug::WriteLn #define FileError(fname) CDebug::DisplayMsgBox("%s@%d\nOpen failed:\n\"%s\"\nRootpath: \"%s\"\nStream: %d", __FILE__,__LINE__,llfile_GetFullPath(fname),llfile_GetPath(LLFILE_APP_DIR),llfile_current_stream); #define MsgBox CDebug::DisplayMsgBox #else #define DebugOut CDebug::__nil__ #define DebugOutLn CDebug::__nil__ #define MsgBox CDebug::__nil__ #define FileError(fname) CDebug::DisplayMsgBox("%s@%d\nOpen failed:\n\"%s\"\nRootpath: \"%s\"\nStream: %d", __FILE__,__LINE__,llfile_GetFullPath(fname),llfile_GetPath(LLFILE_APP_DIR),llfile_current_stream); #endif class CDebug { public: CDebug(); virtual ~CDebug(); static void Write(const char *fmt,...); static void WriteLn(const char *fmt,...); static void DisplayMsgBox( const char *fmt,...); static void __nil__( const char *fmt,...); static char m_filename[256]; }; #endif // !defined(_DEBUG_H)