ScummVM API documentation
debug.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef GRIM_DEBUG_H
23 #define GRIM_DEBUG_H
24 
25 #include "common/debug.h"
26 #include "common/streamdebug.h"
27 
28 namespace Grim {
29 
30 class Debug {
31 public:
32  enum DebugChannel {
33  Info = 1,
34  Warning = 2 << 0,
35  Error = 2 << 1,
36  Engine = 2 << 2,
37  Lua = 2 << 3,
38  Bitmaps = 2 << 4,
39  Models = 2 << 5,
40  Actors = 2 << 6,
41  Costumes = 2 << 7,
42  Chores = 2 << 8,
43  Fonts = 2 << 9,
44  Keyframes = 2 << 10,
45  Materials = 2 << 11,
46  Movie = 2 << 12,
47  Sound = 2 << 13,
48  Scripts = 2 << 14,
49  Sets = 2 << 15,
50  TextObjects = 2 << 16,
51  Patchr = 2 << 17,
52  Lipsync = 2 << 18,
53  Sprites = 2 << 19
54  };
55 
56  static void registerDebugChannels();
57  static bool isChannelEnabled(DebugChannel chan);
58 
65  static void debug(DebugChannel channel, const char *s, ...);
72  static void warning(DebugChannel channel, const char *s, ...);
79  static void error(DebugChannel channel, const char *s, ...);
86  static void error(const char *s, ...);
87 };
88 
89 inline Debug::DebugChannel operator|(Debug::DebugChannel a, Debug::DebugChannel b) {
90  return (Debug::DebugChannel)((int)a | (int) b);
91 }
92 
93 }
94 
95 #endif
Definition: debug.h:30
Definition: actor.h:33
Definition: lua_persistence.h:57
static void debug(DebugChannel channel, const char *s,...)
static void warning(DebugChannel channel, const char *s,...)
static void error(DebugChannel channel, const char *s,...)
Definition: engine.h:143