DEADSOFTWARE

mplat triggers can make sound now
[d2df-sdl.git] / src / tools / mapgen.dpr
index 27c718306e114e612f526d1aa0831983a32952bb..0298aaaae89a6f6e4fba085ab6fdc941fbd56bb3 100644 (file)
@@ -101,7 +101,7 @@ function TDynRecordHelper.trigTlpDir (): Byte; inline; begin result := Byte(getF
     write(foimpl, #10'// ');
     write(fohlp, #10'// ');
     needComma := false;
-    trec := dfmapdef.trigType[tidx];
+    trec := dfmapdef.trigTypeAt[tidx];
     for nidx := 0 to trec.forTrigCount-1 do
     begin
       if needComma then write(fohlp, ', ');
@@ -116,7 +116,7 @@ function TDynRecordHelper.trigTlpDir (): Byte; inline; begin result := Byte(getF
     begin
       fld := trec.fieldAt[fidx];
       if fld.internal then continue;
-      if (fld.binOfs < 0) then continue;
+      //if (fld.binOfs < 0) then continue;
       // HACK!
       if (fld.name = 'panelid') or (fld.name = 'monsterid') then
       begin
@@ -129,8 +129,8 @@ function TDynRecordHelper.trigTlpDir (): Byte; inline; begin result := Byte(getF
       knownfld := nil;
       if fldknown.get(toLowerCase1251(palias), knownfld) then
       begin
-        if (fld.name <> knownfld.name) then raise Exception.Create(formatstrf('field ''%s'' of record ''%s'' conflicts with other field ''%s''', [fld.name, trec.name, knownfld.name]));
-        if (fld.baseType <> knownfld.baseType) then raise Exception.Create(formatstrf('field ''%s'' of record ''%s'' conflicts with other field ''%s'' by type', [fld.name, trec.name, knownfld.name]));
+        if (fld.name <> knownfld.name) then raise Exception.Create(formatstrf('field ''%s'' of record ''%s'' conflicts with other field ''%s''', [fld.name, trec.typeName, knownfld.name]));
+        if (fld.baseType <> knownfld.baseType) then raise Exception.Create(formatstrf('field ''%s'' of record ''%s'' conflicts with other field ''%s'' by type', [fld.name, trec.typeName, knownfld.name]));
         writeln('skipped duplicate field ''', fld.name, '''');
         continue;
       end;
@@ -187,7 +187,7 @@ function TDynRecordHelper.trigTlpDir (): Byte; inline; begin result := Byte(getF
         TDynField.TType.TString:
           begin
             write(fohlp, 'AnsiString; inline;'#10);
-            write(foimpl, 'AnsiString; inline; begin result := utf2win(getFieldWithType(''', fld.name, ''', TDynField.TType.TChar).sval); end;'#10);
+            write(foimpl, 'AnsiString; inline; begin result := utf2win(getFieldWithType(''', fld.name, ''', TDynField.TType.TString).sval); end;'#10);
           end;
         TDynField.TType.TPoint:
           begin