You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
//
|
|
// 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"
|
|
//#define 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)
|