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