--- oup/current/Global/DatStructureLoader.pas 2007/02/22 00:37:39 112 +++ oup/current/Global/DatStructureLoader.pas 2007/02/25 17:20:22 113 @@ -68,6 +68,8 @@ begin Result := 4; 100..300: Result := datatype - 100; + 500..614: + Result := 4; 1000..9999: Result := datatype - 1000; 10000..65535: @@ -128,7 +130,6 @@ end; function LoadStructureDefinition(ConnectionID, FileID: Integer): TStructDef; var - i: Integer; current_type: Byte; //0: Global, 1: Undynamic, 2: Dynamic current_base, current_package, current_package_size: Integer; packages: Integer; @@ -177,7 +178,7 @@ begin 3: begin current_type := 1; - current_base := HexToLong(fields[2]); + current_base := StrToInt(fields[2]); SetLength(Result.Subs, Length(Result.Subs) + 1); Result.Subs[High(Result.Subs)].SubName := MidStr(fields[0], 2, Length(fields[0]) - 1); @@ -186,24 +187,24 @@ begin 6: begin current_type := 2; - current_base := HexToLong(fields[2]); + current_base := StrToInt(fields[2]); current_package := 0; current_package_size := StrToInt(fields[5]); if fields[4][1] <> '$' then begin case StrToInt(fields[4]) of 1: - packages := Data[HexToLong(fields[3])]; + packages := Data[StrToInt(fields[3])]; 2: - packages := Data[HexToLong(fields[3])] + Data[HexToLong(fields[3]) + 1] * 256; + packages := Data[StrToInt(fields[3])] + Data[StrToInt(fields[3]) + 1] * 256; 4: - packages := Data[HexToLong(fields[3])] + Data[HexToLong(fields[3]) + 1] * - 256 + Data[HexToLong(fields[3]) + 2] * 256 * 256 + Data[HexToLong(fields[3]) + 3] * 256 * 256 * 256; + packages := Data[StrToInt(fields[3])] + Data[StrToInt(fields[3]) + 1] * + 256 + Data[StrToInt(fields[3]) + 2] * 256 * 256 + Data[StrToInt(fields[3]) + 3] * 256 * 256 * 256; end; end else begin - packages := HexToLong(fields[4]); + packages := StrToInt(fields[4]); end; SetLength(Result.Subs, Length(Result.Subs) + packages); for current_package := 0 to packages - 1 do @@ -237,7 +238,7 @@ begin structentry.description := ''; if current_type in [0, 1] then begin - structentry.offset := HexToLong(fields[1]) + current_base; + structentry.offset := StrToInt(fields[1]) + current_base; if Length(Result.Subs) = 0 then begin SetLength(Result.Global, Length(Result.Global) + 1); @@ -256,7 +257,7 @@ begin for current_package := 0 to packages - 1 do begin structentry.offset := - current_base + current_package * current_package_size + HexToLong(fields[1]); + current_base + current_package * current_package_size + StrToInt(fields[1]); with Result.Subs[High(Result.Subs) - packages + current_package + 1] do begin SetLength(Entries, Length(Entries) + 1);