X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fshared%2Fwadreader.pas;h=2997bce0abac0b94b78c6a49f96b45dca027c65e;hb=5472594f32e33da0c66606ec9eebc8f798ef6b54;hp=54e81b433e3df56024c4f12d61faa4691e4acca0;hpb=85e9a9b925d265c5cf047df5ce56848377e41336;p=d2df-sdl.git diff --git a/src/shared/wadreader.pas b/src/shared/wadreader.pas index 54e81b4..2997bce 100644 --- a/src/shared/wadreader.pas +++ b/src/shared/wadreader.pas @@ -1,3 +1,18 @@ +(* 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 . + *) {$MODE DELPHI} unit wadreader; @@ -50,10 +65,15 @@ function g_ExtractFilePathName (resourceStr: AnsiString): AnsiString; function findDiskWad (fname: AnsiString): AnsiString; +var + wadoptDebug: Boolean = false; + wadoptFast: Boolean = false; + + implementation uses - SysUtils, Classes, BinEditor, e_log, g_options, utils, MAPSTRUCT; + SysUtils, Classes{, BinEditor}, e_log{, g_options}, utils, MAPSTRUCT; function findDiskWad (fname: AnsiString): AnsiString; @@ -368,7 +388,7 @@ begin {$ENDIF} result := true; {$IFDEF SFS_DWFAD_DEBUG} - if gSFSDebug then + if wadoptDebug then e_WriteLog(Format('DFWAD: file [%s] FOUND in [%s]; size is %d bytes', [name, fFileName, Len]), MSG_NOTIFY); {$ENDIF} exit; @@ -436,11 +456,11 @@ begin exit; end; {$IFDEF SFS_DWFAD_DEBUG} - if gSFSDebug then e_WriteLog(Format('TWADFile.ReadFile: FOUND [%s]', [rfn]), MSG_NOTIFY); + if wadoptDebug then e_WriteLog(Format('TWADFile.ReadFile: FOUND [%s]', [rfn]), MSG_NOTIFY); {$ENDIF} // cache this wad try - if gSFSFastMode then + if wadoptFast then begin if not SFSAddDataFile(rfn, true) then exit; end @@ -455,7 +475,7 @@ begin if fIter = nil then Exit; fFileName := rfn; {$IFDEF SFS_DWFAD_DEBUG} - if gSFSDebug then e_WriteLog(Format('TWADFile.ReadFile: [%s] opened', [fFileName]), MSG_NOTIFY); + if wadoptDebug then e_WriteLog(Format('TWADFile.ReadFile: [%s] opened', [fFileName]), MSG_NOTIFY); {$ENDIF} Result := True; end;