Go to the documentation of this file.
10 #ifndef CONSOLE_INTERNAL_H
11 #define CONSOLE_INTERNAL_H
67 void IConsoleClearBuffer();
76 void IConsoleStdLibRegister();
81 void IConsoleGUIInit();
82 void IConsoleGUIFree();
IConsoleCmd * _iconsole_cmds
List of registered commands.
IConsoleCmdProc * proc
process executed when command is typed
IConsoleCmd * IConsoleCmdGet(const char *name)
Find the command pointed to by its string.
IConsoleAlias * IConsoleAliasGet(const char *name)
Find the alias pointed to by its string.
static const uint ICON_CMDLN_SIZE
maximum length of a typed in command
bool GetArgumentInteger(uint32 *value, const char *arg)
Change a string into its number representation.
char * cmdline
command(s) that is/are being aliased
void IConsoleGUIPrint(TextColour colour_code, char *string)
Handle the printing of text entered into the console or redirected there by any other means.
TextColour
Colour of the strings, see _string_colourmap in table/string_colours.h or docs/ottd-colourtext-palett...
IConsoleHook * hook
any special trigger action that needs executing
static const uint ICON_MAX_STREAMSIZE
maximum length of a totally expanded command
@ CHR_ALLOW
Allow command execution.
void IConsoleAliasRegister(const char *name, const char *cmd)
Register a an alias for an already existing command in the console.
char * name
name of the alias
IConsoleAlias * next
next alias in list
–Aliases– Aliases are like shortcuts for complex functions, variable assignments, etc.
char * name
name of command
IConsoleCmd * next
next command in list
IConsoleAlias * _iconsole_aliases
List of registered aliases.
void IConsoleCmdRegister(const char *name, IConsoleCmdProc *proc, IConsoleHook *hook=nullptr)
Register a new command to be used in the console.
@ CHR_DISALLOW
Disallow command execution.
@ CHR_HIDE
Hide the existence of the command.
bool IConsoleCmdProc(byte argc, char *argv[])
–Commands– Commands are commands, or functions.
char * RemoveUnderscores(char *name)
Remove underscores from a string; the string will be modified!
ConsoleHookResult
Return values of console hooks (#IConsoleHook).