console.h
author truelight
Fri, 04 Feb 2005 13:23:29 +0000
changeset 1279 bc761aad52b3
parent 1230 f08094212688
child 1299 39c06aba09aa
permissions -rw-r--r--
(svn r1783) -Add: Dynamic vehicles (now up to 64k of vehicles)
205
49e96fd94d63 (svn r206) -Fix: [1001540] i lost all wagons. Half-assed fix for lost wagons. But now users can at least fix this problem. Consolecommand: "resetengines"
darkvater
parents: 169
diff changeset
     1
#ifndef CONSOLE_H
49e96fd94d63 (svn r206) -Fix: [1001540] i lost all wagons. Half-assed fix for lost wagons. But now users can at least fix this problem. Consolecommand: "resetengines"
darkvater
parents: 169
diff changeset
     2
#define CONSOLE_H
220
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
     3
1230
f08094212688 (svn r1734) - Fix: [ 1112253 ] hijacking of arrow keys, game also scrolled when it was out of focus (dominik)
darkvater
parents: 644
diff changeset
     4
/* Pointer to console window */
f08094212688 (svn r1734) - Fix: [ 1112253 ] hijacking of arrow keys, game also scrolled when it was out of focus (dominik)
darkvater
parents: 644
diff changeset
     5
VARDEF Window *_iconsole_win;
f08094212688 (svn r1734) - Fix: [ 1112253 ] hijacking of arrow keys, game also scrolled when it was out of focus (dominik)
darkvater
parents: 644
diff changeset
     6
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
     7
// ** console parser ** //
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
     8
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
     9
typedef enum _iconsole_var_types {
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    10
	ICONSOLE_VAR_NONE,
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
    11
	ICONSOLE_VAR_BOOLEAN,
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
    12
	ICONSOLE_VAR_BYTE,
543
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 289
diff changeset
    13
	ICONSOLE_VAR_UINT8,
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
    14
	ICONSOLE_VAR_UINT16,
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
    15
	ICONSOLE_VAR_UINT32,
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
    16
	ICONSOLE_VAR_INT16,
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
    17
	ICONSOLE_VAR_INT32,
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
    18
	ICONSOLE_VAR_STRING,
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
    19
	ICONSOLE_VAR_POINTER,
141
29cc31c87ede (svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater
parents: 136
diff changeset
    20
	ICONSOLE_VAR_REFERENCE,
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    21
	ICONSOLE_VAR_UNKNOWN
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
    22
} _iconsole_var_types;
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
    23
543
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 289
diff changeset
    24
typedef enum {
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 289
diff changeset
    25
	ICONSOLE_FULL,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 289
diff changeset
    26
	ICONSOLE_OPENED,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 289
diff changeset
    27
	ICONSOLE_CLOSED
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 289
diff changeset
    28
} _iconsole_modes;
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 289
diff changeset
    29
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    30
typedef enum _iconsole_hook_types {
220
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
    31
	ICONSOLE_HOOK_ACCESS,
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
    32
	ICONSOLE_HOOK_BEFORE_CHANGE,
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
    33
	ICONSOLE_HOOK_BEFORE_EXEC,
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
    34
	ICONSOLE_HOOK_AFTER_CHANGE,
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    35
	ICONSOLE_HOOK_AFTER_EXEC
220
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
    36
} _iconsole_hook_types;
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
    37
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    38
struct _iconsole_var;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    39
typedef bool (*iconsole_var_hook)(struct _iconsole_var* hook_var);
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
    40
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    41
typedef struct _iconsole_var {
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
    42
	// --------------- //
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    43
	union {
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    44
		void*   addr;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    45
		bool*   bool_;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    46
		byte*   byte_;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    47
		uint16* uint16_;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    48
		uint32* uint32_;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    49
		int16*  int16_;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    50
		int32*  int32_;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    51
		char*   string_;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    52
		struct _iconsole_var* reference_;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    53
	} data;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    54
	char* name;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    55
	_iconsole_var_types type;
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
    56
	// -------------- //
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    57
	iconsole_var_hook hook_access;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    58
	iconsole_var_hook hook_before_change;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    59
	iconsole_var_hook hook_after_change;
220
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
    60
	// -------------- //
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    61
	struct _iconsole_var* _next;
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
    62
	bool _malloc;
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    63
} _iconsole_var;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    64
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    65
struct _iconsole_cmd;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    66
typedef bool (*iconsole_cmd_hook)(struct _iconsole_cmd* hook_cmd);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    67
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    68
typedef _iconsole_var* (*_iconsole_cmd_addr)(byte argc, char* argv[], byte argt[]);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    69
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    70
typedef struct _iconsole_cmd {
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    71
	// -------------- //
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    72
	_iconsole_cmd_addr addr;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    73
	char* name;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    74
	// -------------- //
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    75
	iconsole_cmd_hook hook_access;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    76
	iconsole_cmd_hook hook_before_exec;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    77
	iconsole_cmd_hook hook_after_exec;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    78
	// -------------- //
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    79
	void* _next;
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    80
} _iconsole_cmd;
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
    81
634
754b2df37bfa (svn r1065) -Add: [Console] Alias support. Type 'list_aliases' to show them all (sign_de)
truelight
parents: 554
diff changeset
    82
void IConsoleAliasRegister(const char* name, const char* cmdline);
754b2df37bfa (svn r1065) -Add: [Console] Alias support. Type 'list_aliases' to show them all (sign_de)
truelight
parents: 554
diff changeset
    83
754b2df37bfa (svn r1065) -Add: [Console] Alias support. Type 'list_aliases' to show them all (sign_de)
truelight
parents: 554
diff changeset
    84
typedef struct _iconsole_alias {
754b2df37bfa (svn r1065) -Add: [Console] Alias support. Type 'list_aliases' to show them all (sign_de)
truelight
parents: 554
diff changeset
    85
	// -------------- //
754b2df37bfa (svn r1065) -Add: [Console] Alias support. Type 'list_aliases' to show them all (sign_de)
truelight
parents: 554
diff changeset
    86
	char * cmdline;
754b2df37bfa (svn r1065) -Add: [Console] Alias support. Type 'list_aliases' to show them all (sign_de)
truelight
parents: 554
diff changeset
    87
	char* name;
754b2df37bfa (svn r1065) -Add: [Console] Alias support. Type 'list_aliases' to show them all (sign_de)
truelight
parents: 554
diff changeset
    88
	void* _next;
754b2df37bfa (svn r1065) -Add: [Console] Alias support. Type 'list_aliases' to show them all (sign_de)
truelight
parents: 554
diff changeset
    89
} _iconsole_alias;
754b2df37bfa (svn r1065) -Add: [Console] Alias support. Type 'list_aliases' to show them all (sign_de)
truelight
parents: 554
diff changeset
    90
644
cd687cdec701 (svn r1077) Implements scripts/autoexec.scr to get executed on game starting (sign_de)
dominik
parents: 634
diff changeset
    91
_iconsole_alias* IConsoleAliasGet(const char* name);
cd687cdec701 (svn r1077) Implements scripts/autoexec.scr to get executed on game starting (sign_de)
dominik
parents: 634
diff changeset
    92
220
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
    93
// ** console parser ** //
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
    94
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    95
_iconsole_cmd* _iconsole_cmds; // list of registred commands
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
    96
_iconsole_var* _iconsole_vars; // list of registred vars
634
754b2df37bfa (svn r1065) -Add: [Console] Alias support. Type 'list_aliases' to show them all (sign_de)
truelight
parents: 554
diff changeset
    97
_iconsole_alias* _iconsole_aliases; // list of registred aliases
220
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
    98
141
29cc31c87ede (svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater
parents: 136
diff changeset
    99
// ** console colors ** //
29cc31c87ede (svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater
parents: 136
diff changeset
   100
VARDEF byte _iconsole_color_default;
29cc31c87ede (svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater
parents: 136
diff changeset
   101
VARDEF byte _iconsole_color_error;
248
bd894287e3f2 (svn r249) -Fix: warning fix in console.c/h (Tron)
truelight
parents: 229
diff changeset
   102
VARDEF byte _iconsole_color_warning;
141
29cc31c87ede (svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater
parents: 136
diff changeset
   103
VARDEF byte _iconsole_color_debug;
29cc31c87ede (svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater
parents: 136
diff changeset
   104
VARDEF byte _iconsole_color_commands;
543
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 289
diff changeset
   105
VARDEF _iconsole_modes _iconsole_mode;
141
29cc31c87ede (svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater
parents: 136
diff changeset
   106
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
   107
// ** ttd.c functions ** //
220
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
   108
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   109
void SetDebugString(const char* s);
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
   110
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
   111
// ** console functions ** //
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
   112
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   113
void IConsoleInit(void);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   114
void IConsoleClear(void);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   115
void IConsoleFree(void);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   116
void IConsoleResize(void);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   117
void IConsoleSwitch(void);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   118
void IConsoleClose(void);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   119
void IConsoleOpen(void);
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
   120
141
29cc31c87ede (svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater
parents: 136
diff changeset
   121
// ** console cmd buffer ** //
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   122
void IConsoleCmdBufferAdd(const char* cmd);
141
29cc31c87ede (svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater
parents: 136
diff changeset
   123
void IConsoleCmdBufferNavigate(signed char direction);
29cc31c87ede (svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater
parents: 136
diff changeset
   124
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
   125
// ** console output ** //
543
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 289
diff changeset
   126
void IConsolePrint(uint16 color_code, const char* string);
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents: 289
diff changeset
   127
void CDECL IConsolePrintF(uint16 color_code, const char* s, ...);
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   128
void IConsoleDebug(const char* string);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   129
void IConsoleError(const char* string);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   130
void IConsoleWarning(const char* string);
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
   131
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
   132
// *** Commands *** //
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
   133
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   134
void IConsoleCmdRegister(const char* name, _iconsole_cmd_addr addr);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   135
_iconsole_cmd* IConsoleCmdGet(const char* name);
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
   136
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
   137
// *** Variables *** //
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
   138
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   139
void IConsoleVarRegister(const char* name, void* addr, _iconsole_var_types type);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   140
void IConsoleVarMemRegister(const char* name, _iconsole_var_types type);
554
a4ba0fbbf018 (svn r954) -Fix: [Console] Hook fixes (sign_de)
truelight
parents: 543
diff changeset
   141
void IConsoleVarInsert(_iconsole_var* item_new, const char* name);
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   142
_iconsole_var* IConsoleVarGet(const char* name);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   143
_iconsole_var* IConsoleVarAlloc(_iconsole_var_types type);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   144
void IConsoleVarFree(_iconsole_var* var);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   145
void IConsoleVarSetString(_iconsole_var* var, const char* string);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   146
void IConsoleVarSetValue(_iconsole_var* var, int value);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   147
void IConsoleVarDump(const _iconsole_var* var, const char* dump_desc);
135
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
   148
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
   149
// *** Parser *** //
638fb31434eb (svn r136) -Feature/Fix: Console Rev #2 and WKC_BACKQUOTE this patch adds new features to the ingame console and inserts a new keymanagement for windows pcs... (sign_de)
darkvater
parents: 126
diff changeset
   150
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   151
void IConsoleCmdExec(const char* cmdstr);
205
49e96fd94d63 (svn r206) -Fix: [1001540] i lost all wagons. Half-assed fix for lost wagons. But now users can at least fix this problem. Consolecommand: "resetengines"
darkvater
parents: 169
diff changeset
   152
220
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
   153
// ** console std lib ** //
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   154
void IConsoleStdLibRegister(void);
220
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
   155
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
   156
// ** hook code ** //
289
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   157
void IConsoleVarHook(const char* name, _iconsole_hook_types type, iconsole_var_hook proc);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   158
void IConsoleCmdHook(const char* name, _iconsole_hook_types type, iconsole_cmd_hook proc);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   159
bool IConsoleVarHookHandle(_iconsole_var* hook_var, _iconsole_hook_types type);
6dd77b0ac456 (svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents: 248
diff changeset
   160
bool IConsoleCmdHookHandle(_iconsole_cmd* hook_cmd, _iconsole_hook_types type);
220
dc1710f96b39 (svn r221) -Feature: console command and variable hooking
signde
parents: 205
diff changeset
   161
205
49e96fd94d63 (svn r206) -Fix: [1001540] i lost all wagons. Half-assed fix for lost wagons. But now users can at least fix this problem. Consolecommand: "resetengines"
darkvater
parents: 169
diff changeset
   162
#endif /* CONSOLE_H */