223 if (Message and gm_Down) <> 0 then ParseCommand('/-down', true) else |
223 if (Message and gm_Down) <> 0 then ParseCommand('/-down', true) else |
224 if (Message and gm_Attack) <> 0 then ParseCommand('/-attack', true) |
224 if (Message and gm_Attack) <> 0 then ParseCommand('/-attack', true) |
225 end; |
225 end; |
226 |
226 |
227 {$INCLUDE "CCHandlers.inc"} |
227 {$INCLUDE "CCHandlers.inc"} |
228 |
228 procedure init_uConsole; |
229 initialization |
229 var i: LongInt; |
230 InitConsole; |
230 begin |
231 RegisterVariable('proto' , vtCommand, @chCheckProto , true ); |
231 CurrLine:= 0; |
232 RegisterVariable('spectate', vtBoolean, @fastUntilLag , false); |
232 Variables:= nil; |
233 RegisterVariable('capture' , vtCommand, @chCapture , true ); |
233 isDeveloperMode:= true; |
234 RegisterVariable('rotmask' , vtCommand, @chRotateMask , true ); |
234 |
235 RegisterVariable('addteam' , vtCommand, @chAddTeam , false); |
235 // initConsole |
236 RegisterVariable('addtrig' , vtCommand, @chAddTrigger , false); |
236 cLineWidth:= cScreenWidth div 10; |
237 RegisterVariable('rdriven' , vtCommand, @chTeamLocal , false); |
237 if cLineWidth > 255 then |
238 RegisterVariable('map' , vtCommand, @chSetMap , false); |
238 cLineWidth:= 255; |
239 RegisterVariable('theme' , vtCommand, @chSetTheme , false); |
239 for i:= 0 to Pred(cLinesCount) do |
240 RegisterVariable('seed' , vtCommand, @chSetSeed , false); |
240 PByte(@ConsoleLines[i])^:= 0; |
241 RegisterVariable('template_filter', vtLongInt, @cTemplateFilter, false); |
241 |
242 RegisterVariable('delay' , vtLongInt, @cInactDelay , false); |
242 RegisterVariable('proto' , vtCommand, @chCheckProto , true ); |
243 RegisterVariable('casefreq', vtLongInt, @cCaseFactor , false); |
243 RegisterVariable('spectate', vtBoolean, @fastUntilLag , false); |
244 RegisterVariable('sd_turns', vtLongInt, @cSuddenDTurns , false); |
244 RegisterVariable('capture' , vtCommand, @chCapture , true ); |
245 RegisterVariable('damagepct',vtLongInt, @cDamagePercent , false); |
245 RegisterVariable('rotmask' , vtCommand, @chRotateMask , true ); |
246 RegisterVariable('landadds', vtLongInt, @cLandAdditions , false); |
246 RegisterVariable('addteam' , vtCommand, @chAddTeam , false); |
247 RegisterVariable('gmflags' , vtLongInt, @GameFlags , false); |
247 RegisterVariable('addtrig' , vtCommand, @chAddTrigger , false); |
248 RegisterVariable('trflags' , vtLongInt, @TrainingFlags , false); |
248 RegisterVariable('rdriven' , vtCommand, @chTeamLocal , false); |
249 RegisterVariable('turntime', vtLongInt, @cHedgehogTurnTime, false); |
249 RegisterVariable('map' , vtCommand, @chSetMap , false); |
250 RegisterVariable('minestime',vtLongInt, @cMinesTime , false); |
250 RegisterVariable('theme' , vtCommand, @chSetTheme , false); |
251 RegisterVariable('fort' , vtCommand, @chFort , false); |
251 RegisterVariable('seed' , vtCommand, @chSetSeed , false); |
252 RegisterVariable('voicepack',vtCommand, @chVoicepack , false); |
252 RegisterVariable('template_filter', vtLongInt, @cTemplateFilter, false); |
253 RegisterVariable('grave' , vtCommand, @chGrave , false); |
253 RegisterVariable('delay' , vtLongInt, @cInactDelay , false); |
254 RegisterVariable('bind' , vtCommand, @chBind , true ); |
254 RegisterVariable('casefreq', vtLongInt, @cCaseFactor , false); |
255 RegisterVariable('addhh' , vtCommand, @chAddHH , false); |
255 RegisterVariable('sd_turns', vtLongInt, @cSuddenDTurns , false); |
256 RegisterVariable('hat' , vtCommand, @chSetHat , false); |
256 RegisterVariable('damagepct',vtLongInt, @cDamagePercent , false); |
257 RegisterVariable('hhcoords', vtCommand, @chSetHHCoords , false); |
257 RegisterVariable('landadds', vtLongInt, @cLandAdditions , false); |
258 RegisterVariable('ammstore', vtCommand, @chAddAmmoStore , false); |
258 RegisterVariable('gmflags' , vtLongInt, @GameFlags , false); |
259 RegisterVariable('quit' , vtCommand, @chQuit , true ); |
259 RegisterVariable('trflags' , vtLongInt, @TrainingFlags , false); |
260 RegisterVariable('confirm' , vtCommand, @chConfirm , true ); |
260 RegisterVariable('turntime', vtLongInt, @cHedgehogTurnTime, false); |
261 RegisterVariable('+speedup', vtCommand, @chSpeedup_p , true ); |
261 RegisterVariable('minestime',vtLongInt, @cMinesTime , false); |
262 RegisterVariable('-speedup', vtCommand, @chSpeedup_m , true ); |
262 RegisterVariable('fort' , vtCommand, @chFort , false); |
263 RegisterVariable('zoomin' , vtCommand, @chZoomIn , true ); |
263 RegisterVariable('voicepack',vtCommand, @chVoicepack , false); |
264 RegisterVariable('zoomout' , vtCommand, @chZoomOut , true ); |
264 RegisterVariable('grave' , vtCommand, @chGrave , false); |
265 RegisterVariable('zoomreset',vtCommand, @chZoomReset , true ); |
265 RegisterVariable('bind' , vtCommand, @chBind , true ); |
266 RegisterVariable('skip' , vtCommand, @chSkip , false); |
266 RegisterVariable('addhh' , vtCommand, @chAddHH , false); |
267 RegisterVariable('history' , vtCommand, @chHistory , true ); |
267 RegisterVariable('hat' , vtCommand, @chSetHat , false); |
268 RegisterVariable('chat' , vtCommand, @chChat , true ); |
268 RegisterVariable('hhcoords', vtCommand, @chSetHHCoords , false); |
269 RegisterVariable('newgrave', vtCommand, @chNewGrave , false); |
269 RegisterVariable('ammstore', vtCommand, @chAddAmmoStore , false); |
270 RegisterVariable('say' , vtCommand, @chSay , true ); |
270 RegisterVariable('quit' , vtCommand, @chQuit , true ); |
271 RegisterVariable('hogsay' , vtCommand, @chHogSay , true ); |
271 RegisterVariable('confirm' , vtCommand, @chConfirm , true ); |
272 RegisterVariable('team' , vtCommand, @chTeamSay , true ); |
272 RegisterVariable('+speedup', vtCommand, @chSpeedup_p , true ); |
273 RegisterVariable('ammomenu', vtCommand, @chAmmoMenu , false); |
273 RegisterVariable('-speedup', vtCommand, @chSpeedup_m , true ); |
274 RegisterVariable('+precise', vtCommand, @chPrecise_p , false); |
274 RegisterVariable('zoomin' , vtCommand, @chZoomIn , true ); |
275 RegisterVariable('-precise', vtCommand, @chPrecise_m , false); |
275 RegisterVariable('zoomout' , vtCommand, @chZoomOut , true ); |
276 RegisterVariable('+left' , vtCommand, @chLeft_p , false); |
276 RegisterVariable('zoomreset',vtCommand, @chZoomReset , true ); |
277 RegisterVariable('-left' , vtCommand, @chLeft_m , false); |
277 RegisterVariable('skip' , vtCommand, @chSkip , false); |
278 RegisterVariable('+right' , vtCommand, @chRight_p , false); |
278 RegisterVariable('history' , vtCommand, @chHistory , true ); |
279 RegisterVariable('-right' , vtCommand, @chRight_m , false); |
279 RegisterVariable('chat' , vtCommand, @chChat , true ); |
280 RegisterVariable('+up' , vtCommand, @chUp_p , false); |
280 RegisterVariable('newgrave', vtCommand, @chNewGrave , false); |
281 RegisterVariable('-up' , vtCommand, @chUp_m , false); |
281 RegisterVariable('say' , vtCommand, @chSay , true ); |
282 RegisterVariable('+down' , vtCommand, @chDown_p , false); |
282 RegisterVariable('hogsay' , vtCommand, @chHogSay , true ); |
283 RegisterVariable('-down' , vtCommand, @chDown_m , false); |
283 RegisterVariable('team' , vtCommand, @chTeamSay , true ); |
284 RegisterVariable('+attack' , vtCommand, @chAttack_p , false); |
284 RegisterVariable('ammomenu', vtCommand, @chAmmoMenu , false); |
285 RegisterVariable('-attack' , vtCommand, @chAttack_m , false); |
285 RegisterVariable('+precise', vtCommand, @chPrecise_p , false); |
286 RegisterVariable('switch' , vtCommand, @chSwitch , false); |
286 RegisterVariable('-precise', vtCommand, @chPrecise_m , false); |
287 RegisterVariable('nextturn', vtCommand, @chNextTurn , false); |
287 RegisterVariable('+left' , vtCommand, @chLeft_p , false); |
288 RegisterVariable('timer' , vtCommand, @chTimer , false); |
288 RegisterVariable('-left' , vtCommand, @chLeft_m , false); |
289 RegisterVariable('taunt' , vtCommand, @chTaunt , false); |
289 RegisterVariable('+right' , vtCommand, @chRight_p , false); |
290 RegisterVariable('setweap' , vtCommand, @chSetWeapon , false); |
290 RegisterVariable('-right' , vtCommand, @chRight_m , false); |
291 RegisterVariable('slot' , vtCommand, @chSlot , false); |
291 RegisterVariable('+up' , vtCommand, @chUp_p , false); |
292 RegisterVariable('put' , vtCommand, @chPut , false); |
292 RegisterVariable('-up' , vtCommand, @chUp_m , false); |
293 RegisterVariable('ljump' , vtCommand, @chLJump , false); |
293 RegisterVariable('+down' , vtCommand, @chDown_p , false); |
294 RegisterVariable('hjump' , vtCommand, @chHJump , false); |
294 RegisterVariable('-down' , vtCommand, @chDown_m , false); |
295 RegisterVariable('fullscr' , vtCommand, @chFullScr , true ); |
295 RegisterVariable('+attack' , vtCommand, @chAttack_p , false); |
296 RegisterVariable('+volup' , vtCommand, @chVol_p , true ); |
296 RegisterVariable('-attack' , vtCommand, @chAttack_m , false); |
297 RegisterVariable('-volup' , vtCommand, @chVol_m , true ); |
297 RegisterVariable('switch' , vtCommand, @chSwitch , false); |
298 RegisterVariable('+voldown', vtCommand, @chVol_m , true ); |
298 RegisterVariable('nextturn', vtCommand, @chNextTurn , false); |
299 RegisterVariable('-voldown', vtCommand, @chVol_p , true ); |
299 RegisterVariable('timer' , vtCommand, @chTimer , false); |
300 RegisterVariable('findhh' , vtCommand, @chFindhh , true ); |
300 RegisterVariable('taunt' , vtCommand, @chTaunt , false); |
301 RegisterVariable('pause' , vtCommand, @chPause , true ); |
301 RegisterVariable('setweap' , vtCommand, @chSetWeapon , false); |
302 RegisterVariable('+cur_u' , vtCommand, @chCurU_p , true ); |
302 RegisterVariable('slot' , vtCommand, @chSlot , false); |
303 RegisterVariable('-cur_u' , vtCommand, @chCurU_m , true ); |
303 RegisterVariable('put' , vtCommand, @chPut , false); |
304 RegisterVariable('+cur_d' , vtCommand, @chCurD_p , true ); |
304 RegisterVariable('ljump' , vtCommand, @chLJump , false); |
305 RegisterVariable('-cur_d' , vtCommand, @chCurD_m , true ); |
305 RegisterVariable('hjump' , vtCommand, @chHJump , false); |
306 RegisterVariable('+cur_l' , vtCommand, @chCurL_p , true ); |
306 RegisterVariable('fullscr' , vtCommand, @chFullScr , true ); |
307 RegisterVariable('-cur_l' , vtCommand, @chCurL_m , true ); |
307 RegisterVariable('+volup' , vtCommand, @chVol_p , true ); |
308 RegisterVariable('+cur_r' , vtCommand, @chCurR_p , true ); |
308 RegisterVariable('-volup' , vtCommand, @chVol_m , true ); |
309 RegisterVariable('-cur_r' , vtCommand, @chCurR_m , true ); |
309 RegisterVariable('+voldown', vtCommand, @chVol_m , true ); |
310 |
310 RegisterVariable('-voldown', vtCommand, @chVol_p , true ); |
311 finalization |
311 RegisterVariable('findhh' , vtCommand, @chFindhh , true ); |
312 FreeVariablesList |
312 RegisterVariable('pause' , vtCommand, @chPause , true ); |
|
313 RegisterVariable('+cur_u' , vtCommand, @chCurU_p , true ); |
|
314 RegisterVariable('-cur_u' , vtCommand, @chCurU_m , true ); |
|
315 RegisterVariable('+cur_d' , vtCommand, @chCurD_p , true ); |
|
316 RegisterVariable('-cur_d' , vtCommand, @chCurD_m , true ); |
|
317 RegisterVariable('+cur_l' , vtCommand, @chCurL_p , true ); |
|
318 RegisterVariable('-cur_l' , vtCommand, @chCurL_m , true ); |
|
319 RegisterVariable('+cur_r' , vtCommand, @chCurR_p , true ); |
|
320 RegisterVariable('-cur_r' , vtCommand, @chCurR_m , true ); |
|
321 end; |
|
322 |
|
323 procedure free_uConsole; |
|
324 begin |
|
325 FreeVariablesList(); |
|
326 end; |
313 |
327 |
314 end. |
328 end. |