OpenTTD
console_func.h
Go to the documentation of this file.
1 /*
2  * This file is part of OpenTTD.
3  * 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.
4  * 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.
5  * 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/>.
6  */
7 
10 #ifndef CONSOLE_FUNC_H
11 #define CONSOLE_FUNC_H
12 
13 #include "console_type.h"
14 
15 /* console modes */
16 extern IConsoleModes _iconsole_mode;
17 
18 /* console functions */
19 void IConsoleInit();
20 void IConsoleFree();
21 void IConsoleClose();
22 
23 /* console output */
24 void IConsolePrint(TextColour colour_code, const char *string);
25 void CDECL IConsolePrintF(TextColour colour_code, const char *format, ...) WARN_FORMAT(2, 3);
26 void IConsoleDebug(const char *dbg, const char *string);
27 void IConsoleWarning(const char *string);
28 void IConsoleError(const char *string);
29 
30 /* Parser */
31 void IConsoleCmdExec(const char *cmdstr);
32 
34 
35 #endif /* CONSOLE_FUNC_H */
void IConsoleError(const char *string)
It is possible to print error information to the console.
Definition: console.cpp:167
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:146
void IConsoleWarning(const char *string)
It is possible to print warnings to the console.
Definition: console.cpp:157
IConsoleModes
Modes of the in-game console.
Definition: console_type.h:16
bool IsValidConsoleColour(TextColour c)
Check whether the given TextColour is valid for console usage.
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:124
TextColour
Colour of the strings, see _string_colourmap in table/string_colours.h or docs/ottd-colourtext-palett...
Definition: gfx_type.h:245
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:84
Globally used console related types.
void IConsoleCmdExec(const char *cmdstr)
Execute a given command passed to us.
Definition: console.cpp:401
void IConsoleClose()
Close the in-game console.