--- oup/current/Global/RawList.pas 2007/02/25 17:20:22 113 +++ oup/current/Global/RawList.pas 2007/03/23 01:41:15 122 @@ -311,20 +311,39 @@ var x, y: Word; storetype: Byte; datasize: Integer; + mipmap: Byte; + bpp: Byte; begin + ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $88, SizeOf(mipmap), @mipmap); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $8C, SizeOf(x), @x); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $8E, SizeOf(y), @y); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $90, SizeOf(storetype), @storetype); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $9C, 4, @link_pc); ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $A0, 4, @link_mac); + + case storetype of 0, 1, 2: - datasize := x * y * 2; + bpp := 16; +// datasize := x * y * 2; 8: - datasize := x * y * 4; + bpp := 32; +// datasize := x * y * 4; 9: - datasize := x * y div 2; + bpp := 4; +// datasize := x * y div 2; end; + + datasize := (x * y * bpp) div 8; + if (mipmap and $01) > 0 then + begin + repeat + x := x div 2; + y := y div 2; + datasize := datasize + (x * y * bpp) div 8; + until (x = 1) or (y = 1); + end; + SetLength(Result, 1); if ConManager.Connection[ConnectionID].DataOS = DOS_WIN then begin