Changeset 127
- Timestamp:
- Mar 23, 2007, 6:14:40 PM (18 years ago)
- Location:
- oup/current
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Global/OniImgClass.pas
r124 r127 618 618 size := size + (x * y * bpp) div 8; 619 619 until (x = minside) or (y = minside); 620 if FStoreType = 9 then 621 begin 622 repeat 623 x := x div 2; 624 y := y div 2; 625 size := size + (x * y * 16) div 8; 626 until (x = 1) or (y = 1); 627 end; 620 628 end; 621 629 Result := size; -
oup/current/Global/RawList.pas
r124 r127 345 345 datasize := datasize + (x * y * bpp) div 8; 346 346 until (x = minside) or (y = minside); 347 if storetype = 9 then 348 begin 349 repeat 350 x := x div 2; 351 y := y div 2; 352 datasize := datasize + (x * y * 16) div 8; 353 until (x = 1) or (y = 1); 354 end; 347 355 end; 348 356 -
oup/current/Helper/LevelDB.pas
r120 r127 1 {$A8,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1}2 {$MINSTACKSIZE $00004000}3 {$MAXSTACKSIZE $00100000}4 {$IMAGEBASE $00400000}5 {$APPTYPE GUI}6 {$WARN SYMBOL_DEPRECATED ON}7 {$WARN SYMBOL_LIBRARY ON}8 {$WARN SYMBOL_PLATFORM ON}9 {$WARN SYMBOL_EXPERIMENTAL ON}10 {$WARN UNIT_LIBRARY ON}11 {$WARN UNIT_PLATFORM ON}12 {$WARN UNIT_DEPRECATED ON}13 {$WARN UNIT_EXPERIMENTAL ON}14 {$WARN HRESULT_COMPAT ON}15 {$WARN HIDING_MEMBER ON}16 {$WARN HIDDEN_VIRTUAL ON}17 {$WARN GARBAGE ON}18 {$WARN BOUNDS_ERROR ON}19 {$WARN ZERO_NIL_COMPAT ON}20 {$WARN STRING_CONST_TRUNCED ON}21 {$WARN FOR_LOOP_VAR_VARPAR ON}22 {$WARN TYPED_CONST_VARPAR ON}23 {$WARN ASG_TO_TYPED_CONST ON}24 {$WARN CASE_LABEL_RANGE ON}25 {$WARN FOR_VARIABLE ON}26 {$WARN CONSTRUCTING_ABSTRACT ON}27 {$WARN COMPARISON_FALSE ON}28 {$WARN COMPARISON_TRUE ON}29 {$WARN COMPARING_SIGNED_UNSIGNED ON}30 {$WARN COMBINING_SIGNED_UNSIGNED ON}31 {$WARN UNSUPPORTED_CONSTRUCT ON}32 {$WARN FILE_OPEN ON}33 {$WARN FILE_OPEN_UNITSRC ON}34 {$WARN BAD_GLOBAL_SYMBOL ON}35 {$WARN DUPLICATE_CTOR_DTOR ON}36 {$WARN INVALID_DIRECTIVE ON}37 {$WARN PACKAGE_NO_LINK ON}38 {$WARN PACKAGED_THREADVAR ON}39 {$WARN IMPLICIT_IMPORT ON}40 {$WARN HPPEMIT_IGNORED ON}41 {$WARN NO_RETVAL ON}42 {$WARN USE_BEFORE_DEF ON}43 {$WARN FOR_LOOP_VAR_UNDEF ON}44 {$WARN UNIT_NAME_MISMATCH ON}45 {$WARN NO_CFG_FILE_FOUND ON}46 {$WARN IMPLICIT_VARIANTS ON}47 {$WARN UNICODE_TO_LOCALE ON}48 {$WARN LOCALE_TO_UNICODE ON}49 {$WARN IMAGEBASE_MULTIPLE ON}50 {$WARN SUSPICIOUS_TYPECAST ON}51 {$WARN PRIVATE_PROPACCESSOR ON}52 {$WARN UNSAFE_TYPE OFF}53 {$WARN UNSAFE_CODE OFF}54 {$WARN UNSAFE_CAST OFF}55 {$WARN OPTION_TRUNCATED ON}56 {$WARN WIDECHAR_REDUCED ON}57 {$WARN DUPLICATES_IGNORED ON}58 {$WARN UNIT_INIT_SEQ ON}59 {$WARN LOCAL_PINVOKE ON}60 {$WARN MESSAGE_DIRECTIVE ON}61 1 unit LevelDB; 62 2 interface … … 372 312 begin 373 313 RawFileStream := TMemoryStream.Create; 374 if UpperCase(fileinfo.Extension) = 'TXMP' then 314 Connection.LoadRawFile(FileID, RawLinks[i].SrcOffset, TStream(RawFileStream)); 315 RawFileStream.Seek(0, soFromBeginning); 316 if RawLinks[i].LocSep then 375 317 begin 376 DatFileStream.Seek($88, soFromBeginning); 377 DatFileStream.Read(tempb, 1); 378 if (tempb and $01) > 0 then 379 begin 380 OniImage.Load(Connection.ConnectionID, FileID); 381 if not OniImage.GetMipMappedImage(TStream(RawFileStream)) then 382 begin 383 ShowMessage('MipMapping-Error'); 384 RawFileStream.Seek(0, soFromBeginning); 385 tempb := tempb and $FE; 386 DatFileStream.Seek($88, soFromBeginning); 387 DatFileStream.Write(tempb, 1); 388 OniImage.Load(Connection.ConnectionID, FileID); 389 OniImage.GetAsData(TStream(RawFileStream)); 390 end else 391 begin 392 // Change of Depth($89), Storetype ($90) 393 DatFileStream.Seek($89, soFromBeginning); 394 DatFileStream.Read(tempb, 1); 395 396 DatFileStream.Seek($90, soFromBeginning); 397 DatFileStream.Read(tempb, 1); 398 Exit; 399 end; 400 end else 401 OniImage.GetAsData(TStream(RawFileStream)); 318 RawLinks[i].RawAddr := Stream_Sep.Size; 319 Stream_sep.CopyFrom(RawFileStream, RawFileStream.Size); 402 320 end else begin 403 Connection.LoadRawFile(FileID, RawLinks[i].SrcOffset, TStream(RawFileStream)); 321 RawLinks[i].RawAddr := Stream_Raw.Size; 322 Stream_Raw.CopyFrom(RawFileStream, RawFileStream.Size); 404 323 end; 405 RawFileStream.Seek(0, soFromBeginning);406 324 end else 407 325 RawLinks[i].RawAddr := 0; … … 410 328 411 329 { 412 if rawlist[j].raw_size > 0 then413 begin414 if (UpperCase(fileinfo.Extension) = 'TXMP') and415 ((Data[$88] and $01) > 0) then416 begin417 OniImage.LoadFromTXMP(Connection, i);418 OniImage.GetMipMappedImage(rawdata);419 rawlist[j].raw_size := OniImage.GetImageDataSize(True);420 Data[$90] := $08;421 Data[$89] := 32;422 (* if data[$90]<>OniImage.StoreType then begin423 data[$90]:=OniImage.StoreType;424 data[$89]:=(data[$89] and $CF) or $20;425 end;426 *) end427 else428 begin429 SetLength(rawdata, rawlist[j].raw_size);430 OniDataConnection.LoadRawFile(i, rawlist[j].src_offset, @rawdata[0]);431 end;432 // data[$88]:=data[$88] and $FE;433 434 if rawlist[j].loc_sep then435 begin436 rawlist[j].raw_addr := Stream_Sep.Size;437 Stream_Sep.Write(rawdata[0], Length(rawdata));438 end439 else440 begin441 rawlist[j].raw_addr := Stream_Raw.Size;442 Stream_Raw.Write(rawdata[0], Length(rawdata));443 end;444 end445 else446 rawlist[j].raw_addr := 0;447 330 Data[rawlist[j].src_offset + 0] := (rawlist[j].raw_addr) and $FF; 448 331 Data[rawlist[j].src_offset + 1] := (rawlist[j].raw_addr shr 8) and $FF;
Note:
See TracChangeset
for help on using the changeset viewer.