DEADSOFTWARE

added common file with compiler flags; cosmetic fix in g_monsters.pas
[d2df-sdl.git] / src / game / g_saveload.pas
index 36cf7295eca66469710d281626452db2c3a3e2ab..039883d286cc8d5ccd34593ddca464974867f753 100644 (file)
@@ -1,3 +1,19 @@
+(* 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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *)
+{$INCLUDE g_amodes.inc}
 unit g_saveload;
 
 interface
@@ -15,13 +31,13 @@ implementation
 
 uses
   g_game, g_items, g_map, g_monsters, g_triggers,
-  g_basic, g_main, SysUtils, Math, WADEDITOR,
+  g_basic, g_main, SysUtils, Math, wadreader,
   MAPSTRUCT, MAPDEF, g_weapons, g_player, g_console,
   e_log, g_language;
 
 const
   SAVE_SIGNATURE = $56534644; // 'DFSV'
-  SAVE_VERSION = $02;
+  SAVE_VERSION = $03;
   END_MARKER_STRING = 'END';
   PLAYER_VIEW_SIGNATURE = $57564C50; // 'PLVW'
   OBJ_SIGNATURE = $4A424F5F; // '_OBJ'
@@ -151,7 +167,7 @@ begin
     str := gGameSettings.WAD;
     bMem.WriteString(str, 128);
   // Èìÿ êàðòû:
-    g_ProcessResourceStr(gMapInfo.Map, nil, nil, @str);
+    str := g_ExtractFileName(gMapInfo.Map);
     bMem.WriteString(str, 32);
   // Êîëè÷åñòâî èãðîêîâ:
     nPlayers := g_Player_GetCount();