Changeset 222 for oup


Ignore:
Timestamp:
Jun 18, 2007, 4:22:53 PM (18 years ago)
Author:
alloc
Message:
 
Location:
oup/current
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • oup/current/Global/RawList.pas

    r209 r222  
    4444  for i := 0 to links - 1 do
    4545  begin
     46    Result[i].Name := '<TBD>';
    4647    Result[i].SrcOffset := $20 + i * 4;
    4748    ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $20 + i * 4, 4, @link);
     
    6566  for i := 0 to links - 1 do
    6667  begin
     68    Result[i].Name := '<TBD>';
    6769    Result[i].SrcOffset := $20 + i * $74 + $24;
    6870    ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $20 + i * $74 + $24, 4, @link);
     
    8587  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $08, 4, @datasize);
    8688  SetLength(Result, 1);
     89  Result[0].Name := 'BinaryData';
    8790  Result[0].SrcOffset := $0C;
    8891  Result[0].RawAddr   := link;
     
    102105  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $0C, 4, @link);
    103106  SetLength(Result, 1);
     107  Result[0].Name := 'SoundBinaryData';
    104108  Result[0].SrcOffset := $0C;
    105109  Result[0].RawAddr   := link;
     
    129133    Result[0].SrcOffset := $44;
    130134  end;
     135  Result[0].Name := 'SoundData';
    131136  Result[0].RawAddr := link;
    132137  Result[0].RawSize := datasize;
     
    170175    begin
    171176      SetLength(Result, 1);
     177      Result[0].Name      := 'Subtitles';
    172178      Result[0].SrcID     := FileID;
    173179      Result[0].SrcOffset := $18;
     
    196202  SetLength(Result, 13);
    197203  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $16C, 2, @frames);
    198   {x-z-pos}
     204  {y-pos}
    199205  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $0C, 4, @link);
     206  Result[0].Name      := 'y-pos';
    200207  Result[0].SrcOffset := $0C;
    201208  Result[0].RawAddr   := link;
    202   Result[0].RawSize := frames * 4;
    203   {y-pos}
     209  Result[0].RawSize   := frames * 4;
     210  {x-z-pos}
    204211  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $10, 4, @link);
     212  Result[1].Name      := 'x-z-pos';
    205213  Result[1].SrcOffset := $10;
    206214  Result[1].RawAddr   := link;
    207   Result[1].RawSize := frames * 8;
     215  Result[1].RawSize   := frames * 8;
    208216  {attacks}
    209217  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $182, 1, @tempb);
    210218  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $14, 4, @link);
     219  Result[2].Name      := 'Attacks';
    211220  Result[2].SrcOffset := $14;
    212221  Result[2].RawAddr   := link;
     
    215224  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $183, 1, @tempb);
    216225  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $18, 4, @link);
     226  Result[3].Name      := 'Damage';
    217227  Result[3].SrcOffset := $18;
    218228  Result[3].RawAddr   := link;
     
    221231  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $184, 1, @tempb);
    222232  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $1C, 4, @link);
     233  Result[4].Name      := 'MotionBlur';
    223234  Result[4].SrcOffset := $1C;
    224235  Result[4].RawAddr   := link;
     
    227238  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $185, 1, @tempb);
    228239  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $20, 4, @link);
     240  Result[5].Name      := 'Shortcut';
    229241  Result[5].SrcOffset := $20;
    230242  Result[5].RawAddr   := link;
     
    232244  {throw}
    233245  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $24, 4, @link);
     246  Result[6].Name      := 'Throw';
    234247  Result[6].SrcOffset := $24;
    235248  Result[6].RawAddr   := link;
     
    238251  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $186, 1, @tempb);
    239252  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $28, 4, @link);
     253  Result[7].Name      := 'Footstep';
    240254  Result[7].SrcOffset := $28;
    241255  Result[7].RawAddr   := link;
     
    244258  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $187, 1, @tempb);
    245259  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $2C, 4, @link);
     260  Result[8].Name      := 'Particle';
    246261  Result[8].SrcOffset := $2C;
    247262  Result[8].RawAddr   := link;
     
    249264  {position}
    250265  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $30, 4, @link);
     266  Result[9].Name      := 'Position';
    251267  Result[9].SrcOffset := $30;
    252268  Result[9].RawAddr   := link;
    253269  Result[9].RawSize   := frames * 8;
    254   {particle}
     270  {sound}
    255271  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $154, 2, @tempw);
    256272  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $38, 4, @link);
     273  Result[11].Name      := 'Sound';
    257274  Result[11].SrcOffset := $38;
    258275  Result[11].RawAddr   := link;
     
    261278  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $138, 4, @templ);
    262279  ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $13C, 4, @link);
     280  Result[12].Name      := 'Extent';
    263281  Result[12].SrcOffset := $13C;
    264282  Result[12].RawAddr   := link;
     
    291309    end;
    292310  end;
     311  Result[10].Name      := 'BodyParts Animation';
    293312  Result[10].SrcOffset := $34;
    294313  Result[10].RawAddr   := link;
     
    351370    Result[0].RawAddr   := link_mac;
    352371  end;
     372  Result[0].Name    := 'ImageData';
    353373  Result[0].RawSize := datasize;
    354374  Result[0].LocSep  := not (ConManager.Connection[ConnectionID].DataOS = DOS_WIN);
     
    365385begin
    366386  RawList          := GetRawList(ConnectionID, FileID);
     387  Result.Name      := '';
    367388  Result.SrcID     := -1;
    368389  Result.SrcOffset := -1;
     
    375396      if RawList[i].SrcOffset = DatOffset then
    376397      begin
     398        Result.Name      := RawList[i].Name;
    377399        Result.SrcID     := FileID;
    378400        Result.SrcOffset := RawList[i].SrcOffset;
  • oup/current/Global/TypeDefs.pas

    r124 r222  
    7676
    7777  TRawDataInfo = record
     78      Name:          String;
    7879      SrcID:         Integer;
    7980      SrcOffset:     Integer;
  • oup/current/Helper/WhatLinksHere.dfm

    r114 r222  
    7070      TabOrder = 0
    7171      OnDblClick = list_fromDblClick
    72       ExplicitLeft = 38
    73       ExplicitTop = 65
    74       ExplicitWidth = 415
    75       ExplicitHeight = 84
    7672    end
    7773  end
     
    116112      TabOrder = 0
    117113      OnDblClick = list_fromDblClick
    118       ExplicitLeft = -230
    119       ExplicitTop = -43
    120       ExplicitWidth = 415
    121       ExplicitHeight = 84
    122114    end
    123115  end
  • oup/current/Helper/WhatLinksHere.pas

    r114 r222  
    33uses
    44  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    5   Dialogs, StdCtrls, Template, ExtCtrls;
     5  Dialogs, StdCtrls, _TemplateFile, ExtCtrls;
    66
    77type
     
    1919  private
    2020  public
    21     SenderForm: TForm_ToolTemplate;
     21    SenderForm: TForm_TemplateFile;
    2222    ConID: Integer;
    2323    FileID: Integer;
  • oup/current/Main.dfm

    r209 r222  
    4343      end>
    4444    ParentBiDiMode = False
    45     ExplicitWidth = 742
    4645  end
    4746  object DockTop: TTBDock
     
    5049    Width = 842
    5150    Height = 75
    52     ExplicitWidth = 742
    5351    object MainMenu: TTBToolbar
    5452      Left = 0
     
    359357    Height = 470
    360358    Position = dpRight
    361     ExplicitLeft = 733
    362359  end
    363360  object DockBottom: TTBDock
     
    367364    Height = 9
    368365    Position = dpBottom
    369     ExplicitWidth = 742
    370366  end
    371367  object opend: TOpenDialog
  • oup/current/Main.pas

    r209 r222  
    77  MDITab, TB2Item, TB2Dock, TB2Toolbar, TB2MDI, OneInst,
    88  Data, TypeDefs, ConnectionManager,
    9   Functions, Settings, Template,
    10   RawEdit, BinEdit, Extractor, Preview, TxmpReplace;
     9  Functions, Settings,
     10  RawEdit, BinEdit, Extractor, Preview, TxmpReplace,
     11  _BaseTemplate, _TemplateFile, _TemplateFileList;
    1112
    1213type
     
    108109    procedure menu_previewClick(Sender: TObject);
    109110    procedure menu_metaClick(Sender: TObject);
    110     function open_child(window_context: String; connection, fileid: Integer): TForm_ToolTemplate;
    111111
    112112    procedure menu_windows_cascadeClick(Sender: TObject);
     
    127127  private
    128128  public
     129    function open_child(window_context: String; Connection, FileID: Integer): TForm_BaseTemplate; overload;
     130    function open_child(window_context: String; Connection: Integer): TForm_BaseTemplate; overload;
     131    function open_child(window_context: String): TForm_BaseTemplate; overload;
    129132    procedure DefaultHandler(var Message); override;
    130133  end;
     
    168171var
    169172  i: Integer;
    170   toolform: TForm_ToolTemplate;
     173  toolform: TForm_BaseTemplate;
    171174begin
    172175  Result := True;
     
    175178    for i := 0 to MDITab.MDIChildCount - 1 do
    176179    begin
    177       if MDITab.MDIChildren[i] is TForm_ToolTemplate then
     180      if MDITab.MDIChildren[i] is TForm_BaseTemplate then
    178181      begin
    179         toolform := TForm_ToolTemplate(MDITab.MDIChildren[i]);
     182        toolform := TForm_BaseTemplate(MDITab.MDIChildren[i]);
    180183        if toolform.ConnectionID = ConManager.ConnectionByIndex[index].ConnectionID then
    181184        begin
     
    323326  tabIndex: Integer;
    324327  hint: String;
    325   tool: TForm_ToolTemplate;
     328  tool: TForm_BaseTemplate;
    326329begin
    327330  pt.X := X;
     
    332335  if tabIndex >= 0 then
    333336  begin
    334     if MDITab.MDIChildren[tabIndex] is TForm_ToolTemplate then
     337    if MDITab.MDIChildren[tabIndex] is TForm_BaseTemplate then
    335338    begin
    336       tool := TForm_ToolTemplate(MDITab.MDIChildren[tabIndex]);
     339      tool := TForm_BaseTemplate(MDITab.MDIChildren[tabIndex]);
    337340      if tool.ConnectionID > -1 then
    338341        hint := 'Connection: ' +
    339               ExtractFileName(ConManager.Connection[tool.ConnectionID].FileName) + #13+#10
     342              ExtractFileName(ConManager.Connection[tool.ConnectionID].FileName)
    340343      else
    341         hint := 'Connection: none' + #13+#10;
    342       if tool.SelectedFile.ID > -1 then
    343         hint := hint + 'Selected File: ' +
    344               FormatNumber(tool.SelectedFile.ID, 5, '0') + '-' +
    345               tool.SelectedFile.Name + '.' +
    346               tool.SelectedFile.Extension
    347       else
    348         hint := hint + 'Selected File: none';
     344        hint := 'Connection: none';
     345      if tool is TForm_TemplateFile then
     346      begin
     347        if TForm_TemplateFile(tool).SelectedFile.ID > -1 then
     348          hint := hint + #13+#10 + 'Selected File: ' +
     349                FormatNumber(TForm_TemplateFile(tool).SelectedFile.ID, 5, '0') + '-' +
     350                TForm_TemplateFile(tool).SelectedFile.Name + '.' +
     351                TForm_TemplateFile(tool).SelectedFile.Extension
     352        else
     353          hint := hint + #13+#10 + 'Selected File: none';
     354      end;
    349355    end
    350356    else
     
    481487  if MDITab.MDIChildCount > 0 then
    482488    for i := 0 to MDITab.MDIChildCount - 1 do
    483       if MDITab.MDIChildren[i] is TForm_ToolTemplate then
    484         TForm_ToolTemplate(MDITab.MDIChildren[i]).UpdateConList;
     489      if MDITab.MDIChildren[i] is TForm_BaseTemplate then
     490        TForm_BaseTemplate(MDITab.MDIChildren[i]).UpdateConList;
    485491
    486492  menu_conns.Clear;
     
    553559procedure TForm_Main.menu_createdbClick(Sender: TObject);
    554560begin
    555 //  ShowMessage('Not yet usable');
    556 
    557561  opend.Filter     := 'Oni-Dat-Files|*.dat';
    558562  saved.Filter     := 'OUP-Level-DB (*.oldb)|*.oldb';
     
    566570procedure TForm_Main.menu_createlvlClick(Sender: TObject);
    567571begin
    568 //  ShowMessage('Not yet usable');
    569 
    570572  opend.Filter     := 'OUP-Level-DB (*.oldb)|*.oldb';
    571573  saved.Filter     := 'Oni-Dat-Files|*.dat';
     
    582584procedure TForm_Main.menu_previewClick(Sender: TObject);
    583585begin
    584   open_child('preview', -1, -1);
     586  open_child('preview');
    585587end;
    586588
    587589procedure TForm_Main.menu_bineditClick(Sender: TObject);
    588590begin
    589   open_child('binedit', -1, -1);
     591  open_child('binedit');
    590592end;
    591593
    592594procedure TForm_Main.menu_raweditClick(Sender: TObject);
    593595begin
    594   open_child('rawedit', -1, -1);
     596  open_child('rawedit');
    595597end;
    596598
    597599procedure TForm_Main.menu_txmpreplaceClick(Sender: TObject);
    598600begin
    599   open_child('txmpreplace', -1, -1);
     601  open_child('txmpreplace');
    600602end;
    601603
    602604procedure TForm_Main.menu_extractorClick(Sender: TObject);
    603605begin
    604   open_child('extractor', -1, -1);
     606  open_child('extractor');
    605607end;
    606608
    607609procedure TForm_Main.menu_metaClick(Sender: TObject);
    608 var
    609   toolform:    TForm_Meta;
    610   i:           Integer;
    611   tag:         Integer;
    612   iconindex:   Integer;
    613 begin
    614   tag := 1;
    615   if MDIChildCount > 0 then
    616     for i := 0 to MDIChildCount - 1 do
    617       if MDIChildren[i].Tag >= tag then
    618         tag := MDIChildren[i].Tag + 1;
    619 
    620   iconindex := -1;
    621 
    622   toolform := nil;
    623 
    624   toolform         := TForm_Meta.Create(Self);
    625   toolform.Caption := 'MetaEditor' + ' ' + IntToStr(tag) + '       ';
    626   iconindex        := 11;
    627 
    628   if Assigned(toolform) then
    629   begin
    630     toolform.Name    := 'meta' + IntToStr(tag);
    631     toolform.Tag     := tag;
    632     MDITab.AddTab(TForm(toolform), iconindex);
    633     toolform.Caption := AnsiReplaceStr(toolform.Caption, '       ', '');
    634   end;
     610begin
     611  open_child('meta');
    635612end;
    636613
    637614procedure TForm_Main.menu_filecompareClick(Sender: TObject);
    638615begin
    639   open_child('compare', -1, -1);
     616  open_child('compare');
    640617end;
    641618
     
    706683  RepMsg: TStatusMessages;
    707684begin
    708 //  name := TTBItem(Sender).Caption;
    709685  index := TTBItem(Sender).Parent.IndexOf(TTBItem(Sender));
    710686  name := ExtractFileName(ConManager.ConnectionByIndex[index].FileName);
     
    753729
    754730
    755 function TForm_Main.open_child(window_context: String; connection, fileid: Integer): TForm_ToolTemplate;
     731function TForm_Main.open_child(window_context: String; connection, fileid: Integer): TForm_BaseTemplate;
    756732type
    757   TTemplate = class of TForm_ToolTemplate;
     733  TTemplate = class of TForm_BaseTemplate;
    758734  TTool = record
    759735      name: String;
     
    768744    (name: 'preview';     icon: 4; caption: 'Preview-Window';     classt: TForm_Preview),
    769745    (name: 'rawedit';     icon: 6; caption: 'Binary .raw-Editor'; classt: TForm_RawEdit),
    770     (name: 'txmpreplace'; icon: 7; caption: 'TXMP Replacer';      classt: TForm_TxmpReplace)
     746//    (name: 'txmpreplace'; icon: 7; caption: 'TXMP Replacer';      classt: TForm_TxmpReplace),
     747    (name: 'meta'; icon: 11; caption: 'MetaEditor'; classt: TForm_Meta)
    771748  );
    772749var
    773   toolform:    TForm_ToolTemplate;
     750  toolform:    TForm_BaseTemplate;
    774751  i:           Integer;
    775752  tag:         Integer;
     
    806783    MDITab.AddTab(TForm(toolform), iconindex);
    807784    toolform.Caption := AnsiReplaceStr(toolform.Caption, '       ', '');
    808     if connection > -1 then
     785    if Connection > -1 then
    809786    begin
    810787      toolform.SelectConnection(connection);
    811       if fileid > -1 then
    812         toolform.SelectFileID(connection, fileid);
     788      if (FileID > -1) and (toolform is TForm_TemplateFile) then
     789        TForm_TemplateFile(toolform).SelectFileID(Connection, FileID);
    813790    end;
    814791    Result := toolform;
     
    816793end;
    817794
     795function TForm_Main.open_child(window_context: String; Connection: Integer): TForm_BaseTemplate;
     796begin
     797  open_child(window_context, Connection, -1);
     798end;
     799
     800function TForm_Main.open_child(window_context: String): TForm_BaseTemplate;
     801begin
     802  open_child(window_context, -1, -1);
     803end;
     804
    818805end.
  • oup/current/OniUnPacker.bdsproj

    r216 r222  
    179179   
    180180   
     181   
    181182    <Excluded_Packages>
    182183      <Excluded_Packages Name="d:\programme\borland\bds\3.0\Bin\dbwebxprt.bpl">Borland Web Wizard Package</Excluded_Packages>
  • oup/current/OniUnPacker.dpr

    r216 r222  
    1515  Settings in 'Settings.pas' {Form_Settings},
    1616  Template in 'Tools\Template.pas' {Form_ToolTemplate},
    17   Preview in 'Tools\Preview.pas' {Form_Preview},
    1817  OniImgClass in 'Global\OniImgClass.pas',
    1918  Functions in 'Global\Functions.pas',
     
    2221  Exporters in 'Global\Exporters.pas',
    2322  ValueEdit in 'Helper\ValueEdit.pas' {Form_ValueEdit},
    24   BinEdit in 'Tools\BinEdit.pas' {Form_BinEdit},
    25   RawEdit in 'Tools\RawEdit.pas' {Form_RawEdit},
    26   Extractor in 'Tools\Extractor.pas' {Form_Extractor},
    2723  TxmpReplace in 'Tools\TxmpReplace.pas' {Form_TxmpReplace},
    2824  WhatLinksHere in 'Helper\WhatLinksHere.pas' {Form_WhatLinksHere},
     
    3329  Img_DDSTypes in 'Global\Img_DDSTypes.pas',
    3430  TXMP in 'FileClasses\TXMP.pas',
    35   MetaEditor in 'Tools\MetaEditor.pas' {Form_Meta},
    3631  _MetaManager in 'FileClasses\_MetaManager.pas',
    3732  _EmptyFile in 'FileClasses\_EmptyFile.pas',
     
    147142  WMM_ in 'FileClasses\WMM_.pas',
    148143  WMMB in 'FileClasses\WMMB.pas',
    149   WPge in 'FileClasses\WPge.pas';
     144  WPge in 'FileClasses\WPge.pas',
     145  _BaseTemplate in 'Tools\_BaseTemplate.pas' {Form_BaseTemplate},
     146  _TemplateFile in 'Tools\_TemplateFile.pas' {Form_TemplateFile},
     147  _TemplateFileList in 'Tools\_TemplateFileList.pas' {Form_TemplateFileList},
     148  MetaEditor in 'Tools\MetaEditor.pas' {Form_Meta},
     149  BinEdit in 'Tools\BinEdit.pas' {Form_BinEdit},
     150  Extractor in 'Tools\Extractor.pas' {Form_Extractor},
     151  Preview in 'Tools\Preview.pas' {Form_Preview},
     152  RawEdit in 'Tools\RawEdit.pas' {Form_RawEdit};
    150153
    151154{$R *.res}
  • oup/current/Tools/_TemplateFileList.dfm

    r221 r222  
    3636        Align = alClient
    3737        TabOrder = 0
    38         ExplicitLeft = -41
    39         ExplicitTop = 28
    40         ExplicitWidth = 241
    41         ExplicitHeight = 381
    4238        object tab_files: TTabSheet
    4339          Caption = 'Files'
     
    277273          end
    278274        end
     275        object tab_meta: TTabSheet
     276          Caption = 'Meta'
     277          ImageIndex = 1
     278        end
    279279      end
    280280    end
  • oup/current/Tools/_TemplateFileList.pas

    r221 r222  
    3838    check_filtername: TCheckBox;
    3939    filelist: TListBox;
     40    tab_meta: TTabSheet;
    4041    procedure NewCon(ID: Integer);
    4142
Note: See TracChangeset for help on using the changeset viewer.