X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_console.pas;h=fb76d519dfcef27660f37db6336f21f7fef7029c;hb=c7827dd408b445f025117f2c5df2a3c0f4622298;hp=47239783b94865e4625d9580479e87d3488c8f68;hpb=12a3a77053c645b50a8845a382daf8366fa0c2c0;p=d2df-sdl.git diff --git a/src/game/g_console.pas b/src/game/g_console.pas index 4723978..fb76d51 100644 --- a/src/game/g_console.pas +++ b/src/game/g_console.pas @@ -2,8 +2,7 @@ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * the Free Software Foundation, version 3 of the License ONLY. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -38,6 +37,7 @@ uses LAST_ACTION = ACTION_WEAPPREV; procedure g_Console_Init; +procedure g_Console_SysInit; procedure g_Console_Update; procedure g_Console_Draw (MessagesOnly: Boolean = False); procedure g_Console_Char (C: AnsiChar); @@ -86,9 +86,13 @@ implementation uses g_textures, g_main, e_graphics, e_input, g_game, - SysUtils, g_basic, g_options, Math, g_touch, + SysUtils, g_basic, g_options, Math, g_touch, e_res, g_menu, g_gui, g_language, g_net, g_netmsg, e_log, conbuf; +const + configScript = 'dfconfig.cfg'; + autoexecScript = 'autoexec.cfg'; + configComment = 'generated by doom2d, do not modify'; type PCommand = ^TCommand; @@ -289,7 +293,7 @@ var begin if (Length(p) <> 2) then begin - conwritefln('%s %s', [me.cmd, PAnsiString(me.ptr)^]); + conwritefln('%s %s', [me.cmd, QuoteStr(PAnsiString(me.ptr)^)]); end else begin @@ -580,7 +584,7 @@ begin begin // exec if Length(p) = 2 then - g_Console_ReadConfig(GameDir + '/' + p[1]) + g_Console_ReadConfig(p[1]) else g_Console_Add('exec