mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(svn r13228) -Codechange: split console.h.
This commit is contained in:
parent
0c47d3fc14
commit
6c20f77330
@ -876,7 +876,19 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\..\src\console.h"
|
RelativePath=".\..\src\console_func.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\..\src\console_gui.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\..\src\console_internal.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\..\src\console_type.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
|
@ -873,7 +873,19 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\..\src\console.h"
|
RelativePath=".\..\src\console_func.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\..\src\console_gui.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\..\src\console_internal.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\..\src\console_type.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
|
@ -144,7 +144,10 @@ cargotype.h
|
|||||||
cmd_helper.h
|
cmd_helper.h
|
||||||
command_func.h
|
command_func.h
|
||||||
command_type.h
|
command_type.h
|
||||||
console.h
|
console_func.h
|
||||||
|
console_gui.h
|
||||||
|
console_internal.h
|
||||||
|
console_type.h
|
||||||
cheat_func.h
|
cheat_func.h
|
||||||
cheat_type.h
|
cheat_type.h
|
||||||
currency.h
|
currency.h
|
||||||
|
@ -7,10 +7,11 @@
|
|||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
#include "textbuf_gui.h"
|
#include "textbuf_gui.h"
|
||||||
#include "window_gui.h"
|
#include "window_gui.h"
|
||||||
|
#include "console_gui.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "console.h"
|
#include "console_internal.h"
|
||||||
#include "network/network.h"
|
#include "network/network.h"
|
||||||
#include "network/network_data.h"
|
#include "network/network_data.h"
|
||||||
#include "network/network_server.h"
|
#include "network/network_server.h"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "openttd.h"
|
#include "openttd.h"
|
||||||
#include "console.h"
|
#include "console_internal.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "engine_func.h"
|
#include "engine_func.h"
|
||||||
#include "landscape.h"
|
#include "landscape.h"
|
||||||
|
31
src/console_func.h
Normal file
31
src/console_func.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/** @file console_func.h Console functions used outside of the console code. */
|
||||||
|
|
||||||
|
#ifndef CONSOLE_FUNC_H
|
||||||
|
#define CONSOLE_FUNC_H
|
||||||
|
|
||||||
|
#include "console_type.h"
|
||||||
|
|
||||||
|
/* console colors/modes */
|
||||||
|
extern byte _icolour_def;
|
||||||
|
extern byte _icolour_err;
|
||||||
|
extern byte _icolour_warn;
|
||||||
|
extern byte _icolour_dbg;
|
||||||
|
extern byte _icolour_cmd;
|
||||||
|
extern IConsoleModes _iconsole_mode;
|
||||||
|
|
||||||
|
/* console functions */
|
||||||
|
void IConsoleInit();
|
||||||
|
void IConsoleFree();
|
||||||
|
void IConsoleClose();
|
||||||
|
|
||||||
|
/* console output */
|
||||||
|
void IConsolePrint(uint16 color_code, const char *string);
|
||||||
|
void CDECL IConsolePrintF(uint16 color_code, const char *s, ...);
|
||||||
|
void IConsoleDebug(const char *dbg, const char *string);
|
||||||
|
|
||||||
|
/* Parser */
|
||||||
|
void IConsoleCmdExec(const char *cmdstr);
|
||||||
|
|
||||||
|
#endif /* CONSOLE_FUNC_H */
|
13
src/console_gui.h
Normal file
13
src/console_gui.h
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/** @file console_gui.h GUI related functions in the console. */
|
||||||
|
|
||||||
|
#ifndef CONSOLE_GUI_H
|
||||||
|
#define CONSOLE_GUI_H
|
||||||
|
|
||||||
|
#include "window_type.h"
|
||||||
|
|
||||||
|
void IConsoleResize(Window *w);
|
||||||
|
void IConsoleSwitch();
|
||||||
|
|
||||||
|
#endif /* CONSOLE_GUI_H */
|
@ -1,11 +1,11 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/** @file console.h In-game console. */
|
/** @file console_internal.h Internally used functions for the console. */
|
||||||
|
|
||||||
#ifndef CONSOLE_H
|
#ifndef CONSOLE_INTERNAL_H
|
||||||
#define CONSOLE_H
|
#define CONSOLE_INTERNAL_H
|
||||||
|
|
||||||
#include "window_type.h"
|
#include "console_func.h"
|
||||||
|
|
||||||
/* maximum length of a typed in command */
|
/* maximum length of a typed in command */
|
||||||
#define ICON_CMDLN_SIZE 255
|
#define ICON_CMDLN_SIZE 255
|
||||||
@ -22,12 +22,6 @@ enum IConsoleVarTypes {
|
|||||||
ICONSOLE_VAR_STRING
|
ICONSOLE_VAR_STRING
|
||||||
};
|
};
|
||||||
|
|
||||||
enum IConsoleModes {
|
|
||||||
ICONSOLE_FULL,
|
|
||||||
ICONSOLE_OPENED,
|
|
||||||
ICONSOLE_CLOSED
|
|
||||||
};
|
|
||||||
|
|
||||||
enum IConsoleHookTypes {
|
enum IConsoleHookTypes {
|
||||||
ICONSOLE_HOOK_ACCESS,
|
ICONSOLE_HOOK_ACCESS,
|
||||||
ICONSOLE_HOOK_PRE_ACTION,
|
ICONSOLE_HOOK_PRE_ACTION,
|
||||||
@ -107,27 +101,11 @@ extern IConsoleCmd *_iconsole_cmds; ///< list of registred commands
|
|||||||
extern IConsoleVar *_iconsole_vars; ///< list of registred vars
|
extern IConsoleVar *_iconsole_vars; ///< list of registred vars
|
||||||
extern IConsoleAlias *_iconsole_aliases; ///< list of registred aliases
|
extern IConsoleAlias *_iconsole_aliases; ///< list of registred aliases
|
||||||
|
|
||||||
/* console colors/modes */
|
|
||||||
extern byte _icolour_def;
|
|
||||||
extern byte _icolour_err;
|
|
||||||
extern byte _icolour_warn;
|
|
||||||
extern byte _icolour_dbg;
|
|
||||||
extern byte _icolour_cmd;
|
|
||||||
extern IConsoleModes _iconsole_mode;
|
|
||||||
|
|
||||||
/* console functions */
|
/* console functions */
|
||||||
void IConsoleInit();
|
|
||||||
void IConsoleFree();
|
|
||||||
void IConsoleClearBuffer();
|
void IConsoleClearBuffer();
|
||||||
void IConsoleResize(Window *w);
|
|
||||||
void IConsoleSwitch();
|
|
||||||
void IConsoleClose();
|
|
||||||
void IConsoleOpen();
|
void IConsoleOpen();
|
||||||
|
|
||||||
/* console output */
|
/* console output */
|
||||||
void IConsolePrint(uint16 color_code, const char *string);
|
|
||||||
void CDECL IConsolePrintF(uint16 color_code, const char *s, ...);
|
|
||||||
void IConsoleDebug(const char *dbg, const char *string);
|
|
||||||
void IConsoleWarning(const char *string);
|
void IConsoleWarning(const char *string);
|
||||||
void IConsoleError(const char *string);
|
void IConsoleError(const char *string);
|
||||||
|
|
||||||
@ -145,7 +123,6 @@ void IConsoleVarPrintGetValue(const IConsoleVar *var);
|
|||||||
void IConsoleVarPrintSetValue(const IConsoleVar *var);
|
void IConsoleVarPrintSetValue(const IConsoleVar *var);
|
||||||
|
|
||||||
/* Parser */
|
/* Parser */
|
||||||
void IConsoleCmdExec(const char *cmdstr);
|
|
||||||
void IConsoleVarExec(const IConsoleVar *var, byte tokencount, char *token[]);
|
void IConsoleVarExec(const IConsoleVar *var, byte tokencount, char *token[]);
|
||||||
|
|
||||||
/* console std lib (register ingame commands/aliases/variables) */
|
/* console std lib (register ingame commands/aliases/variables) */
|
14
src/console_type.h
Normal file
14
src/console_type.h
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/** @file console_type.h Globally used console related types. */
|
||||||
|
|
||||||
|
#ifndef CONSOLE_TYPE_H
|
||||||
|
#define CONSOLE_TYPE_H
|
||||||
|
|
||||||
|
enum IConsoleModes {
|
||||||
|
ICONSOLE_FULL,
|
||||||
|
ICONSOLE_OPENED,
|
||||||
|
ICONSOLE_CLOSED
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* CONSOLE_TYPE_H */
|
@ -6,7 +6,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include "openttd.h"
|
#include "openttd.h"
|
||||||
#include "console.h"
|
#include "console_func.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "string_func.h"
|
#include "string_func.h"
|
||||||
#include "network/core/core.h"
|
#include "network/core/core.h"
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "viewport_func.h"
|
#include "viewport_func.h"
|
||||||
#include "command_func.h"
|
#include "command_func.h"
|
||||||
#include "news_gui.h"
|
#include "news_gui.h"
|
||||||
#include "console.h"
|
#include "console_gui.h"
|
||||||
#include "waypoint.h"
|
#include "waypoint.h"
|
||||||
#include "genworld.h"
|
#include "genworld.h"
|
||||||
#include "transparency_gui.h"
|
#include "transparency_gui.h"
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "core/tcp.h"
|
#include "core/tcp.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "network_gui.h"
|
#include "network_gui.h"
|
||||||
#include "../console.h" /* IConsoleCmdExec */
|
#include "../console_func.h"
|
||||||
#include <stdarg.h> /* va_list */
|
#include <stdarg.h> /* va_list */
|
||||||
#include "../md5.h"
|
#include "../md5.h"
|
||||||
#include "../fileio.h"
|
#include "../fileio.h"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include "network_gui.h"
|
#include "network_gui.h"
|
||||||
#include "../saveload.h"
|
#include "../saveload.h"
|
||||||
#include "../command_func.h"
|
#include "../command_func.h"
|
||||||
#include "../console.h"
|
#include "../console_func.h"
|
||||||
#include "../variables.h"
|
#include "../variables.h"
|
||||||
#include "../ai/ai.h"
|
#include "../ai/ai.h"
|
||||||
#include "../core/alloc_func.hpp"
|
#include "../core/alloc_func.hpp"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "../date_func.h"
|
#include "../date_func.h"
|
||||||
#include "network_server.h"
|
#include "network_server.h"
|
||||||
#include "network_udp.h"
|
#include "network_udp.h"
|
||||||
#include "../console.h"
|
#include "../console_func.h"
|
||||||
#include "../command_func.h"
|
#include "../command_func.h"
|
||||||
#include "../saveload.h"
|
#include "../saveload.h"
|
||||||
#include "../station_base.h"
|
#include "../station_base.h"
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
#include "fios.h"
|
#include "fios.h"
|
||||||
#include "airport.h"
|
#include "airport.h"
|
||||||
#include "aircraft.h"
|
#include "aircraft.h"
|
||||||
#include "console.h"
|
#include "console_func.h"
|
||||||
#include "screenshot.h"
|
#include "screenshot.h"
|
||||||
#include "network/network.h"
|
#include "network/network.h"
|
||||||
#include "signs_base.h"
|
#include "signs_base.h"
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "network/network_internal.h"
|
#include "network/network_internal.h"
|
||||||
#include "settings_internal.h"
|
#include "settings_internal.h"
|
||||||
#include "command_func.h"
|
#include "command_func.h"
|
||||||
#include "console.h"
|
#include "console_func.h"
|
||||||
#include "saveload.h"
|
#include "saveload.h"
|
||||||
#include "npf.h"
|
#include "npf.h"
|
||||||
#include "yapf/yapf.h"
|
#include "yapf/yapf.h"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "openttd.h"
|
#include "openttd.h"
|
||||||
#include "landscape.h"
|
#include "landscape.h"
|
||||||
#include "gfx_func.h"
|
#include "gfx_func.h"
|
||||||
#include "console.h"
|
#include "console_func.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
#include "blitter/factory.hpp"
|
#include "blitter/factory.hpp"
|
||||||
#include "texteff.hpp"
|
#include "texteff.hpp"
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
#include "void_map.h"
|
#include "void_map.h"
|
||||||
#include "tgp.h"
|
#include "tgp.h"
|
||||||
#include "console.h"
|
|
||||||
#include "genworld.h"
|
#include "genworld.h"
|
||||||
#include "core/alloc_func.hpp"
|
#include "core/alloc_func.hpp"
|
||||||
#include "core/random_func.hpp"
|
#include "core/random_func.hpp"
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include "signs_func.h"
|
#include "signs_func.h"
|
||||||
#include "fios.h"
|
#include "fios.h"
|
||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "console.h"
|
#include "console_gui.h"
|
||||||
#include "news_gui.h"
|
#include "news_gui.h"
|
||||||
#include "tilehighlight_func.h"
|
#include "tilehighlight_func.h"
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include "../gfx_func.h"
|
#include "../gfx_func.h"
|
||||||
#include "../network/network.h"
|
#include "../network/network.h"
|
||||||
#include "../network/network_internal.h"
|
#include "../network/network_internal.h"
|
||||||
#include "../console.h"
|
#include "../console_func.h"
|
||||||
#include "../variables.h"
|
#include "../variables.h"
|
||||||
#include "../genworld.h"
|
#include "../genworld.h"
|
||||||
#include "../fileio.h"
|
#include "../fileio.h"
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "player_func.h"
|
#include "player_func.h"
|
||||||
#include "gfx_func.h"
|
#include "gfx_func.h"
|
||||||
#include "console.h"
|
#include "console_func.h"
|
||||||
|
#include "console_gui.h"
|
||||||
#include "viewport_func.h"
|
#include "viewport_func.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
#include "genworld.h"
|
#include "genworld.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user