X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_console.pas;h=5439a0f1738b37198687d599a6f4f37736bbef32;hb=3fff94d70eb6097b01b0a8cb3364ca7ce10765da;hp=21b056f66130f629832193af63b51ed096abd1e5;hpb=7ab0e3623e342566a036b71b847b629e26ee56e1;p=d2df-sdl.git diff --git a/src/game/g_console.pas b/src/game/g_console.pas index 21b056f..5439a0f 100644 --- a/src/game/g_console.pas +++ b/src/game/g_console.pas @@ -48,10 +48,14 @@ procedure g_Console_Add (L: AnsiString; show: Boolean=false); procedure g_Console_Clear (); function g_Console_CommandBlacklisted (C: AnsiString): Boolean; procedure g_Console_ReadConfig (filename: String); +procedure g_Console_WriteConfig (filename: String); function g_Console_Interactive: Boolean; function g_Console_Action (action: Integer): Boolean; +function g_Console_FindBind (n: Integer; down: AnsiString; up: AnsiString = ''): Integer; +procedure g_Console_BindKey (key: Integer; down: AnsiString; up: AnsiString = ''); procedure g_Console_ProcessBind (key: Integer; down: Boolean); +procedure g_Console_ResetBinds; procedure conwriteln (const s: AnsiString; show: Boolean=false); procedure conwritefln (const s: AnsiString; args: array of const; show: Boolean=false); @@ -75,7 +79,7 @@ var gChatTeam: Boolean = false; gAllowConsoleMessages: Boolean = true; gJustChatted: Boolean = false; // ÷òîáû àäìèí â èíòåðå ÷àòÿñü íå ïðîìàòûâàë ñòàòèñòèêó - gPlayerAction, gDefaultAction: Array [0..1, 0..LAST_ACTION] of Boolean; // [player, action] + gPlayerAction: Array [0..1, 0..LAST_ACTION] of Boolean; // [player, action] implementation @@ -138,9 +142,8 @@ var Time: Word; end; - bindDown, bindProcess: Boolean; gInputBinds: Array [0..e_MaxInputKeys - 1] of record - commands: SSArray; + down, up: SSArray; end; @@ -511,14 +514,20 @@ begin begin // exec if Length(p) = 2 then - begin - s := GameDir + '/' + p[1]; - g_Console_ReadConfig(s); - end + g_Console_ReadConfig(GameDir + '/' + p[1]) else g_Console_Add('exec