DEADSOFTWARE

can load map scripts from wads now
[d2df-sdl.git] / src / shared / MAPDEF.pas
index 697d25339a9477b41b41cd7963b2830e2d4b6d1f..3f843872a2f3cdd8825b9268e254232d35a251a5 100644 (file)
@@ -1,3 +1,19 @@
+(* 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/>.
+ *)
+{$MODE DELPHI}
 unit MAPDEF;
 
 {
@@ -144,7 +160,8 @@ const
   TRIGGER_HEALTH          = 26;
   TRIGGER_SHOT            = 27;
   TRIGGER_EFFECT          = 28;
-  TRIGGER_MAX             = 28;
+  TRIGGER_SCRIPT          = 29;
+  TRIGGER_MAX             = 29;
 
   TRIGGER_SHOT_PISTOL  = 0;
   TRIGGER_SHOT_BULLET  = 1;
@@ -208,7 +225,7 @@ const
   TEXTURE_SPECIAL_ACID2 = DWORD(-3);
   TEXTURE_NONE = DWORD(-4);
 
-Type
+type
   TPoint = packed record
     X, Y: LongInt;
   end;
@@ -288,13 +305,13 @@ Type
                              HealInterval: Word;
                              HealMax: Boolean;
                              HealSilent: Boolean);
-      TRIGGER_SHOT:         (ShotType: Byte;
+      TRIGGER_SHOT:         (ShotPos: TPoint;
+                             ShotType: Byte;
+                             ShotTarget: Byte;
                              ShotSound: Boolean;
+                             ShotAllMap: Boolean;
                              ShotPanelID: Integer;
-                             ShotTarget: Byte;
                              ShotIntSight: Word;
-                             ShotAllMap: Boolean;
-                             ShotPos: TPoint;
                              ShotAngle: Word;
                              ShotWait: Word;
                              ShotAccuracy: Word;
@@ -314,8 +331,16 @@ Type
                              FXSpreadR: Byte;
                              FXSpreadU: Byte;
                              FXSpreadD: Byte);
+      TRIGGER_SCRIPT:       (SCRProc: Char64;
+                             SCRArg: Integer);
   end;
 
+{$INCLUDE mapstructsizes.inc}
+
 implementation
 
+uses SysUtils;
+
+{$INCLUDE mapstructio.inc}
+
 end.