90 done: boolean; |
90 done: boolean; |
91 begin |
91 begin |
92 {$IFDEF DEBUGFILE}AddFileLog('Console write: ' + s);{$ENDIF} |
92 {$IFDEF DEBUGFILE}AddFileLog('Console write: ' + s);{$ENDIF} |
93 Write(s); |
93 Write(s); |
94 done:= false; |
94 done:= false; |
95 |
95 |
96 while not done do |
96 while not done do |
97 begin |
97 begin |
98 Len:= cLineWidth - Length(ConsoleLines[CurrLine].s); |
98 Len:= cLineWidth - Length(ConsoleLines[CurrLine].s); |
99 SetLine(ConsoleLines[CurrLine], ConsoleLines[CurrLine].s + copy(s, 1, Len)); |
99 SetLine(ConsoleLines[CurrLine], ConsoleLines[CurrLine].s + copy(s, 1, Len)); |
100 Delete(s, 1, Len); |
100 Delete(s, 1, Len); |
202 var i: LongInt; |
202 var i: LongInt; |
203 begin |
203 begin |
204 CurrLine:= 0; |
204 CurrLine:= 0; |
205 Variables:= nil; |
205 Variables:= nil; |
206 isDeveloperMode:= true; |
206 isDeveloperMode:= true; |
207 |
207 |
208 // initConsole |
208 // initConsole |
209 cLineWidth:= cScreenWidth div 10; |
209 cLineWidth:= cScreenWidth div 10; |
210 if cLineWidth > 255 then |
210 if cLineWidth > 255 then |
211 cLineWidth:= 255; |
211 cLineWidth:= 255; |
212 for i:= 0 to Pred(cLinesCount) do |
212 for i:= 0 to Pred(cLinesCount) do |
213 PByte(@ConsoleLines[i])^:= 0; |
213 PByte(@ConsoleLines[i])^:= 0; |
214 |
214 |
215 RegisterVariable('proto' , vtCommand, @chCheckProto , true ); |
215 RegisterVariable('proto' , vtCommand, @chCheckProto , true ); |
216 RegisterVariable('spectate', vtBoolean, @fastUntilLag , false); |
216 RegisterVariable('spectate', vtBoolean, @fastUntilLag , false); |
217 RegisterVariable('capture' , vtCommand, @chCapture , true ); |
217 RegisterVariable('capture' , vtCommand, @chCapture , true ); |
218 RegisterVariable('rotmask' , vtCommand, @chRotateMask , true ); |
218 RegisterVariable('rotmask' , vtCommand, @chRotateMask , true ); |
219 RegisterVariable('addteam' , vtCommand, @chAddTeam , false); |
219 RegisterVariable('addteam' , vtCommand, @chAddTeam , false); |