ScummVM API documentation
debug_log.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 AGS_ENGINE_DEBUGGING_DEBUG_LOG_H
23#define AGS_ENGINE_DEBUGGING_DEBUG_LOG_H
24
25#include "ags/engine/ac/runtime_defines.h"
26#include "ags/shared/ac/common.h"
27#include "ags/shared/debugging/out.h"
28#include "ags/shared/util/ini_util.h"
29#include "ags/shared/util/string.h"
30
31namespace AGS3 {
32
33struct ccInstance;
34
35void init_debug(const AGS::Shared::ConfigTree &cfg, bool stderr_only);
36void apply_debug_config(const AGS::Shared::ConfigTree &cfg);
37void shutdown_debug();
38
39// prints debug messages of given type tagged with kDbgGroup_Game,
40// prepending it with current room number and script position info
41void debug_script_print(AGS::Shared::MessageType mt, const char *msg, ...);
42// prints formatted debug warnings tagged with kDbgGroup_Game,
43// prepending it with current room number and script position info
44void debug_script_warn(const char *msg, ...);
45// prints formatted debug message tagged with kDbgGroup_Game,
46// prepending it with current room number and script position info
47void debug_script_log(const char *msg, ...);
48
49// Connect engine to external debugger, if one is available
50bool init_editor_debugging();
51// allow LShift to single-step, RShift to pause flow
52void scriptDebugHook(ccInstance *ccinst, int linenum);
53
54} // namespace AGS3
55
56#endif