ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

common/debug.h

Go to the documentation of this file.
00001 /* ScummVM - Graphic Adventure Engine
00002  *
00003  * ScummVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the COPYRIGHT
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #ifndef COMMON_DEBUG_H
00024 #define COMMON_DEBUG_H
00025 
00026 #include "common/scummsys.h"
00027 
00028 #ifdef DISABLE_TEXT_CONSOLE
00029 
00030 inline void debug(const char *s, ...) {}
00031 inline void debug(int level, const char *s, ...) {}
00032 inline void debugN(const char *s, ...) {}
00033 inline void debugN(int level, const char *s, ...) {}
00034 inline void debugC(int level, uint32 debugChannels, const char *s, ...) {}
00035 inline void debugC(uint32 debugChannels, const char *s, ...) {}
00036 inline void debugCN(int level, uint32 debugChannels, const char *s, ...) {}
00037 inline void debugCN(uint32 debugChannels, const char *s, ...) {}
00038 
00039 #else
00040 
00041 
00046 void debug(const char *s, ...) GCC_PRINTF(1, 2);
00047 
00054 void debug(int level, const char *s, ...) GCC_PRINTF(2, 3);
00055 
00060 void debugN(const char *s, ...) GCC_PRINTF(1, 2);
00061 
00068 void debugN(int level, const char *s, ...) GCC_PRINTF(2, 3);
00069 
00079 void debugC(int level, uint32 debugChannels, const char *s, ...) GCC_PRINTF(3, 4);
00080 
00090 void debugCN(int level, uint32 debugChannels, const char *s, ...) GCC_PRINTF(3, 4);
00091 
00099 void debugC(uint32 debugChannels, const char *s, ...) GCC_PRINTF(2, 3);
00100 
00108 void debugCN(uint32 debugChannels, const char *s, ...) GCC_PRINTF(2, 3);
00109 
00110 #endif
00111 
00115 bool debugLevelSet(int level);
00116 
00123 bool debugChannelSet(int level, uint32 debugChannels);
00124 
00131 extern int gDebugLevel;
00132 
00140 extern bool gDebugChannelsOnly;
00141 
00142 //Global constant for EventRecorder debug channel
00143 enum GlobalDebugLevels {
00144     kDebugLevelEventRec = 1 << 30
00145 };
00146 
00147 #endif


Generated on Sat May 18 2019 05:00:59 for ResidualVM by doxygen 1.7.1
curved edge   curved edge