author | jose1711 |
Sun, 04 Sep 2011 00:48:54 +0200 | |
changeset 5751 | f8f7e61d090d |
parent 5679 | 505c6448069b |
child 5725 | e27100a0e2d0 |
child 6001 | 24b3a7ba3884 |
child 6088 | 47d1b04003d1 |
permissions | -rw-r--r-- |
4976 | 1 |
(* |
2 |
* Hedgewars, a free turn based strategy game |
|
3 |
* Copyright (c) 2004-2011 Andrey Korotaev <unC0Rr@gmail.com> |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
|
17 |
*) |
|
18 |
||
4413 | 19 |
{$INCLUDE "options.inc"} |
4976 | 20 |
|
4413 | 21 |
unit uCommandHandlers; |
22 |
||
23 |
interface |
|
24 |
||
25 |
procedure initModule; |
|
26 |
procedure freeModule; |
|
27 |
||
28 |
implementation |
|
5247 | 29 |
uses uCommands, uTypes, uVariables, uIO, uDebug, uConsts, uScript, uUtils, SDLh, uRandom, uCaptions; |
4413 | 30 |
|
4531
4ea193b0e378
Reenable ReadyTimer using a synced message NEEDS TESTING.
nemo
parents:
4528
diff
changeset
|
31 |
procedure chGenCmd(var s: shortstring); |
4ea193b0e378
Reenable ReadyTimer using a synced message NEEDS TESTING.
nemo
parents:
4528
diff
changeset
|
32 |
begin |
4ea193b0e378
Reenable ReadyTimer using a synced message NEEDS TESTING.
nemo
parents:
4528
diff
changeset
|
33 |
case s[1] of |
4ea193b0e378
Reenable ReadyTimer using a synced message NEEDS TESTING.
nemo
parents:
4528
diff
changeset
|
34 |
'R': if ReadyTimeLeft > 1 then |
4ea193b0e378
Reenable ReadyTimer using a synced message NEEDS TESTING.
nemo
parents:
4528
diff
changeset
|
35 |
begin |
4ea193b0e378
Reenable ReadyTimer using a synced message NEEDS TESTING.
nemo
parents:
4528
diff
changeset
|
36 |
ReadyTimeLeft:= 1; |
4ea193b0e378
Reenable ReadyTimer using a synced message NEEDS TESTING.
nemo
parents:
4528
diff
changeset
|
37 |
if not CurrentTeam^.ExtDriven then SendIPC('c'+s); |
4ea193b0e378
Reenable ReadyTimer using a synced message NEEDS TESTING.
nemo
parents:
4528
diff
changeset
|
38 |
end |
4ea193b0e378
Reenable ReadyTimer using a synced message NEEDS TESTING.
nemo
parents:
4528
diff
changeset
|
39 |
end |
4ea193b0e378
Reenable ReadyTimer using a synced message NEEDS TESTING.
nemo
parents:
4528
diff
changeset
|
40 |
end; |
4ea193b0e378
Reenable ReadyTimer using a synced message NEEDS TESTING.
nemo
parents:
4528
diff
changeset
|
41 |
|
4413 | 42 |
procedure chQuit(var s: shortstring); |
43 |
const prevGState: TGameState = gsConfirm; |
|
44 |
begin |
|
4751 | 45 |
s:= s; // avoid compiler hint |
5555
38e3d9347910
Don't switch to gsConfirm state (which is pretty same as gsGame) when not in gsGame or gsChat state. Prevents crashes and other possible kinds of wierd behaviour.
unc0rr
parents:
5524
diff
changeset
|
46 |
if (GameState = gsGame) or (GameState = gsChat) then |
38e3d9347910
Don't switch to gsConfirm state (which is pretty same as gsGame) when not in gsGame or gsChat state. Prevents crashes and other possible kinds of wierd behaviour.
unc0rr
parents:
5524
diff
changeset
|
47 |
begin |
4413 | 48 |
prevGState:= GameState; |
5523 | 49 |
GameState:= gsConfirm; |
50 |
SDL_ShowCursor(1) |
|
5555
38e3d9347910
Don't switch to gsConfirm state (which is pretty same as gsGame) when not in gsGame or gsChat state. Prevents crashes and other possible kinds of wierd behaviour.
unc0rr
parents:
5524
diff
changeset
|
51 |
end else |
38e3d9347910
Don't switch to gsConfirm state (which is pretty same as gsGame) when not in gsGame or gsChat state. Prevents crashes and other possible kinds of wierd behaviour.
unc0rr
parents:
5524
diff
changeset
|
52 |
if GameState = gsConfirm then |
38e3d9347910
Don't switch to gsConfirm state (which is pretty same as gsGame) when not in gsGame or gsChat state. Prevents crashes and other possible kinds of wierd behaviour.
unc0rr
parents:
5524
diff
changeset
|
53 |
begin |
38e3d9347910
Don't switch to gsConfirm state (which is pretty same as gsGame) when not in gsGame or gsChat state. Prevents crashes and other possible kinds of wierd behaviour.
unc0rr
parents:
5524
diff
changeset
|
54 |
GameState:= prevGState; |
38e3d9347910
Don't switch to gsConfirm state (which is pretty same as gsGame) when not in gsGame or gsChat state. Prevents crashes and other possible kinds of wierd behaviour.
unc0rr
parents:
5524
diff
changeset
|
55 |
SDL_ShowCursor(ord(isPaused)) |
38e3d9347910
Don't switch to gsConfirm state (which is pretty same as gsGame) when not in gsGame or gsChat state. Prevents crashes and other possible kinds of wierd behaviour.
unc0rr
parents:
5524
diff
changeset
|
56 |
end |
4413 | 57 |
end; |
58 |
||
4744
ecc2c757d0df
general uKey refactor in preparaiton of two new shortcuts
koda
parents:
4661
diff
changeset
|
59 |
procedure chForceQuit(var s: shortstring); |
ecc2c757d0df
general uKey refactor in preparaiton of two new shortcuts
koda
parents:
4661
diff
changeset
|
60 |
begin |
ecc2c757d0df
general uKey refactor in preparaiton of two new shortcuts
koda
parents:
4661
diff
changeset
|
61 |
s:= s; // avoid compiler hint |
4751 | 62 |
GameState:= gsConfirm; |
63 |
ParseCommand('confirm', true); |
|
4413 | 64 |
end; |
65 |
||
66 |
procedure chConfirm(var s: shortstring); |
|
67 |
begin |
|
4751 | 68 |
s:= s; // avoid compiler hint |
69 |
if GameState = gsConfirm then |
|
4413 | 70 |
begin |
4751 | 71 |
SendIPC('Q'); |
72 |
GameState:= gsExit |
|
4413 | 73 |
end |
74 |
else |
|
75 |
ParseCommand('chat team', true); |
|
76 |
end; |
|
77 |
||
4751 | 78 |
procedure chHalt (var s: shortstring); |
4746
3ae448aebe7e
implemented actions for closing/enging program (needs testing over the net)
koda
parents:
4744
diff
changeset
|
79 |
begin |
3ae448aebe7e
implemented actions for closing/enging program (needs testing over the net)
koda
parents:
4744
diff
changeset
|
80 |
s:= s; // avoid compiler hint |
3ae448aebe7e
implemented actions for closing/enging program (needs testing over the net)
koda
parents:
4744
diff
changeset
|
81 |
SendIPC('H'); |
3ae448aebe7e
implemented actions for closing/enging program (needs testing over the net)
koda
parents:
4744
diff
changeset
|
82 |
GameState:= gsExit |
3ae448aebe7e
implemented actions for closing/enging program (needs testing over the net)
koda
parents:
4744
diff
changeset
|
83 |
end; |
3ae448aebe7e
implemented actions for closing/enging program (needs testing over the net)
koda
parents:
4744
diff
changeset
|
84 |
|
4413 | 85 |
procedure chCheckProto(var s: shortstring); |
86 |
var i, c: LongInt; |
|
87 |
begin |
|
88 |
if isDeveloperMode then |
|
89 |
begin |
|
90 |
val(s, i, c); |
|
91 |
if (c <> 0) or (i = 0) then exit; |
|
92 |
TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old', true); |
|
93 |
TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new', true) |
|
94 |
end |
|
95 |
end; |
|
96 |
||
97 |
procedure chTeamLocal(var s: shortstring); |
|
98 |
begin |
|
99 |
s:= s; // avoid compiler hint |
|
100 |
if not isDeveloperMode then exit; |
|
101 |
if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/rdriven"', true); |
|
102 |
CurrentTeam^.ExtDriven:= true |
|
103 |
end; |
|
104 |
||
105 |
procedure chGrave(var s: shortstring); |
|
106 |
begin |
|
107 |
if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/grave"', true); |
|
108 |
if s[1]='"' then Delete(s, 1, 1); |
|
109 |
if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1); |
|
110 |
CurrentTeam^.GraveName:= s |
|
111 |
end; |
|
112 |
||
113 |
procedure chFort(var s: shortstring); |
|
114 |
begin |
|
115 |
if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/fort"', true); |
|
116 |
if s[1]='"' then Delete(s, 1, 1); |
|
117 |
if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1); |
|
118 |
CurrentTeam^.FortName:= s |
|
119 |
end; |
|
120 |
||
121 |
procedure chFlag(var s: shortstring); |
|
122 |
begin |
|
123 |
if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/flag"', true); |
|
124 |
if s[1]='"' then Delete(s, 1, 1); |
|
125 |
if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1); |
|
126 |
CurrentTeam^.flag:= s |
|
127 |
end; |
|
128 |
||
129 |
procedure chScript(var s: shortstring); |
|
130 |
begin |
|
131 |
if s[1]='"' then Delete(s, 1, 1); |
|
132 |
if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1); |
|
133 |
ScriptLoad(s) |
|
134 |
end; |
|
135 |
||
136 |
procedure chSetHat(var s: shortstring); |
|
137 |
begin |
|
138 |
if (not isDeveloperMode) or (CurrentTeam = nil) then exit; |
|
139 |
with CurrentTeam^ do |
|
140 |
begin |
|
141 |
if not CurrentHedgehog^.King then |
|
142 |
if (s = '') or |
|
143 |
(((GameFlags and gfKing) <> 0) and (s = 'crown')) or |
|
144 |
((Length(s) > 39) and (Copy(s,1,8) = 'Reserved') and (Copy(s,9,32) <> PlayerHash)) then |
|
145 |
CurrentHedgehog^.Hat:= 'NoHat' |
|
146 |
else |
|
147 |
CurrentHedgehog^.Hat:= s |
|
148 |
end; |
|
149 |
end; |
|
150 |
||
151 |
procedure chCurU_p(var s: shortstring); |
|
152 |
begin |
|
153 |
s:= s; // avoid compiler hint |
|
154 |
CursorMovementY:= -1; |
|
155 |
end; |
|
156 |
||
157 |
procedure chCurU_m(var s: shortstring); |
|
158 |
begin |
|
159 |
s:= s; // avoid compiler hint |
|
160 |
CursorMovementY:= 0; |
|
161 |
end; |
|
162 |
||
163 |
procedure chCurD_p(var s: shortstring); |
|
164 |
begin |
|
165 |
s:= s; // avoid compiler hint |
|
166 |
CursorMovementY:= 1; |
|
167 |
end; |
|
168 |
||
169 |
procedure chCurD_m(var s: shortstring); |
|
170 |
begin |
|
171 |
s:= s; // avoid compiler hint |
|
172 |
CursorMovementY:= 0; |
|
173 |
end; |
|
174 |
||
175 |
procedure chCurL_p(var s: shortstring); |
|
176 |
begin |
|
177 |
s:= s; // avoid compiler hint |
|
178 |
CursorMovementX:= -1; |
|
179 |
end; |
|
180 |
||
181 |
procedure chCurL_m(var s: shortstring); |
|
182 |
begin |
|
183 |
s:= s; // avoid compiler hint |
|
184 |
CursorMovementX:= 0; |
|
185 |
end; |
|
186 |
||
187 |
procedure chCurR_p(var s: shortstring); |
|
188 |
begin |
|
189 |
s:= s; // avoid compiler hint |
|
190 |
CursorMovementX:= 1; |
|
191 |
end; |
|
192 |
||
193 |
procedure chCurR_m(var s: shortstring); |
|
194 |
begin |
|
195 |
s:= s; // avoid compiler hint |
|
196 |
CursorMovementX:= 0; |
|
197 |
end; |
|
198 |
||
199 |
procedure chLeft_p(var s: shortstring); |
|
200 |
begin |
|
201 |
s:= s; // avoid compiler hint |
|
202 |
if CheckNoTeamOrHH or isPaused then exit; |
|
203 |
if not CurrentTeam^.ExtDriven then SendIPC('L'); |
|
204 |
bShowFinger:= false; |
|
205 |
with CurrentHedgehog^.Gear^ do |
|
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
206 |
Message:= Message or (gmLeft and InputMask); |
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
207 |
ScriptCall('onLeft'); |
4413 | 208 |
end; |
209 |
||
210 |
procedure chLeft_m(var s: shortstring); |
|
211 |
begin |
|
212 |
s:= s; // avoid compiler hint |
|
213 |
if CheckNoTeamOrHH then exit; |
|
214 |
if not CurrentTeam^.ExtDriven then SendIPC('l'); |
|
215 |
with CurrentHedgehog^.Gear^ do |
|
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
216 |
Message:= Message and not (gmLeft and InputMask); |
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
217 |
ScriptCall('onLeftUp'); |
4413 | 218 |
end; |
219 |
||
220 |
procedure chRight_p(var s: shortstring); |
|
221 |
begin |
|
222 |
s:= s; // avoid compiler hint |
|
223 |
if CheckNoTeamOrHH or isPaused then exit; |
|
224 |
if not CurrentTeam^.ExtDriven then SendIPC('R'); |
|
225 |
bShowFinger:= false; |
|
226 |
with CurrentHedgehog^.Gear^ do |
|
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
227 |
Message:= Message or (gmRight and InputMask); |
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
228 |
ScriptCall('onRight'); |
4413 | 229 |
end; |
230 |
||
231 |
procedure chRight_m(var s: shortstring); |
|
232 |
begin |
|
233 |
s:= s; // avoid compiler hint |
|
234 |
if CheckNoTeamOrHH then exit; |
|
235 |
if not CurrentTeam^.ExtDriven then SendIPC('r'); |
|
236 |
with CurrentHedgehog^.Gear^ do |
|
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
237 |
Message:= Message and not (gmRight and InputMask); |
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
238 |
ScriptCall('onRightUp'); |
4413 | 239 |
end; |
240 |
||
241 |
procedure chUp_p(var s: shortstring); |
|
242 |
begin |
|
243 |
s:= s; // avoid compiler hint |
|
244 |
if CheckNoTeamOrHH or isPaused then exit; |
|
245 |
if not CurrentTeam^.ExtDriven then SendIPC('U'); |
|
246 |
bShowFinger:= false; |
|
247 |
with CurrentHedgehog^.Gear^ do |
|
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
248 |
Message:= Message or (gmUp and InputMask); |
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
249 |
ScriptCall('onUp'); |
4413 | 250 |
end; |
251 |
||
252 |
procedure chUp_m(var s: shortstring); |
|
253 |
begin |
|
254 |
s:= s; // avoid compiler hint |
|
255 |
if CheckNoTeamOrHH then exit; |
|
256 |
if not CurrentTeam^.ExtDriven then SendIPC('u'); |
|
257 |
with CurrentHedgehog^.Gear^ do |
|
4522
0f590eefd531
Add an input mask for setting of gear messages. Intended for intercepting user messages. This is totally untested. I don't think it should desync but seriously needs a lot of testing. Esp the doPut behaviour.
nemo
parents:
4437
diff
changeset
|
258 |
Message:= Message and not (gmUp and InputMask); |
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
259 |
ScriptCall('onUpUp'); |
4413 | 260 |
end; |
261 |
||
262 |
procedure chDown_p(var s: shortstring); |
|
263 |
begin |
|
264 |
s:= s; // avoid compiler hint |
|
265 |
if CheckNoTeamOrHH or isPaused then exit; |
|
266 |
if not CurrentTeam^.ExtDriven then SendIPC('D'); |
|
267 |
bShowFinger:= false; |
|
268 |
with CurrentHedgehog^.Gear^ do |
|
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
269 |
Message:= Message or (gmDown and InputMask); |
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
270 |
ScriptCall('onDown'); |
4413 | 271 |
end; |
272 |
||
273 |
procedure chDown_m(var s: shortstring); |
|
274 |
begin |
|
275 |
s:= s; // avoid compiler hint |
|
276 |
if CheckNoTeamOrHH then exit; |
|
277 |
if not CurrentTeam^.ExtDriven then SendIPC('d'); |
|
278 |
with CurrentHedgehog^.Gear^ do |
|
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
279 |
Message:= Message and not (gmDown and InputMask); |
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
280 |
ScriptCall('onDownUp'); |
4413 | 281 |
end; |
282 |
||
283 |
procedure chPrecise_p(var s: shortstring); |
|
284 |
begin |
|
285 |
s:= s; // avoid compiler hint |
|
286 |
if CheckNoTeamOrHH or isPaused then exit; |
|
287 |
if not CurrentTeam^.ExtDriven then SendIPC('Z'); |
|
288 |
bShowFinger:= false; |
|
289 |
with CurrentHedgehog^.Gear^ do |
|
4522
0f590eefd531
Add an input mask for setting of gear messages. Intended for intercepting user messages. This is totally untested. I don't think it should desync but seriously needs a lot of testing. Esp the doPut behaviour.
nemo
parents:
4437
diff
changeset
|
290 |
Message:= Message or (gmPrecise and InputMask); |
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
291 |
ScriptCall('onPrecise'); |
4413 | 292 |
end; |
293 |
||
294 |
procedure chPrecise_m(var s: shortstring); |
|
295 |
begin |
|
296 |
s:= s; // avoid compiler hint |
|
297 |
if CheckNoTeamOrHH then exit; |
|
298 |
if not CurrentTeam^.ExtDriven then SendIPC('z'); |
|
299 |
with CurrentHedgehog^.Gear^ do |
|
4522
0f590eefd531
Add an input mask for setting of gear messages. Intended for intercepting user messages. This is totally untested. I don't think it should desync but seriously needs a lot of testing. Esp the doPut behaviour.
nemo
parents:
4437
diff
changeset
|
300 |
Message:= Message and not (gmPrecise and InputMask); |
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
301 |
ScriptCall('onPreciseUp'); |
4413 | 302 |
end; |
303 |
||
304 |
procedure chLJump(var s: shortstring); |
|
305 |
begin |
|
306 |
s:= s; // avoid compiler hint |
|
307 |
if CheckNoTeamOrHH or isPaused then exit; |
|
308 |
if not CurrentTeam^.ExtDriven then SendIPC('j'); |
|
309 |
bShowFinger:= false; |
|
310 |
with CurrentHedgehog^.Gear^ do |
|
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
311 |
Message:= Message or (gmLJump and InputMask); |
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
312 |
ScriptCall('onLJump'); |
4413 | 313 |
end; |
314 |
||
315 |
procedure chHJump(var s: shortstring); |
|
316 |
begin |
|
317 |
s:= s; // avoid compiler hint |
|
318 |
if CheckNoTeamOrHH or isPaused then exit; |
|
319 |
if not CurrentTeam^.ExtDriven then SendIPC('J'); |
|
320 |
bShowFinger:= false; |
|
321 |
with CurrentHedgehog^.Gear^ do |
|
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
322 |
Message:= Message or (gmHJump and InputMask); |
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
323 |
ScriptCall('onHJump'); |
4413 | 324 |
end; |
325 |
||
326 |
procedure chAttack_p(var s: shortstring); |
|
327 |
begin |
|
328 |
s:= s; // avoid compiler hint |
|
329 |
if CheckNoTeamOrHH or isPaused then exit; |
|
330 |
bShowFinger:= false; |
|
331 |
with CurrentHedgehog^.Gear^ do |
|
332 |
begin |
|
4900 | 333 |
AddFileLog('/+attack: hedgehog''s Gear^.State = '+inttostr(State)); |
4413 | 334 |
if ((State and gstHHDriven) <> 0) then |
335 |
begin |
|
336 |
FollowGear:= CurrentHedgehog^.Gear; |
|
337 |
if not CurrentTeam^.ExtDriven then SendIPC('A'); |
|
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
338 |
Message:= Message or (gmAttack and InputMask); |
5247 | 339 |
ScriptCall('onAttack'); |
4413 | 340 |
end |
341 |
end |
|
342 |
end; |
|
343 |
||
344 |
procedure chAttack_m(var s: shortstring); |
|
345 |
begin |
|
346 |
s:= s; // avoid compiler hint |
|
347 |
if CheckNoTeamOrHH then exit; |
|
348 |
with CurrentHedgehog^.Gear^ do |
|
349 |
begin |
|
350 |
if not CurrentTeam^.ExtDriven and |
|
351 |
((Message and gmAttack) <> 0) then SendIPC('a'); |
|
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
352 |
Message:= Message and not (gmAttack and InputMask); |
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
353 |
ScriptCall('onAttackUp'); |
4413 | 354 |
end |
355 |
end; |
|
356 |
||
357 |
procedure chSwitch(var s: shortstring); |
|
358 |
begin |
|
359 |
s:= s; // avoid compiler hint |
|
360 |
if CheckNoTeamOrHH or isPaused then exit; |
|
361 |
if not CurrentTeam^.ExtDriven then SendIPC('S'); |
|
362 |
bShowFinger:= false; |
|
363 |
with CurrentHedgehog^.Gear^ do |
|
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
364 |
Message:= Message or (gmSwitch and InputMask); |
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
365 |
ScriptCall('onSwitch'); |
4413 | 366 |
end; |
367 |
||
368 |
procedure chNextTurn(var s: shortstring); |
|
369 |
begin |
|
370 |
s:= s; // avoid compiler hint |
|
371 |
TryDo(AllInactive, '/nextturn called when not all gears are inactive', true); |
|
372 |
||
373 |
if not CurrentTeam^.ExtDriven then SendIPC('N'); |
|
374 |
AddFileLog('Doing SwitchHedgehog: time '+inttostr(GameTicks)); |
|
375 |
end; |
|
376 |
||
377 |
procedure chTimer(var s: shortstring); |
|
378 |
begin |
|
379 |
if (s[0] <> #1) or (s[1] < '1') or (s[1] > '5') or CheckNoTeamOrHH then exit; |
|
380 |
||
381 |
if not CurrentTeam^.ExtDriven then SendIPC(s); |
|
382 |
bShowFinger:= false; |
|
383 |
with CurrentHedgehog^.Gear^ do |
|
384 |
begin |
|
4522
0f590eefd531
Add an input mask for setting of gear messages. Intended for intercepting user messages. This is totally untested. I don't think it should desync but seriously needs a lot of testing. Esp the doPut behaviour.
nemo
parents:
4437
diff
changeset
|
385 |
Message:= Message or (gmTimer and InputMask); |
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
386 |
MsgParam:= byte(s[1]) - ord('0'); |
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
387 |
ScriptCall('onTimer'); |
4413 | 388 |
end |
389 |
end; |
|
390 |
||
391 |
procedure chSlot(var s: shortstring); |
|
392 |
var slot: LongWord; |
|
393 |
begin |
|
394 |
if (s[0] <> #1) or CheckNoTeamOrHH then exit; |
|
395 |
slot:= byte(s[1]) - 49; |
|
396 |
if slot > cMaxSlotIndex then exit; |
|
397 |
if not CurrentTeam^.ExtDriven then SendIPC(char(byte(s[1]) + 79)); |
|
398 |
bShowFinger:= false; |
|
399 |
with CurrentHedgehog^.Gear^ do |
|
400 |
begin |
|
4522
0f590eefd531
Add an input mask for setting of gear messages. Intended for intercepting user messages. This is totally untested. I don't think it should desync but seriously needs a lot of testing. Esp the doPut behaviour.
nemo
parents:
4437
diff
changeset
|
401 |
Message:= Message or (gmSlot and InputMask); |
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
402 |
MsgParam:= slot; |
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
403 |
ScriptCall('onSlot'); |
4413 | 404 |
end |
405 |
end; |
|
406 |
||
407 |
procedure chSetWeapon(var s: shortstring); |
|
408 |
begin |
|
409 |
if (s[0] <> #1) or CheckNoTeamOrHH then exit; |
|
410 |
||
411 |
if TAmmoType(s[1]) > High(TAmmoType) then exit; |
|
412 |
||
413 |
if not CurrentTeam^.ExtDriven then SendIPC('w' + s); |
|
414 |
||
415 |
with CurrentHedgehog^.Gear^ do |
|
416 |
begin |
|
4522
0f590eefd531
Add an input mask for setting of gear messages. Intended for intercepting user messages. This is totally untested. I don't think it should desync but seriously needs a lot of testing. Esp the doPut behaviour.
nemo
parents:
4437
diff
changeset
|
417 |
Message:= Message or (gmWeapon and InputMask); |
4413 | 418 |
MsgParam:= byte(s[1]); |
5247 | 419 |
ScriptCall('onSetWeapon'); |
4413 | 420 |
end; |
421 |
end; |
|
422 |
||
423 |
procedure chTaunt(var s: shortstring); |
|
424 |
begin |
|
425 |
if (s[0] <> #1) or CheckNoTeamOrHH then exit; |
|
426 |
||
427 |
if TWave(s[1]) > High(TWave) then exit; |
|
428 |
||
429 |
if not CurrentTeam^.ExtDriven then SendIPC('t' + s); |
|
430 |
||
431 |
with CurrentHedgehog^.Gear^ do |
|
432 |
begin |
|
4522
0f590eefd531
Add an input mask for setting of gear messages. Intended for intercepting user messages. This is totally untested. I don't think it should desync but seriously needs a lot of testing. Esp the doPut behaviour.
nemo
parents:
4437
diff
changeset
|
433 |
Message:= Message or (gmAnimate and InputMask); |
4661
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
434 |
MsgParam:= byte(s[1]) ; |
f5d858e4b634
Whole ton of script callbacks on commands. Poor engine.
mikade
parents:
4611
diff
changeset
|
435 |
ScriptCall('onTaunt'); |
4413 | 436 |
end |
437 |
end; |
|
438 |
||
439 |
procedure chPut(var s: shortstring); |
|
440 |
begin |
|
441 |
s:= s; // avoid compiler hint |
|
442 |
doPut(0, 0, false); |
|
443 |
end; |
|
444 |
||
445 |
procedure chCapture(var s: shortstring); |
|
446 |
begin |
|
447 |
s:= s; // avoid compiler hint |
|
448 |
flagMakeCapture:= true |
|
449 |
end; |
|
450 |
||
451 |
procedure chSetMap(var s: shortstring); |
|
452 |
begin |
|
5679
505c6448069b
accidentally reverted this when reverting the rest of the override changes.
nemo
parents:
5555
diff
changeset
|
453 |
if isDeveloperMode then |
4413 | 454 |
begin |
5238
46ddaf14509d
Enable ~/.hedgewars/Data (or platform equivalent) to override/extend pretty much everything in system Data dir. Obviously desyncing can occur, so this is at user's own risk. Should simplify map etc install. Needs testing.
nemo
parents:
5026
diff
changeset
|
455 |
UserPathz[ptMapCurrent]:= UserPathz[ptMaps] + '/' + s; |
4413 | 456 |
Pathz[ptMapCurrent]:= Pathz[ptMaps] + '/' + s; |
457 |
InitStepsFlags:= InitStepsFlags or cifMap |
|
458 |
end |
|
459 |
end; |
|
460 |
||
461 |
procedure chSetTheme(var s: shortstring); |
|
462 |
begin |
|
463 |
if isDeveloperMode then |
|
464 |
begin |
|
5238
46ddaf14509d
Enable ~/.hedgewars/Data (or platform equivalent) to override/extend pretty much everything in system Data dir. Obviously desyncing can occur, so this is at user's own risk. Should simplify map etc install. Needs testing.
nemo
parents:
5026
diff
changeset
|
465 |
UserPathz[ptCurrTheme]:= UserPathz[ptThemes] + '/' + s; |
4413 | 466 |
Pathz[ptCurrTheme]:= Pathz[ptThemes] + '/' + s; |
4611 | 467 |
Theme:= s; |
4413 | 468 |
InitStepsFlags:= InitStepsFlags or cifTheme |
469 |
end |
|
470 |
end; |
|
471 |
||
472 |
procedure chSetSeed(var s: shortstring); |
|
473 |
begin |
|
474 |
if isDeveloperMode then |
|
475 |
begin |
|
476 |
SetRandomSeed(s); |
|
477 |
cSeed:= s; |
|
478 |
InitStepsFlags:= InitStepsFlags or cifRandomize |
|
479 |
end |
|
480 |
end; |
|
481 |
||
482 |
procedure chAmmoMenu(var s: shortstring); |
|
483 |
begin |
|
484 |
s:= s; // avoid compiler hint |
|
485 |
if CheckNoTeamOrHH then |
|
486 |
bShowAmmoMenu:= true |
|
487 |
else |
|
488 |
begin |
|
489 |
with CurrentTeam^ do |
|
490 |
with Hedgehogs[CurrHedgehog] do |
|
491 |
begin |
|
492 |
bSelected:= false; |
|
493 |
||
494 |
if bShowAmmoMenu then bShowAmmoMenu:= false |
|
495 |
else if ((Gear^.State and (gstAttacking or gstAttacked)) <> 0) or |
|
496 |
((MultiShootAttacks > 0) and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEnd) = 0)) or |
|
497 |
((Gear^.State and gstHHDriven) = 0) then else bShowAmmoMenu:= true |
|
498 |
end; |
|
499 |
end |
|
500 |
end; |
|
501 |
||
502 |
procedure chVol_p(var s: shortstring); |
|
503 |
begin |
|
504 |
s:= s; // avoid compiler hint |
|
505 |
inc(cVolumeDelta, 3) |
|
506 |
end; |
|
507 |
||
508 |
procedure chVol_m(var s: shortstring); |
|
509 |
begin |
|
510 |
s:= s; // avoid compiler hint |
|
511 |
dec(cVolumeDelta, 3) |
|
512 |
end; |
|
513 |
||
514 |
procedure chFindhh(var s: shortstring); |
|
515 |
begin |
|
516 |
s:= s; // avoid compiler hint |
|
517 |
if CheckNoTeamOrHH or isPaused then exit; |
|
5247 | 518 |
|
519 |
if FollowGear <> nil then |
|
520 |
begin |
|
521 |
AddCaption('Auto Camera Off', $CCCCCC, capgrpVolume); |
|
522 |
autoCameraOn:= false |
|
523 |
end |
|
524 |
else begin |
|
525 |
AddCaption('Auto Camera On', $CCCCCC, capgrpVolume); |
|
526 |
bShowFinger:= true; |
|
527 |
FollowGear:= CurrentHedgehog^.Gear; |
|
528 |
autoCameraOn:= true |
|
529 |
end |
|
4413 | 530 |
end; |
531 |
||
532 |
procedure chPause(var s: shortstring); |
|
533 |
begin |
|
534 |
s:= s; // avoid compiler hint |
|
535 |
if gameType <> gmtNet then |
|
536 |
isPaused:= not isPaused; |
|
5524
40b7f95d9f18
Oh, and fix cursor visibility correlations between gsConfirm state and paused state
unc0rr
parents:
5523
diff
changeset
|
537 |
|
40b7f95d9f18
Oh, and fix cursor visibility correlations between gsConfirm state and paused state
unc0rr
parents:
5523
diff
changeset
|
538 |
if isPaused then |
40b7f95d9f18
Oh, and fix cursor visibility correlations between gsConfirm state and paused state
unc0rr
parents:
5523
diff
changeset
|
539 |
SDL_ShowCursor(1) |
40b7f95d9f18
Oh, and fix cursor visibility correlations between gsConfirm state and paused state
unc0rr
parents:
5523
diff
changeset
|
540 |
else |
40b7f95d9f18
Oh, and fix cursor visibility correlations between gsConfirm state and paused state
unc0rr
parents:
5523
diff
changeset
|
541 |
SDL_ShowCursor(ord(GameState = gsConfirm)) |
4413 | 542 |
end; |
543 |
||
544 |
procedure chRotateMask(var s: shortstring); |
|
545 |
begin |
|
546 |
s:= s; // avoid compiler hint |
|
547 |
if ((GameFlags and gfInvulnerable) = 0) then cTagsMask:= cTagsMasks[cTagsMask] else cTagsMask:= cTagsMasksNoHealth[cTagsMask]; |
|
548 |
end; |
|
549 |
||
550 |
procedure chSpeedup_p(var s: shortstring); |
|
551 |
begin |
|
552 |
s:= s; // avoid compiler hint |
|
553 |
isSpeed:= true |
|
554 |
end; |
|
555 |
||
556 |
procedure chSpeedup_m(var s: shortstring); |
|
557 |
begin |
|
558 |
s:= s; // avoid compiler hint |
|
559 |
isSpeed:= false |
|
560 |
end; |
|
561 |
||
562 |
procedure chZoomIn(var s: shortstring); |
|
563 |
begin |
|
564 |
s:= s; // avoid compiler hint |
|
565 |
if ZoomValue < cMinZoomLevel then |
|
566 |
ZoomValue:= ZoomValue + cZoomDelta; |
|
567 |
end; |
|
568 |
||
569 |
procedure chZoomOut(var s: shortstring); |
|
570 |
begin |
|
571 |
s:= s; // avoid compiler hint |
|
572 |
if ZoomValue > cMaxZoomLevel then |
|
573 |
ZoomValue:= ZoomValue - cZoomDelta; |
|
574 |
end; |
|
575 |
||
576 |
procedure chZoomReset(var s: shortstring); |
|
577 |
begin |
|
578 |
s:= s; // avoid compiler hint |
|
579 |
ZoomValue:= cDefaultZoomLevel; |
|
580 |
end; |
|
581 |
||
582 |
||
583 |
procedure initModule; |
|
584 |
begin |
|
4528
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
585 |
//////// Begin top sorted by freq analysis not including chatmsg |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
586 |
RegisterVariable('+right' , vtCommand, @chRight_p , false); |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
587 |
RegisterVariable('-right' , vtCommand, @chRight_m , false); |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
588 |
RegisterVariable('+up' , vtCommand, @chUp_p , false); |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
589 |
RegisterVariable('-up' , vtCommand, @chUp_m , false); |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
590 |
RegisterVariable('+left' , vtCommand, @chLeft_p , false); |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
591 |
RegisterVariable('-left' , vtCommand, @chLeft_m , false); |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
592 |
RegisterVariable('+attack' , vtCommand, @chAttack_p , false); |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
593 |
RegisterVariable('+down' , vtCommand, @chDown_p , false); |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
594 |
RegisterVariable('-down' , vtCommand, @chDown_m , false); |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
595 |
RegisterVariable('hjump' , vtCommand, @chHJump , false); |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
596 |
RegisterVariable('ljump' , vtCommand, @chLJump , false); |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
597 |
RegisterVariable('nextturn', vtCommand, @chNextTurn , false); |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
598 |
RegisterVariable('-attack' , vtCommand, @chAttack_m , false); |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
599 |
RegisterVariable('slot' , vtCommand, @chSlot , false); |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
600 |
RegisterVariable('setweap' , vtCommand, @chSetWeapon , false); |
630f4ab0c926
Reorder top registered variables by frequency gathered from 60 or so games of varying length/type. Oh. And add green hair to joker.
nemo
parents:
4522
diff
changeset
|
601 |
//////// End top by freq analysis |
4531
4ea193b0e378
Reenable ReadyTimer using a synced message NEEDS TESTING.
nemo
parents:
4528
diff
changeset
|
602 |
RegisterVariable('gencmd' , vtCommand, @chGenCmd , false); |
4413 | 603 |
RegisterVariable('flag' , vtCommand, @chFlag , false); |
604 |
RegisterVariable('script' , vtCommand, @chScript , false); |
|
605 |
RegisterVariable('proto' , vtCommand, @chCheckProto , true ); |
|
606 |
RegisterVariable('spectate', vtBoolean, @fastUntilLag , false); |
|
607 |
RegisterVariable('capture' , vtCommand, @chCapture , true ); |
|
608 |
RegisterVariable('rotmask' , vtCommand, @chRotateMask , true ); |
|
609 |
RegisterVariable('rdriven' , vtCommand, @chTeamLocal , false); |
|
610 |
RegisterVariable('map' , vtCommand, @chSetMap , false); |
|
611 |
RegisterVariable('theme' , vtCommand, @chSetTheme , false); |
|
612 |
RegisterVariable('seed' , vtCommand, @chSetSeed , false); |
|
613 |
RegisterVariable('template_filter', vtLongInt, @cTemplateFilter, false); |
|
614 |
RegisterVariable('mapgen' , vtLongInt, @cMapGen , false); |
|
615 |
RegisterVariable('maze_size',vtLongInt, @cMazeSize , false); |
|
616 |
RegisterVariable('delay' , vtLongInt, @cInactDelay , false); |
|
617 |
RegisterVariable('ready' , vtLongInt, @cReadyDelay , false); |
|
618 |
RegisterVariable('casefreq', vtLongInt, @cCaseFactor , false); |
|
619 |
RegisterVariable('healthprob', vtLongInt, @cHealthCaseProb, false); |
|
620 |
RegisterVariable('hcaseamount', vtLongInt, @cHealthCaseAmount, false); |
|
621 |
RegisterVariable('sd_turns', vtLongInt, @cSuddenDTurns , false); |
|
622 |
RegisterVariable('waterrise', vtLongInt, @cWaterRise , false); |
|
623 |
RegisterVariable('healthdec', vtLongInt, @cHealthDecrease, false); |
|
624 |
RegisterVariable('damagepct',vtLongInt, @cDamagePercent , false); |
|
625 |
RegisterVariable('ropepct' , vtLongInt, @cRopePercent , false); |
|
5026 | 626 |
RegisterVariable('getawaytime' , vtLongInt, @cGetAwayTime , false); |
4413 | 627 |
RegisterVariable('minedudpct',vtLongInt,@cMineDudPercent, false); |
628 |
RegisterVariable('minesnum', vtLongInt, @cLandMines , false); |
|
629 |
RegisterVariable('explosives',vtLongInt,@cExplosives , false); |
|
630 |
RegisterVariable('gmflags' , vtLongInt, @GameFlags , false); |
|
631 |
RegisterVariable('turntime', vtLongInt, @cHedgehogTurnTime, false); |
|
632 |
RegisterVariable('minestime',vtLongInt, @cMinesTime , false); |
|
633 |
RegisterVariable('fort' , vtCommand, @chFort , false); |
|
634 |
RegisterVariable('grave' , vtCommand, @chGrave , false); |
|
635 |
RegisterVariable('hat' , vtCommand, @chSetHat , false); |
|
636 |
RegisterVariable('quit' , vtCommand, @chQuit , true ); |
|
4744
ecc2c757d0df
general uKey refactor in preparaiton of two new shortcuts
koda
parents:
4661
diff
changeset
|
637 |
RegisterVariable('forcequit', vtCommand, @chForceQuit , true ); |
4413 | 638 |
RegisterVariable('confirm' , vtCommand, @chConfirm , true ); |
4751 | 639 |
RegisterVariable('halt', vtCommand, @chHalt , true ); |
4413 | 640 |
RegisterVariable('+speedup', vtCommand, @chSpeedup_p , true ); |
641 |
RegisterVariable('-speedup', vtCommand, @chSpeedup_m , true ); |
|
642 |
RegisterVariable('zoomin' , vtCommand, @chZoomIn , true ); |
|
643 |
RegisterVariable('zoomout' , vtCommand, @chZoomOut , true ); |
|
644 |
RegisterVariable('zoomreset',vtCommand, @chZoomReset , true ); |
|
645 |
RegisterVariable('ammomenu', vtCommand, @chAmmoMenu , true); |
|
646 |
RegisterVariable('+precise', vtCommand, @chPrecise_p , false); |
|
647 |
RegisterVariable('-precise', vtCommand, @chPrecise_m , false); |
|
648 |
RegisterVariable('switch' , vtCommand, @chSwitch , false); |
|
649 |
RegisterVariable('timer' , vtCommand, @chTimer , false); |
|
650 |
RegisterVariable('taunt' , vtCommand, @chTaunt , false); |
|
651 |
RegisterVariable('put' , vtCommand, @chPut , false); |
|
652 |
RegisterVariable('+volup' , vtCommand, @chVol_p , true ); |
|
653 |
RegisterVariable('-volup' , vtCommand, @chVol_m , true ); |
|
654 |
RegisterVariable('+voldown', vtCommand, @chVol_m , true ); |
|
655 |
RegisterVariable('-voldown', vtCommand, @chVol_p , true ); |
|
656 |
RegisterVariable('findhh' , vtCommand, @chFindhh , true ); |
|
657 |
RegisterVariable('pause' , vtCommand, @chPause , true ); |
|
658 |
RegisterVariable('+cur_u' , vtCommand, @chCurU_p , true ); |
|
659 |
RegisterVariable('-cur_u' , vtCommand, @chCurU_m , true ); |
|
660 |
RegisterVariable('+cur_d' , vtCommand, @chCurD_p , true ); |
|
661 |
RegisterVariable('-cur_d' , vtCommand, @chCurD_m , true ); |
|
662 |
RegisterVariable('+cur_l' , vtCommand, @chCurL_p , true ); |
|
663 |
RegisterVariable('-cur_l' , vtCommand, @chCurL_m , true ); |
|
664 |
RegisterVariable('+cur_r' , vtCommand, @chCurR_p , true ); |
|
665 |
RegisterVariable('-cur_r' , vtCommand, @chCurR_m , true ); |
|
666 |
end; |
|
667 |
||
668 |
procedure freeModule; |
|
669 |
begin |
|
670 |
end; |
|
671 |
||
672 |
end. |