author | miham |
Wed, 17 Aug 2005 12:30:07 +0000 | |
changeset 2349 | df02d0ffb588 |
parent 2186 | 461a2aff3486 |
child 2817 | 58dcead3f545 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
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
|
3 |
#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
|
4 |
#define CONSOLE_H |
220
dc1710f96b39
(svn r221) -Feature: console command and variable hooking
signde
parents:
205
diff
changeset
|
5 |
|
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
6 |
// maximum length of a typed in command |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
7 |
#define ICON_CMDLN_SIZE 255 |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
8 |
// maximum length of a totally expanded command |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
9 |
#define ICON_MAX_STREAMSIZE 1024 |
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
|
10 |
|
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
11 |
typedef enum IConsoleVarTypes { |
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
|
12 |
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
|
13 |
ICONSOLE_VAR_BYTE, |
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, |
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
18 |
ICONSOLE_VAR_STRING |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
19 |
} IConsoleVarTypes; |
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
|
20 |
|
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
21 |
typedef enum IConsoleModes { |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
289
diff
changeset
|
22 |
ICONSOLE_FULL, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
289
diff
changeset
|
23 |
ICONSOLE_OPENED, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
289
diff
changeset
|
24 |
ICONSOLE_CLOSED |
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
25 |
} IConsoleModes; |
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
|
26 |
|
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
27 |
typedef enum IConsoleHookTypes { |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
28 |
ICONSOLE_HOOK_ACCESS, |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
29 |
ICONSOLE_HOOK_PRE_ACTION, |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
30 |
ICONSOLE_HOOK_POST_ACTION |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
31 |
} IConsoleHookTypes; |
289
1e1102dd2a62
(svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents:
248
diff
changeset
|
32 |
|
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
33 |
/** --Hooks-- |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
34 |
* Hooks are certain triggers get get accessed/executed on either |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
35 |
* access, before execution/change or after execution/change. This allows |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
36 |
* for general flow of permissions or special action needed in some cases |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
37 |
*/ |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
38 |
typedef bool IConsoleHook(void); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
39 |
typedef struct IConsoleHooks{ |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
40 |
IConsoleHook *access; // trigger when accessing the variable/command |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
41 |
IConsoleHook *pre; // trigger before the variable/command is changed/executed |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
42 |
IConsoleHook *post; // trigger after the variable/command is changed/executed |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
43 |
} IConsoleHooks; |
289
1e1102dd2a62
(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 |
|
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
45 |
/** --Commands-- |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
46 |
* Commands are commands, or functions. They get executed once and any |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
47 |
* effect they produce are carried out. The arguments to the commands |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
48 |
* are given to them, each input word seperated by a double-quote (") is an argument |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
49 |
* If you want to handle multiple words as one, enclose them in double-quotes |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
50 |
* eg. 'say "hello sexy boy"' |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
51 |
*/ |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
52 |
typedef bool (IConsoleCmdProc)(byte argc, char *argv[]); |
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
|
53 |
|
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
54 |
struct IConsoleCmd; |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
55 |
typedef struct IConsoleCmd { |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
56 |
char *name; // name of command |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
57 |
struct IConsoleCmd *next; // next command in list |
634
88d9420048db
(svn r1065) -Add: [Console] Alias support. Type 'list_aliases' to show them all (sign_de)
truelight
parents:
554
diff
changeset
|
58 |
|
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
59 |
IConsoleCmdProc *proc; // process executed when command is typed |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
60 |
IConsoleHooks hook; // any special trigger action that needs executing |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
61 |
} IConsoleCmd; |
634
88d9420048db
(svn r1065) -Add: [Console] Alias support. Type 'list_aliases' to show them all (sign_de)
truelight
parents:
554
diff
changeset
|
62 |
|
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
63 |
/** --Variables-- |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
64 |
* Variables are pointers to real ingame variables which allow for |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
65 |
* changing while ingame. After changing they keep their new value |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
66 |
* and can be used for debugging, gameplay, etc. It accepts: |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
67 |
* - no arguments; just print out current value |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
68 |
* - '= <new value>' to assign a new value to the variable |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
69 |
* - '++' to increase value by one |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
70 |
* - '--' to decrease value by one |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
71 |
*/ |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
72 |
struct IConsoleVar; |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
73 |
typedef struct IConsoleVar { |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
74 |
char *name; // name of the variable |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
75 |
struct IConsoleVar *next; // next variable in list |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
76 |
|
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
77 |
void *addr; // the address where the variable is pointing at |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
78 |
uint32 size; // size of the variable, used for strings |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
79 |
char *help; // the optional help string shown when requesting information |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
80 |
IConsoleVarTypes type; // type of variable (for correct assignment/output) |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
81 |
IConsoleCmdProc *proc; // some variables need really special handling, use a callback function for that |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
82 |
IConsoleHooks hook; // any special trigger action that needs executing |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
83 |
} IConsoleVar; |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
84 |
|
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
85 |
/** --Aliases-- |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
86 |
* Aliases are like shortcuts for complex functions, variable assignments, |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
87 |
* etc. You can use a simple alias to rename a longer command (eg 'lv' for |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
88 |
* 'list_vars' for example), or concatenate more commands into one |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
89 |
* (eg. 'ng' for 'load %A; unpause; debug_level 5'). Aliases can parse the arguments |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
90 |
* given to them in the command line. |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
91 |
* - "%A - %Z" substitute arguments 1 t/m 26 |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
92 |
* - "%+" lists all parameters keeping them seperated |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
93 |
* - "%!" also lists all parameters but presenting them to the aliased command as one argument |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
94 |
* - ";" allows for combining commands (see example 'ng') |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
95 |
*/ |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
96 |
struct IConsoleAlias; |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
97 |
typedef struct IConsoleAlias { |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
98 |
char *name; // name of the alias |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
99 |
struct IConsoleAlias *next; // next alias in list |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
100 |
|
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
101 |
char *cmdline; // command(s) that is/are being aliased |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
102 |
} IConsoleAlias; |
644
e833509107ad
(svn r1077) Implements scripts/autoexec.scr to get executed on game starting (sign_de)
dominik
parents:
634
diff
changeset
|
103 |
|
220
dc1710f96b39
(svn r221) -Feature: console command and variable hooking
signde
parents:
205
diff
changeset
|
104 |
// ** console parser ** // |
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
105 |
IConsoleCmd *_iconsole_cmds; // list of registred commands |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
106 |
IConsoleVar *_iconsole_vars; // list of registred vars |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
107 |
IConsoleAlias *_iconsole_aliases; // list of registred aliases |
220
dc1710f96b39
(svn r221) -Feature: console command and variable hooking
signde
parents:
205
diff
changeset
|
108 |
|
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
109 |
// ** console colors/modes ** // |
1805
7989b82b106a
(svn r2309) - CodeChange: Change all _iconsole_color_whatever into _icolour_wtv (abbreviated). Besides the changed into proper english, yes this commit is pretty useless ;)
Darkvater
parents:
1739
diff
changeset
|
110 |
VARDEF byte _icolour_def; |
7989b82b106a
(svn r2309) - CodeChange: Change all _iconsole_color_whatever into _icolour_wtv (abbreviated). Besides the changed into proper english, yes this commit is pretty useless ;)
Darkvater
parents:
1739
diff
changeset
|
111 |
VARDEF byte _icolour_err; |
7989b82b106a
(svn r2309) - CodeChange: Change all _iconsole_color_whatever into _icolour_wtv (abbreviated). Besides the changed into proper english, yes this commit is pretty useless ;)
Darkvater
parents:
1739
diff
changeset
|
112 |
VARDEF byte _icolour_warn; |
7989b82b106a
(svn r2309) - CodeChange: Change all _iconsole_color_whatever into _icolour_wtv (abbreviated). Besides the changed into proper english, yes this commit is pretty useless ;)
Darkvater
parents:
1739
diff
changeset
|
113 |
VARDEF byte _icolour_dbg; |
7989b82b106a
(svn r2309) - CodeChange: Change all _iconsole_color_whatever into _icolour_wtv (abbreviated). Besides the changed into proper english, yes this commit is pretty useless ;)
Darkvater
parents:
1739
diff
changeset
|
114 |
VARDEF byte _icolour_cmd; |
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
115 |
VARDEF IConsoleModes _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
|
116 |
|
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
|
117 |
// ** console functions ** // |
289
1e1102dd2a62
(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 IConsoleInit(void); |
1e1102dd2a62
(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 IConsoleFree(void); |
1827
b8a0edd6eb89
(svn r2332) - Feature: Add 'clear' command and CTRL+L to empty the console window
Darkvater
parents:
1805
diff
changeset
|
120 |
void IConsoleClearBuffer(void); |
289
1e1102dd2a62
(svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents:
248
diff
changeset
|
121 |
void IConsoleResize(void); |
1e1102dd2a62
(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 IConsoleSwitch(void); |
1e1102dd2a62
(svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents:
248
diff
changeset
|
123 |
void IConsoleClose(void); |
1e1102dd2a62
(svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents:
248
diff
changeset
|
124 |
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
|
125 |
|
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
|
126 |
// ** console cmd buffer ** // |
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
127 |
void IConsoleHistoryAdd(const char *cmd); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
128 |
void IConsoleHistoryNavigate(signed char direction); |
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
|
129 |
|
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
|
130 |
// ** console output ** // |
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
131 |
void IConsolePrint(uint16 color_code, const char *string); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
132 |
void CDECL IConsolePrintF(uint16 color_code, const char *s, ...); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
133 |
void IConsoleDebug(const char *string); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
134 |
void IConsoleWarning(const char *string); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
135 |
void IConsoleError(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
|
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 |
// *** Commands *** // |
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
138 |
void IConsoleCmdRegister(const char *name, IConsoleCmdProc *proc); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
139 |
void IConsoleAliasRegister(const char *name, const char *cmd); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
140 |
IConsoleCmd *IConsoleCmdGet(const char *name); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
141 |
IConsoleAlias *IConsoleAliasGet(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
|
142 |
|
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
|
143 |
// *** Variables *** // |
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
144 |
void IConsoleVarRegister(const char *name, void *addr, IConsoleVarTypes type, const char *help); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
145 |
void IConsoleVarStringRegister(const char *name, void *addr, uint32 size, const char *help); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
146 |
IConsoleVar* IConsoleVarGet(const char *name); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
147 |
void IConsoleVarPrintGetValue(const IConsoleVar *var); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
148 |
void IConsoleVarPrintSetValue(const IConsoleVar *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
|
149 |
|
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 |
// *** Parser *** // |
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
151 |
void IConsoleCmdExec(const char *cmdstr); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
152 |
void IConsoleVarExec(const IConsoleVar *var, byte tokencount, char *token[]); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
153 |
void IConsoleAliasExec(const IConsoleAlias *alias, byte tokencount, char *tokens[]); |
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
|
154 |
|
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
155 |
// ** console std lib (register ingame commands/aliases/variables) ** // |
289
1e1102dd2a62
(svn r295) -Fix: Rewrite and fix of console stuff, including marking (XXX) of areas that require further investigation (Tron)
darkvater
parents:
248
diff
changeset
|
156 |
void IConsoleStdLibRegister(void); |
220
dc1710f96b39
(svn r221) -Feature: console command and variable hooking
signde
parents:
205
diff
changeset
|
157 |
|
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
158 |
// ** Hooking code ** // |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
159 |
void IConsoleCmdHookAdd(const char *name, IConsoleHookTypes type, IConsoleHook *proc); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
160 |
void IConsoleVarHookAdd(const char *name, IConsoleHookTypes type, IConsoleHook *proc); |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
161 |
void IConsoleVarProcAdd(const char *name, IConsoleCmdProc *proc); |
220
dc1710f96b39
(svn r221) -Feature: console command and variable hooking
signde
parents:
205
diff
changeset
|
162 |
|
1739
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
163 |
// ** Supporting functions **// |
4f3082735fbc
(svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents:
1397
diff
changeset
|
164 |
bool GetArgumentInteger(uint32 *value, const char *arg); |
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
|
165 |
#endif /* CONSOLE_H */ |