source: oup/current/Helper_LevelDB.pas@ 85

Last change on this file since 85 was 85, checked in by alloc, 18 years ago
File size: 39.8 KB
RevLine 
[43]1unit Helper_LevelDB;
2
3interface
4
5uses
6 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7 Dialogs, ComCtrls, StdCtrls, StrUtils;
8
9type
10 TForm_LevelDB = class(TForm)
11 group_progress: TGroupBox;
12 progress: TProgressBar;
13 lbl_progress: TLabel;
14 btn_abortok: TButton;
15 lbl_estimation: TLabel;
16 procedure btn_abortokClick(Sender: TObject);
17 private
18 procedure HandleFile(ext: String; fileid: LongWord; dir_dat2db: Boolean);
19 procedure stop_convert;
20 public
21 procedure CreateDatabase(Source, target: String);
22 procedure CreateLevel(Source, target: String);
23 end;
24
25
26var
27 Form_LevelDB: TForm_LevelDB;
28
29implementation
30
31{$R *.dfm}
32
[46]33uses ABSMain, ABSDecUtil, Main, Functions, Data,
34 OniImgClass, DataStructures, OniDataClass;
[43]35
36type
37 THandler = procedure(fileid: LongWord; dir_dat2db: Boolean);
38
39 TConvertHandlers = record
40 Ext: String[4];
41 needed: Boolean;
42 Handler: THandler;
43 end;
44
45var
46 ConvertHandlers: array of TConvertHandlers;
47 loaded_filename: String;
48 converting: Boolean = False;
49 abort: Boolean = False;
50 DataBase: TABSDatabase;
51 Query: TABSQuery;
52 MimeCoder: TStringFormat_MIME64;
53
54var
55 DatHeader: THeader;
56 FilesHeader: TFilesMap;
57 NamedFilesHeader: TNamedFilesMap;
58 ExtensionsHeader: TExtensionsMap;
59 Stream_Body, Stream_Names: TMemoryStream;
60 Stream_Dat, Stream_Raw, Stream_Sep: TFileStream;
61
62
63
64
65procedure TForm_LevelDB.CreateLevel(Source, target: String);
66var
67 files: LongWord;
68
69 i, j: LongWord;
70 temps, temps2: String;
71 Data, rawdata: Tdata;
72 absolutebegintime, begintime: Double;
73 step: Byte;
74 rawlist: TRawList;
75 extlist: TExtensionsMap;
76 fileinfo: TFileInfo;
77 datlinks: TDatLinks;
78 OniImage: TOniImage;
79 levelid: LongWord;
[56]80 timeformat: TFormatSettings;
[43]81const
82 steps: Byte = 3;
83
84
85
86
87 procedure DoStep(stepname: String);
88 begin
89 Inc(step);
90 if stepname <> 'FIN' then
91 group_progress.Caption :=
92 'Creating Dat (Step ' + IntToStr(step) + '/' + IntToStr(steps) + ': ' + stepname + ')'
93 else
94 group_progress.Caption := 'Creating Dat (FINISHED)';
95 end;
96
97begin
98
99 //
100 // FILE EXISTS CHECK FÜR DAT/RAW/SEP!!!
101 //
102
[85]103 timeformat.ShortTimeFormat := 'hh:nn:ss';
[56]104 timeformat.LongTimeFormat := 'hh:nn:ss';
105 timeformat.TimeSeparator := ':';
106
[43]107 if not CreateDataConnection(Source, ODB_ADB) then
108 begin
109 ShowMessage('Could not connect to .oldb-file');
110 Exit;
111 end;
112 levelid := OniDataConnection.LevelInfo.LevelNumber;
113 levelid := (levelid * 2) * 256 * 256 * 256 + $01;
114 OniImage := TOniImage.Create;
115
116 absolutebegintime := Time;
117
118 Self.Visible := True;
119 Form_Main.Visible := False;
120 step := 0;
121 converting := True;
122 abort := False;
123 btn_abortok.Caption := '&Abort...';
124 btn_abortok.Default := False;
125 absolutebegintime := Time;
126
127 Stream_Body := TMemoryStream.Create;
128 Stream_Names := TMemoryStream.Create;
129 Stream_Dat := TFileStream.Create(target, fmCreate);
130 Stream_Raw := TFileStream.Create(AnsiReplaceStr(target, '.dat', '.raw'), fmCreate);
131 if OniDataConnection.OSisMac then
132 Stream_Sep := TFileStream.Create(AnsiReplaceStr(target, '.dat', '.sep'), fmCreate);
133
134 DoStep('Creating header');
135 progress.Position := 0;
136 lbl_progress.Caption := '';
137 lbl_estimation.Caption := 'Estimated finishing time: unknown';
138 Application.ProcessMessages;
139
140 NamedFilesHeader := TOniDataADB(OniDataConnection).GetNamedFilesMap;
141 extlist := OniDataConnection.GetExtendedExtensionsList;
142 for i := 0 to High(DatHeader.Ident) do
143 DatHeader.Ident[i] := OniDataConnection.LevelInfo.Ident[i];
144 DatHeader.Files := OniDataConnection.GetFilesCount;
145 DatHeader.NamedFiles := Length(NamedFilesHeader);
146 DatHeader.Extensions := Length(extlist);
147 DatHeader.DataAddr := 0;
148 DatHeader.DataSize := 0;
149 DatHeader.NamesAddr := 0;
150 DatHeader.NamesSize := 0;
151 for i := 0 to High(DatHeader.Ident2) do
152 DatHeader.Ident2[i] := 0;
153 SetLength(FilesHeader, DatHeader.Files);
154 SetLength(ExtensionsHeader, DatHeader.Extensions);
155
156 DoStep('Writing extensions-header');
157 progress.Max := Length(OniDataConnection.GetExtensionsList);
158 Application.ProcessMessages;
159
160 for i := 0 to High(ExtensionsHeader) do
161 begin
162 ExtensionsHeader[i].Ident := extlist[i].Ident;
163 ExtensionsHeader[i].Extension := extlist[i].Extension;
164 SetLength(temps, 4);
165 for j := 0 to 3 do
166 temps[j + 1] := ExtensionsHeader[i].Extension[3 - j];
167 ExtensionsHeader[i].ExtCount :=
[46]168 Length(OniDataConnection.GetFilesList(temps, '', False, stIDAsc));
[43]169 progress.Position := i + 1;
170 lbl_progress.Caption := 'Extensions done: ' + IntToStr(i + 1) + '/' +
171 IntToStr(Length(extlist));
172 Application.ProcessMessages;
173 end;
174
175 DoStep('Storing files-data');
176 progress.Position := 0;
177 progress.Max := DatHeader.Files;
178 lbl_progress.Caption := '';
179 lbl_estimation.Caption := 'Estimated finishing time: unknown';
180 Application.ProcessMessages;
181
182 begintime := Time;
183 for i := 0 to DatHeader.Files - 1 do
184 begin
185 fileinfo := OniDataConnection.GetFileInfo(i);
186 for j := 0 to 3 do
187 FilesHeader[i].Extension[j] := fileinfo.Extension[4 - j];
188 if fileinfo.Size > 0 then
189 begin
190 // DatLinks:=;
191 FilesHeader[i].DataAddr := Stream_Body.Size + 8;
192 Data := OniDataConnection.LoadDatFile(i);
193 Data[4] := (levelid) and $FF;
194 Data[5] := (levelid shr 8) and $FF;
195 Data[6] := (levelid shr 16) and $FF;
196 Data[7] := (levelid shr 24) and $FF;
197
198 if (Pos(UpperCase(fileinfo.Extension), UpperCase(raws)) mod 4) = 1 then
199 begin
200 rawlist := OniDataConnection.GetRawList(i);
201 if Length(rawlist) > 0 then
202 begin
203 for j := 0 to High(rawlist) do
204 begin
205 if rawlist[j].raw_size > 0 then
206 begin
207 if (UpperCase(fileinfo.Extension) = 'TXMP') and
208 ((Data[$88] and $01) > 0) then
209 begin
210 OniImage.LoadFromTXMP(i);
211 OniImage.GetMipMappedImage(rawdata);
212 rawlist[j].raw_size := OniImage.GetImageDataSize(True);
213 Data[$90] := $08;
214 Data[$89] := 32;
215{ if data[$90]<>OniImage.StoreType then begin
216 data[$90]:=OniImage.StoreType;
217 data[$89]:=(data[$89] and $CF) or $20;
218 end;
219} end
220 else
221 begin
222 SetLength(rawdata, rawlist[j].raw_size);
223 OniDataConnection.LoadRawFile(i, rawlist[j].src_offset, @rawdata[0]);
224 end;
225 // data[$88]:=data[$88] and $FE;
226
227 if rawlist[j].loc_sep then
228 begin
229 rawlist[j].raw_addr := Stream_Sep.Size;
230 Stream_Sep.Write(rawdata[0], Length(rawdata));
231 end
232 else
233 begin
234 rawlist[j].raw_addr := Stream_Raw.Size;
235 Stream_Raw.Write(rawdata[0], Length(rawdata));
236 end;
237 end
238 else
239 rawlist[j].raw_addr := 0;
240 Data[rawlist[j].src_offset + 0] := (rawlist[j].raw_addr) and $FF;
241 Data[rawlist[j].src_offset + 1] := (rawlist[j].raw_addr shr 8) and $FF;
242 Data[rawlist[j].src_offset + 2] := (rawlist[j].raw_addr shr 16) and $FF;
243 Data[rawlist[j].src_offset + 3] := (rawlist[j].raw_addr shr 24) and $FF;
244 end;
245 end;
246 end;
247
248 Stream_Body.Write(Data[0], Length(Data));
249 //
250 end
251 else
252 FilesHeader[i].DataAddr := 0;
253 if Length(fileinfo.Name) > 0 then
254 begin
255 FilesHeader[i].NameAddr := Stream_Names.Size;
256 temps := fileinfo.Extension + fileinfo.Name + Chr(0);
257 Stream_Names.Write(temps[1], Length(temps));
258 end
259 else
260 FilesHeader[i].NameAddr := 0;
261 FilesHeader[i].FileSize := fileinfo.Size;
262 FilesHeader[i].FileType := fileinfo.FileType;
263
[58]264 if ((i mod 10) = 0) and (i >= 100) then
265 lbl_estimation.Caption := 'Estimated time left: ' + TimeToStr(
[81]266 (Time - begintime) / i * (progress.Max - i + 1) * 1.1, timeformat );
[43]267 progress.Position := i + 1;
268 lbl_progress.Caption := 'Files done: ' + IntToStr(i + 1) + '/' + IntToStr(progress.Max);
269 Application.ProcessMessages;
270 end;
271
272 Stream_Dat.Write(DatHeader, SizeOf(DatHeader));
273 for i := 0 to High(FilesHeader) do
274 Stream_Dat.Write(FilesHeader[i], SizeOf(FilesHeader[i]));
275 for i := 0 to High(NamedFilesHeader) do
276 Stream_Dat.Write(NamedFilesHeader[i], SizeOf(NamedFilesHeader[i]));
277 for i := 0 to High(ExtensionsHeader) do
278 Stream_Dat.Write(ExtensionsHeader[i], SizeOf(ExtensionsHeader[i]));
279
280 DatHeader.DataSize := Stream_Body.Size;
281 DatHeader.NamesSize := Stream_Names.Size;
282 DatHeader.DataAddr := Stream_Dat.Size;
283 Stream_Body.Seek(0, soFromBeginning);
284 Stream_Dat.CopyFrom(Stream_Body, Stream_Body.Size);
285 DatHeader.NamesAddr := Stream_Dat.Size;
286 Stream_Names.Seek(0, soFromBeginning);
287 Stream_Dat.CopyFrom(Stream_Names, Stream_Names.Size);
288
289 Stream_Dat.Seek(0, soFromBeginning);
290 Stream_Dat.Write(DatHeader, SizeOf(DatHeader));
291
292 Stream_Dat.Free;
293 Stream_Body.Free;
294 Stream_Names.Free;
295 Stream_Raw.Free;
296 if OniDataConnection.OSisMac then
297 Stream_Sep.Free;
298
299 progress.Position := progress.Max;
300 lbl_progress.Caption := 'Files done: ' + IntToStr(progress.Max) + '/' +
301 IntToStr(progress.Max);
[56]302 lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime, timeformat) + ')';
[43]303
304 DoStep('FIN');
305 btn_abortok.Caption := '&OK';
306 btn_abortok.Default := True;
307
308 OniImage.Free;
309
310 converting := False;
311
312 CloseDataConnection;
313end;
314
315
316
317
318procedure TForm_LevelDB.HandleFile;
319var
320 i: Byte;
321begin
322 for i := 1 to Length(ConvertHandlers) do
323 if UpperCase(ConvertHandlers[i].Ext) = UpperCase(ext) then
324 if ConvertHandlers[i].needed then
325 begin
326 ConvertHandlers[i].Handler(fileid, dir_dat2db);
327 Break;
328 end
329 else
330 Break;
331end;
332
333
334
335
336procedure TForm_LevelDB.CreateDatabase(Source, target: String);
337var
338 i, j: LongWord;
339 temps, temps2: String;
340 Data: Tdata;
341 absolutebegintime, begintime: Double;
342 step: Byte;
343 rawlist: TRawList;
344 extlist: TExtensionsMap;
345 fileinfo: TFileInfo;
[56]346 timeformat: TFormatSettings;
[43]347const
348 steps: Byte = 4;
349
350
351
352
353 procedure DoStep(stepname: String);
354 begin
355 Inc(step);
356 if stepname <> 'FIN' then
357 group_progress.Caption :=
358 'Creating DB (Step ' + IntToStr(step) + '/' + IntToStr(steps) + ': ' + stepname + ')'
359 else
360 group_progress.Caption := 'Creating DB (FINISHED)';
361 end;
362
363begin
364 if not CreateDataConnection(Source, ODB_Dat) then
365 begin
366 ShowMessage('Could not connect to .dat-file');
367 Exit;
368 end
369 else
370 begin
371 TOniDataDat(OniDataConnection).UnloadWhenUnused := False;
372 end;
373
[85]374 timeformat.LongTimeFormat := 'hh:nn:ss';
375 timeformat.ShortTimeFormat := 'hh:nn:ss';
376 timeformat.TimeSeparator := ':';
377
[43]378 Self.Visible := True;
379 Form_Main.Visible := False;
380 step := 0;
381 converting := True;
382 abort := False;
383 btn_abortok.Caption := '&Abort...';
384 btn_abortok.Default := False;
385 loaded_filename := target;
386
387 absolutebegintime := Time;
388
389 DataBase := TABSDatabase.Create(Self);
390 DataBase.DatabaseName := 'OLDB';
391 DataBase.DatabaseFileName := target;
392 DataBase.CreateDatabase;
393
394 DoStep('Creating tables');
395 progress.Position := 0;
396 lbl_progress.Caption := '';
397 lbl_estimation.Caption := 'Estimated finishing time: unknown';
398 Application.ProcessMessages;
399
400 Query := TABSQuery.Create(Self);
401 Query.DatabaseName := 'OLDB';
402 Query.SQL.Text :=
403 'CREATE TABLE globals ( id AUTOINC PRIMARY KEY, name STRING(128), value STRING(128) );';
404 Query.ExecSQL;
405 Query.SQL.Text :=
406 'CREATE TABLE linkmap ( id AUTOINC PRIMARY KEY, src_id INTEGER, src_link_offset INTEGER, target_id INTEGER );';
407 Query.ExecSQL;
408 Query.SQL.Text :=
409 'CREATE TABLE rawmap ( id AUTOINC PRIMARY KEY, src_id INTEGER, src_link_offset INTEGER, sep BOOLEAN, size INTEGER, data BLOB BlobCompressionMode 9 BlobBlockSize 1024 BlobCompressionAlgorithm ZLib );';
410 // Query.SQL.Text:='CREATE TABLE rawmap ( id AUTOINC PRIMARY KEY, src_id INTEGER, src_link_offset INTEGER, size INTEGER, data BLOB BlobCompressionAlgorithm None );';
411 Query.ExecSQL;
412 Query.SQL.Text :=
413 'CREATE TABLE datfiles ( id INTEGER PRIMARY KEY, extension CHAR(4), name STRING(128), contenttype INTEGER, size INTEGER, data BLOB BlobCompressionMode 9 BlobBlockSize 1024 BlobCompressionAlgorithm ZLib );';
414 // Query.SQL.Text:='CREATE TABLE datfiles ( id INTEGER PRIMARY KEY, extension CHAR(4), name STRING(128), contenttype INTEGER, size INTEGER, data BLOB BlobCompressionAlgorithm None );';
415 Query.ExecSQL;
416 Query.SQL.Text :=
417 'CREATE TABLE extlist ( id AUTOINC PRIMARY KEY, ext CHAR(4), ident CHAR(16) );';
418 Query.ExecSQL;
419
420 Query.SQL.Text := 'INSERT INTO globals (name,value) VALUES ("dbversion","' +
421 dbversion + '");';
422 Query.ExecSQL;
423 SetLength(Data, Length(OniDataConnection.LevelInfo.Ident));
424 for i := 0 to High(OniDataConnection.LevelInfo.Ident) do
425 Data[i] := OniDataConnection.LevelInfo.Ident[i];
426 temps := CreateHexString(Data, True);
427 Query.SQL.Text := 'INSERT INTO globals (name,value) VALUES ("ident","' + temps + '");';
428 Query.ExecSQL;
429 Query.SQL.Text := 'INSERT INTO globals (name,value) VALUES ("lvl","' +
430 IntToStr(OniDataConnection.LevelInfo.LevelNumber) + '");';
431 Query.ExecSQL;
432 if OniDataConnection.OSisMAC then
433 Query.SQL.Text := 'INSERT INTO globals (name,value) VALUES ("os","MAC");'
434 else
435 Query.SQL.Text := 'INSERT INTO globals (name,value) VALUES ("os","PC");';
436 Query.ExecSQL;
437
438 DoStep('Writing extensionslist');
439 progress.Max := Length(OniDataConnection.GetExtensionsList);
440 Application.ProcessMessages;
441
442 extlist := OniDataConnection.GetExtendedExtensionsList;
443 for i := 0 to High(extlist) do
444 begin
445 SetLength(Data, Length(extlist[i].Ident));
446 for j := 0 to High(extlist[i].Ident) do
447 Data[j] := extlist[i].Ident[j];
448 temps := CreateHexString(Data, True);
449 temps2 := extlist[i].Extension[3] + extlist[i].Extension[2] +
450 extlist[i].Extension[1] + extlist[i].Extension[0];
451 Query.SQL.Text := 'INSERT INTO extlist (ext,ident) VALUES ("' +
452 temps2 + '","' + temps + '");';
453 Query.ExecSQL;
454 progress.Position := i;
455 lbl_progress.Caption := 'Extensions done: ' + IntToStr(i) + '/' +
456 IntToStr(Length(extlist));
457 Application.ProcessMessages;
458 if abort then
459 begin
460 stop_convert;
461 Exit;
462 end;
463 end;
464 lbl_progress.Caption := '';
465
466 progress.Position := 0;
467 lbl_progress.Caption := 'Files done: ' + IntToStr(0) + '/' + IntToStr(
468 OniDataConnection.GetFilesCount);
469 lbl_estimation.Caption := 'Estimated finishing time: unknown';
470
471 DoStep('Loading .dat into memory');
472 Application.ProcessMessages;
473
474 progress.Max := OniDataConnection.GetFilesCount;
475 begintime := Time;
476 DoStep('Writing .dat-fileslist');
477 Application.ProcessMessages;
478
479 Database.StartTransaction;
480 for i := 0 to OniDataConnection.GetFilesCount - 1 do
481 begin
482 fileinfo := OniDataConnection.GetFileInfo(i);
483 if (fileinfo.FileType and $02) = 0 then
484 begin
485 mimecoder := TStringFormat_MIME64.Create;
486 Data := OniDataConnection.LoadDatFile(i);
487 Query.SQL.Text :=
488 'INSERT INTO datfiles (id,extension,name,contenttype,size,data) VALUES (' +
489 IntToStr(i) + ',"' + fileinfo.Extension + '","' + fileinfo.Name + '","' + IntToHex(
490 fileinfo.FileType, 8) + '",' + IntToStr(fileinfo.Size) + ',MimeToBin("' +
491 MimeCoder.StrTo(@Data[0], Length(Data)) + '") );';
492 Query.ExecSQL;
493 mimecoder.Free;
494
495 rawlist := OniDataConnection.GetRawList(i);
496 if Length(rawlist) > 0 then
497 begin
498 for j := 0 to High(rawlist) do
499 begin
500 if rawlist[j].raw_size > 0 then
501 begin
502 SetLength(Data, rawlist[j].raw_size);
503 OniDataConnection.LoadRawFile(i, rawlist[j].src_offset, Data);
504 mimecoder := TStringFormat_MIME64.Create;
505 Query.SQL.Text :=
506 'INSERT INTO rawmap (src_id,src_link_offset,sep,size,data) VALUES (' +
507 IntToStr(i) + ',' + IntToStr(rawlist[j].src_offset) + ',' + BoolToStr(
508 rawlist[j].loc_sep) + ',' + IntToStr(rawlist[j].raw_size) + ',MimeToBin("' +
509 MimeCoder.StrTo(@Data[0], rawlist[j].raw_size) + '") );';
510 Query.ExecSQL;
511 mimecoder.Free;
512 end
513 else
514 begin
515 Query.SQL.Text :=
516 'INSERT INTO rawmap (src_id,src_link_offset,sep,size) VALUES (' +
517 IntToStr(i) + ',' + IntToStr(rawlist[j].src_offset) + ',' + BoolToStr(rawlist[j].loc_sep) + ',0);';
518 Query.ExecSQL;
519 end;
520 end;
521 end;
522
523 HandleFile(fileinfo.Extension, i, True);
524 end
525 else
526 begin
527 Query.SQL.Text :=
528 'INSERT INTO datfiles (id,extension,name,contenttype,size) VALUES (' +
529 IntToStr(i) + ',"' + fileinfo.Extension + '","' + fileinfo.Name + '","' + IntToHex(
530 fileinfo.FileType, 8) + '",0);';
531 Query.ExecSQL;
532 end;
533 if ((i mod 100) = 0) and (i > 0) then
534 begin
535 Database.Commit(False);
536 Database.StartTransaction;
537 end;
[58]538 if ((i mod 10) = 0) and (i >= 100) then
539 lbl_estimation.Caption := 'Estimated time left: ' + TimeToStr(
[81]540 (Time - begintime) / i * (progress.Max - i + 1) * 1.1, timeformat );
[43]541 progress.Position := i;
542 lbl_progress.Caption := 'Files done: ' + IntToStr(i) + '/' + IntToStr(progress.Max);
543 Application.ProcessMessages;
544 if abort then
545 begin
546 stop_convert;
547 Exit;
548 end;
549 end;
550 Database.Commit(False);
551 progress.Position := progress.Max;
552 lbl_progress.Caption := 'Files done: ' + IntToStr(progress.Max) + '/' +
553 IntToStr(progress.Max);
554
[56]555 lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime, timeformat) + ')';
556
[43]557 DoStep('FIN');
558 btn_abortok.Caption := '&OK';
559 btn_abortok.Default := True;
560
561 converting := False;
562
563 database.Close;
564 database.Free;
565
566 CloseDataConnection;
567end;
568
569
570
571
572procedure TForm_LevelDB.stop_convert;
573begin
574 btn_abortok.Caption := '&Close';
575 btn_abortok.Default := True;
576 converting := False;
577 lbl_estimation.Caption := 'ABORTED';
578 group_progress.Caption := 'Creating DB (ABORTED)';
579 DataBase.Close;
580 if MessageBox(Self.Handle, PChar('Delete the unfinished DB-file?'),
581 PChar('Delete file?'), MB_YESNO) = idYes then
582 begin
583 DeleteFile(loaded_filename);
584 end;
585end;
586
587
588
589
590procedure TForm_LevelDB.btn_abortokClick(Sender: TObject);
591begin
592 if converting then
593 begin
594 if MessageBox(Self.Handle,
595 PChar('Do you really want to cancel the convert-progress?'),
596 PChar('Warning: Converting'), MB_YESNO) = idYes then
597 abort := True;
598 end
599 else
600 begin
601 Self.Visible := False;
602 Form_Main.Visible := True;
603 end;
604end;
605
606
607
608
609procedure InsertDatLinkToDB(fileid: LongWord; offset: LongWord);
610var
611 link: LongWord;
612begin
613 OniDataConnection.LoadDatFilePart(fileid, offset, 4, @link);
614 if link = 0 then
615 link := $FFFFFFFF
616 else
617 link := link div 256;
618 Query.SQL.Text := 'INSERT INTO linkmap (src_id,src_link_offset,target_id) VALUES (' +
619 IntToStr(fileid) + ',' + IntToStr(offset) + ',' + IntToStr(link) + ');';
620 Query.ExecSQL;
621end;
622
623
624
625
626procedure AISA(fileid: LongWord; dir_dat2db: Boolean);
627var
628 packages: Word;
629 i: LongWord;
630begin
631 if dir_dat2db then
632 begin
633 OniDataConnection.LoadDatFilePart(fileid, $1E, 2, @packages);
634 if packages > 0 then
635 begin
636 for i := 0 to packages - 1 do
637 InsertDatLinkToDB(fileid, $20 + i * $160 + $28);
638 for i := 0 to packages - 1 do
639 InsertDatLinkToDB(fileid, $20 + i * $160 + $150);
640 end;
641 end
642 else
643 begin
644 end;
645end;
646
647
648
649
650procedure AKEV(fileid: LongWord; dir_dat2db: Boolean);
651var
652 i: LongWord;
653begin
654 if dir_dat2db then
655 begin
656 for i := 0 to 16 do
657 InsertDatLinkToDB(fileid, $8 + i * 4);
658 end
659 else
660 begin
661 end;
662end;
663
664
665
666
667procedure AKOT(fileid: LongWord; dir_dat2db: Boolean);
668var
669 i: LongWord;
670begin
671 if dir_dat2db then
672 begin
673 for i := 0 to 4 do
674 InsertDatLinkToDB(fileid, $8 + i * 4);
675 end
676 else
677 begin
678 end;
679end;
680
681
682
683
684procedure CBPI(fileid: LongWord; dir_dat2db: Boolean);
685var
686 i: LongWord;
687begin
688 if dir_dat2db then
689 begin
690 for i := 0 to 56 do
691 InsertDatLinkToDB(fileid, $8 + i * 4);
692 end
693 else
694 begin
695 end;
696end;
697
698
699
700
701procedure CBPM(fileid: LongWord; dir_dat2db: Boolean);
702var
703 i: LongWord;
704begin
705 if dir_dat2db then
706 begin
707 for i := 0 to 18 do
708 InsertDatLinkToDB(fileid, $8 + i * 4);
709 end
710 else
711 begin
712 end;
713end;
714
715
716
717
718procedure CONS(fileid: LongWord; dir_dat2db: Boolean);
719var
720 i: LongWord;
721begin
722 if dir_dat2db then
723 begin
724 for i := 0 to 1 do
725 InsertDatLinkToDB(fileid, $24 + i * 4);
726 end
727 else
728 begin
729 end;
730end;
731
732
733
734
735procedure CRSA(fileid: LongWord; dir_dat2db: Boolean);
736var
737 packages: LongWord;
738 i: LongWord;
739begin
740 if dir_dat2db then
741 begin
742 OniDataConnection.LoadDatFilePart(fileid, $14, 4, @packages);
743 if packages > 0 then
744 for i := 0 to packages - 1 do
745 InsertDatLinkToDB(fileid, $20 + i * 1100 + $A0);
746 end
747 else
748 begin
749 end;
750end;
751
752
753
754
755procedure DOOR(fileid: LongWord; dir_dat2db: Boolean);
756begin
757 if dir_dat2db then
758 begin
759 InsertDatLinkToDB(fileid, $08);
760 InsertDatLinkToDB(fileid, $10);
761 end
762 else
763 begin
764 end;
765end;
766
767
768
769
770procedure DPGE(fileid: LongWord; dir_dat2db: Boolean);
771begin
772 if dir_dat2db then
773 begin
774 InsertDatLinkToDB(fileid, $40);
775 end
776 else
777 begin
778 end;
779end;
780
781
782
783
784procedure HPGE(fileid: LongWord; dir_dat2db: Boolean);
785begin
786 if dir_dat2db then
787 begin
788 InsertDatLinkToDB(fileid, $0C);
789 end
790 else
791 begin
792 end;
793end;
794
795
796
797
798procedure IGHH(fileid: LongWord; dir_dat2db: Boolean);
799begin
800 if dir_dat2db then
801 begin
802 InsertDatLinkToDB(fileid, $24);
803 InsertDatLinkToDB(fileid, $28);
804 end
805 else
806 begin
807 end;
808end;
809
810
811
812
813procedure IGPA(fileid: LongWord; dir_dat2db: Boolean);
814var
815 links: LongWord;
816 i: LongWord;
817begin
818 if dir_dat2db then
819 begin
820 OniDataConnection.LoadDatFilePart(fileid, $1C, 4, @links);
821 if links > 0 then
822 for i := 0 to links - 1 do
823 InsertDatLinkToDB(fileid, $20 + i * 4);
824 end
825 else
826 begin
827 end;
828end;
829
830
831
832
833procedure IGPG(fileid: LongWord; dir_dat2db: Boolean);
834var
835 i: LongWord;
836begin
837 if dir_dat2db then
838 begin
839 for i := 0 to 1 do
840 InsertDatLinkToDB(fileid, $1C + i * 4);
841 end
842 else
843 begin
844 end;
845end;
846
847
848
849
850procedure IGSA(fileid: LongWord; dir_dat2db: Boolean);
851var
852 links: LongWord;
853 i: LongWord;
854begin
855 if dir_dat2db then
856 begin
857 OniDataConnection.LoadDatFilePart(fileid, $1C, 4, @links);
858 if links > 0 then
859 for i := 0 to links - 1 do
860 InsertDatLinkToDB(fileid, $20 + i * 4);
861 end
862 else
863 begin
864 end;
865end;
866
867
868
869
870procedure IMPT(fileid: LongWord; dir_dat2db: Boolean);
871begin
872 if dir_dat2db then
873 begin
874 InsertDatLinkToDB(fileid, $10);
875 end
876 else
877 begin
878 end;
879end;
880
881
882
883
884procedure IPGE(fileid: LongWord; dir_dat2db: Boolean);
885begin
886 if dir_dat2db then
887 begin
888 InsertDatLinkToDB(fileid, $0C);
889 end
890 else
891 begin
892 end;
893end;
894
895
896
897
898procedure KEYI(fileid: LongWord; dir_dat2db: Boolean);
899var
900 i: LongWord;
901begin
902 if dir_dat2db then
903 begin
904 for i := 0 to 9 do
905 InsertDatLinkToDB(fileid, $08 + i * 4);
906 end
907 else
908 begin
909 end;
910end;
911
912
913
914
915procedure M3GA(fileid: LongWord; dir_dat2db: Boolean);
916var
917 links: LongWord;
918 i: LongWord;
919begin
920 if dir_dat2db then
921 begin
922 OniDataConnection.LoadDatFilePart(fileid, $1C, 4, @links);
923 if links > 0 then
924 for i := 0 to links - 1 do
925 InsertDatLinkToDB(fileid, $20 + i * 4);
926 end
927 else
928 begin
929 end;
930end;
931
932
933
934
935procedure M3GM(fileid: LongWord; dir_dat2db: Boolean);
936var
937 i: LongWord;
938begin
939 if dir_dat2db then
940 begin
941 for i := 0 to 6 do
942 InsertDatLinkToDB(fileid, $0C + i * 4);
943 end
944 else
945 begin
946 end;
947end;
948
949
950
951
952procedure MTRL(fileid: LongWord; dir_dat2db: Boolean);
953begin
954 if dir_dat2db then
955 begin
956 InsertDatLinkToDB(fileid, $10);
957 end
958 else
959 begin
960 end;
961end;
962
963
964
965
966procedure OBDC(fileid: LongWord; dir_dat2db: Boolean);
967var
968 packages: Word;
969 i: LongWord;
970begin
971 if dir_dat2db then
972 begin
973 OniDataConnection.LoadDatFilePart(fileid, $1E, 2, @packages);
974 if packages > 0 then
975 for i := 0 to packages - 1 do
976 InsertDatLinkToDB(fileid, $20 + i * $18 + $4);
977 end
978 else
979 begin
980 end;
981end;
982
983
984
985
986procedure OBOA(fileid: LongWord; dir_dat2db: Boolean);
987var
988 packages: Word;
989 i: LongWord;
990begin
991 if dir_dat2db then
992 begin
993 OniDataConnection.LoadDatFilePart(fileid, $1E, 2, @packages);
994 if packages > 0 then
995 for i := 0 to packages - 1 do
996 begin
997 InsertDatLinkToDB(fileid, $20 + i * 240 + $0);
998 InsertDatLinkToDB(fileid, $20 + i * 240 + $4);
999 InsertDatLinkToDB(fileid, $20 + i * 240 + $8);
1000 end;
1001 end
1002 else
1003 begin
1004 end;
1005end;
1006
1007
1008
1009
1010procedure OFGA(fileid: LongWord; dir_dat2db: Boolean);
1011var
1012 packages: LongWord;
1013 i: LongWord;
1014begin
1015 if dir_dat2db then
1016 begin
1017 OniDataConnection.LoadDatFilePart(fileid, $1C, 4, @packages);
1018 if packages > 0 then
1019 for i := 0 to packages - 1 do
1020 InsertDatLinkToDB(fileid, $20 + i * 12 + $04);
1021 end
1022 else
1023 begin
1024 end;
1025end;
1026
1027
1028
1029
1030procedure ONCC(fileid: LongWord; dir_dat2db: Boolean);
1031var
1032 i: LongWord;
1033begin
1034 if dir_dat2db then
1035 begin
1036 InsertDatLinkToDB(fileid, $28);
1037 InsertDatLinkToDB(fileid, $434);
1038 InsertDatLinkToDB(fileid, $438);
1039 InsertDatLinkToDB(fileid, $43C);
1040 InsertDatLinkToDB(fileid, $C3C);
1041 InsertDatLinkToDB(fileid, $C40);
1042 InsertDatLinkToDB(fileid, $C44);
1043 InsertDatLinkToDB(fileid, $C48);
1044 InsertDatLinkToDB(fileid, $C88);
1045 InsertDatLinkToDB(fileid, $C8C);
1046 end
1047 else
1048 begin
1049 end;
1050end;
1051
1052
1053
1054
1055procedure ONCV(fileid: LongWord; dir_dat2db: Boolean);
1056begin
1057 if dir_dat2db then
1058 begin
1059 InsertDatLinkToDB(fileid, $08);
1060 end
1061 else
1062 begin
1063 end;
1064end;
1065
1066
1067
1068
1069procedure ONLV(fileid: LongWord; dir_dat2db: Boolean);
1070var
1071 i: LongWord;
1072begin
1073 if dir_dat2db then
1074 begin
1075 for i := 0 to 5 do
1076 InsertDatLinkToDB(fileid, $48 + i * 4);
1077 for i := 0 to 5 do
1078 InsertDatLinkToDB(fileid, $64 + i * 4);
1079 InsertDatLinkToDB(fileid, $300);
1080 end
1081 else
1082 begin
1083 end;
1084end;
1085
1086
1087
1088
1089procedure ONOA(fileid: LongWord; dir_dat2db: Boolean);
1090var
1091 packages: LongWord;
1092 i: LongWord;
1093begin
1094 if dir_dat2db then
1095 begin
1096 OniDataConnection.LoadDatFilePart(fileid, $1C, 4, @packages);
1097 if packages > 0 then
1098 for i := 0 to packages - 1 do
1099 InsertDatLinkToDB(fileid, $20 + i * 8 + $04);
1100 end
1101 else
1102 begin
1103 end;
1104end;
1105
1106
1107
1108
1109procedure ONSK(fileid: LongWord; dir_dat2db: Boolean);
1110begin
1111 if dir_dat2db then
1112 begin
1113 InsertDatLinkToDB(fileid, $08);
1114 InsertDatLinkToDB(fileid, $0C);
1115 InsertDatLinkToDB(fileid, $10);
1116 InsertDatLinkToDB(fileid, $14);
1117 InsertDatLinkToDB(fileid, $18);
1118 InsertDatLinkToDB(fileid, $20);
1119 InsertDatLinkToDB(fileid, $44);
1120 end
1121 else
1122 begin
1123 end;
1124end;
1125
1126
1127
1128
1129procedure ONVL(fileid: LongWord; dir_dat2db: Boolean);
1130var
1131 packages: LongWord;
1132 i: LongWord;
1133begin
1134 if dir_dat2db then
1135 begin
1136 OniDataConnection.LoadDatFilePart(fileid, $1C, 4, @packages);
1137 if packages > 0 then
1138 for i := 0 to packages - 1 do
1139 InsertDatLinkToDB(fileid, $20 + i * 4);
1140 end
1141 else
1142 begin
1143 end;
1144end;
1145
1146
1147
1148
1149procedure ONWC(fileid: LongWord; dir_dat2db: Boolean);
1150begin
1151 if dir_dat2db then
1152 begin
1153 InsertDatLinkToDB(fileid, $28);
1154 InsertDatLinkToDB(fileid, $34);
1155 InsertDatLinkToDB(fileid, $40);
1156 InsertDatLinkToDB(fileid, $54);
1157 InsertDatLinkToDB(fileid, $58);
1158 InsertDatLinkToDB(fileid, $5C);
1159 InsertDatLinkToDB(fileid, $60);
1160 InsertDatLinkToDB(fileid, $6FC);
1161 InsertDatLinkToDB(fileid, $700);
1162 end
1163 else
1164 begin
1165 end;
1166end;
1167
1168
1169
1170
1171procedure OPGE(fileid: LongWord; dir_dat2db: Boolean);
1172begin
1173 if dir_dat2db then
1174 begin
1175 InsertDatLinkToDB(fileid, $0C);
1176 end
1177 else
1178 begin
1179 end;
1180end;
1181
1182
1183
1184
1185procedure PSPC(fileid: LongWord; dir_dat2db: Boolean);
1186begin
1187 if dir_dat2db then
1188 begin
1189 InsertDatLinkToDB(fileid, $50);
1190 end
1191 else
1192 begin
1193 end;
1194end;
1195
1196
1197
1198
1199procedure PSPL(fileid: LongWord; dir_dat2db: Boolean);
1200var
1201 packages: LongWord;
1202 i: LongWord;
1203begin
1204 if dir_dat2db then
1205 begin
1206 OniDataConnection.LoadDatFilePart(fileid, $1C, 4, @packages);
1207 if packages > 0 then
1208 for i := 0 to packages - 1 do
1209 InsertDatLinkToDB(fileid, $20 + i * 8 + $4);
1210 end
1211 else
1212 begin
1213 end;
1214end;
1215
1216
1217
1218
1219procedure PSUI(fileid: LongWord; dir_dat2db: Boolean);
1220var
1221 i: LongWord;
1222begin
1223 if dir_dat2db then
1224 begin
1225 for i := 0 to 43 do
1226 InsertDatLinkToDB(fileid, $08 + i * 4);
1227 end
1228 else
1229 begin
1230 end;
1231end;
1232
1233
1234
1235
1236procedure STNA(fileid: LongWord; dir_dat2db: Boolean);
1237var
1238 packages: Word;
1239 i: LongWord;
1240begin
1241 if dir_dat2db then
1242 begin
1243 OniDataConnection.LoadDatFilePart(fileid, $1E, 2, @packages);
1244 if packages > 0 then
1245 for i := 0 to packages - 1 do
1246 InsertDatLinkToDB(fileid, $20 + i * 4);
1247 end
1248 else
1249 begin
1250 end;
1251end;
1252
1253
1254
1255
1256procedure TRAC(fileid: LongWord; dir_dat2db: Boolean);
1257var
1258 packages: Word;
1259 i: LongWord;
1260begin
1261 if dir_dat2db then
1262 begin
1263 InsertDatLinkToDB(fileid, $18);
1264 OniDataConnection.LoadDatFilePart(fileid, $1E, 2, @packages);
1265 if packages > 0 then
1266 for i := 0 to packages - 1 do
1267 InsertDatLinkToDB(fileid, $20 + i * 12 + 8);
1268 end
1269 else
1270 begin
1271 end;
1272end;
1273
1274
1275
1276
1277procedure TRAM(fileid: LongWord; dir_dat2db: Boolean);
1278begin
1279 if dir_dat2db then
1280 begin
1281 InsertDatLinkToDB(fileid, $40);
1282 InsertDatLinkToDB(fileid, $44);
1283 end
1284 else
1285 begin
1286 end;
1287end;
1288
1289
1290
1291
1292procedure TRAS(fileid: LongWord; dir_dat2db: Boolean);
1293begin
1294 if dir_dat2db then
1295 begin
1296 InsertDatLinkToDB(fileid, $08);
1297 end
1298 else
1299 begin
1300 end;
1301end;
1302
1303
1304
1305
1306procedure TRBS(fileid: LongWord; dir_dat2db: Boolean);
1307var
1308 i: LongWord;
1309begin
1310 if dir_dat2db then
1311 begin
1312 for i := 0 to 4 do
1313 InsertDatLinkToDB(fileid, $08 + i * 4);
1314 end
1315 else
1316 begin
1317 end;
1318end;
1319
1320
1321
1322
1323procedure TRCM(fileid: LongWord; dir_dat2db: Boolean);
1324var
1325 i: LongWord;
1326begin
1327 if dir_dat2db then
1328 begin
1329 for i := 0 to 2 do
1330 InsertDatLinkToDB(fileid, $5C + i * 4);
1331 end
1332 else
1333 begin
1334 end;
1335end;
1336
1337
1338
1339
1340procedure TRGA(fileid: LongWord; dir_dat2db: Boolean);
1341var
1342 i: LongWord;
1343 packages: Word;
1344begin
1345 if dir_dat2db then
1346 begin
1347 OniDataConnection.LoadDatFilePart(fileid, $1E, 2, @packages);
1348 if packages > 0 then
1349 for i := 0 to packages - 1 do
1350 InsertDatLinkToDB(fileid, $20 + i * 4);
1351 end
1352 else
1353 begin
1354 end;
1355end;
1356
1357
1358
1359
1360procedure TRGE(fileid: LongWord; dir_dat2db: Boolean);
1361begin
1362 if dir_dat2db then
1363 begin
1364 InsertDatLinkToDB(fileid, $20);
1365 end
1366 else
1367 begin
1368 end;
1369end;
1370
1371
1372
1373
1374procedure TRIG(fileid: LongWord; dir_dat2db: Boolean);
1375begin
1376 if dir_dat2db then
1377 begin
1378 InsertDatLinkToDB(fileid, $18);
1379 InsertDatLinkToDB(fileid, $24);
1380 InsertDatLinkToDB(fileid, $28);
1381 end
1382 else
1383 begin
1384 end;
1385end;
1386
1387
1388
1389
1390procedure TRMA(fileid: LongWord; dir_dat2db: Boolean);
1391var
1392 i: LongWord;
1393 packages: Word;
1394begin
1395 if dir_dat2db then
1396 begin
1397 OniDataConnection.LoadDatFilePart(fileid, $1E, 2, @packages);
1398 if packages > 0 then
1399 for i := 0 to packages - 1 do
1400 InsertDatLinkToDB(fileid, $20 + i * 4);
1401 end
1402 else
1403 begin
1404 end;
1405end;
1406
1407
1408
1409
1410procedure TRSC(fileid: LongWord; dir_dat2db: Boolean);
1411var
1412 i: LongWord;
1413 packages: Word;
1414begin
1415 if dir_dat2db then
1416 begin
1417 OniDataConnection.LoadDatFilePart(fileid, $1E, 2, @packages);
1418 if packages > 0 then
1419 for i := 0 to packages - 1 do
1420 InsertDatLinkToDB(fileid, $20 + i * 4);
1421 end
1422 else
1423 begin
1424 end;
1425end;
1426
1427
1428
1429
1430procedure TSFF(fileid: LongWord; dir_dat2db: Boolean);
1431var
1432 i: LongWord;
1433 packages: LongWord;
1434begin
1435 if dir_dat2db then
1436 begin
1437 OniDataConnection.LoadDatFilePart(fileid, $1C, 4, @packages);
1438 if packages > 0 then
1439 for i := 0 to packages - 1 do
1440 InsertDatLinkToDB(fileid, $20 + i * 4);
1441 end
1442 else
1443 begin
1444 end;
1445end;
1446
1447
1448
1449
1450procedure TSFT(fileid: LongWord; dir_dat2db: Boolean);
1451begin
1452 if dir_dat2db then
1453 begin
1454 InsertDatLinkToDB(fileid, $1C);
1455 end
1456 else
1457 begin
1458 end;
1459end;
1460
1461
1462
1463
1464procedure TURR(fileid: LongWord; dir_dat2db: Boolean);
1465begin
1466 if dir_dat2db then
1467 begin
1468 InsertDatLinkToDB(fileid, $60);
1469 InsertDatLinkToDB(fileid, $6C);
1470 InsertDatLinkToDB(fileid, $74);
1471 end
1472 else
1473 begin
1474 end;
1475end;
1476
1477
1478
1479
1480procedure TXAN(fileid: LongWord; dir_dat2db: Boolean);
1481var
1482 i: LongWord;
1483 packages: LongWord;
1484begin
1485 if dir_dat2db then
1486 begin
1487 OniDataConnection.LoadDatFilePart(fileid, $1C, 4, @packages);
1488 if packages > 0 then
1489 for i := 0 to packages - 1 do
1490 InsertDatLinkToDB(fileid, $20 + i * 4);
1491 end
1492 else
1493 begin
1494 end;
1495end;
1496
1497
1498
1499
1500procedure TXMA(fileid: LongWord; dir_dat2db: Boolean);
1501var
1502 i: LongWord;
1503 packages: LongWord;
1504begin
1505 if dir_dat2db then
1506 begin
1507 OniDataConnection.LoadDatFilePart(fileid, $1C, 4, @packages);
1508 if packages > 0 then
1509 for i := 0 to packages - 1 do
1510 InsertDatLinkToDB(fileid, $20 + i * 4);
1511 end
1512 else
1513 begin
1514 end;
1515end;
1516
1517
1518
1519
1520procedure TXMB(fileid: LongWord; dir_dat2db: Boolean);
1521var
1522 i: LongWord;
1523 packages: LongWord;
1524begin
1525 if dir_dat2db then
1526 begin
1527 OniDataConnection.LoadDatFilePart(fileid, $1C, 4, @packages);
1528 if packages > 0 then
1529 for i := 0 to packages - 1 do
1530 InsertDatLinkToDB(fileid, $20 + i * 4);
1531 end
1532 else
1533 begin
1534 end;
1535end;
1536
1537
1538
1539
1540procedure TXMP(fileid: LongWord; dir_dat2db: Boolean);
1541begin
1542 if dir_dat2db then
1543 begin
1544 InsertDatLinkToDB(fileid, $94);
1545 InsertDatLinkToDB(fileid, $98);
1546 end
1547 else
1548 begin
1549 end;
1550end;
1551
1552
1553
1554
1555procedure TXTC(fileid: LongWord; dir_dat2db: Boolean);
1556begin
1557 if dir_dat2db then
1558 begin
1559 InsertDatLinkToDB(fileid, $08);
1560 end
1561 else
1562 begin
1563 end;
1564end;
1565
1566
1567
1568
1569procedure WMCL(fileid: LongWord; dir_dat2db: Boolean);
1570var
1571 i: LongWord;
1572 packages: LongWord;
1573begin
1574 if dir_dat2db then
1575 begin
1576 OniDataConnection.LoadDatFilePart(fileid, $1C, 4, @packages);
1577 if packages > 0 then
1578 for i := 0 to packages - 1 do
1579 InsertDatLinkToDB(fileid, $20 + i * 8 + $4);
1580 end
1581 else
1582 begin
1583 end;
1584end;
1585
1586
1587
1588
1589procedure WMDD(fileid: LongWord; dir_dat2db: Boolean);
1590var
1591 i: LongWord;
1592 packages: LongWord;
1593begin
1594 if dir_dat2db then
1595 begin
1596 OniDataConnection.LoadDatFilePart(fileid, $11C, 4, @packages);
1597 if packages > 0 then
1598 for i := 0 to packages - 1 do
1599 InsertDatLinkToDB(fileid, $120 + i * $124 + $114);
1600 end
1601 else
1602 begin
1603 end;
1604end;
1605
1606
1607
1608
1609procedure WMMB(fileid: LongWord; dir_dat2db: Boolean);
1610var
1611 i: LongWord;
1612 packages: LongWord;
1613begin
1614 if dir_dat2db then
1615 begin
1616 OniDataConnection.LoadDatFilePart(fileid, $1C, 4, @packages);
1617 if packages > 0 then
1618 for i := 0 to packages - 1 do
1619 InsertDatLinkToDB(fileid, $20 + i * 4);
1620 end
1621 else
1622 begin
1623 end;
1624end;
1625
1626
1627
1628
1629procedure WPGE(fileid: LongWord; dir_dat2db: Boolean);
1630begin
1631 if dir_dat2db then
1632 begin
1633 InsertDatLinkToDB(fileid, $08);
1634 InsertDatLinkToDB(fileid, $0C);
1635 end
1636 else
1637 begin
1638 end;
1639end;
1640
1641
1642
1643
1644procedure InsertHandler(ext: String; needed: Boolean; handler: THandler);
1645begin
1646 SetLength(ConvertHandlers, Length(ConvertHandlers) + 1);
1647 ConvertHandlers[High(ConvertHandlers)].Ext := ext;
1648 ConvertHandlers[High(ConvertHandlers)].needed := needed;
1649 ConvertHandlers[High(ConvertHandlers)].handler := handler;
1650end;
1651
1652begin
1653 InsertHandler('ABNA', False, nil);
1654 // InsertHandler('AGDB',True,AGDB);
1655 InsertHandler('AGDB', False, nil);
1656 InsertHandler('AGQC', False, nil);
1657 InsertHandler('AGQG', False, nil);
1658 InsertHandler('AGQR', False, nil);
1659 InsertHandler('AISA', True, AISA);
1660 InsertHandler('AITR', False, nil);
1661 InsertHandler('AKAA', False, nil);
1662 InsertHandler('AKBA', False, nil);
1663 InsertHandler('AKBP', False, nil);
1664 InsertHandler('AKDA', False, nil);
1665 InsertHandler('AKEV', True, AKEV);
1666 InsertHandler('AKOT', True, AKOT);
1667 InsertHandler('AKVA', False, nil);
1668 InsertHandler('BINA', False, nil);
1669 InsertHandler('CBPI', True, CBPI);
1670 InsertHandler('CBPM', True, CBPM);
1671 InsertHandler('CONS', True, CONS);
1672 InsertHandler('CRSA', True, CRSA);
1673 InsertHandler('DOOR', True, DOOR);
1674 InsertHandler('DPGE', True, DPGE);
1675 InsertHandler('ENVP', False, nil);
1676 InsertHandler('FILM', False, nil);
1677 InsertHandler('HPGE', True, HPGE);
1678 InsertHandler('IDXA', False, nil);
1679 InsertHandler('IGHH', True, IGHH);
1680 InsertHandler('IGPA', True, IGPA);
1681 InsertHandler('IGPG', True, IGPG);
1682 InsertHandler('IGSA', True, IGSA);
1683 InsertHandler('IMPT', True, IMPT);
1684 InsertHandler('IPGE', True, IPGE);
1685 InsertHandler('KEYI', True, KEYI);
1686 InsertHandler('M3GA', True, M3GA);
1687 InsertHandler('M3GM', True, M3GM);
1688 InsertHandler('MTRL', True, MTRL);
1689 InsertHandler('OBAN', False, nil);
1690 InsertHandler('OBDC', True, OBDC);
1691 InsertHandler('OBOA', True, OBOA);
1692 InsertHandler('OFGA', True, OFGA);
1693 InsertHandler('ONCC', True, ONCC);
1694 InsertHandler('ONCP', False, nil);
1695 InsertHandler('ONCV', True, ONCV);
1696 InsertHandler('ONFA', False, nil);
1697 InsertHandler('ONGS', False, nil);
1698 InsertHandler('ONIA', False, nil);
1699 InsertHandler('ONLD', False, nil);
1700 InsertHandler('ONLV', True, ONLV);
1701 InsertHandler('ONMA', False, nil);
1702 InsertHandler('ONOA', True, ONOA);
1703 InsertHandler('ONSA', False, nil);
1704 InsertHandler('ONSK', True, ONSK);
1705 InsertHandler('ONTA', False, nil);
1706 InsertHandler('ONVL', True, ONVL);
1707 InsertHandler('ONWC', True, ONWC);
1708 InsertHandler('OPGE', True, OPGE);
1709 InsertHandler('OSBD', False, nil);
1710 InsertHandler('OTIT', False, nil);
1711 InsertHandler('OTLF', False, nil);
1712 InsertHandler('PLEA', False, nil);
1713 InsertHandler('PNTA', False, nil);
1714 InsertHandler('PSPC', True, PSPC);
1715 InsertHandler('PSPL', True, PSPL);
1716 InsertHandler('PSUI', True, PSUI);
1717 InsertHandler('QTNA', False, nil);
1718 InsertHandler('SNDD', False, nil);
1719 InsertHandler('STNA', True, STNA);
1720 InsertHandler('SUBT', False, nil);
1721 InsertHandler('TRAC', True, TRAC);
1722 InsertHandler('TRAM', True, TRAM);
1723 InsertHandler('TRAS', True, TRAS);
1724 InsertHandler('TRBS', True, TRBS);
1725 InsertHandler('TRCM', True, TRCM);
1726 InsertHandler('TRGA', True, TRGA);
1727 InsertHandler('TRGE', True, TRGE);
1728 InsertHandler('TRIA', False, nil);
1729 InsertHandler('TRIG', True, TRIG);
1730 InsertHandler('TRMA', True, TRMA);
1731 InsertHandler('TRSC', True, TRSC);
1732 InsertHandler('TRTA', False, nil);
1733 InsertHandler('TSFF', True, TSFF);
1734 InsertHandler('TSFL', False, nil);
1735 InsertHandler('TSFT', True, TSFT);
1736 InsertHandler('TSGA', False, nil);
1737 InsertHandler('TSTR', False, nil);
1738 InsertHandler('TURR', True, TURR);
1739 InsertHandler('TXAN', True, TXAN);
1740 InsertHandler('TXCA', False, nil);
1741 InsertHandler('TXMA', True, TXMA);
1742 InsertHandler('TXMB', True, TXMB);
1743 InsertHandler('TXMP', True, TXMP);
1744 InsertHandler('TXTC', True, TXTC);
1745 InsertHandler('VCRA', False, nil);
1746 InsertHandler('WMCL', True, WMCL);
1747 InsertHandler('WMDD', True, WMDD);
1748 InsertHandler('WMM_', False, nil);
1749 InsertHandler('WMMB', True, WMMB);
1750 InsertHandler('WPGE', True, WPGE);
1751end.
Note: See TracBrowser for help on using the repository browser.