From: Ketmar Dark Date: Mon, 18 Apr 2016 06:49:29 +0000 (+0300) Subject: wads works again! X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=ac9c2149eb3d0ac7b8ae15c8c6e8a54a6c3c61b6;p=d2df-sdl.git wads works again! --- diff --git a/src/shared/wadreader.pas b/src/shared/wadreader.pas index 343c92f..252075f 100644 --- a/src/shared/wadreader.pas +++ b/src/shared/wadreader.pas @@ -51,15 +51,15 @@ begin result := ''; if not findFileCI(fname) then begin - //e_WriteLog(Format('TWADFile.ReadFile: error looking for [%s] [%s]', [path, ExtractFileName(fname)]), MSG_NOTIFY); + //e_WriteLog(Format('findDiskWad: error looking for [%s]', [fname]), MSG_NOTIFY); if StrEquCI1251(ExtractFileExt(fname), '.wad') then begin - fname := ChangeFileExt(ExtractFileName(fname), '.pk3'); - //e_WriteLog(Format(' looking for [%s] [%s]', [path, rfn]), MSG_NOTIFY); + fname := ChangeFileExt(fname, '.pk3'); + //e_WriteLog(Format(' looking for [%s]', [fname]), MSG_NOTIFY); if not findFileCI(fname) then begin - //e_WriteLog(Format(' looking for [%s] [%s]', [path, rfn]), MSG_NOTIFY); - fname := ChangeFileExt(ExtractFileName(fname), '.zip'); + fname := ChangeFileExt(fname, '.zip'); + //e_WriteLog(Format(' looking for [%s]', [fname]), MSG_NOTIFY); if not findFileCI(fname) then exit; end; end @@ -67,12 +67,8 @@ begin begin exit; end; - //e_WriteLog(Format('TWADFile.ReadFile: FOUND [%s]', [rfn]), MSG_NOTIFY); - end - else - begin - //if rfn <> ExtractFileName(FileName) then e_WriteLog(Format('TWADFile.ReadFile: FOUND [%s]', [rfn]), MSG_NOTIFY); end; + //e_WriteLog(Format('findDiskWad: FOUND [%s]', [fname]), MSG_NOTIFY); result := fname; end;