X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fshared%2Fwadreader.pas;h=db73d456e9b4d5335cf715b022cd2f306fc10e66;hb=8b7ced631d49879ce68703ac84389e3b4780c3db;hp=818e912f7ee532a42591b2059d890d39c4b27edb;hpb=cd1ca85acc0740e0f307782e2af54e5ba0a59507;p=d2df-sdl.git diff --git a/src/shared/wadreader.pas b/src/shared/wadreader.pas index 818e912..db73d45 100644 --- a/src/shared/wadreader.pas +++ b/src/shared/wadreader.pas @@ -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 @@ -23,11 +23,12 @@ interface uses Classes, - mempool, sfs, xstreams, utils; + {$IFDEF USE_MEMPOOL}mempool,{$ENDIF} + sfs, xstreams, utils; type - TWADFile = class(TPoolObject) + TWADFile = class{$IFDEF USE_MEMPOOL}(TPoolObject){$ENDIF} private fFileName: AnsiString; // empty: not opened fIter: TSFSFileList; @@ -63,9 +64,6 @@ function g_ExtractFilePath (resourceStr: AnsiString): AnsiString; function g_ExtractFileName (resourceStr: AnsiString): AnsiString; // without path function g_ExtractFilePathName (resourceStr: AnsiString): AnsiString; -// return fixed AnsiString or empty AnsiString -function findDiskWad (fname: AnsiString): AnsiString; - var wadoptDebug: Boolean = false; @@ -78,33 +76,6 @@ uses SysUtils, e_log, MAPDEF, xdynrec; -function findDiskWad (fname: AnsiString): AnsiString; -begin - result := ''; - if not findFileCI(fname) then - begin - //e_WriteLog(Format('findDiskWad: error looking for [%s]', [fname]), MSG_NOTIFY); - if StrEquCI1251(ExtractFileExt(fname), '.wad') then - begin - fname := ChangeFileExt(fname, '.pk3'); - //e_WriteLog(Format(' looking for [%s]', [fname]), MSG_NOTIFY); - if not findFileCI(fname) then - begin - fname := ChangeFileExt(fname, '.zip'); - //e_WriteLog(Format(' looking for [%s]', [fname]), MSG_NOTIFY); - if not findFileCI(fname) then exit; - end; - end - else - begin - exit; - end; - end; - //e_WriteLog(Format('findDiskWad: FOUND [%s]', [fname]), MSG_NOTIFY); - result := fname; -end; - - function normSlashes (s: AnsiString): AnsiString; var f: Integer;