author | skidd13 |
Sat, 14 Jun 2008 16:23:08 +0000 | |
changeset 10962 | 2649d7a316af |
parent 10790 | 9f507561b6a5 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
10684 | 3 |
/** @file console_internal.h Internally used functions for the console. */ |
6449
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
4 |
|
10684 | 5 |
#ifndef CONSOLE_INTERNAL_H |
6 |
#define CONSOLE_INTERNAL_H |
|
220
dc1710f96b39
(svn r221) -Feature: console command and variable hooking
signde
parents:
205
diff
changeset
|
7 |
|
10684 | 8 |
#include "console_func.h" |
8602
9e75e594a068
(svn r11667) -Codechange: split window.h into a header that defines some 'global' window related types, on that defined 'global' window functions and one that defines functions and types only used by *_gui.cpps.
rubidium
parents:
6574
diff
changeset
|
9 |
|
6449
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
10 |
/* maximum length of a typed in command */ |
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 |
#define ICON_CMDLN_SIZE 255 |
6449
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
12 |
/* maximum length of a totally expanded command */ |
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
|
13 |
#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
|
14 |
|
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
15 |
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
|
16 |
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
|
17 |
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
|
18 |
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
|
19 |
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
|
20 |
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
|
21 |
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
|
22 |
ICONSOLE_VAR_STRING |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
23 |
}; |
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
|
24 |
|
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
25 |
enum IConsoleHookTypes { |
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
|
26 |
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
|
27 |
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
|
28 |
ICONSOLE_HOOK_POST_ACTION |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
29 |
}; |
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
|
30 |
|
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
|
31 |
/** --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
|
32 |
* 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
|
33 |
* 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
|
34 |
* 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
|
35 |
*/ |
6573 | 36 |
typedef bool IConsoleHook(); |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
37 |
struct IConsoleHooks{ |
6449
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
38 |
IConsoleHook *access; ///< trigger when accessing the variable/command |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
39 |
IConsoleHook *pre; ///< trigger before the variable/command is changed/executed |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
40 |
IConsoleHook *post; ///< trigger after the variable/command is changed/executed |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
41 |
}; |
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
|
42 |
|
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
|
43 |
/** --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
|
44 |
* 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
|
45 |
* 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
|
46 |
* 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
|
47 |
* 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
|
48 |
* 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
|
49 |
*/ |
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 |
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
|
51 |
|
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
52 |
struct IConsoleCmd { |
6449
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
53 |
char *name; ///< name of command |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
54 |
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
|
55 |
|
6449
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
56 |
IConsoleCmdProc *proc; ///< process executed when command is typed |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
57 |
IConsoleHooks hook; ///< any special trigger action that needs executing |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
58 |
}; |
634
88d9420048db
(svn r1065) -Add: [Console] Alias support. Type 'list_aliases' to show them all (sign_de)
truelight
parents:
554
diff
changeset
|
59 |
|
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
|
60 |
/** --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
|
61 |
* 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
|
62 |
* 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
|
63 |
* 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
|
64 |
* - 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
|
65 |
* - '= <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
|
66 |
* - '++' 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
|
67 |
* - '--' 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
|
68 |
*/ |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
69 |
struct IConsoleVar { |
6449
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
70 |
char *name; ///< name of the variable |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
71 |
IConsoleVar *next; ///< next variable in list |
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
|
72 |
|
6449
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
73 |
void *addr; ///< the address where the variable is pointing at |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
74 |
uint32 size; ///< size of the variable, used for strings |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
75 |
char *help; ///< the optional help string shown when requesting information |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
76 |
IConsoleVarTypes type; ///< type of variable (for correct assignment/output) |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
77 |
IConsoleCmdProc *proc; ///< some variables need really special handling, use a callback function for that |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
78 |
IConsoleHooks hook; ///< any special trigger action that needs executing |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
79 |
}; |
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
|
80 |
|
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 |
/** --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
|
82 |
* 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
|
83 |
* 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
|
84 |
* '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
|
85 |
* (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
|
86 |
* 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
|
87 |
* - "%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
|
88 |
* - "%+" 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
|
89 |
* - "%!" 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
|
90 |
* - ";" 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
|
91 |
*/ |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
92 |
struct IConsoleAlias { |
6449
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
93 |
char *name; ///< name of the alias |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
94 |
IConsoleAlias *next; ///< next alias in list |
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
|
95 |
|
6449
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
5726
diff
changeset
|
96 |
char *cmdline; ///< command(s) that is/are being aliased |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
97 |
}; |
644
e833509107ad
(svn r1077) Implements scripts/autoexec.scr to get executed on game starting (sign_de)
dominik
parents:
634
diff
changeset
|
98 |
|
4432
33631ac88c40
(svn r6195) -Codechange: do not use '//' in '/* ... */' style comments and '/*' or '*/' in '//' style comments.
rubidium
parents:
3900
diff
changeset
|
99 |
/* console parser */ |
8764
65746a5248ec
(svn r11832) -Codechange: get rid of (quite) some VARDEFs.
rubidium
parents:
8602
diff
changeset
|
100 |
extern IConsoleCmd *_iconsole_cmds; ///< list of registred commands |
65746a5248ec
(svn r11832) -Codechange: get rid of (quite) some VARDEFs.
rubidium
parents:
8602
diff
changeset
|
101 |
extern IConsoleVar *_iconsole_vars; ///< list of registred vars |
65746a5248ec
(svn r11832) -Codechange: get rid of (quite) some VARDEFs.
rubidium
parents:
8602
diff
changeset
|
102 |
extern IConsoleAlias *_iconsole_aliases; ///< list of registred aliases |
220
dc1710f96b39
(svn r221) -Feature: console command and variable hooking
signde
parents:
205
diff
changeset
|
103 |
|
4432
33631ac88c40
(svn r6195) -Codechange: do not use '//' in '/* ... */' style comments and '/*' or '*/' in '//' style comments.
rubidium
parents:
3900
diff
changeset
|
104 |
/* console functions */ |
6573 | 105 |
void IConsoleClearBuffer(); |
106 |
void IConsoleOpen(); |
|
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 |
|
4432
33631ac88c40
(svn r6195) -Codechange: do not use '//' in '/* ... */' style comments and '/*' or '*/' in '//' style comments.
rubidium
parents:
3900
diff
changeset
|
108 |
/* 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
|
109 |
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
|
110 |
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
|
111 |
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
|
112 |
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
|
113 |
|
4432
33631ac88c40
(svn r6195) -Codechange: do not use '//' in '/* ... */' style comments and '/*' or '*/' in '//' style comments.
rubidium
parents:
3900
diff
changeset
|
114 |
/* 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
|
115 |
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
|
116 |
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
|
117 |
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
|
118 |
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
|
119 |
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
|
120 |
|
4432
33631ac88c40
(svn r6195) -Codechange: do not use '//' in '/* ... */' style comments and '/*' or '*/' in '//' style comments.
rubidium
parents:
3900
diff
changeset
|
121 |
/* 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
|
122 |
void IConsoleVarExec(const IConsoleVar *var, byte tokencount, char *token[]); |
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
|
123 |
|
4432
33631ac88c40
(svn r6195) -Codechange: do not use '//' in '/* ... */' style comments and '/*' or '*/' in '//' style comments.
rubidium
parents:
3900
diff
changeset
|
124 |
/* console std lib (register ingame commands/aliases/variables) */ |
6573 | 125 |
void IConsoleStdLibRegister(); |
220
dc1710f96b39
(svn r221) -Feature: console command and variable hooking
signde
parents:
205
diff
changeset
|
126 |
|
4432
33631ac88c40
(svn r6195) -Codechange: do not use '//' in '/* ... */' style comments and '/*' or '*/' in '//' style comments.
rubidium
parents:
3900
diff
changeset
|
127 |
/* Hooking code */ |
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
|
128 |
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
|
129 |
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
|
130 |
void IConsoleVarProcAdd(const char *name, IConsoleCmdProc *proc); |
220
dc1710f96b39
(svn r221) -Feature: console command and variable hooking
signde
parents:
205
diff
changeset
|
131 |
|
4432
33631ac88c40
(svn r6195) -Codechange: do not use '//' in '/* ... */' style comments and '/*' or '*/' in '//' style comments.
rubidium
parents:
3900
diff
changeset
|
132 |
/* Supporting functions */ |
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
|
133 |
bool GetArgumentInteger(uint32 *value, const char *arg); |
10687
7a2d9450e0e7
(svn r13231) -Codechange: split the core console code and the console GUI.
rubidium
parents:
10684
diff
changeset
|
134 |
|
7a2d9450e0e7
(svn r13231) -Codechange: split the core console code and the console GUI.
rubidium
parents:
10684
diff
changeset
|
135 |
void IConsoleGUIInit(); |
7a2d9450e0e7
(svn r13231) -Codechange: split the core console code and the console GUI.
rubidium
parents:
10684
diff
changeset
|
136 |
void IConsoleGUIFree(); |
7a2d9450e0e7
(svn r13231) -Codechange: split the core console code and the console GUI.
rubidium
parents:
10684
diff
changeset
|
137 |
void IConsoleGUIPrint(ConsoleColour color_code, char *string); |
7a2d9450e0e7
(svn r13231) -Codechange: split the core console code and the console GUI.
rubidium
parents:
10684
diff
changeset
|
138 |
|
7a2d9450e0e7
(svn r13231) -Codechange: split the core console code and the console GUI.
rubidium
parents:
10684
diff
changeset
|
139 |
#endif /* CONSOLE_INTERNAL_H */ |