X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_saveload.pas;h=9ab49931944e1b9e8a2051d68083ba1699a8642e;hb=c737ec14212534a2b7069615641afdf329ea8cb4;hp=4e5697465bfc8b8c42ede7cc174ebc3e2dc07742;hpb=414f2873efa0cce84499f64774db7000e6268971;p=d2df-sdl.git diff --git a/src/game/g_saveload.pas b/src/game/g_saveload.pas index 4e56974..9ab4993 100644 --- a/src/game/g_saveload.pas +++ b/src/game/g_saveload.pas @@ -180,7 +180,7 @@ begin //if (Length(gCurrentMapFileName) <> 0) then e_LogWritefln('SAVE: current map is ''%s''...', [gCurrentMapFileName]); utils.writeStr(st, gCurrentMapFileName); // Ïóòü ê êàðòå - utils.writeStr(st, gGameSettings.WAD); + utils.writeStr(st, ExtractFileName(gGameSettings.WAD)); // Èìÿ êàðòû utils.writeStr(st, g_ExtractFileName(gMapInfo.Map)); // Êîëè÷åñòâî èãðîêîâ @@ -317,7 +317,9 @@ begin e_WriteLog('Loading saved game...', TMsgType.Notify); - {$IF DEFINED(D2F_DEBUG)}try{$ENDIF} +{$IF DEFINED(D2F_DEBUG)} + try +{$ENDIF} //g_Game_Free(false); // don't free textures for the same map g_Game_ClearLoading(); g_Game_SetLoadingText(_lc[I_LOAD_SAVE_FILE], 0, False); @@ -403,11 +405,9 @@ begin g_Game_SetupScreenSize(); // Çàãðóçêà è çàïóñê êàðòû - if not g_Game_StartMap(WAD_Path+':\'+Map_Name, True, curmapfile) then - begin - g_FatalError(Format(_lc[I_GAME_ERROR_MAP_LOAD], [WAD_Path + ':\' + Map_Name])); - exit; - end; + //FIXME: save/load `asMegawad` + if not g_Game_StartMap(false{asMegawad}, WAD_Path+':\'+Map_Name, True, curmapfile) then + raise Exception.Create(Format(_lc[I_GAME_ERROR_MAP_LOAD], [WAD_Path + ':\' + Map_Name])); // Íàñòðîéêè èãðîêîâ è áîòîâ g_Player_Init(); @@ -487,14 +487,14 @@ begin // done gLoadGameMode := false; result := true; - {$IF DEFINED(D2F_DEBUG)} +{$IF DEFINED(D2F_DEBUG)} except begin errpos := LongWord(st.position); raise; end; end; - {$ENDIF} +{$ENDIF} finally st.Free(); end;