Changeset 233 for oup/current/FileClasses
- Timestamp:
- Jun 29, 2007, 2:38:24 PM (17 years ago)
- Location:
- oup/current/FileClasses
- Files:
-
- 1 added
- 118 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/FileClasses/ABNA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/AGDB.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/AGQC.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/AGQG.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/AGQM.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/AGQR.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/AISA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/AITR.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/AIWA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/AKAA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/AKBA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/AKBP.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/AKDA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/AKEV.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/AKOT.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/AKVA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/BINA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/CBPI.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/CBPM.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/CONS.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/CRSA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/DOOR.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/DPge.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/EDIA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ENVP.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/FILM.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/FXLR.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/GMAN.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/HPge.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/IDXA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/IGHH.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/IGPA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/IGPG.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/IGSA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/IGSt.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/IPge.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/Impt.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/KeyI.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/M3GA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/M3GM.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/M3TA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/Mtrl.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/NMSA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/OBAN.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/OBDC.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/OBLS.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/OBOA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/OFGA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ONCC.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ONCP.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ONCV.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ONFA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ONGS.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ONIA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ONLD.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ONLV.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ONMA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ONOA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ONSA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ONSK.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ONTA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ONVL.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/ONWC.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/OPge.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/OSBD.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/OTIT.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/OTLF.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/PLEA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/PNTA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/PSUI.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/PSpL.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/PSpc.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/QTNA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/QUDA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/SNDD.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/SUBT.pas
r215 r233 16 16 17 17 uses 18 ConnectionManager, Math, Classes, TypeDefs, _DataTypes, Forms, StdCtrls ;18 ConnectionManager, Math, Classes, TypeDefs, _DataTypes, Forms, StdCtrls, Grids; 19 19 20 20 procedure TFile_SUBT.InitDataFields; … … 42 42 end; 43 43 end; 44 FFileStream.Free; 45 FFileStream := nil; 44 46 end; 45 47 … … 47 49 procedure TFile_SUBT.InitEditor; 48 50 var 49 lab: TLabel;51 grid: TStringGrid; 50 52 begin 51 53 FEditor := TFrame.Create(nil); 52 lab := TLabel.Create(FEditor); 53 lab.Left := 0; 54 lab.Top := 0; 55 lab.Caption := 'Hello World'; 56 FEditor.InsertControl(lab); 54 grid := TStringGrid.Create(FEditor); 55 grid.Parent := FEditor; 57 56 end; 58 57 59 58 end. 60 -
oup/current/FileClasses/StNA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TMFA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TMRA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TRAC.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TRAM.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TRAS.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TRBS.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TRCM.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TRFT.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TRGA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TRGE.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TRIA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TRIG.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TRMA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TRSC.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TRTA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TSFF.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TSFL.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TSFT.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TSGA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TStr.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TURR.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TXAN.pas
r215 r233 20 20 var 21 21 tempi: Integer; 22 arrargs: TArrayArgs; 22 23 begin 23 24 inherited; … … 44 45 AddField(TUnused, $1A, 'Unused', '', @tempi); 45 46 46 tempi := 2; 47 with AddField(TArray, $1C, 'AnimTextures array', '', @tempi) do 47 arrargs.CounterSize := 2; 48 arrargs.BlockLength := 4; 49 with AddField(TArray, $1C, 'AnimTextures array', '', @arrargs) do 48 50 begin 49 51 AddField(TLinkByID, $00, 'Texture', '', nil); 50 52 end; 51 53 end; 54 FFileStream.Free; 55 FFileStream := nil; 52 56 end; 53 57 54 58 55 59 end. 56 -
oup/current/FileClasses/TXCA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TXMA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TXMB.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TXMP.pas
r232 r233 16 16 17 17 uses 18 ConnectionManager, Math, Classes, TypeDefs, _DataTypes, ExtCtrls, StdCtrls, 18 ConnectionManager, Math, Classes, TypeDefs, _DataTypes, ExtCtrls, StdCtrls, 19 19 Controls, Forms; 20 20 … … 105 105 end; 106 106 templist.Free; 107 FFileStream.Free; 108 FFileStream := nil; 107 109 end; 108 110 … … 137 139 138 140 end. 139 -
oup/current/FileClasses/TXPC.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/TxtC.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/UUEA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/UVDL.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/VCRA.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/WMCL.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/WMDD.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/WMMB.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/WMM_.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/WPge.pas
r215 r233 28 28 AddField(TLevelID, $04, 'LevelID', '', nil); 29 29 end; 30 FFileStream.Free; 31 FFileStream := nil; 30 32 end; 31 33 32 34 33 35 end. 34 -
oup/current/FileClasses/_DataTypes.pas
r213 r233 4 4 5 5 uses 6 Classes ;6 Classes, _TreeElement; 7 7 8 8 type 9 TDataField = class 9 TDataField = class(TTreeElement) 10 function GetChildCount: Integer; override; 11 function GetChild(ID: Integer): TTreeElement; override; 12 function GetCaption: String; override; 10 13 protected 11 14 FOffset: Integer; … … 36 39 private 37 40 FDataFields: array of TDataField; 41 FBlockLength: Integer; 42 function GetChildCount: Integer; override; 43 function GetChild(ID: Integer): TTreeElement; override; 38 44 function GetFieldByOffset(Offset: Integer): TDataField; 39 function GetFieldByIndex(ID: Integer): TDataField; 40 function GetFieldCount: Integer; 41 public 42 // ExtraArgs: keine 45 public 46 // ExtraArgs: Pointer auf Integer: BlockLength 43 47 constructor Create(ParentFile: TObject; ParentField: TDataField; 44 48 Offset: Integer; Name, Description: String; ExtraArgs: Pointer); override; 45 49 procedure Update(Offset, Length: Integer); override; 46 50 property FieldByOffset[Offset: Integer]: TDataField read GetFieldByOffset; 47 property FieldByIndex[ID: Integer]: TDataField read GetFieldByIndex;48 property FieldCount: Integer read GetFieldCount;49 51 50 52 function AddField(fieldtype: TFieldType; Offset: Integer; … … 103 105 104 106 TLinkByID = class(TDataField) 107 function GetChildCount: Integer; override; 108 function GetChild(ID: Integer): TTreeElement; override; 105 109 private 106 110 FFileID: Integer; … … 127 131 128 132 133 TArrayArgs = packed record 134 CounterSize: Integer; 135 BlockLength: Integer; 136 BlockCount: Integer; 137 end; 129 138 TArray = class(TDataField) 130 139 private 131 FDataFields: array of TDataField; 140 FDataFields: array of TBlock; 141 function GetChildCount: Integer; override; 142 function GetChild(ID: Integer): TTreeElement; override; 132 143 function GetFieldByOffset(Offset: Integer): TDataField; 133 function GetFieldByIndex(ID: Integer): TDataField; 134 function GetFieldCount: Integer; 135 public 136 // ExtraArgs: Pointer auf 2 Integer: Length+Count (packed record...) 137 constructor Create(ParentFile: TObject; ParentField: TDataField; 138 Offset: Integer; Name, Description: String; ExtraArgs: Pointer); override; 139 procedure Update(Offset, Length: Integer); override; 140 property FieldByOffset[Offset: Integer]: TDataField read GetFieldByOffset; 141 property FieldByIndex[ID: Integer]: TDataField read GetFieldByIndex; 142 property FieldCount: Integer read GetFieldCount; 144 public 145 // ExtraArgs: Pointer auf 3 Integer: CounterSize+Length+Count (packed record...) 146 constructor Create(ParentFile: TObject; ParentField: TDataField; 147 Offset: Integer; Name, Description: String; ExtraArgs: Pointer); override; 148 procedure Update(Offset, Length: Integer); override; 143 149 144 150 function AddField(fieldtype: TFieldType; Offset: Integer; … … 190 196 FParentFile := ParentFile; 191 197 FParentField := ParentField; 198 FConnectionID := TFile(ParentFile).ConnectionID; 199 end; 200 201 function TDataField.GetCaption: String; 202 begin 203 Result := FName; 204 end; 205 206 function TDataField.GetChild(ID: Integer): TTreeElement; 207 begin 208 Result := nil; 209 end; 210 211 function TDataField.GetChildCount: Integer; 212 begin 213 Result := 0; 192 214 end; 193 215 … … 265 287 constructor TArray.Create(ParentFile: TObject; ParentField: TDataField; 266 288 Offset: Integer; Name, Description: String; ExtraArgs: Pointer); 267 begin268 inherited Create(ParentFile, ParentField, Offset, Name, Description, ExtraArgs);269 end;270 271 function TArray.GetFieldByIndex(ID: Integer): TDataField;272 begin273 if ID < Length(FDataFields) then274 Result := FDataFields[ID]275 else276 Result := nil;277 end;278 279 function TArray.GetFieldByOffset(Offset: Integer): TDataField;280 289 var 281 290 i: Integer; 282 begin 283 Result := nil; 284 291 args: TArrayArgs; 292 fstream: TMemoryStream; 293 begin 294 inherited Create(ParentFile, ParentField, Offset, Name, Description, ExtraArgs); 295 args := TArrayArgs(ExtraArgs^); 296 if args.CounterSize > 0 then 297 begin 298 fstream := TFile(ParentFile).FileStream; 299 fstream.Seek(Offset, soFromBeginning); 300 args.BlockCount := 0; 301 fstream.Read(args.BlockCount, args.CounterSize); 302 end; 303 SetLength(FDataFields, args.BlockCount); 285 304 if Length(FDataFields) > 0 then 286 305 begin 287 306 for i := 0 to High(FDataFields) do 288 if FDataFields[i].Offset = Offset then289 break;290 if i < Length(FDataFields) then291 Result := FDataFields[i];292 end; 293 end; 294 295 function TArray.Get FieldCount: Integer;307 begin 308 FDataFields[i] := TBlock.Create(ParentFile, Self, 309 Offset + args.CounterSize + i * args.BlockLength, Name+'['+IntToStr(i)+']', '', @args.BlockLength); 310 end; 311 end; 312 end; 313 314 function TArray.GetChildCount: Integer; 296 315 begin 297 316 Result := Length(FDataFields); 317 end; 318 319 function TArray.GetChild(ID: Integer): TTreeElement; 320 begin 321 Result := FDataFields[ID]; 322 end; 323 324 function TArray.GetFieldByOffset(Offset: Integer): TDataField; 325 begin 326 Exit; 298 327 end; 299 328 … … 333 362 begin 334 363 inherited Create(ParentFile, ParentField, Offset, Name, Description, ExtraArgs); 335 end; 336 337 function TBlock.GetFieldByIndex(ID: Integer): TDataField; 364 if ExtraArgs <> nil then 365 FBlockLength := Integer(ExtraArgs^) 366 else 367 FBlockLength := -1; 368 end; 369 370 function TBlock.GetChild(ID: Integer): TTreeElement; 338 371 begin 339 372 Result := FDataFields[ID]; 340 373 end; 341 374 375 function TBlock.GetChildCount: Integer; 376 begin 377 Result := Length(FDataFields); 378 end; 379 342 380 function TBlock.GetFieldByOffset(Offset: Integer): TDataField; 343 381 begin 344 382 Exit; 345 end;346 347 function TBlock.GetFieldCount: Integer;348 begin349 Result := Length(FDataFields);350 383 end; 351 384 … … 433 466 end; 434 467 468 function TLinkByID.GetChild(ID: Integer): TTreeElement; 469 begin 470 if FFileID > 0 then 471 Result := ConManager.Connection[FConnectionID].MetaData.FileById[FFileID].Child[ID] 472 else 473 Result := nil; 474 end; 475 476 function TLinkByID.GetChildCount: Integer; 477 begin 478 if FFileID > 0 then 479 Result := ConManager.Connection[FConnectionID].MetaData.FileById[FFileID].ChildCount 480 else 481 Result := 0; 482 end; 483 435 484 function TLinkByID.GetValueAsString: String; 436 485 begin -
oup/current/FileClasses/_Extensions.pas
r231 r233 4 4 5 5 uses 6 _FileTypes ;6 _FileTypes, _TreeElement; 7 7 8 8 type 9 TExtension = class 9 TExtension = class(TTreeElement) 10 function GetChildCount: Integer; override; 11 function GetChild(ID: Integer): TTreeElement; override; 12 function GetCaption: String; override; 10 13 private 11 FConnectionID: Integer;12 14 FExt: String; 13 15 FFiles: array of Integer; 14 function GetFile(ID: Integer): Integer;15 function GetFileCount: Integer;16 16 public 17 17 constructor Create(ConnectionID: Integer; Ext: String); virtual; 18 18 procedure InitList; 19 property Ext: String read FExt;20 property Files[ID: Integer]: Integer read GetFile;21 property FileCount: Integer read GetFileCount;22 19 end; 23 20 24 TExtensions = array of TExtension; 25 21 TExtensions = class(TTreeElement) 22 function GetChildCount: Integer; override; 23 function GetChild(ID: Integer): TTreeElement; override; 24 function GetCaption: String; override; 25 private 26 FExtensions: array of TExtension; 27 public 28 constructor Create(DataAccess: TObject; ConnectionID: Integer); 29 function GetExt(Ext: String): TExtension; 30 procedure AddExt(Ext: String); 31 end; 32 26 33 27 34 … … 29 36 30 37 uses 31 Classes, StrUtils, SysUtils, ConnectionManager, TypeDefs ;38 Classes, StrUtils, SysUtils, ConnectionManager, TypeDefs, DataAccess, _MetaManager; 32 39 33 40 { TExtension } … … 39 46 end; 40 47 41 function TExtension.Get File(ID: Integer): Integer;48 function TExtension.GetCaption: String; 42 49 begin 43 Result := F Files[ID];50 Result := FExt; 44 51 end; 45 52 46 function TExtension.GetFileCount: Integer; 53 function TExtension.GetChild(ID: Integer): TTreeElement; 54 var 55 Meta: TMetaManager; 56 begin 57 Meta := ConManager.Connection[FConnectionID].MetaData; 58 Meta.InitFile(FFiles[ID]); 59 Result := Meta.FileById[FFiles[ID]]; 60 end; 61 62 function TExtension.GetChildCount: Integer; 47 63 begin 48 64 Result := Length(FFiles); … … 57 73 begin 58 74 files := TStringList.Create; 59 files := ConManager.Connection[FConnectionID].GetFilesList( Ext, '', False, ST_NameAsc);75 files := ConManager.Connection[FConnectionID].GetFilesList(FExt, '', False, ST_NameAsc); 60 76 if files.Count > 0 then 61 77 begin … … 74 90 end; 75 91 92 93 { TExtensions } 94 95 function TExtensions.GetCaption: String; 96 begin 97 Result := ''; 98 end; 99 100 function TExtensions.GetChild(ID: Integer): TTreeElement; 101 begin 102 Result := FExtensions[ID]; 103 end; 104 105 function TExtensions.GetChildCount: Integer; 106 begin 107 Result := Length(FExtensions); 108 end; 109 110 constructor TExtensions.Create(DataAccess: TObject; ConnectionID: Integer); 111 var 112 files: TStrings; 113 i: Integer; 114 fid: Integer; 115 finfo: TFileInfo; 116 begin 117 FConnectionID := ConnectionID; 118 files := TStringList.Create; 119 files := TDataAccess(DataAccess).GetFilesList('', '', False, ST_IDAsc); 120 SetLength(FExtensions, 0); 121 if files.Count > 0 then 122 begin 123 for i := 0 to files.Count - 1 do 124 begin 125 fid := StrToInt(MidStr(files.Strings[i], 1, 5)); 126 finfo := TDataAccess(DataAccess).GetFileInfo(fid); 127 if Length(finfo.Name) > 0 then 128 if not Assigned(GetExt(finfo.Extension)) then 129 AddExt(finfo.Extension); 130 end; 131 end; 132 files.Free; 133 end; 134 135 136 function TExtensions.GetExt(Ext: String): TExtension; 137 var 138 i: Integer; 139 begin 140 Result := nil; 141 if Length(FExtensions) > 0 then 142 for i := 0 to High(FExtensions) do 143 if FExtensions[i].GetCaption = Ext then 144 begin 145 Result := FExtensions[i]; 146 Break; 147 end; 148 end; 149 150 procedure TExtensions.AddExt(Ext: String); 151 var 152 i: Integer; 153 begin 154 SetLength(FExtensions, Length(FExtensions) + 1); 155 for i := High(FExtensions) downto 1 do 156 begin 157 if FExtensions[i-1].GetCaption < Ext then 158 begin 159 FExtensions[i] := TExtension.Create(FConnectionID, Ext); 160 Break; 161 end 162 else 163 FExtensions[i] := FExtensions[i-1]; 164 end; 165 if i = 0 then 166 FExtensions[0] := TExtension.Create(FConnectionID, Ext); 167 end; 168 169 170 76 171 end. -
oup/current/FileClasses/_FileTypes.pas
r232 r233 4 4 5 5 uses 6 TypeDefs, _DataTypes, Classes, Forms;6 TypeDefs, _DataTypes, _TreeElement, Classes, Forms; 7 7 8 8 9 9 type 10 TFile = class 10 TFile = class(TTreeElement) 11 function GetChildCount: Integer; override; 12 function GetChild(ID: Integer): TTreeElement; override; 13 function GetCaption: String; override; 14 private 15 FConnectionID: Integer; 11 16 protected 12 FConnectionID: Integer;13 17 FFileInfo: TFileInfo; 14 18 FFileStream: TMemoryStream; … … 17 21 FChanged: Boolean; 18 22 19 FDatLinks: TDatLinkList;20 23 FDataFields: TBlock; 21 FRawParts: TRawDataList;22 24 23 25 FEditor: TFrame; 24 26 FOpened: Boolean; 25 27 26 procedure InitDatLinks;27 procedure InitRawList;28 29 function GetDatLinkByOffset(Offset: Integer): TDatLink;30 function GetDatLinkByIndex(ID: Integer): TDatLink;31 28 function GetFieldByOffset(Offset: Integer): TDataField; 32 function GetFieldByIndex(ID: Integer): TDataField; 33 function GetRawPartByOffset(Offset: Integer): TRawDataInfo; 34 function GetRawPartByIndex(ID: Integer): TRawDataInfo; 35 function GetChildCount: Integer; 36 function GetRawCount: Integer; 29 published 37 30 public 38 31 constructor Create(ConnectionID, FileID: Integer); virtual; … … 52 45 property Opened: Boolean read FOpened write FOpened; 53 46 54 property ChildCount: Integer read GetChildCount;55 property LinkByOffset[Offset: Integer]: TDatLink read GetDatLinkByOffset;56 property LinkByIndex[ID: Integer]: TDatLink read GetDatLinkByIndex;57 58 47 property FieldByOffset[Offset: Integer]: TDataField read GetFieldByOffset; 59 property FieldByIndex[ID: Integer]: TDataField read GetFieldByIndex;60 61 property RawCount: Integer read GetRawCount;62 property RawPartByOffset[Offset: Integer]: TRawDataInfo read GetRawPartByOffset;63 property RawPartByIndex[ID: Integer]: TRawDataInfo read GetRawPartByIndex;64 48 end; 65 49 … … 68 52 69 53 70 function GetDatLinkValue(stream: TStream; offset: Integer): Integer;71 72 73 54 74 55 implementation 75 56 76 57 uses 77 DatLinks, RawList, ConnectionManager, Dialogs, _ EmptyFile;58 DatLinks, RawList, ConnectionManager, Dialogs, _MetaTypes, _MetaManager; 78 59 79 60 { TFileType } … … 89 70 if not (Self is TFile_Empty) then 90 71 begin 91 InitDatLinks();92 InitRawList();93 72 FDataFields := nil; 73 InitDataFields; 94 74 FEditor := nil; 95 75 end 96 76 else 97 77 begin 98 SetLength(FDatLinks, 0);99 SetLength(FRawParts, 0);100 78 FEditor := nil; 101 79 end; … … 108 86 end; 109 87 110 function TFile.GetDatLinkByIndex(ID: Integer): TDatLink;111 var112 i: Integer;113 valids: Integer;114 begin115 if ID < GetChildCount then116 begin117 valids := 0;118 i := 0;119 repeat120 if FDatLinks[i].DestID >= 0 then121 begin122 Inc(valids);123 end;124 Inc(i);125 until valids > ID;126 Result := FDatLinks[i - 1];127 end128 else129 with Result do130 begin131 SrcOffset := -1;132 DestID := -1;133 PosDestExts := '';134 end;135 end;136 137 function TFile.GetDatLinkByOffset(Offset: Integer): TDatLink;138 var139 i: Integer;140 begin141 Result.SrcOffset := -1;142 Result.DestID := -1;143 Result.PosDestExts := '';144 145 if Length(FDatLinks) > 0 then146 begin147 for i := 0 to High(FDatLinks) do148 if FDatLinks[i].SrcOffset = Offset then149 break;150 if i < Length(FDatLinks) then151 Result := FDatLinks[i];152 end;153 end;154 155 156 function TFile.GetFieldByIndex(ID: Integer): TDataField;157 begin158 Result := FDataFields.FieldByIndex[ID];159 end;160 88 161 89 function TFile.GetFieldByOffset(Offset: Integer): TDataField; … … 165 93 166 94 167 function TFile.GetChildCount: Integer; 168 var 169 i: Integer; 95 function TFile.GetCaption: String; 170 96 begin 171 Result := Length(FDatLinks); 172 if Result > 0 then 173 begin 174 Result := 0; 175 for i := 0 to High(FDatLinks) do 176 if FDatLinks[i].DestID >= 0 then 177 Inc(Result); 178 end; 97 Result := FFileInfo.Name; 98 if Result = '' then 99 Result := 'Unnamed'; 179 100 end; 180 101 181 function TFile.GetRawCount: Integer; 182 var 183 i: Integer; 102 function TFile.GetChild(ID: Integer): TTreeElement; 184 103 begin 185 Result := Length(FRawParts); 186 if Result > 0 then 187 begin 188 Result := 0; 189 for i := 0 to High(FRawParts) do 190 if FRawParts[i].RawSize > 0 then 191 Inc(Result); 192 end; 104 Result := FDataFields.Child[ID]; 193 105 end; 194 106 195 function TFile.GetRawPartByIndex(ID: Integer): TRawDataInfo; 196 var 197 i: Integer; 198 valids: Integer; 107 function TFile.GetChildCount: Integer; 199 108 begin 200 if ID < GetRawCount then 201 begin 202 valids := 0; 203 i := 0; 204 repeat 205 if FRawParts[i].RawSize > 0 then 206 begin 207 Inc(valids); 208 end; 209 Inc(i); 210 until valids > ID; 211 Result := FRawParts[i - 1]; 212 end 213 else 214 with Result do 215 begin 216 SrcID := -1; 217 SrcOffset := -1; 218 RawAddr := -1; 219 RawSize := -1; 220 end; 109 if FDataFields <> nil then 110 Result := FDataFields.ChildCount; 221 111 end; 222 223 function TFile.GetRawPartByOffset(Offset: Integer): TRawDataInfo;224 var225 i: Integer;226 begin227 with Result do228 begin229 SrcID := -1;230 SrcOffset := -1;231 RawAddr := -1;232 RawSize := -1;233 end;234 235 if Length(FRawParts) > 0 then236 begin237 for i := 0 to High(FRawParts) do238 if FRawParts[i].SrcOffset = Offset then239 break;240 if i < Length(FRawParts) then241 Result := FRawParts[i];242 end;243 end;244 245 112 246 113 … … 249 116 if Assigned(FDataFields) then 250 117 Exit; 118 FFileStream := TMemoryStream.Create; 119 ConManager.Connection[FConnectionID].LoadDatFile(FFileInfo.ID, TStream(FFileStream)); 251 120 end; 252 121 253 procedure TFile.InitDatLinks;254 begin255 FDatLinks := ConManager.Connection[FConnectionID].GetDatLinks(FFileInfo.ID);256 end;257 122 258 123 procedure TFile.InitEditor; … … 261 126 end; 262 127 263 procedure TFile.InitRawList;264 begin265 FRawParts := ConManager.Connection[FConnectionID].GetRawList(FFileInfo.ID);266 end;267 268 function GetDatLinkValue(stream: TStream; offset: Integer): Integer;269 begin270 stream.Seek(Offset, soFromBeginning);271 stream.Read(Result, 4);272 if Result > 0 then273 Result := Result div 256274 else275 Result := -1;276 end;277 128 278 129 end. -
oup/current/FileClasses/_MetaManager.pas
r229 r233 13 13 function GetFileCount: Integer; 14 14 function GetFileById(Id: Integer): TFile; 15 function GetExt(Ext: String): TExtension;16 procedure AddExt(Ext: String);17 15 private 18 procedure InitExts;19 16 public 20 17 constructor Create(ConnectionID: Integer; DataAccess: TObject); 21 procedure InitExtFiles(Ext: String);22 18 procedure InitFile(id: Integer); 23 19 procedure InitFileFields(id: Integer); 24 20 25 21 property Root: TExtensions read FRoot; 26 property RootExt[Ext: String]: TExtension read GetExt;27 22 property FileCount: Integer read GetFileCount; 28 23 property FileById[Id: Integer]: TFile read GetFileById; … … 33 28 uses 34 29 Classes, ConnectionManager, Access_OniArchive, TypeDefs, 35 Dialogs, SysUtils, StrUtils, DataAccess ;30 Dialogs, SysUtils, StrUtils, DataAccess, _Extensions; 36 31 37 32 { TFileManager } … … 42 37 FDataAccess := DataAccess; 43 38 SetLength(FFiles, TDataAccess(DataAccess).GetFileCount); 44 InitExts;39 FRoot := TExtensions.Create(DataAccess, ConnectionID); 45 40 end; 46 41 47 function TMetaManager.GetExt(Ext: String): TExtension;48 var49 i: Integer;50 begin51 Result := nil;52 if Length(FRoot) > 0 then53 for i := 0 to High(FRoot) do54 if FRoot[i].Ext = Ext then55 begin56 Result := FRoot[i];57 Break;58 end;59 end;60 61 procedure TMetaManager.AddExt(Ext: String);62 var63 i: Integer;64 begin65 SetLength(FRoot, Length(FRoot) + 1);66 for i := High(FRoot) downto 1 do67 begin68 if FRoot[i-1].Ext < Ext then69 begin70 FRoot[i] := TExtension.Create(FConnectionID, Ext);71 Break;72 end73 else74 FRoot[i] := FRoot[i-1];75 end;76 if i = 0 then77 FRoot[0] := TExtension.Create(FConnectionID, Ext);78 end;79 42 80 43 function TMetaManager.GetFileById(Id: Integer): TFile; 81 44 begin 45 InitFile(Id); 82 46 Result := FFiles[Id]; 83 47 end; … … 130 94 end; 131 95 132 procedure TMetaManager.InitExtFiles(Ext: String);133 var134 files: TStrings;135 i: Integer;136 typei: Integer;137 fid: Integer;138 finfo: TFileInfo;139 begin140 if ConManager.Connection[FConnectionID] is TAccess_OniArchive then141 TAccess_OniArchive(ConManager.Connection[FConnectionID]).UnloadWhenUnused := False;142 files := TStringList.Create;143 files := ConManager.Connection[FConnectionID].GetFilesList('', '', False, ST_IDAsc);144 SetLength(FFiles, ConManager.Connection[FConnectionID].GetFileCount);145 for i := 0 to High(FFiles) do146 FFiles[i] := nil;147 if files.Count > 0 then148 begin149 for i := 0 to files.Count - 1 do150 begin151 fid := StrToInt(MidStr(files.Strings[i], 1, 5));152 finfo := ConManager.Connection[FConnectionID].GetFileInfo(fid);153 if Length(finfo.Name) > 0 then154 begin155 if finfo.Size > 0 then156 begin157 for typei := 0 to High(FileDescs) do158 begin159 if FileDescs[typei].ext = finfo.Extension then160 begin161 FFiles[fid] := TFileClass(FileDescs[typei].ftype).Create(FConnectionID, fid);162 Break;163 end;164 end;165 end166 else167 FFiles[fid] := TFile_Empty.Create(FConnectionID, fid);168 end;169 end;170 end;171 files.Free;172 if ConManager.Connection[FConnectionID] is TAccess_OniArchive then173 TAccess_OniArchive(ConManager.Connection[FConnectionID]).UnloadWhenUnused := True;174 end;175 176 procedure TMetaManager.InitExts;177 var178 files: TStrings;179 i: Integer;180 fid: Integer;181 finfo: TFileInfo;182 begin183 files := TStringList.Create;184 files := TDataAccess(FDataAccess).GetFilesList('', '', False, ST_IDAsc);185 SetLength(FRoot, 0);186 if files.Count > 0 then187 begin188 for i := 0 to files.Count - 1 do189 begin190 fid := StrToInt(MidStr(files.Strings[i], 1, 5));191 finfo := TDataAccess(FDataAccess).GetFileInfo(fid);192 if Length(finfo.Name) > 0 then193 if not Assigned(GetExt(finfo.Extension)) then194 AddExt(finfo.Extension);195 end;196 end;197 files.Free;198 end;199 200 96 end. -
oup/current/FileClasses/_MetaTypes.pas
r229 r233 4 4 5 5 uses 6 _FileTypes, _EmptyFile, _ DataTypes, _Extensions,6 _FileTypes, _EmptyFile, _Unlinked, _DataTypes, _Extensions, _TreeElement, 7 7 ABNA, AGDB, AGQC, AGQG, AGQM, AGQR, AISA, AITR, AIWA, AKAA, AKBA, AKBP, AKDA, 8 8 AKEV, AKOT, AKVA, BINA, CBPI, CBPM, CONS, CRSA, DOOR, DPge, EDIA, ENVP, FILM, … … 16 16 17 17 type 18 TTreeElement = _TreeElement.TTreeElement; 18 19 TFile = _FileTypes.TFile; 19 20 TFile_Empty = _EmptyFile.TFile_Empty; 21 TFile_Unlinked = _Unlinked.TFile_Unlinked; 20 22 TExtension = _Extensions.TExtension; 21 23 TExtensions = _Extensions.TExtensions;
Note:
See TracChangeset
for help on using the changeset viewer.