Changeset 129 for oup/current


Ignore:
Timestamp:
Mar 28, 2007, 3:12:22 AM (18 years ago)
Author:
alloc
Message:
 
Location:
oup/current
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • oup/current/Helper/LevelDB.pas

    r127 r129  
    324324          end else
    325325            RawLinks[i].RawAddr := 0;
     326          DatFileStream.Seek(RawLinks[i].SrcOffset, soFromBeginning);
     327          DatFileStream.Write(RawLinks[i].RawAddr, 4);
    326328        end;
    327329      end;
    328 
    329 {
    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);
    337332    end
    338333    else
     
    381376  Stream_Names.Free;
    382377  Stream_Raw.Free;
    383   if OniDataConnection.OSisMac then
     378
     379  if Connection.DataOS in [DOS_WINDEMO, DOS_MAC, DOS_MACBETA] then
    384380    Stream_Sep.Free;
    385381
     
    397393  converting := False;
    398394
    399   CloseDataConnection(DataConnections[conIndex]);
     395//  CloseDataConnection(DataConnections[conIndex]);
    400396end;
    401397
     
    407403  i: Byte;
    408404begin
    409   for i := 1 to Length(ConvertHandlers) do
     405{  for i := 1 to Length(ConvertHandlers) do
    410406    if UpperCase(ConvertHandlers[i].Ext) = UpperCase(ext) then
    411407      if ConvertHandlers[i].needed then
     
    416412      else
    417413        Break;
    418 end;
     414}end;
    419415
    420416
     
    422418
    423419procedure TForm_LevelDB.CreateDatabase(Source, target: String);
     420{
    424421var
    425422  DataBase:    TABSDatabase;
     
    453450      group_progress.Caption := 'Creating DB (FINISHED)';
    454451  end;
    455 
    456 begin
    457   if CreateDataConnection(Source, ODB_Dat) = nil then
     452}
     453
     454begin
     455{  if CreateDataConnection(Source, ODB_Dat) = nil then
    458456  begin
    459457    ShowMessage('Could not connect to .dat-file');
     
    658656
    659657  CloseDataConnection(DataConnections[conIndex]);
    660 end;
    661 
    662 
    663 
    664 
    665 procedure TForm_LevelDB.stop_convert;
    666 begin
    667   btn_abortok.Caption := '&Close';
     658}
     659end;
     660
     661
     662
     663
     664procedure TForm_LevelDB.StopConvert;
     665begin
     666{  btn_abortok.Caption := '&Close';
    668667  btn_abortok.Default := True;
    669668  converting := False;
     
    676675    DeleteFile(loaded_filename);
    677676  end;
    678 end;
     677}end;
    679678
    680679
     
    699698
    700699
    701 
     700{
    702701procedure InsertDatLinkToDB(fileid: LongWord; offset: LongWord);
    703702var
     
    17311730  end;
    17321731end;
    1733 
    1734 
    1735 
    1736 
     1732}
     1733
     1734
     1735{
    17371736procedure InsertHandler(ext: String; needed: Boolean; handler: THandler);
    17381737begin
     
    17421741  ConvertHandlers[High(ConvertHandlers)].handler := handler;
    17431742end;
    1744 
    1745 begin
    1746   InsertHandler('ABNA', False, nil);
     1743}
     1744begin
     1745{  InsertHandler('ABNA', False, nil);
    17471746  //  InsertHandler('AGDB',True,AGDB);
    17481747  InsertHandler('AGDB', False, nil);
     
    18421841  InsertHandler('WMMB', True, WMMB);
    18431842  InsertHandler('WPGE', True, WPGE);
    1844 end.
     1843}end.
  • oup/current/Main.pas

    r113 r129  
    138138implementation
    139139
     140uses
     141  LevelDB;
     142
    140143{$R *.dfm}
    141144
     
    562565procedure TForm_Main.menu_createlvlClick(Sender: TObject);
    563566begin
    564   ShowMessage('Not yet usable');
    565 {
     567//  ShowMessage('Not yet usable');
     568
    566569  opend.Filter     := 'OUP-Level-DB (*.oldb)|*.oldb';
    567570  saved.Filter     := 'Oni-Dat-Files|*.dat';
     
    570573    if saved.Execute then
    571574      Form_LevelDB.CreateLevel(opend.FileName, saved.FileName);
    572 }
     575
    573576end;
    574577
  • oup/current/OniUnPacker.dpr

    r125 r129  
    2929  DatLinks in 'Global\DatLinks.pas',
    3030  _DataTypes in 'FileClasses\_DataTypes.pas',
    31   _FileTypes in 'FileClasses\_FileTypes.pas';
     31  _FileTypes in 'FileClasses\_FileTypes.pas',
     32  LevelDB in 'Helper\LevelDB.pas' {Form_LevelDB};
    3233
    3334{$R *.res}
     
    4142  Application.CreateForm(TForm_ValueEdit, Form_ValueEdit);
    4243  Application.CreateForm(TForm_WhatLinksHere, Form_WhatLinksHere);
     44  Application.CreateForm(TForm_LevelDB, Form_LevelDB);
    4345  Application.Run;
    4446end.
Note: See TracChangeset for help on using the changeset viewer.