DEADSOFTWARE

can load map scripts from wads now
[d2df-sdl.git] / src / shared / mapstructio.inc
index 3e9763be912be89a1be453e99a71a024973bcf91..ae432b9614f0a857f524af2fa522be8b06d8d2fa 100644 (file)
@@ -229,6 +229,12 @@ procedure mb_Read_TriggerData (var tr: TTriggerData; ttype: Integer; const buf;
     getBytesAt(tr.FXSpreadD, buf, 15, 1);
   end;
 
+  procedure xreadScript ();
+  begin
+    getBytesAt(tr.SCRProc, buf, 0, 64);
+    getIntAt(tr.SCRArg, buf, 64);
+  end;
+
 begin
   if (bufsize < 104) then raise Exception.Create('invalid buffer size in mb_Read_TriggerData');
   if (ttype = TRIGGER_EXIT) then begin xreadExit(); exit; end;
@@ -259,6 +265,7 @@ begin
   if (ttype = TRIGGER_HEALTH) then begin xreadHealth(); exit; end;
   if (ttype = TRIGGER_SHOT) then begin xreadShot(); exit; end;
   if (ttype = TRIGGER_EFFECT) then begin xreadEffect(); exit; end;
+  if (ttype = TRIGGER_SCRIPT) then begin xreadScript(); exit; end;
   raise Exception.Create('invalid trigger type in mb_Read_TriggerData');
 end;