46 procedure ParseCommand(CmdStr: shortstring); |
46 procedure ParseCommand(CmdStr: shortstring); |
47 function GetLastConsoleLine: shortstring; |
47 function GetLastConsoleLine: shortstring; |
48 |
48 |
49 implementation |
49 implementation |
50 {$J+} |
50 {$J+} |
51 uses uMisc, uStore, Types, uConsts, uGears, uTeams, uIO, uKeys, uSound, uWorld, uLand; |
51 uses uMisc, uStore, Types, uConsts, uGears, uTeams, uIO, uKeys, uSound, uWorld, uLand, uRandom; |
52 const cLineWidth: integer = 0; |
52 const cLineWidth: integer = 0; |
53 cLinesCount = 256; |
53 cLinesCount = 256; |
54 |
54 |
55 type PVariable = ^TVariable; |
55 type PVariable = ^TVariable; |
56 TVariable = record |
56 TVariable = record |
273 InitConsole; |
273 InitConsole; |
274 RegisterVariable('quit' , vtCommand, @chQuit ); |
274 RegisterVariable('quit' , vtCommand, @chQuit ); |
275 RegisterVariable('capture' , vtCommand, @chCapture ); |
275 RegisterVariable('capture' , vtCommand, @chCapture ); |
276 RegisterVariable('addteam' , vtCommand, @chAddTeam ); |
276 RegisterVariable('addteam' , vtCommand, @chAddTeam ); |
277 RegisterVariable('rdriven' , vtCommand, @chTeamLocal ); |
277 RegisterVariable('rdriven' , vtCommand, @chTeamLocal ); |
278 //RegisterVariable('gravity' , vtReal , @cGravity ); гравитация не должна быть доступна вообще |
278 RegisterVariable('map' , vtCommand, @chSetMap ); |
|
279 RegisterVariable('theme' , vtCommand, @chSetTheme ); |
|
280 RegisterVariable('seed' , vtCommand, @chSetSeed ); |
279 RegisterVariable('c_height', vtInteger, @cConsoleHeight ); |
281 RegisterVariable('c_height', vtInteger, @cConsoleHeight ); |
280 RegisterVariable('gmflags' , vtInteger, @GameFlags ); |
282 RegisterVariable('gmflags' , vtInteger, @GameFlags ); |
281 RegisterVariable('turntime', vtInteger, @cHedgehogTurnTime); |
283 RegisterVariable('turntime', vtInteger, @cHedgehogTurnTime); |
282 RegisterVariable('showfps' , vtBoolean, @cShowFPS ); |
284 RegisterVariable('showfps' , vtBoolean, @cShowFPS ); |
283 RegisterVariable('sound' , vtBoolean, @isSoundEnabled ); |
|
284 RegisterVariable('name' , vtCommand, @chName ); |
285 RegisterVariable('name' , vtCommand, @chName ); |
285 RegisterVariable('fort' , vtCommand, @chFort ); |
286 RegisterVariable('fort' , vtCommand, @chFort ); |
286 RegisterVariable('grave' , vtCommand, @chGrave ); |
287 RegisterVariable('grave' , vtCommand, @chGrave ); |
287 RegisterVariable('bind' , vtCommand, @chBind ); |
288 RegisterVariable('bind' , vtCommand, @chBind ); |
288 RegisterVariable('add' , vtCommand, @chAdd ); |
289 RegisterVariable('add' , vtCommand, @chAdd ); |