DEADSOFTWARE

sdl1/2: fix invalid window title
[d2df-sdl.git] / src / shared / xdynrec.pas
index 12d99d015c663a706eb258cf8523d9911ba8c7db..511c82dd0fd2ba8aeafa406cc5ef26e714318148 100644 (file)
@@ -1,9 +1,8 @@
-(* 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
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation, version 3 of the License ONLY.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -21,7 +20,8 @@ interface
 
 uses
   SysUtils, Variants, Classes,
-  xparser, xstreams, utils, hashtable, mempool;
+  {$IFDEF USE_MEMPOOL}mempool,{$ENDIF}
+  xparser, xstreams, utils, hashtable;
 
 
 // ////////////////////////////////////////////////////////////////////////// //
@@ -54,7 +54,7 @@ type
   TDynEBSList = specialize TSimpleList<TDynEBS>;
 
   // this is base type for all scalars (and arrays)
-  TDynField = class(TPoolObject)
+  TDynField = class{$IFDEF USE_MEMPOOL}(TPoolObject){$ENDIF}
   public
     type
       TType = (TBool, TChar, TByte, TUByte, TShort, TUShort, TInt, TUInt, TString, TPoint, TSize, TColor, TList, TTrigData);
@@ -238,7 +238,7 @@ type
 
 
   // record, either with actual values, or with type definitions
-  TDynRecord = class(TPoolObject)
+  TDynRecord = class{$IFDEF USE_MEMPOOL}(TPoolObject){$ENDIF}
   private
     mOwner: TDynMapDef;
     mId: AnsiString;
@@ -375,7 +375,7 @@ type
 
 
   // bitset/enum definition
-  TDynEBS = class(TPoolObject)
+  TDynEBS = class{$IFDEF USE_MEMPOOL}(TPoolObject){$ENDIF}
   private
     mOwner: TDynMapDef;
     mIsEnum: Boolean;
@@ -420,7 +420,7 @@ type
 
 
   // parsed "mapdef.txt"
-  TDynMapDef = class(TPoolObject)
+  TDynMapDef = class{$IFDEF USE_MEMPOOL}(TPoolObject){$ENDIF}
   public
     recTypes: TDynRecList; // [0] is always header
     trigTypes: TDynRecList; // trigdata
@@ -1179,7 +1179,7 @@ begin
   ahelp := '';
 
   // field name
-  fldname := pr.expectStrOrId();
+  fldname := pr.expectIdOrStr();
 
   while (not pr.isDelim(';')) do
   begin
@@ -2611,7 +2611,7 @@ begin
   end
   else
   begin
-    mTypeName := pr.expectStrOrId();
+    mTypeName := pr.expectIdOrStr();
     while (not pr.isDelim('{')) do
     begin
       if pr.eatId('header') then begin mHeader := true; continue; end;