Mercurial > hg > openttd
annotate console.c @ 141:c1b1024d9f3f draft
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
author | darkvater <darkvater@openttd.org> |
---|---|
date | Wed, 25 Aug 2004 22:11:41 +0000 |
parents | b1efd00ffd88 |
children | ebd4e4ced31b |
rev | line source |
---|---|
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1 #include "stdafx.h" |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
2 #include "ttd.h" |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
3 #include "window.h" |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
4 #include "gui.h" |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
5 #include "gfx.h" |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
6 #include "player.h" |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
7 #include "variables.h" |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
8 #include "hal.h" |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
9 #include <stdarg.h> |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
10 #include "console.h" |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
11 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
12 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
13 // ** main console ** // |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
14 static bool _iconsole_inited; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
15 static byte* _iconsole_buffer[80]; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
16 static byte _iconsole_cbuffer[80]; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
17 static byte _iconsole_cmdline[255]; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
18 static byte _iconsole_cmdpos; |
136
b1efd00ffd88
(svn r137) Fix: console sometime didn't open (sign_de)
dominik <dominik@openttd.org>
parents:
135
diff
changeset
|
19 static byte _iconsole_mode = ICONSOLE_CLOSED; |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
20 static Window *_iconsole_win = NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
21 static byte _iconsole_scroll; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
22 |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
23 // ** main console cmd buffer ** // sign_de: especialy for Celestar :D |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
24 static byte* _iconsole_cmdbuffer[20]; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
25 static byte _iconsole_cmdbufferpos; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
26 |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
27 // ** console cursor ** // |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
28 static bool _icursor_state; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
29 static byte _icursor_rate; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
30 static byte _icursor_counter; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
31 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
32 // ** console window ** // |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
33 static void IConsoleWndProc(Window *w, WindowEvent *e); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
34 static const Widget _iconsole_window_widgets[] = {{WWT_LAST}}; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
35 static const WindowDesc _iconsole_window_desc = { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
36 0, 0, 2, 2, |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
37 WC_CONSOLE,0, |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
38 WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS, |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
39 _iconsole_window_widgets, |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
40 IConsoleWndProc, |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
41 }; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
42 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
43 // ** console parser ** // |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
44 static _iconsole_cmd * _iconsole_cmds; // list of registred commands |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
45 static _iconsole_var * _iconsole_vars; // list of registred vars |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
46 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
47 // ** console std lib ** // |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
48 static byte _stdlib_developer=1; |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
49 static bool _stdlib_con_developer=false; |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
50 static void IConsoleStdLibRegister(); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
51 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
52 /* *************** */ |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
53 /* end of header */ |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
54 /* *************** */ |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
55 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
56 void IConsoleClearCommand() |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
57 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
58 int i; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
59 for (i=0; i<255; i++) _iconsole_cmdline[i]=0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
60 _iconsole_cmdpos=0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
61 SetWindowDirty(_iconsole_win); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
62 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
63 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
64 static void IConsoleWndProc(Window *w, WindowEvent *e) |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
65 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
66 switch(e->event) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
67 |
136
b1efd00ffd88
(svn r137) Fix: console sometime didn't open (sign_de)
dominik <dominik@openttd.org>
parents:
135
diff
changeset
|
68 case WE_PAINT: |
b1efd00ffd88
(svn r137) Fix: console sometime didn't open (sign_de)
dominik <dominik@openttd.org>
parents:
135
diff
changeset
|
69 |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
70 GfxFillRect(w->left,w->top,w->width,w->height-1,0); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
71 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
72 int i=_iconsole_scroll; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
73 int max=(w->height/12)-1; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
74 while ((i>_iconsole_scroll-max) && (_iconsole_buffer[i]!=NULL)) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
75 DoDrawString(_iconsole_buffer[i],5,w->height-(((_iconsole_scroll+2)-i)*12),_iconsole_cbuffer[i]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
76 i--; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
77 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
78 DoDrawString("]",5,w->height-12,_iconsole_color_commands); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
79 DoDrawString((char *)&_iconsole_cmdline,10,w->height-12,_iconsole_color_commands); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
80 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
81 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
82 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
83 case WE_TICK: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
84 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
85 _icursor_counter++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
86 if (_icursor_counter>_icursor_rate) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
87 _icursor_state=!_icursor_state; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
88 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
89 int posx; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
90 int posy; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
91 int color; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
92 _cur_dpi=&_screen; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
93 if (_icursor_state) color=14; else color=0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
94 posx=10+GetStringWidth((char *)&_iconsole_cmdline); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
95 posy=w->height-3; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
96 GfxFillRect(posx,posy,posx+5,posy+1,color); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
97 _video_driver->make_dirty(posx,posy,5,1); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
98 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
99 _icursor_counter=0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
100 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
101 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
102 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
103 case WE_KEYPRESS: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
104 e->keypress.cont=false; |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
105 if (e->keypress.keycode == (WKC_UP)) |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
106 { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
107 IConsoleCmdBufferNavigate(+1); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
108 SetWindowDirty(w); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
109 } else |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
110 if (e->keypress.keycode == (WKC_DOWN)) |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
111 { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
112 IConsoleCmdBufferNavigate(-1); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
113 SetWindowDirty(w); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
114 } else |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
115 if (e->keypress.keycode == (WKC_SHIFT | WKC_PAGEUP)) |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
116 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
117 if ((_iconsole_scroll - ((w->height/12)-1))<0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
118 _iconsole_scroll = 0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
119 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
120 _iconsole_scroll -= (w->height/12)-1; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
121 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
122 SetWindowDirty(w); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
123 } else |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
124 if (e->keypress.keycode == (WKC_SHIFT | WKC_PAGEDOWN)) |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
125 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
126 if ((_iconsole_scroll + ((w->height/12)-1))>79) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
127 _iconsole_scroll = 79; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
128 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
129 _iconsole_scroll += (w->height/12)-1; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
130 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
131 SetWindowDirty(w); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
132 } else |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
133 if (e->keypress.keycode == (WKC_SHIFT | WKC_UP)) |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
134 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
135 if ((_iconsole_scroll - 1)<0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
136 _iconsole_scroll = 0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
137 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
138 _iconsole_scroll -= 1; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
139 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
140 SetWindowDirty(w); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
141 } else |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
142 if (e->keypress.keycode == (WKC_SHIFT | WKC_DOWN)) |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
143 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
144 if ((_iconsole_scroll + 1)>79) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
145 _iconsole_scroll = 79; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
146 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
147 _iconsole_scroll += 1; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
148 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
149 SetWindowDirty(w); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
150 } else |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
151 if (e->keypress.keycode == WKC_BACKQUOTE) |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
152 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
153 IConsoleSwitch(); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
154 } else |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
155 if (e->keypress.keycode == WKC_RETURN) |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
156 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
157 IConsolePrintF(_iconsole_color_commands, "] %s", _iconsole_cmdline); |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
158 IConsoleCmdBufferAdd(_iconsole_cmdline); |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
159 IConsoleCmdExec((byte *) _iconsole_cmdline); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
160 IConsoleClearCommand(); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
161 } else |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
162 if (e->keypress.keycode == WKC_BACKSPACE) |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
163 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
164 if (_iconsole_cmdpos!=0) _iconsole_cmdpos--; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
165 _iconsole_cmdline[_iconsole_cmdpos]=0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
166 SetWindowDirty(w); |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
167 _iconsole_cmdbufferpos=19; |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
168 } else |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
169 if (IS_INT_INSIDE((e->keypress.ascii), 32, 256)) |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
170 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
171 _iconsole_scroll=79; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
172 _iconsole_cmdline[_iconsole_cmdpos]=e->keypress.ascii; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
173 if (_iconsole_cmdpos!=255) _iconsole_cmdpos++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
174 SetWindowDirty(w); |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
175 _iconsole_cmdbufferpos=19; |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
176 } else e->keypress.cont=true; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
177 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
178 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
179 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
180 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
181 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
182 void IConsoleInit() |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
183 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
184 int i; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
185 #if defined(WITH_REV) |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
186 extern char _openttd_revision[]; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
187 #endif |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
188 _iconsole_color_default = 1; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
189 _iconsole_color_error = 3; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
190 _iconsole_color_debug = 5; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
191 _iconsole_color_commands = 2; |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
192 _iconsole_scroll=79; |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
193 _iconsole_cmdbufferpos=19; |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
194 _iconsole_inited=true; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
195 _iconsole_mode=ICONSOLE_CLOSED; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
196 _iconsole_win=NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
197 _icursor_state=false; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
198 _icursor_rate=5; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
199 _icursor_counter=0; |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
200 for (i=0;i<20;i++) { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
201 _iconsole_cmdbuffer[i]=NULL; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
202 } |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
203 for (i=0;i<80;i++) { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
204 _iconsole_buffer[i]=NULL; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
205 _iconsole_cbuffer[i]=0; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
206 } |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
207 IConsoleStdLibRegister(); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
208 #if defined(WITH_REV) |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
209 IConsolePrintF(13,"OpenTTD Game Console Revision 3 - %s",_openttd_revision); |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
210 #else |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
211 IConsolePrint(13,"OpenTTD Game Console Revision 3"); |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
212 #endif |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
213 IConsolePrint(12,"---------------------------------"); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
214 IConsolePrint(12,"use \"help\" for more info"); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
215 IConsolePrint(12,""); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
216 IConsoleClearCommand(); |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
217 IConsoleCmdBufferAdd(""); |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
218 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
219 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
220 void IConsoleClear() |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
221 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
222 int i; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
223 for (i=0;i<80;i++) if (_iconsole_buffer[i]!=NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
224 free(_iconsole_buffer[i]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
225 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
226 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
227 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
228 void IConsoleFree() |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
229 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
230 _iconsole_inited=false; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
231 IConsoleClear(); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
232 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
233 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
234 void IConsoleResize() { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
235 if (_iconsole_win!=NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
236 _iconsole_win->height = _screen.height / 3; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
237 _iconsole_win->width= _screen.width; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
238 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
239 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
240 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
241 void IConsoleSwitch() |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
242 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
243 if (_iconsole_mode==ICONSOLE_CLOSED) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
244 _iconsole_win = AllocateWindowDesc(&_iconsole_window_desc); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
245 _iconsole_win->height = _screen.height / 3; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
246 _iconsole_win->width= _screen.width; |
136
b1efd00ffd88
(svn r137) Fix: console sometime didn't open (sign_de)
dominik <dominik@openttd.org>
parents:
135
diff
changeset
|
247 _iconsole_mode=ICONSOLE_OPENED; |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
248 } else |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
249 if (_iconsole_mode==ICONSOLE_OPENED) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
250 DeleteWindow(_iconsole_win); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
251 _iconsole_win=NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
252 _iconsole_mode=ICONSOLE_CLOSED; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
253 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
254 MarkWholeScreenDirty(); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
255 MarkAllViewportsDirty(0,0,_screen.width,_screen.height); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
256 _video_driver->make_dirty(0,0,_screen.width,_screen.height); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
257 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
258 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
259 void IConsoleClose() { |
136
b1efd00ffd88
(svn r137) Fix: console sometime didn't open (sign_de)
dominik <dominik@openttd.org>
parents:
135
diff
changeset
|
260 if (_iconsole_mode==ICONSOLE_OPENED) IConsoleSwitch(); |
b1efd00ffd88
(svn r137) Fix: console sometime didn't open (sign_de)
dominik <dominik@openttd.org>
parents:
135
diff
changeset
|
261 _iconsole_mode=ICONSOLE_CLOSED; |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
262 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
263 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
264 void IConsoleOpen() { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
265 if (_iconsole_mode==ICONSOLE_CLOSED) IConsoleSwitch(); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
266 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
267 |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
268 void IConsoleCmdBufferAdd(byte * cmd) { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
269 int i; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
270 if (_iconsole_cmdbufferpos != 19) return; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
271 if (_iconsole_cmdbuffer[18]!=NULL) free(_iconsole_cmdbuffer[18]); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
272 for (i=18; i>0; i--) _iconsole_cmdbuffer[i]=_iconsole_cmdbuffer[i-1]; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
273 i=strlen((char *)cmd); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
274 _iconsole_cmdbuffer[0]=malloc(i+1); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
275 memset(((void *)_iconsole_cmdbuffer[0]),0,i+1); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
276 memcpy(((void *)_iconsole_cmdbuffer[0]),(void *)cmd,i); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
277 _iconsole_cmdbuffer[0][i]=0; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
278 _iconsole_cmdbufferpos = 19; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
279 } |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
280 |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
281 void IConsoleCmdBufferNavigate(signed char direction) { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
282 int i; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
283 i=_iconsole_cmdbufferpos + direction; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
284 if (i<0) i=19; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
285 if (i>19) i=0; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
286 if (direction>0) while (_iconsole_cmdbuffer[i]==NULL) { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
287 i++; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
288 if (i>19) i=0; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
289 } |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
290 if (direction<0) while (_iconsole_cmdbuffer[i]==NULL) { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
291 i--; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
292 if (i<0) i=19; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
293 } |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
294 _iconsole_cmdbufferpos = i; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
295 IConsoleClearCommand(); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
296 memcpy((void *)_iconsole_cmdline,(void *)_iconsole_cmdbuffer[i],strlen(_iconsole_cmdbuffer[i])); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
297 _iconsole_cmdpos =strlen(_iconsole_cmdbuffer[i]); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
298 } |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
299 |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
300 void IConsolePrint(byte color_code, byte* string) |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
301 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
302 byte * _ex; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
303 byte * _new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
304 byte _exc; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
305 byte _newc; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
306 int i,j; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
307 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
308 if (!_iconsole_inited) return; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
309 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
310 _newc=color_code; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
311 i=strlen((char *)string); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
312 _new=malloc(i+1); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
313 memset(_new,0,i+1); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
314 memcpy(_new,string,i); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
315 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
316 for (j=0;j<i;j++) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
317 if (_new[j]<0x1F) _new[j]=0x20; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
318 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
319 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
320 i=79; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
321 while (i>=0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
322 _ex=_iconsole_buffer[i]; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
323 _exc=_iconsole_cbuffer[i]; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
324 _iconsole_buffer[i]=_new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
325 _iconsole_cbuffer[i]=_newc; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
326 _new=_ex; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
327 _newc=_exc; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
328 i--; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
329 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
330 if (_ex!=NULL) free(_ex); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
331 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
332 if (_iconsole_win!=NULL) SetWindowDirty(_iconsole_win); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
333 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
334 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
335 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
336 void IConsolePrintF(byte color_code, const char *s, ...) |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
337 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
338 va_list va; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
339 char buf[1024]; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
340 va_start(va, s); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
341 vsprintf(buf, s, va); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
342 va_end(va); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
343 IConsolePrint(color_code, (byte *) &buf); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
344 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
345 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
346 void IConsoleDebug(byte* string) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
347 if (_stdlib_developer>1) IConsolePrintF(_iconsole_color_debug, "DEBUG: %s", string); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
348 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
349 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
350 void IConsoleError(byte* string) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
351 if (_stdlib_developer>0) IConsolePrintF(_iconsole_color_error, "ERROR: %s", string); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
352 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
353 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
354 void IConsoleCmdRegister(byte * name, void * addr) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
355 byte * _new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
356 _iconsole_cmd * item; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
357 _iconsole_cmd * item_new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
358 int i; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
359 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
360 i=strlen((char *)name); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
361 _new=malloc(i+1); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
362 memset(_new,0,i+1); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
363 memcpy(_new,name,i); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
364 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
365 item_new = malloc(sizeof(_iconsole_cmd)); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
366 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
367 item_new->_next = NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
368 item_new->addr = addr; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
369 item_new->name = _new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
370 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
371 item = _iconsole_cmds; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
372 if (item == NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
373 _iconsole_cmds = item_new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
374 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
375 while (item->_next != NULL) { item = item->_next; }; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
376 item->_next = item_new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
377 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
378 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
379 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
380 void* IConsoleCmdGetAddr(byte * name) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
381 _iconsole_cmd * item; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
382 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
383 item = _iconsole_cmds; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
384 while (item != NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
385 if (strcmp(item->name,name)==0) return item->addr; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
386 item = item->_next; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
387 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
388 return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
389 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
390 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
391 void IConsoleVarRegister(byte * name, void * addr, byte type) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
392 byte * _new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
393 _iconsole_var * item; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
394 _iconsole_var * item_new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
395 int i; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
396 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
397 i=strlen((char *)name)+1; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
398 _new=malloc(i+1); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
399 memset(_new,0,i+1); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
400 _new[0]='*'; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
401 memcpy(_new+1,name,i); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
402 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
403 item_new = malloc(sizeof(_iconsole_var)); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
404 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
405 item_new->_next = NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
406 item_new->addr = addr; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
407 item_new->name = _new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
408 item_new->type = type; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
409 item_new->_malloc = false; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
410 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
411 item = _iconsole_vars; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
412 if (item == NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
413 _iconsole_vars = item_new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
414 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
415 while (item->_next != NULL) { item = item->_next; }; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
416 item->_next = item_new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
417 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
418 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
419 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
420 void IConsoleVarInsert(_iconsole_var * var, byte * name) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
421 byte * _new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
422 _iconsole_var * item; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
423 _iconsole_var * item_new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
424 int i; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
425 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
426 item_new = var; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
427 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
428 // dont allow to build variable rings |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
429 if (item_new->_next != NULL) return; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
430 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
431 i=strlen((char *)name)+1; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
432 _new=malloc(i+1); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
433 memset(_new,0,i+1); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
434 _new[0]='*'; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
435 memcpy(_new+1,name,i); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
436 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
437 item_new->name = _new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
438 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
439 item = _iconsole_vars; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
440 if (item == NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
441 _iconsole_vars = item_new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
442 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
443 while (item->_next != NULL) { item = item->_next; }; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
444 item->_next = item_new; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
445 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
446 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
447 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
448 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
449 _iconsole_var * IConsoleVarGet(byte * name) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
450 _iconsole_var * item; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
451 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
452 item = _iconsole_vars; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
453 while (item != NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
454 if (strcmp(item->name,name)==0) return item; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
455 item = item->_next; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
456 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
457 return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
458 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
459 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
460 _iconsole_var * IConsoleVarAlloc(byte type) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
461 _iconsole_var * item; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
462 item=malloc(sizeof(_iconsole_var)); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
463 item->_next = NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
464 item->name = ""; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
465 item->type = type; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
466 switch (item->type) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
467 case ICONSOLE_VAR_BOOLEAN: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
468 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
469 item->addr=malloc(sizeof(bool)); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
470 memset(item->addr,0,sizeof(bool)); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
471 item->_malloc=true; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
472 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
473 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
474 case ICONSOLE_VAR_BYTE: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
475 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
476 item->addr=malloc(sizeof(byte)); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
477 memset(item->addr,0,sizeof(byte)); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
478 item->_malloc=true; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
479 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
480 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
481 case ICONSOLE_VAR_UINT16: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
482 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
483 item->addr=malloc(sizeof(unsigned short)); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
484 memset(item->addr,0,sizeof(unsigned short)); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
485 item->_malloc=true; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
486 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
487 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
488 case ICONSOLE_VAR_UINT32: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
489 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
490 item->addr=malloc(sizeof(unsigned int)); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
491 memset(item->addr,0,sizeof(unsigned int)); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
492 item->_malloc=true; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
493 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
494 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
495 case ICONSOLE_VAR_INT16: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
496 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
497 item->addr=malloc(sizeof(signed short)); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
498 memset(item->addr,0,sizeof(signed short)); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
499 item->_malloc=true; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
500 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
501 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
502 case ICONSOLE_VAR_INT32: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
503 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
504 item->addr=malloc(sizeof(signed int)); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
505 memset(item->addr,0,sizeof(signed int)); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
506 item->_malloc=true; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
507 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
508 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
509 default: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
510 item->addr = NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
511 item->_malloc = false; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
512 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
513 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
514 return item; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
515 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
516 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
517 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
518 void IConsoleVarFree(_iconsole_var * var) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
519 if (var ->_malloc) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
520 free(var ->addr); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
521 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
522 free(var); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
523 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
524 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
525 void IConsoleVarSetString(_iconsole_var * var, byte * string) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
526 int l; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
527 |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
528 if (string == NULL) return; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
529 |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
530 if (var->_malloc) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
531 free(var->addr); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
532 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
533 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
534 l=strlen((char *) string); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
535 var->addr=malloc(l+1); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
536 var->_malloc=true; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
537 memset(var->addr,0,l); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
538 memcpy((void *) var->addr,(void *) string, l); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
539 ((byte *)var->addr)[l]=0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
540 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
541 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
542 void IConsoleVarSetValue(_iconsole_var * var, int value) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
543 switch (var->type) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
544 case ICONSOLE_VAR_BOOLEAN: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
545 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
546 (*(bool *)var->addr)=(value!=0); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
547 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
548 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
549 case ICONSOLE_VAR_BYTE: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
550 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
551 (*(byte *)var->addr)=value; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
552 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
553 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
554 case ICONSOLE_VAR_UINT16: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
555 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
556 (*(unsigned short *)var->addr)=value; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
557 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
558 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
559 case ICONSOLE_VAR_UINT32: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
560 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
561 (*(unsigned int *)var->addr)=value; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
562 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
563 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
564 case ICONSOLE_VAR_INT16: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
565 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
566 (*(signed short *)var->addr)=value; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
567 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
568 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
569 case ICONSOLE_VAR_INT32: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
570 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
571 (*(signed int *)var->addr)=value; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
572 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
573 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
574 default: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
575 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
576 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
577 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
578 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
579 void IConsoleVarDump(_iconsole_var * var, byte * dump_desc) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
580 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
581 byte var_b; // TYPE BYTE |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
582 unsigned short var_ui16; // TYPE UINT16 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
583 unsigned int var_ui32; // TYPE UINT32 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
584 signed short var_i16; // TYPE INT16 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
585 signed int var_i32; // TYPE INT32 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
586 byte * var_s; // TYPE STRING |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
587 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
588 if (dump_desc==NULL) dump_desc = var->name; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
589 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
590 switch (var->type) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
591 case ICONSOLE_VAR_BOOLEAN: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
592 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
593 if (*(bool *)var->addr) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
594 IConsolePrintF(_iconsole_color_default, "%s = true",dump_desc); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
595 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
596 IConsolePrintF(_iconsole_color_default, "%s = false",dump_desc); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
597 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
598 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
599 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
600 case ICONSOLE_VAR_BYTE: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
601 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
602 var_b=*(byte *)var->addr; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
603 IConsolePrintF(_iconsole_color_default, "%s = %i",dump_desc,var_b); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
604 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
605 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
606 case ICONSOLE_VAR_UINT16: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
607 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
608 var_ui16=*(unsigned short *)var->addr; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
609 IConsolePrintF(_iconsole_color_default, "%s = %i",dump_desc,var_ui16); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
610 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
611 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
612 case ICONSOLE_VAR_UINT32: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
613 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
614 var_ui32=*(unsigned int *)var->addr; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
615 IConsolePrintF(_iconsole_color_default, "%s = %i",dump_desc,var_ui32); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
616 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
617 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
618 case ICONSOLE_VAR_INT16: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
619 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
620 var_i16=*(signed short *)var->addr; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
621 IConsolePrintF(_iconsole_color_default, "%s = %i",dump_desc,var_i16); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
622 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
623 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
624 case ICONSOLE_VAR_INT32: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
625 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
626 var_i32=*(signed int *)var->addr; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
627 IConsolePrintF(_iconsole_color_default, "%s = %i",dump_desc,var_i32); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
628 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
629 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
630 case ICONSOLE_VAR_STRING: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
631 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
632 var_s=(byte *)var->addr; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
633 IConsolePrintF(_iconsole_color_default, "%s = %s",dump_desc,var_s); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
634 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
635 break; |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
636 case ICONSOLE_VAR_REFERENCE: |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
637 IConsolePrintF(_iconsole_color_default, "%s = @%s",dump_desc,((_iconsole_var *)var->addr)->name); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
638 break; |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
639 case ICONSOLE_VAR_UNKNOWN: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
640 case ICONSOLE_VAR_POINTER: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
641 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
642 var_i32=(signed int)((byte *)var->addr); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
643 IConsolePrintF(_iconsole_color_default, "%s = @%i",dump_desc,var_i32); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
644 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
645 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
646 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
647 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
648 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
649 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
650 void IConsoleCmdExec(byte * cmdstr) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
651 _iconsole_var * (*function)(byte argc, byte* argv[], byte argt[]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
652 byte * tokens[20]; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
653 byte tokentypes[20]; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
654 byte * tokenstream; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
655 byte * tokenstream_s; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
656 byte execution_mode; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
657 _iconsole_var * var = NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
658 _iconsole_var * result = NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
659 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
660 bool longtoken; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
661 bool valid_token; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
662 bool skip_lt_change; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
663 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
664 int c; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
665 int i; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
666 int l; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
667 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
668 //** clearing buffer **// |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
669 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
670 for (i=0;i<20;i++) { tokens[i]=NULL; tokentypes[i]=ICONSOLE_VAR_NONE; }; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
671 tokenstream_s=tokenstream=malloc(1024); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
672 memset(tokenstream,0,1024); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
673 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
674 //** parsing **// |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
675 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
676 longtoken=false; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
677 valid_token=false; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
678 skip_lt_change=false; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
679 l=strlen((char *) cmdstr); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
680 i=0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
681 c=0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
682 tokens[c] = tokenstream; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
683 while (i<l) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
684 if (cmdstr[i]=='"') { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
685 if (longtoken) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
686 if (cmdstr[i+1]=='"') { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
687 i++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
688 *tokenstream = '"'; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
689 tokenstream++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
690 skip_lt_change=true; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
691 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
692 longtoken=!longtoken; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
693 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
694 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
695 longtoken=!longtoken; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
696 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
697 if (!skip_lt_change) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
698 if (!longtoken) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
699 if (valid_token) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
700 c++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
701 *tokenstream = 0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
702 tokenstream++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
703 tokens[c] = tokenstream; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
704 valid_token = false; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
705 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
706 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
707 skip_lt_change=false; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
708 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
709 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
710 else if ((!longtoken) && (cmdstr[i]==' ')) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
711 if (valid_token) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
712 c++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
713 *tokenstream = 0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
714 tokenstream++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
715 tokens[c] = tokenstream; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
716 valid_token = false; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
717 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
718 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
719 else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
720 valid_token=true; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
721 *tokenstream = cmdstr[i]; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
722 tokenstream++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
723 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
724 i++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
725 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
726 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
727 tokenstream--; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
728 if (!(*tokenstream==0)) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
729 c++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
730 tokenstream++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
731 *tokenstream = 0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
732 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
733 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
734 //** interpreting **// |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
735 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
736 for (i=0; i<c; i++) { |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
737 tokentypes[i]=ICONSOLE_VAR_UNKNOWN; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
738 if (tokens[i]!=NULL) if (i>0) if (strlen((char *) tokens[i])>0) { |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
739 if (tokens[i][0]=='*') { |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
740 if ((i==2) && (tokentypes[1]==ICONSOLE_VAR_UNKNOWN) && (strcmp(tokens[1],"<<")==0)) { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
741 // dont change the variable to an pointer if execution_mode 4 is being prepared |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
742 // this is used to assign one variable the value of the other one [token 0 and 2] |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
743 } else { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
744 var = IConsoleVarGet(tokens[i]); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
745 if (var!=NULL) { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
746 tokens[i]=(byte *)var->addr; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
747 tokentypes[i]=var->type; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
748 } |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
749 } |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
750 } |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
751 if (tokens[i]!=NULL) if (tokens[i][0]=='@') if (tokens[i][1]=='*') { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
752 var = IConsoleVarGet(tokens[i]+1); |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
753 if (var!=NULL) { |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
754 tokens[i]=(byte *)var; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
755 tokentypes[i]=ICONSOLE_VAR_REFERENCE; |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
756 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
757 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
758 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
759 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
760 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
761 execution_mode=0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
762 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
763 function = IConsoleCmdGetAddr(tokens[0]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
764 if (function != NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
765 execution_mode=1; // this is a command |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
766 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
767 var = IConsoleVarGet(tokens[0]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
768 if (var != NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
769 execution_mode=2; // this is a variable |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
770 if (c>2) if (strcmp(tokens[1],"<<")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
771 // this is command to variable mode [normal] |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
772 function = IConsoleCmdGetAddr(tokens[2]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
773 if (function != NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
774 execution_mode=3; |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
775 } else { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
776 result = IConsoleVarGet(tokens[2]); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
777 if (result != NULL) { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
778 execution_mode=4; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
779 } |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
780 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
781 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
782 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
783 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
784 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
785 //** executing **// |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
786 if (_stdlib_con_developer) IConsolePrintF(_iconsole_color_debug,"CONDEBUG: execution_mode: %i",execution_mode); |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
787 switch (execution_mode) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
788 case 0: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
789 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
790 // not found |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
791 IConsoleError("command or variable not found"); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
792 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
793 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
794 case 1: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
795 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
796 // execution with command syntax |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
797 result = function(c,tokens,tokentypes); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
798 if (result!=NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
799 IConsoleVarDump(result,"result"); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
800 IConsoleVarFree(result); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
801 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
802 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
803 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
804 case 2: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
805 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
806 // execution with variable syntax |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
807 if ((c==2) || (c==3)) { |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
808 // ** variable modifications ** // |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
809 switch (var->type) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
810 case ICONSOLE_VAR_BOOLEAN: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
811 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
812 if (strcmp(tokens[1],"=")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
813 if (c==3) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
814 *(bool *)var->addr=(atoi((char *) tokens[2])!=0); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
815 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
816 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
817 *(bool *)var->addr=false; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
818 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
819 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
820 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
821 else if (strcmp(tokens[1],"++")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
822 *(bool *)var->addr=!*(bool *)var->addr; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
823 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
824 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
825 else if (strcmp(tokens[1],"--")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
826 *(bool *)var->addr=!*(bool *)var->addr; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
827 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
828 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
829 else { IConsoleError("operation not supported"); } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
830 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
831 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
832 case ICONSOLE_VAR_BYTE: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
833 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
834 if (strcmp(tokens[1],"=")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
835 if (c==3) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
836 *(byte *)var->addr=atoi((char *) tokens[2]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
837 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
838 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
839 *(byte *)var->addr=0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
840 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
841 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
842 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
843 else if (strcmp(tokens[1],"++")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
844 (*(byte *)var->addr)++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
845 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
846 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
847 else if (strcmp(tokens[1],"--")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
848 (*(byte *)var->addr)--; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
849 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
850 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
851 else { IConsoleError("operation not supported"); } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
852 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
853 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
854 case ICONSOLE_VAR_UINT16: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
855 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
856 if (strcmp(tokens[1],"=")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
857 if (c==3) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
858 *(unsigned short *)var->addr=atoi((char *) tokens[2]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
859 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
860 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
861 *(unsigned short *)var->addr=0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
862 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
863 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
864 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
865 else if (strcmp(tokens[1],"++")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
866 (*(unsigned short *)var->addr)++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
867 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
868 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
869 else if (strcmp(tokens[1],"--")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
870 (*(unsigned short *)var->addr)--; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
871 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
872 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
873 else { IConsoleError("operation not supported"); } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
874 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
875 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
876 case ICONSOLE_VAR_UINT32: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
877 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
878 if (strcmp(tokens[1],"=")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
879 if (c==3) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
880 *(unsigned int *)var->addr=atoi((char *) tokens[2]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
881 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
882 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
883 *(unsigned int *)var->addr=0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
884 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
885 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
886 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
887 else if (strcmp(tokens[1],"++")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
888 (*(unsigned int *)var->addr)++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
889 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
890 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
891 else if (strcmp(tokens[1],"--")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
892 (*(unsigned int *)var->addr)--; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
893 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
894 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
895 else { IConsoleError("operation not supported"); } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
896 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
897 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
898 case ICONSOLE_VAR_INT16: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
899 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
900 if (strcmp(tokens[1],"=")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
901 if (c==3) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
902 *(signed short *)var->addr=atoi((char *) tokens[2]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
903 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
904 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
905 *(signed short *)var->addr=0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
906 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
907 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
908 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
909 else if (strcmp(tokens[1],"++")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
910 (*(signed short *)var->addr)++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
911 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
912 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
913 else if (strcmp(tokens[1],"--")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
914 (*(signed short *)var->addr)--; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
915 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
916 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
917 else { IConsoleError("operation not supported"); } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
918 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
919 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
920 case ICONSOLE_VAR_INT32: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
921 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
922 if (strcmp(tokens[1],"=")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
923 if (c==3) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
924 *(signed int *)var->addr=atoi((char *) tokens[2]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
925 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
926 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
927 *(signed int *)var->addr=0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
928 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
929 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
930 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
931 else if (strcmp(tokens[1],"++")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
932 (*(signed int *)var->addr)++; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
933 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
934 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
935 else if (strcmp(tokens[1],"--")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
936 (*(signed int *)var->addr)--; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
937 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
938 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
939 else { IConsoleError("operation not supported"); } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
940 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
941 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
942 case ICONSOLE_VAR_STRING: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
943 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
944 if (strcmp(tokens[1],"=")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
945 if (c==3) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
946 IConsoleVarSetString(var, tokens[2]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
947 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
948 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
949 IConsoleVarSetString(var, ""); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
950 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
951 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
952 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
953 else { IConsoleError("operation not supported"); } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
954 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
955 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
956 case ICONSOLE_VAR_POINTER: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
957 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
958 if (strcmp(tokens[1],"=")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
959 if (c==3) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
960 if (tokentypes[2]==ICONSOLE_VAR_UNKNOWN) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
961 var->addr = (void *)atoi(tokens[2]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
962 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
963 var->addr = (void *)tokens[2]; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
964 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
965 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
966 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
967 var->addr = NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
968 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
969 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
970 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
971 else if (strcmp(tokens[1],"++")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
972 var->addr = ((char *)var->addr)+1; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
973 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
974 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
975 else if (strcmp(tokens[1],"--")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
976 var->addr = ((char *)var->addr)-1;; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
977 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
978 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
979 else { IConsoleError("operation not supported"); } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
980 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
981 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
982 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
983 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
984 if (c==1) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
985 // ** variable output ** // |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
986 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
987 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
988 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
989 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
990 case 3: |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
991 case 4: |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
992 { |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
993 // execute command with result or assign a variable |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
994 if (execution_mode==3) { |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
995 int i; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
996 int diff; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
997 void * temp; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
998 byte temp2; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
999 |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1000 // tokenshifting |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1001 for (diff=0; diff<2; diff++) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1002 temp=tokens[0]; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1003 temp2=tokentypes[0]; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1004 for (i=1; i<20; i++) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1005 tokens[i-1]=tokens[i]; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1006 tokentypes[i-1]=tokentypes[i]; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1007 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1008 tokens[19]=temp; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1009 tokentypes[19]=temp2; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1010 } |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1011 |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1012 result = function(c,tokens,tokentypes); |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1013 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1014 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1015 if (result!=NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1016 if (result ->type != var -> type) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1017 IConsoleError("variable type missmatch"); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1018 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1019 switch (result->type) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1020 case ICONSOLE_VAR_BOOLEAN: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1021 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1022 (*(bool *)var->addr)=(*(bool *)result->addr); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1023 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1024 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1025 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1026 case ICONSOLE_VAR_BYTE: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1027 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1028 (*(byte *)var->addr)=(*(byte *)result->addr); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1029 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1030 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1031 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1032 case ICONSOLE_VAR_UINT16: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1033 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1034 (*(unsigned short *)var->addr)=(*(unsigned short *)result->addr); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1035 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1036 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1037 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1038 case ICONSOLE_VAR_UINT32: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1039 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1040 (*(unsigned int *)var->addr)=(*(unsigned int *)result->addr); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1041 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1042 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1043 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1044 case ICONSOLE_VAR_INT16: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1045 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1046 (*(signed short *)var->addr)=(*(signed short *)result->addr); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1047 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1048 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1049 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1050 case ICONSOLE_VAR_INT32: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1051 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1052 (*(signed int *)var->addr)=(*(signed int *)result->addr); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1053 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1054 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1055 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1056 case ICONSOLE_VAR_POINTER: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1057 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1058 var->addr=result->addr; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1059 IConsoleVarDump(var,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1060 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1061 break; |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1062 case ICONSOLE_VAR_STRING: |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1063 { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1064 IConsoleVarSetString(var,result->addr); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1065 IConsoleVarDump(var,NULL); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1066 } |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1067 break; |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1068 default: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1069 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1070 IConsoleError("variable type missmatch"); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1071 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1072 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1073 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1074 } |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1075 |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1076 if (execution_mode==3) { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1077 IConsoleVarFree(result); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1078 result = NULL; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1079 } |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1080 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1081 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1082 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1083 break; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1084 default: |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1085 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1086 // execution mode invalid |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1087 IConsoleError("invalid execution mode"); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1088 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1089 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1090 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1091 //** freeing the tokens **// |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1092 for (i=0;i<20;i++) tokens[i]=NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1093 free(tokenstream_s); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1094 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1095 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1096 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1097 /* **************************** */ |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1098 /* default console commands */ |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1099 /* **************************** */ |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1100 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1101 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1102 static _iconsole_var * IConsoleStdLibEcho(byte argc, byte* argv[], byte argt[]) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1103 if (argc<2) return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1104 IConsolePrint(_iconsole_color_default, argv[1]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1105 return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1106 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1107 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1108 static _iconsole_var * IConsoleStdLibEchoC(byte argc, byte* argv[], byte argt[]) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1109 if (argc<3) return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1110 IConsolePrint(atoi(argv[1]), argv[2]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1111 return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1112 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1113 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1114 static _iconsole_var * IConsoleStdLibPrintF(byte argc, byte* argv[], byte argt[]) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1115 if (argc<3) return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1116 IConsolePrintF(_iconsole_color_default, argv[1] ,argv[2],argv[3],argv[4],argv[5],argv[6],argv[7],argv[8],argv[9],argv[10],argv[11],argv[12],argv[13],argv[14],argv[15],argv[16],argv[17],argv[18],argv[19]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1117 return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1118 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1119 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1120 static _iconsole_var * IConsoleStdLibPrintFC(byte argc, byte* argv[], byte argt[]) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1121 if (argc<3) return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1122 IConsolePrintF(atoi(argv[1]), argv[2] ,argv[3],argv[4],argv[5],argv[6],argv[7],argv[8],argv[9],argv[10],argv[11],argv[12],argv[13],argv[14],argv[15],argv[16],argv[17],argv[18],argv[19]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1123 return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1124 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1125 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1126 static _iconsole_var * IConsoleStdLibScreenShot(byte argc, byte* argv[], byte argt[]) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1127 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1128 if (argc<2) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1129 _make_screenshot=1; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1130 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1131 if (strcmp(argv[1],"big")==0) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1132 _make_screenshot=2; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1133 } |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1134 if (strcmp(argv[1],"no_con")==0) { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1135 IConsoleClose(); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1136 _make_screenshot=1; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1137 } |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1138 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1139 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1140 return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1141 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1142 |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1143 static _iconsole_var * IConsoleStdLibVarInfo(byte argc, byte* argv[], byte argt[]) { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1144 if (argc<2) return NULL; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1145 if (argt[1]!=ICONSOLE_VAR_REFERENCE) { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1146 IConsoleError("variable must be an variable reference"); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1147 } else { |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1148 _iconsole_var * item; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1149 item = (_iconsole_var *) argv[1]; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1150 IConsolePrintF(_iconsole_color_default,"variable_name: %s",item->name); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1151 IConsolePrintF(_iconsole_color_default,"variable_type: %i",item->type); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1152 IConsolePrintF(_iconsole_color_default,"variable_addr: %i",item->addr); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1153 if (item->_malloc) IConsolePrintF(_iconsole_color_default,"variable_malloc: internal allocated"); else IConsolePrintF(_iconsole_color_default, "variable_malloc: external allocated"); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1154 } |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1155 return NULL; |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1156 } |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1157 |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1158 static _iconsole_var * IConsoleStdLibDebugLevel(byte argc, byte* argv[], byte argt[]) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1159 if (argc<2) return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1160 SetDebugString(argv[1]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1161 return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1162 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1163 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1164 static _iconsole_var * IConsoleStdLibExit(byte argc, byte* argv[], byte argt[]) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1165 _exit_game = true; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1166 return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1167 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1168 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1169 static _iconsole_var * IConsoleStdLibHelp(byte argc, byte* argv[], byte argt[]) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1170 IConsolePrint(13 ," -- console help -- "); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1171 IConsolePrint(1 ," variables: [command to list them: list_vars]"); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1172 IConsolePrint(1 ," *temp_string = \"my little \""); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1173 IConsolePrint(1 ,""); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1174 IConsolePrint(1 ," commands: [command to list them: list_cmds]"); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1175 IConsolePrint(1 ," [command] [\"string argument with spaces\"] [argument 2] ..."); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1176 IConsolePrint(1 ," printf \"%s world\" *temp_string"); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1177 IConsolePrint(1 ,""); |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1178 IConsolePrint(1 ," command/variable returning a value into an variable:"); |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1179 IConsolePrint(1 ," *temp_uint16 << random"); |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1180 IConsolePrint(1 ," *temp_uint16 << *temp_uint16_2"); |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1181 IConsolePrint(1 ,""); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1182 return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1183 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1184 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1185 static _iconsole_var * IConsoleStdLibRandom(byte argc, byte* argv[], byte argt[]) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1186 _iconsole_var * result; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1187 result = IConsoleVarAlloc(ICONSOLE_VAR_UINT16); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1188 IConsoleVarSetValue(result,rand()); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1189 return result; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1190 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1191 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1192 static _iconsole_var * IConsoleStdLibListCommands(byte argc, byte* argv[], byte argt[]) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1193 _iconsole_cmd * item; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1194 int l = 0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1195 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1196 if (argv[1]!=NULL) l = strlen((char *) argv[1]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1197 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1198 item = _iconsole_cmds; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1199 while (item != NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1200 if (argv[1]!=NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1201 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1202 if (memcmp((void *) item->name, (void *) argv[1],l)==0) |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1203 IConsolePrintF(_iconsole_color_default,"%s",item->name); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1204 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1205 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1206 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1207 IConsolePrintF(_iconsole_color_default,"%s",item->name); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1208 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1209 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1210 item = item->_next; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1211 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1212 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1213 return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1214 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1215 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1216 static _iconsole_var * IConsoleStdLibListVariables(byte argc, byte* argv[], byte argt[]) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1217 _iconsole_var * item; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1218 int l = 0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1219 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1220 if (argv[1]!=NULL) l = strlen((char *) argv[1]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1221 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1222 item = _iconsole_vars; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1223 while (item != NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1224 if (argv[1]!=NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1225 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1226 if (memcmp((void *) item->name, (void *) argv[1],l)==0) |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1227 IConsolePrintF(_iconsole_color_default,"%s",item->name); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1228 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1229 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1230 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1231 IConsolePrintF(_iconsole_color_default,"%s",item->name); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1232 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1233 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1234 item = item->_next; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1235 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1236 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1237 return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1238 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1239 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1240 static _iconsole_var * IConsoleStdLibListDumpVariables(byte argc, byte* argv[], byte argt[]) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1241 _iconsole_var * item; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1242 int l = 0; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1243 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1244 if (argv[1]!=NULL) l = strlen((char *) argv[1]); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1245 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1246 item = _iconsole_vars; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1247 while (item != NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1248 if (argv[1]!=NULL) { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1249 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1250 if (memcmp((void *) item->name, (void *) argv[1],l)==0) |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1251 IConsoleVarDump(item,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1252 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1253 } else { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1254 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1255 IConsoleVarDump(item,NULL); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1256 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1257 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1258 item = item->_next; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1259 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1260 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1261 return NULL; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1262 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1263 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1264 static void IConsoleStdLibRegister() { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1265 IConsoleCmdRegister("debug_level",IConsoleStdLibDebugLevel); |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1266 IConsoleCmdRegister("dump_vars",IConsoleStdLibListDumpVariables); |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1267 IConsoleCmdRegister("echo",IConsoleStdLibEcho); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1268 IConsoleCmdRegister("echoc",IConsoleStdLibEchoC); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1269 IConsoleCmdRegister("exit",IConsoleStdLibExit); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1270 IConsoleCmdRegister("help",IConsoleStdLibHelp); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1271 IConsoleCmdRegister("printf",IConsoleStdLibPrintF); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1272 IConsoleCmdRegister("printfc",IConsoleStdLibPrintFC); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1273 IConsoleCmdRegister("quit",IConsoleStdLibExit); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1274 IConsoleCmdRegister("random",IConsoleStdLibRandom); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1275 IConsoleCmdRegister("list_cmds",IConsoleStdLibListCommands); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1276 IConsoleCmdRegister("list_vars",IConsoleStdLibListVariables); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1277 IConsoleCmdRegister("screenshot",IConsoleStdLibScreenShot); |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1278 IConsoleCmdRegister("varinfo",IConsoleStdLibVarInfo); |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1279 IConsoleVarRegister("cursor_rate",(void *) &_icursor_rate,ICONSOLE_VAR_BYTE); |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1280 IConsoleVarRegister("con_developer",(void *) &_stdlib_con_developer,ICONSOLE_VAR_BOOLEAN); |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1281 IConsoleVarRegister("developer",(void *) &_stdlib_developer,ICONSOLE_VAR_BYTE); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1282 #if defined(_DEBUG) |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1283 { |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1284 _iconsole_var * var; |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1285 var = IConsoleVarAlloc(ICONSOLE_VAR_BOOLEAN); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1286 IConsoleVarInsert(var,"temp_bool"); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1287 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1288 var = IConsoleVarAlloc(ICONSOLE_VAR_INT16); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1289 IConsoleVarInsert(var,"temp_int16"); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1290 var = IConsoleVarAlloc(ICONSOLE_VAR_INT32); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1291 IConsoleVarInsert(var,"temp_int32"); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1292 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1293 var = IConsoleVarAlloc(ICONSOLE_VAR_POINTER); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1294 IConsoleVarInsert(var,"temp_pointer"); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1295 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1296 var = IConsoleVarAlloc(ICONSOLE_VAR_UINT16); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1297 IConsoleVarInsert(var,"temp_uint16"); |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1298 var = IConsoleVarAlloc(ICONSOLE_VAR_UINT16); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1299 IConsoleVarInsert(var,"temp_uint16_2"); |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1300 var = IConsoleVarAlloc(ICONSOLE_VAR_UINT32); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1301 IConsoleVarInsert(var,"temp_uint32"); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1302 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1303 var = IConsoleVarAlloc(ICONSOLE_VAR_STRING); |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1304 IConsoleVarInsert(var,"temp_string"); |
141
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1305 var = IConsoleVarAlloc(ICONSOLE_VAR_STRING); |
c1b1024d9f3f
(svn r142) -Feature development: [1016299] Console Rev #3 allowes variable references and has a new commandline buffer (sign_de)
darkvater <darkvater@openttd.org>
parents:
136
diff
changeset
|
1306 IConsoleVarInsert(var,"temp_string2"); |
135
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1307 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1308 #endif |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1309 } |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1310 |
5f7d4f435388
(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 <darkvater@openttd.org>
parents:
129
diff
changeset
|
1311 |