--- oup/current/Global/RawList.pas 2007/04/03 15:43:53 169 +++ oup/current/Global/RawList.pas 2007/07/17 22:27:16 241 @@ -29,7 +29,7 @@ var implementation uses - Template, ConnectionManager, Access_OniArchive, Classes, SysUtils, Math; + ConnectionManager, Access_OniArchive, Classes, SysUtils, Math, _TemplateFile; function AGDB(ConnectionID, FileID: Integer): TRawDataList; @@ -43,11 +43,13 @@ begin SetLength(Result, links); for i := 0 to links - 1 do begin + Result[i].Name := ''; Result[i].SrcOffset := $20 + i * 4; ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $20 + i * 4, 4, @link); Result[i].RawAddr := link; Result[i].RawSize := 32; Result[i].LocSep := False; + Result[i].RawType := 'AGDB' + IntToStr(i mod 2); end; end; @@ -64,12 +66,14 @@ begin SetLength(Result, links); for i := 0 to links - 1 do begin + Result[i].Name := ''; Result[i].SrcOffset := $20 + i * $74 + $24; ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $20 + i * $74 + $24, 4, @link); Result[i].RawAddr := link; ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $20 + i * $74 + $28, 4, @link); Result[i].RawSize := link; Result[i].LocSep := False; + Result[i].RawType := 'AKVA'; end; end; @@ -84,10 +88,12 @@ begin ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $0C, 4, @link); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $08, 4, @datasize); SetLength(Result, 1); + Result[0].Name := 'Binary data'; Result[0].SrcOffset := $0C; Result[0].RawAddr := link; Result[0].RawSize := datasize; Result[0].LocSep := not (ConManager.Connection[ConnectionID].DataOS = DOS_WIN); + Result[0].RawType := 'BINA'; end; @@ -101,10 +107,12 @@ begin ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $08, 4, @datasize); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $0C, 4, @link); SetLength(Result, 1); + Result[0].Name := 'Sound Binary Data'; Result[0].SrcOffset := $0C; Result[0].RawAddr := link; Result[0].RawSize := datasize; - Result[0].LocSep := not (ConManager.Connection[ConnectionID].DataOS = DOS_WIN); + Result[0].LocSep := not (ConManager.Connection[ConnectionID].DataOS = DOS_WIN); + Result[0].RawType := 'OSBD'; end; @@ -116,7 +124,7 @@ var datasize: Integer; begin SetLength(Result, 1); - if ConManager.Connection[ConnectionID].DataOS = DOS_MAC then + if ConManager.Connection[ConnectionID].DataOS in [DOS_MACBETA, DOS_MAC] then begin ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $10, 4, @datasize); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $14, 4, @link); @@ -128,9 +136,11 @@ begin ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $44, 4, @link); Result[0].SrcOffset := $44; end; + Result[0].Name := 'Sound data'; Result[0].RawAddr := link; Result[0].RawSize := datasize; Result[0].LocSep := False; + Result[0].RawType := 'SNDD'; end; @@ -169,11 +179,13 @@ begin if foundzeros = 2 then begin SetLength(Result, 1); + Result[0].Name := 'Subtitles'; Result[0].SrcID := FileID; Result[0].SrcOffset := $18; Result[0].RawAddr := baselink; Result[0].RawSize := Data.Position; Result[0].LocSep := False; + Result[0].RawType := 'SUBT'; end; end; end; @@ -197,78 +209,96 @@ begin ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $16C, 2, @frames); {y-pos} ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $0C, 4, @link); + Result[0].Name := 'y-pos'; Result[0].SrcOffset := $0C; Result[0].RawAddr := link; Result[0].RawSize := frames * 4; + Result[0].RawType := 'TRAM0'; {x-z-pos} ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $10, 4, @link); + Result[1].Name := 'x-z-pos'; Result[1].SrcOffset := $10; Result[1].RawAddr := link; - if link > 0 then - Result[1].RawSize := frames * 8 - else - Result[1].RawSize := 0; + Result[1].RawSize := frames * 8; + Result[1].RawType := 'TRAM1'; {attacks} ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $182, 1, @tempb); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $14, 4, @link); + Result[2].Name := 'Attacks'; Result[2].SrcOffset := $14; Result[2].RawAddr := link; Result[2].RawSize := tempb * 32; + Result[2].RawType := 'TRAM2'; {damage} ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $183, 1, @tempb); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $18, 4, @link); + Result[3].Name := 'Damage'; Result[3].SrcOffset := $18; Result[3].RawAddr := link; Result[3].RawSize := tempb * 8; + Result[3].RawType := 'TRAM3'; {motionblur} ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $184, 1, @tempb); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $1C, 4, @link); + Result[4].Name := 'MotionBlur'; Result[4].SrcOffset := $1C; Result[4].RawAddr := link; Result[4].RawSize := tempb * 12; + Result[4].RawType := 'TRAM4'; {shortcut} ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $185, 1, @tempb); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $20, 4, @link); + Result[5].Name := 'Shortcut'; Result[5].SrcOffset := $20; Result[5].RawAddr := link; Result[5].RawSize := tempb * 8; + Result[5].RawType := 'TRAM5'; {throw} ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $24, 4, @link); + Result[6].Name := 'Throw'; Result[6].SrcOffset := $24; Result[6].RawAddr := link; - if link > 0 then - Result[6].RawSize := 24 - else - Result[6].RawSize := 0; + Result[6].RawSize := 24; + Result[6].RawType := 'TRAM6'; {footstep} ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $186, 1, @tempb); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $28, 4, @link); + Result[7].Name := 'Footstep'; Result[7].SrcOffset := $28; Result[7].RawAddr := link; Result[7].RawSize := tempb * 4; + Result[7].RawType := 'TRAM7'; {particle} ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $187, 1, @tempb); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $2C, 4, @link); + Result[8].Name := 'Particle'; Result[8].SrcOffset := $2C; Result[8].RawAddr := link; Result[8].RawSize := tempb * 24; + Result[8].RawType := 'TRAM8'; {position} ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $30, 4, @link); + Result[9].Name := 'Position'; Result[9].SrcOffset := $30; Result[9].RawAddr := link; Result[9].RawSize := frames * 8; - {particle} + Result[9].RawType := 'TRAM9'; + {sound} ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $154, 2, @tempw); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $38, 4, @link); + Result[11].Name := 'Sound'; Result[11].SrcOffset := $38; Result[11].RawAddr := link; Result[11].RawSize := tempw * 34; + Result[11].RawType := 'TRAM11'; {extent} ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $138, 4, @templ); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $13C, 4, @link); + Result[12].Name := 'Extent'; Result[12].SrcOffset := $13C; Result[12].RawAddr := link; Result[12].RawSize := templ * 12; + Result[12].RawType := 'TRAM12'; ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $34, 4, @link); if link > 0 then @@ -296,8 +326,10 @@ begin Result[10].RawSize := 0; end; end; + Result[10].Name := 'BodyParts Animation'; Result[10].SrcOffset := $34; Result[10].RawAddr := link; + Result[10].RawType := 'TRAM10'; end; @@ -356,8 +388,10 @@ begin Result[0].SrcOffset := $A0; Result[0].RawAddr := link_mac; end; + Result[0].Name := 'ImageData'; Result[0].RawSize := datasize; Result[0].LocSep := not (ConManager.Connection[ConnectionID].DataOS = DOS_WIN); + Result[0].RawType := 'TXMP'; end; @@ -370,21 +404,25 @@ var RawList: TRawDataList; begin RawList := GetRawList(ConnectionID, FileID); + Result.Name := ''; Result.SrcID := -1; Result.SrcOffset := -1; Result.RawAddr := -1; Result.RawSize := -1; + Result.RawType := ''; if Length(RawList) > 0 then begin for i := 0 to High(RawList) do begin if RawList[i].SrcOffset = DatOffset then begin + Result.Name := RawList[i].Name; Result.SrcID := FileID; Result.SrcOffset := RawList[i].SrcOffset; Result.RawAddr := RawList[i].RawAddr; Result.RawSize := RawList[i].RawSize; Result.LocSep := RawList[i].LocSep; + Result.RawType := RawList[i].RawType; Break; end; end; @@ -406,6 +444,10 @@ begin Result := FRawListHandlers[i].Handler(ConnectionID, FileID); Break; end; + if Length(Result) > 0 then + for i := 0 to High(Result) do + if Result[i].RawAddr = 0 then + Result[i].RawSize := 0; end; procedure TRawLists.InsertRawListHandler(ext: String; needed: Boolean; handler: THandler);