- Timestamp:
- Jun 18, 2007, 4:22:53 PM (18 years ago)
- Location:
- oup/current
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Global/RawList.pas
r209 r222 44 44 for i := 0 to links - 1 do 45 45 begin 46 Result[i].Name := '<TBD>'; 46 47 Result[i].SrcOffset := $20 + i * 4; 47 48 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $20 + i * 4, 4, @link); … … 65 66 for i := 0 to links - 1 do 66 67 begin 68 Result[i].Name := '<TBD>'; 67 69 Result[i].SrcOffset := $20 + i * $74 + $24; 68 70 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $20 + i * $74 + $24, 4, @link); … … 85 87 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $08, 4, @datasize); 86 88 SetLength(Result, 1); 89 Result[0].Name := 'BinaryData'; 87 90 Result[0].SrcOffset := $0C; 88 91 Result[0].RawAddr := link; … … 102 105 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $0C, 4, @link); 103 106 SetLength(Result, 1); 107 Result[0].Name := 'SoundBinaryData'; 104 108 Result[0].SrcOffset := $0C; 105 109 Result[0].RawAddr := link; … … 129 133 Result[0].SrcOffset := $44; 130 134 end; 135 Result[0].Name := 'SoundData'; 131 136 Result[0].RawAddr := link; 132 137 Result[0].RawSize := datasize; … … 170 175 begin 171 176 SetLength(Result, 1); 177 Result[0].Name := 'Subtitles'; 172 178 Result[0].SrcID := FileID; 173 179 Result[0].SrcOffset := $18; … … 196 202 SetLength(Result, 13); 197 203 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $16C, 2, @frames); 198 { x-z-pos}204 {y-pos} 199 205 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $0C, 4, @link); 206 Result[0].Name := 'y-pos'; 200 207 Result[0].SrcOffset := $0C; 201 208 Result[0].RawAddr := link; 202 Result[0].RawSize := frames * 4;203 { y-pos}209 Result[0].RawSize := frames * 4; 210 {x-z-pos} 204 211 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $10, 4, @link); 212 Result[1].Name := 'x-z-pos'; 205 213 Result[1].SrcOffset := $10; 206 214 Result[1].RawAddr := link; 207 Result[1].RawSize := frames * 8;215 Result[1].RawSize := frames * 8; 208 216 {attacks} 209 217 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $182, 1, @tempb); 210 218 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $14, 4, @link); 219 Result[2].Name := 'Attacks'; 211 220 Result[2].SrcOffset := $14; 212 221 Result[2].RawAddr := link; … … 215 224 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $183, 1, @tempb); 216 225 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $18, 4, @link); 226 Result[3].Name := 'Damage'; 217 227 Result[3].SrcOffset := $18; 218 228 Result[3].RawAddr := link; … … 221 231 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $184, 1, @tempb); 222 232 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $1C, 4, @link); 233 Result[4].Name := 'MotionBlur'; 223 234 Result[4].SrcOffset := $1C; 224 235 Result[4].RawAddr := link; … … 227 238 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $185, 1, @tempb); 228 239 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $20, 4, @link); 240 Result[5].Name := 'Shortcut'; 229 241 Result[5].SrcOffset := $20; 230 242 Result[5].RawAddr := link; … … 232 244 {throw} 233 245 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $24, 4, @link); 246 Result[6].Name := 'Throw'; 234 247 Result[6].SrcOffset := $24; 235 248 Result[6].RawAddr := link; … … 238 251 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $186, 1, @tempb); 239 252 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $28, 4, @link); 253 Result[7].Name := 'Footstep'; 240 254 Result[7].SrcOffset := $28; 241 255 Result[7].RawAddr := link; … … 244 258 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $187, 1, @tempb); 245 259 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $2C, 4, @link); 260 Result[8].Name := 'Particle'; 246 261 Result[8].SrcOffset := $2C; 247 262 Result[8].RawAddr := link; … … 249 264 {position} 250 265 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $30, 4, @link); 266 Result[9].Name := 'Position'; 251 267 Result[9].SrcOffset := $30; 252 268 Result[9].RawAddr := link; 253 269 Result[9].RawSize := frames * 8; 254 { particle}270 {sound} 255 271 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $154, 2, @tempw); 256 272 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $38, 4, @link); 273 Result[11].Name := 'Sound'; 257 274 Result[11].SrcOffset := $38; 258 275 Result[11].RawAddr := link; … … 261 278 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $138, 4, @templ); 262 279 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $13C, 4, @link); 280 Result[12].Name := 'Extent'; 263 281 Result[12].SrcOffset := $13C; 264 282 Result[12].RawAddr := link; … … 291 309 end; 292 310 end; 311 Result[10].Name := 'BodyParts Animation'; 293 312 Result[10].SrcOffset := $34; 294 313 Result[10].RawAddr := link; … … 351 370 Result[0].RawAddr := link_mac; 352 371 end; 372 Result[0].Name := 'ImageData'; 353 373 Result[0].RawSize := datasize; 354 374 Result[0].LocSep := not (ConManager.Connection[ConnectionID].DataOS = DOS_WIN); … … 365 385 begin 366 386 RawList := GetRawList(ConnectionID, FileID); 387 Result.Name := ''; 367 388 Result.SrcID := -1; 368 389 Result.SrcOffset := -1; … … 375 396 if RawList[i].SrcOffset = DatOffset then 376 397 begin 398 Result.Name := RawList[i].Name; 377 399 Result.SrcID := FileID; 378 400 Result.SrcOffset := RawList[i].SrcOffset; -
oup/current/Global/TypeDefs.pas
r124 r222 76 76 77 77 TRawDataInfo = record 78 Name: String; 78 79 SrcID: Integer; 79 80 SrcOffset: Integer; -
oup/current/Helper/WhatLinksHere.dfm
r114 r222 70 70 TabOrder = 0 71 71 OnDblClick = list_fromDblClick 72 ExplicitLeft = 3873 ExplicitTop = 6574 ExplicitWidth = 41575 ExplicitHeight = 8476 72 end 77 73 end … … 116 112 TabOrder = 0 117 113 OnDblClick = list_fromDblClick 118 ExplicitLeft = -230119 ExplicitTop = -43120 ExplicitWidth = 415121 ExplicitHeight = 84122 114 end 123 115 end -
oup/current/Helper/WhatLinksHere.pas
r114 r222 3 3 uses 4 4 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 5 Dialogs, StdCtrls, Template, ExtCtrls;5 Dialogs, StdCtrls, _TemplateFile, ExtCtrls; 6 6 7 7 type … … 19 19 private 20 20 public 21 SenderForm: TForm_T oolTemplate;21 SenderForm: TForm_TemplateFile; 22 22 ConID: Integer; 23 23 FileID: Integer; -
oup/current/Main.dfm
r209 r222 43 43 end> 44 44 ParentBiDiMode = False 45 ExplicitWidth = 74246 45 end 47 46 object DockTop: TTBDock … … 50 49 Width = 842 51 50 Height = 75 52 ExplicitWidth = 74253 51 object MainMenu: TTBToolbar 54 52 Left = 0 … … 359 357 Height = 470 360 358 Position = dpRight 361 ExplicitLeft = 733362 359 end 363 360 object DockBottom: TTBDock … … 367 364 Height = 9 368 365 Position = dpBottom 369 ExplicitWidth = 742370 366 end 371 367 object opend: TOpenDialog -
oup/current/Main.pas
r209 r222 7 7 MDITab, TB2Item, TB2Dock, TB2Toolbar, TB2MDI, OneInst, 8 8 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; 11 12 12 13 type … … 108 109 procedure menu_previewClick(Sender: TObject); 109 110 procedure menu_metaClick(Sender: TObject); 110 function open_child(window_context: String; connection, fileid: Integer): TForm_ToolTemplate;111 111 112 112 procedure menu_windows_cascadeClick(Sender: TObject); … … 127 127 private 128 128 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; 129 132 procedure DefaultHandler(var Message); override; 130 133 end; … … 168 171 var 169 172 i: Integer; 170 toolform: TForm_ ToolTemplate;173 toolform: TForm_BaseTemplate; 171 174 begin 172 175 Result := True; … … 175 178 for i := 0 to MDITab.MDIChildCount - 1 do 176 179 begin 177 if MDITab.MDIChildren[i] is TForm_ ToolTemplate then180 if MDITab.MDIChildren[i] is TForm_BaseTemplate then 178 181 begin 179 toolform := TForm_ ToolTemplate(MDITab.MDIChildren[i]);182 toolform := TForm_BaseTemplate(MDITab.MDIChildren[i]); 180 183 if toolform.ConnectionID = ConManager.ConnectionByIndex[index].ConnectionID then 181 184 begin … … 323 326 tabIndex: Integer; 324 327 hint: String; 325 tool: TForm_ ToolTemplate;328 tool: TForm_BaseTemplate; 326 329 begin 327 330 pt.X := X; … … 332 335 if tabIndex >= 0 then 333 336 begin 334 if MDITab.MDIChildren[tabIndex] is TForm_ ToolTemplate then337 if MDITab.MDIChildren[tabIndex] is TForm_BaseTemplate then 335 338 begin 336 tool := TForm_ ToolTemplate(MDITab.MDIChildren[tabIndex]);339 tool := TForm_BaseTemplate(MDITab.MDIChildren[tabIndex]); 337 340 if tool.ConnectionID > -1 then 338 341 hint := 'Connection: ' + 339 ExtractFileName(ConManager.Connection[tool.ConnectionID].FileName) + #13+#10342 ExtractFileName(ConManager.Connection[tool.ConnectionID].FileName) 340 343 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; 349 355 end 350 356 else … … 481 487 if MDITab.MDIChildCount > 0 then 482 488 for i := 0 to MDITab.MDIChildCount - 1 do 483 if MDITab.MDIChildren[i] is TForm_ ToolTemplate then484 TForm_ ToolTemplate(MDITab.MDIChildren[i]).UpdateConList;489 if MDITab.MDIChildren[i] is TForm_BaseTemplate then 490 TForm_BaseTemplate(MDITab.MDIChildren[i]).UpdateConList; 485 491 486 492 menu_conns.Clear; … … 553 559 procedure TForm_Main.menu_createdbClick(Sender: TObject); 554 560 begin 555 // ShowMessage('Not yet usable');556 557 561 opend.Filter := 'Oni-Dat-Files|*.dat'; 558 562 saved.Filter := 'OUP-Level-DB (*.oldb)|*.oldb'; … … 566 570 procedure TForm_Main.menu_createlvlClick(Sender: TObject); 567 571 begin 568 // ShowMessage('Not yet usable');569 570 572 opend.Filter := 'OUP-Level-DB (*.oldb)|*.oldb'; 571 573 saved.Filter := 'Oni-Dat-Files|*.dat'; … … 582 584 procedure TForm_Main.menu_previewClick(Sender: TObject); 583 585 begin 584 open_child('preview' , -1, -1);586 open_child('preview'); 585 587 end; 586 588 587 589 procedure TForm_Main.menu_bineditClick(Sender: TObject); 588 590 begin 589 open_child('binedit' , -1, -1);591 open_child('binedit'); 590 592 end; 591 593 592 594 procedure TForm_Main.menu_raweditClick(Sender: TObject); 593 595 begin 594 open_child('rawedit' , -1, -1);596 open_child('rawedit'); 595 597 end; 596 598 597 599 procedure TForm_Main.menu_txmpreplaceClick(Sender: TObject); 598 600 begin 599 open_child('txmpreplace' , -1, -1);601 open_child('txmpreplace'); 600 602 end; 601 603 602 604 procedure TForm_Main.menu_extractorClick(Sender: TObject); 603 605 begin 604 open_child('extractor' , -1, -1);606 open_child('extractor'); 605 607 end; 606 608 607 609 procedure 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; 610 begin 611 open_child('meta'); 635 612 end; 636 613 637 614 procedure TForm_Main.menu_filecompareClick(Sender: TObject); 638 615 begin 639 open_child('compare' , -1, -1);616 open_child('compare'); 640 617 end; 641 618 … … 706 683 RepMsg: TStatusMessages; 707 684 begin 708 // name := TTBItem(Sender).Caption;709 685 index := TTBItem(Sender).Parent.IndexOf(TTBItem(Sender)); 710 686 name := ExtractFileName(ConManager.ConnectionByIndex[index].FileName); … … 753 729 754 730 755 function TForm_Main.open_child(window_context: String; connection, fileid: Integer): TForm_ ToolTemplate;731 function TForm_Main.open_child(window_context: String; connection, fileid: Integer): TForm_BaseTemplate; 756 732 type 757 TTemplate = class of TForm_ ToolTemplate;733 TTemplate = class of TForm_BaseTemplate; 758 734 TTool = record 759 735 name: String; … … 768 744 (name: 'preview'; icon: 4; caption: 'Preview-Window'; classt: TForm_Preview), 769 745 (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) 771 748 ); 772 749 var 773 toolform: TForm_ ToolTemplate;750 toolform: TForm_BaseTemplate; 774 751 i: Integer; 775 752 tag: Integer; … … 806 783 MDITab.AddTab(TForm(toolform), iconindex); 807 784 toolform.Caption := AnsiReplaceStr(toolform.Caption, ' ', ''); 808 if connection > -1 then785 if Connection > -1 then 809 786 begin 810 787 toolform.SelectConnection(connection); 811 if fileid > -1then812 toolform.SelectFileID(connection, fileid);788 if (FileID > -1) and (toolform is TForm_TemplateFile) then 789 TForm_TemplateFile(toolform).SelectFileID(Connection, FileID); 813 790 end; 814 791 Result := toolform; … … 816 793 end; 817 794 795 function TForm_Main.open_child(window_context: String; Connection: Integer): TForm_BaseTemplate; 796 begin 797 open_child(window_context, Connection, -1); 798 end; 799 800 function TForm_Main.open_child(window_context: String): TForm_BaseTemplate; 801 begin 802 open_child(window_context, -1, -1); 803 end; 804 818 805 end. -
oup/current/OniUnPacker.bdsproj
r216 r222 179 179 180 180 181 181 182 <Excluded_Packages> 182 183 <Excluded_Packages Name="d:\programme\borland\bds\3.0\Bin\dbwebxprt.bpl">Borland Web Wizard Package</Excluded_Packages> -
oup/current/OniUnPacker.dpr
r216 r222 15 15 Settings in 'Settings.pas' {Form_Settings}, 16 16 Template in 'Tools\Template.pas' {Form_ToolTemplate}, 17 Preview in 'Tools\Preview.pas' {Form_Preview},18 17 OniImgClass in 'Global\OniImgClass.pas', 19 18 Functions in 'Global\Functions.pas', … … 22 21 Exporters in 'Global\Exporters.pas', 23 22 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},27 23 TxmpReplace in 'Tools\TxmpReplace.pas' {Form_TxmpReplace}, 28 24 WhatLinksHere in 'Helper\WhatLinksHere.pas' {Form_WhatLinksHere}, … … 33 29 Img_DDSTypes in 'Global\Img_DDSTypes.pas', 34 30 TXMP in 'FileClasses\TXMP.pas', 35 MetaEditor in 'Tools\MetaEditor.pas' {Form_Meta},36 31 _MetaManager in 'FileClasses\_MetaManager.pas', 37 32 _EmptyFile in 'FileClasses\_EmptyFile.pas', … … 147 142 WMM_ in 'FileClasses\WMM_.pas', 148 143 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}; 150 153 151 154 {$R *.res} -
oup/current/Tools/_TemplateFileList.dfm
r221 r222 36 36 Align = alClient 37 37 TabOrder = 0 38 ExplicitLeft = -4139 ExplicitTop = 2840 ExplicitWidth = 24141 ExplicitHeight = 38142 38 object tab_files: TTabSheet 43 39 Caption = 'Files' … … 277 273 end 278 274 end 275 object tab_meta: TTabSheet 276 Caption = 'Meta' 277 ImageIndex = 1 278 end 279 279 end 280 280 end -
oup/current/Tools/_TemplateFileList.pas
r221 r222 38 38 check_filtername: TCheckBox; 39 39 filelist: TListBox; 40 tab_meta: TTabSheet; 40 41 procedure NewCon(ID: Integer); 41 42
Note:
See TracChangeset
for help on using the changeset viewer.