DEADSOFTWARE

fixed README (SDL_mixer build option)
[d2df-sdl.git] / src / game / g_console.pas
index 9e6f4d5de4776bd505e2499b4a384cfff3a6862a..3ed1d138818daa0cdb64e42251613634afc6ec5e 100644 (file)
@@ -1,4 +1,4 @@
-(* Copyright (C)  DooM 2D:Forever Developers
+(* Copyright (C)  Doom 2D: Forever Developers
  *
  * 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
@@ -265,7 +265,7 @@ var
   cp: PCommand;
   pv: PVarSingle;
 begin
-  GetMem(pv, sizeof(pv^));
+  GetMem(pv, sizeof(TVarSingle));
   pv.val := pvar;
   pv.min := amin;
   pv.max := amax;
@@ -469,6 +469,13 @@ begin
       g_Console_Add('exec <script file>');
   end;
 
+  if (cmd = 'ver') or (cmd = 'version') then
+  begin
+    conwriteln('Doom 2D: Forever v. ' + GAME_VERSION);
+    conwritefln('Net protocol v. %d', [NET_PROTOCOL_VER]);
+    conwritefln('Build date: %s at %s', [GAME_BUILDDATE, GAME_BUILDTIME]);
+  end;
+
   if cmd = 'alias' then
   begin
     // alias [alias_name] [commands]
@@ -602,6 +609,8 @@ begin
   AddCommand('exec', ConsoleCommands);
   AddCommand('alias', ConsoleCommands);
   AddCommand('call', ConsoleCommands);
+  AddCommand('ver', ConsoleCommands);
+  AddCommand('version', ConsoleCommands);
 
   AddCommand('d_window', DebugCommands);
   AddCommand('d_sounds', DebugCommands);