X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_console.pas;h=fee51960c149868ffe4c969c24c04e7c1513af66;hb=8028f947967b9156e80eea51b7f8b50f3c5862b3;hp=505f1950b67a086ec15b20832c4c12be8644863a;hpb=e38d4f7bc547f5c22852c550e96a237d1b6e93ba;p=d2df-sdl.git diff --git a/src/game/g_console.pas b/src/game/g_console.pas index 505f195..fee5196 100644 --- a/src/game/g_console.pas +++ b/src/game/g_console.pas @@ -44,7 +44,8 @@ uses end; procedure g_Console_Init; -procedure g_Console_SysInit; +procedure g_Console_Initialize; +procedure g_Console_Finalize; procedure g_Console_Update; procedure g_Console_Char (C: AnsiChar); procedure g_Console_Control (K: Word); @@ -101,13 +102,12 @@ var implementation uses - g_textures, g_main, e_input, g_game, g_gfx, g_player, g_items, + g_textures, e_input, g_game, g_gfx, g_player, g_items, SysUtils, g_basic, g_options, Math, g_touch, e_res, g_menu, g_gui, g_language, g_net, g_netmsg, e_log, conbuf, g_weapons, Keyboard; const - autoexecScript = 'autoexec.cfg'; configComment = 'generated by doom2d, do not modify'; type @@ -970,7 +970,7 @@ begin end; end; -procedure g_Console_SysInit; +procedure g_Console_Initialize; var a: Integer; begin gConsoleShow := False; @@ -1230,10 +1230,17 @@ begin g_Console_ResetBinds; g_Console_ReadConfig(gConfigScript); - g_Console_ReadConfig(autoexecScript); +// g_Console_ReadConfig(autoexecScript); + g_Console_ReadConfig('autoexec.cfg'); + gParsingBinds := False; end; +procedure g_Console_Finalize; +begin + +end; + procedure g_Console_Init; begin g_Console_Add(Format(_lc[I_CONSOLE_WELCOME], [GAME_VERSION])); @@ -1766,7 +1773,7 @@ end; procedure g_Console_BindKey (key: Integer; down: AnsiString; up: AnsiString = ''; rep: Boolean = False); begin - //e_LogWritefln('bind "%s" "%s" <%s>', [LowerCase(e_KeyNames[key]), cmd, key]); + // e_LogWritefln('bind "%s" "%s" "%s" <%s>', [LowerCase(e_KeyNames[key]), down, up, key]); ASSERT(key >= 0); ASSERT(key < e_MaxInputKeys); if key > 0 then @@ -2015,6 +2022,7 @@ procedure g_Console_WriteConfig (filename: String); end; begin + // e_LogWritefln('g_Console_WriteConfig: %s', [filename]); AssignFile(f, filename); Rewrite(f); WriteLn(f, '// ' + configComment);