index 36cf7295eca66469710d281626452db2c3a3e2ab..f020b9bb69bc77aba28390dd431c50d1c3695550 100644 (file)
--- a/src/game/g_saveload.pas
+++ b/src/game/g_saveload.pas
+(* 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/>.
+ *)
+{$MODE DELPHI}
unit g_saveload;
interface
unit g_saveload;
interface
uses
g_game, g_items, g_map, g_monsters, g_triggers,
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'
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'
END_MARKER_STRING = 'END';
PLAYER_VIEW_SIGNATURE = $57564C50; // 'PLVW'
OBJ_SIGNATURE = $4A424F5F; // '_OBJ'
str := gGameSettings.WAD;
bMem.WriteString(str, 128);
// Èìÿ êàðòû:
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();
bMem.WriteString(str, 32);
// Êîëè÷åñòâî èãðîêîâ:
nPlayers := g_Player_GetCount();