- Timestamp:
- Apr 1, 2007, 2:27:10 PM (18 years ago)
- Location:
- oup/current
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Helper/LevelDB.pas
r142 r143 45 45 46 46 procedure TForm_LevelDB.CreateLevel(Source, Target: String); 47 const 48 EmptyBytes: Array[0..31] of Byte = ( 49 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ); 47 50 var 48 51 DatHeader: THeader; … … 336 339 RawLinks[i].RawAddr := Stream_Sep.Size; 337 340 Stream_sep.CopyFrom(RawFileStream, RawFileStream.Size); 341 if (Stream_Sep.Size mod 32) > 0 then 342 Stream_Sep.Write(EmptyBytes[0], 32 - (Stream_Sep.Size mod 32)); 338 343 end else begin 339 344 RawLinks[i].RawAddr := Stream_Raw.Size; 340 345 Stream_Raw.CopyFrom(RawFileStream, RawFileStream.Size); 346 if (Stream_Raw.Size mod 32) > 0 then 347 Stream_Raw.Write(EmptyBytes[0], 32 - (Stream_Raw.Size mod 32)); 341 348 end; 342 349 end else … … 348 355 DatFileStream.Seek(0, soFromBeginning); 349 356 Stream_Body.CopyFrom(DatFileStream, DatFileStream.Size); 357 if (Stream_Body.Size mod 32) > 0 then 358 Stream_Body.Write(EmptyBytes[0], 32 - (Stream_Body.Size mod 32)); 350 359 end 351 360 else … … 378 387 Stream_Dat.Write(ExtensionsHeader[i], SizeOf(ExtensionsHeader[i])); 379 388 389 if (Stream_Dat.Size mod 32) > 0 then 390 Stream_Dat.Write(EmptyBytes[0], 32 - (Stream_Dat.Size mod 32)); 391 380 392 DatHeader.DataSize := Stream_Body.Size; 381 393 DatHeader.NamesSize := Stream_Names.Size; … … 384 396 Stream_Body.Seek(0, soFromBeginning); 385 397 Stream_Dat.CopyFrom(Stream_Body, Stream_Body.Size); 398 399 if (Stream_Dat.Size mod 32) > 0 then 400 Stream_Dat.Write(EmptyBytes[0], 32 - (Stream_Dat.Size mod 32)); 401 386 402 DatHeader.NamesAddr := Stream_Dat.Size; 387 403 Stream_Names.Seek(0, soFromBeginning);
Note:
See TracChangeset
for help on using the changeset viewer.