| 323 |  | end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 324 |  | end else | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 325 |  | RawLinks[i].RawAddr := 0; | 
 
 
 
 
 
 
 
 | 326 | + | DatFileStream.Seek(RawLinks[i].SrcOffset, soFromBeginning); | 
 
 
 
 
 
 
 
 | 327 | + | DatFileStream.Write(RawLinks[i].RawAddr, 4); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 328 |  | end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 329 |  | end; | 
 
 
 
 
 
 
 
 
 
 
 | 330 | < |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 331 | < | { | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 330 | < | Data[rawlist[j].src_offset + 0] := (rawlist[j].raw_addr) and $FF; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 331 | < | Data[rawlist[j].src_offset + 1] := (rawlist[j].raw_addr shr 8) and $FF; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 332 | < | Data[rawlist[j].src_offset + 2] := (rawlist[j].raw_addr shr 16) and $FF; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 333 | < | Data[rawlist[j].src_offset + 3] := (rawlist[j].raw_addr shr 24) and $FF; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 334 | < | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 335 | < | Stream_Body.Write(Data[0], Length(Data)); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 336 | < | // | 
 
 
 
 
 
 
 
 
 | 330 | > | DatFileStream.Seek(0, soFromBeginning); | 
 
 
 
 
 | 331 | > | Stream_Body.CopyFrom(DatFileStream, DatFileStream.Size); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 332 |  | end | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 333 |  | else | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 334 |  | FilesHeader[i].DataAddr := 0; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 375 |  | Stream_Body.Free; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 376 |  | Stream_Names.Free; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 377 |  | Stream_Raw.Free; | 
 
 
 
 
 
 
 
 
 
 
 | 378 | < | if OniDataConnection.OSisMac then | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 378 | > |  | 
 
 
 
 
 | 379 | > | if Connection.DataOS in [DOS_WINDEMO, DOS_MAC, DOS_MACBETA] then | 
 
 
 
 
 
 
 
 
 
 
 | 380 |  | Stream_Sep.Free; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 381 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 382 |  | progress.Position      := progress.Max; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 392 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 393 |  | converting := False; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 394 |  |  | 
 
 
 
 
 
 
 
 
 
 
 | 395 | < | CloseDataConnection(DataConnections[conIndex]); | 
 
 
 
 
 
 
 
 
 | 395 | > | //  CloseDataConnection(DataConnections[conIndex]); | 
 
 
 
 
 
 
 
 
 
 
 | 396 |  | end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 397 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 398 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 402 |  | var | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 403 |  | i: Byte; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 404 |  | begin | 
 
 
 
 
 
 
 
 
 
 
 | 405 | < | for i := 1 to Length(ConvertHandlers) do | 
 
 
 
 
 
 
 
 
 | 405 | > | {  for i := 1 to Length(ConvertHandlers) do | 
 
 
 
 
 
 
 
 
 
 
 | 406 |  | if UpperCase(ConvertHandlers[i].Ext) = UpperCase(ext) then | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 407 |  | if ConvertHandlers[i].needed then | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 408 |  | begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 411 |  | end | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 412 |  | else | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 413 |  | Break; | 
 
 
 
 
 
 
 
 
 
 
 | 414 | < | end; | 
 
 
 
 
 
 
 
 
 | 414 | > | }end; | 
 
 
 
 
 
 
 
 
 
 
 | 415 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 416 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 417 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 418 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 419 |  | procedure TForm_LevelDB.CreateDatabase(Source, target: String); | 
 
 
 
 
 
 
 
 | 420 | + | { | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 421 |  | var | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 422 |  | DataBase:    TABSDatabase; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 423 |  | Query:       TABSQuery; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 449 |  | else | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 450 |  | group_progress.Caption := 'Creating DB (FINISHED)'; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 451 |  | end; | 
 
 
 
 
 
 
 
 | 452 | + | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 453 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 454 |  | begin | 
 
 
 
 
 
 
 
 
 
 
 | 455 | < | if CreateDataConnection(Source, ODB_Dat) = nil then | 
 
 
 
 
 
 
 
 
 | 455 | > | {  if CreateDataConnection(Source, ODB_Dat) = nil then | 
 
 
 
 
 
 
 
 
 
 
 | 456 |  | begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 457 |  | ShowMessage('Could not connect to .dat-file'); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 458 |  | Exit; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 655 |  | database.Free; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 656 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 657 |  | CloseDataConnection(DataConnections[conIndex]); | 
 
 
 
 
 
 
 
 | 658 | + | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 659 |  | end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 660 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 661 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 662 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 663 |  |  | 
 
 
 
 
 
 
 
 
 
 
 | 664 | < | procedure TForm_LevelDB.stop_convert; | 
 
 
 
 
 
 
 
 
 | 664 | > | procedure TForm_LevelDB.StopConvert; | 
 
 
 
 
 
 
 
 
 
 
 | 665 |  | begin | 
 
 
 
 
 
 
 
 
 
 
 | 666 | < | btn_abortok.Caption := '&Close'; | 
 
 
 
 
 
 
 
 
 | 666 | > | {  btn_abortok.Caption := '&Close'; | 
 
 
 
 
 
 
 
 
 
 
 | 667 |  | btn_abortok.Default := True; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 668 |  | converting := False; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 669 |  | lbl_estimation.Caption := 'ABORTED'; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 674 |  | begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 675 |  | DeleteFile(loaded_filename); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 676 |  | end; | 
 
 
 
 
 
 
 
 
 
 
 | 677 | < | end; | 
 
 
 
 
 
 
 
 
 | 677 | > | }end; | 
 
 
 
 
 
 
 
 
 
 
 | 678 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 679 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 680 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 697 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 698 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 699 |  |  | 
 
 
 
 
 
 
 
 
 
 
 | 700 | < |  | 
 
 
 
 
 
 
 
 
 | 700 | > | { | 
 
 
 
 
 
 
 
 
 
 
 | 701 |  | procedure InsertDatLinkToDB(fileid: LongWord; offset: LongWord); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 702 |  | var | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 703 |  | link: LongWord; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1729 |  | begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1730 |  | end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1731 |  | end; | 
 
 
 
 
 
 
 
 | 1732 | + | } | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1733 |  |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1734 |  |  | 
 
 
 
 
 
 
 
 
 
 
 | 1735 | < |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1736 | < |  | 
 
 
 
 
 
 
 
 
 | 1735 | > | { | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1736 |  | procedure InsertHandler(ext: String; needed: Boolean; handler: THandler); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1737 |  | begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1738 |  | SetLength(ConvertHandlers, Length(ConvertHandlers) + 1); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1740 |  | ConvertHandlers[High(ConvertHandlers)].needed  := needed; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1741 |  | ConvertHandlers[High(ConvertHandlers)].handler := handler; | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1742 |  | end; | 
 
 
 
 
 
 
 
 
 
 
 | 1743 | < |  | 
 
 
 
 
 
 
 
 
 | 1743 | > | } | 
 
 
 
 
 
 
 
 
 
 
 | 1744 |  | begin | 
 
 
 
 
 
 
 
 
 
 
 | 1745 | < | InsertHandler('ABNA', False, nil); | 
 
 
 
 
 
 
 
 
 | 1745 | > | {  InsertHandler('ABNA', False, nil); | 
 
 
 
 
 
 
 
 
 
 
 | 1746 |  | //  InsertHandler('AGDB',True,AGDB); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1747 |  | InsertHandler('AGDB', False, nil); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1748 |  | InsertHandler('AGQC', False, nil); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1840 |  | InsertHandler('WMM_', False, nil); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1841 |  | InsertHandler('WMMB', True, WMMB); | 
 
 
 
 
 
 
 
 
 
 
 
 
 | 1842 |  | InsertHandler('WPGE', True, WPGE); | 
 
 
 
 
 
 
 
 
 
 
 | 1843 | < | end. | 
 
 
 
 
 
 
 
 
 | 1843 | > | }end. |