OpenTTD

console_func.h
Go to the documentation of this file.
1 /* $Id: console_func.h 21707 2011-01-03 20:54:20Z rubidium $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
9
12 #ifndef CONSOLE_FUNC_H
13 #define CONSOLE_FUNC_H
14
15 #include "console_type.h"
16
17 /* console modes */
18 extern IConsoleModes _iconsole_mode;
19
20 /* console functions */
21 void IConsoleInit();
22 void IConsoleFree();
23 void IConsoleClose();
24
25 /* console output */
26 void IConsolePrint(TextColour colour_code, const char *string);
27 void CDECL IConsolePrintF(TextColour colour_code, const char *format, ...) WARN_FORMAT(2, 3);
28 void IConsoleDebug(const char *dbg, const char *string);
29 void IConsoleWarning(const char *string);
30 void IConsoleError(const char *string);
31
32 /* Parser */
33 void IConsoleCmdExec(const char *cmdstr);
34
35 bool IsValidConsoleColour(TextColour c);
36
37 #endif /* CONSOLE_FUNC_H */
IConsoleError
void IConsoleError(const char *string)
It is possible to print error information to the console.
Definition: console.cpp:175
IConsoleDebug
void CDECL void IConsoleDebug(const char *dbg, const char *string)
It is possible to print debugging information to the console, which is achieved by using this functio...
Definition: console.cpp:154
IConsoleWarning
void IConsoleWarning(const char *string)
It is possible to print warnings to the console.
Definition: console.cpp:165
IConsoleModes
IConsoleModes
Modes of the in-game console.
Definition: console_type.h:18
IsValidConsoleColour
bool IsValidConsoleColour(TextColour c)
Check whether the given TextColour is valid for console usage.
Definition: console_gui.cpp:515
IConsolePrintF
void CDECL IConsolePrintF(TextColour colour_code, const char *format,...)
Handle the printing of text entered into the console or redirected there by any other means...
Definition: console.cpp:132
TextColour
TextColour
Colour of the strings, see _string_colourmap in table/string_colours.h or docs/ottd-colourtext-palett...
Definition: gfx_type.h:247
IConsolePrint
void IConsolePrint(TextColour colour_code, const char *string)
Handle the printing of text entered into the console or redirected there by any other means...
Definition: console.cpp:88
console_type.h
Globally used console related types.
IConsoleCmdExec
void IConsoleCmdExec(const char *cmdstr)
Execute a given command passed to us.
Definition: console.cpp:409
IConsoleClose
void IConsoleClose()
Close the in-game console.
Definition: console_gui.cpp:445