DEADSOFTWARE

console commands can have help strings (somebody, please, add 'em! ;-)
[d2df-sdl.git] / src / shared / wadreader.pas
index 7aeef80aeb1d3e9069814a1c883fd64094fe3286..df0de0fc591a48ffe3d16ce7f68ba412fd781b85 100644 (file)
@@ -1,7 +1,22 @@
-{$MODE DELPHI}
+(* 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/>.
+ *)
+{$INCLUDE a_modes.inc}
 unit wadreader;
 
-{$DEFINE SFS_DWFAD_DEBUG}
+{$DEFINE SFS_DFWAD_DEBUG}
 {$DEFINE SFS_MAPDETECT_FX}
 
 interface
@@ -372,7 +387,7 @@ begin
       end;
 {$ENDIF}
       result := true;
-      {$IFDEF SFS_DWFAD_DEBUG}
+      {$IFDEF SFS_DFWAD_DEBUG}
       if wadoptDebug then
         e_WriteLog(Format('DFWAD: file [%s] FOUND in [%s]; size is %d bytes', [name, fFileName, Len]), MSG_NOTIFY);
       {$ENDIF}
@@ -440,7 +455,7 @@ begin
     e_WriteLog(Format('TWADFile.ReadFile: error looking for [%s]', [FileName]), MSG_NOTIFY);
     exit;
   end;
-  {$IFDEF SFS_DWFAD_DEBUG}
+  {$IFDEF SFS_DFWAD_DEBUG}
   if wadoptDebug then e_WriteLog(Format('TWADFile.ReadFile: FOUND [%s]', [rfn]), MSG_NOTIFY);
   {$ENDIF}
   // cache this wad
@@ -459,7 +474,7 @@ begin
   fIter := SFSFileList(rfn);
   if fIter = nil then Exit;
   fFileName := rfn;
-  {$IFDEF SFS_DWFAD_DEBUG}
+  {$IFDEF SFS_DFWAD_DEBUG}
   if wadoptDebug then e_WriteLog(Format('TWADFile.ReadFile: [%s] opened', [fFileName]), MSG_NOTIFY);
   {$ENDIF}
   Result := True;
@@ -486,8 +501,8 @@ begin
 
   fn := Format(' -- memwad %d -- ', [uniqueCounter]);
   Inc(uniqueCounter);
-  {$IFDEF SFS_DWFAD_DEBUG}
-    e_WriteLog(Format('TWADFile.ReadMemory: [%s]', [fn]), MSG_NOTIFY);
+  {$IFDEF SFS_DFWAD_DEBUG}
+  if wadoptDebug then e_WriteLog(Format('TWADFile.ReadMemory: [%s]', [fn]), MSG_NOTIFY);
   {$ENDIF}
 
   try
@@ -506,8 +521,8 @@ begin
   if fIter = nil then Exit;
 
   fFileName := fn;
-  {$IFDEF SFS_DWFAD_DEBUG}
-    e_WriteLog(Format('TWADFile.ReadMemory: [%s] opened', [fFileName]), MSG_NOTIFY);
+  {$IFDEF SFS_DFWAD_DEBUG}
+  if wadoptDebug then e_WriteLog(Format('TWADFile.ReadMemory: [%s] opened', [fFileName]), MSG_NOTIFY);
   {$ENDIF}
 
   {