| 313 |
|
datasize: Integer; |
| 314 |
|
mipmap: Byte; |
| 315 |
|
bpp: Byte; |
| 316 |
+ |
minside: Byte; |
| 317 |
|
begin |
| 318 |
|
ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $88, SizeOf(mipmap), @mipmap); |
| 319 |
|
ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $8C, SizeOf(x), @x); |
| 323 |
|
ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $A0, 4, @link_mac); |
| 324 |
|
|
| 325 |
|
|
| 326 |
+ |
minside := 1; |
| 327 |
|
case storetype of |
| 328 |
|
0, 1, 2: |
| 329 |
|
bpp := 16; |
| 328 |
– |
// datasize := x * y * 2; |
| 330 |
|
8: |
| 331 |
|
bpp := 32; |
| 331 |
– |
// datasize := x * y * 4; |
| 332 |
|
9: |
| 333 |
+ |
begin |
| 334 |
|
bpp := 4; |
| 335 |
< |
// datasize := x * y div 2; |
| 335 |
> |
minside := 4; |
| 336 |
> |
end; |
| 337 |
|
end; |
| 338 |
|
|
| 339 |
|
datasize := (x * y * bpp) div 8; |
| 343 |
|
x := x div 2; |
| 344 |
|
y := y div 2; |
| 345 |
|
datasize := datasize + (x * y * bpp) div 8; |
| 346 |
< |
until (x = 1) or (y = 1); |
| 346 |
> |
until (x = minside) or (y = minside); |
| 347 |
|
end; |
| 348 |
|
|
| 349 |
|
SetLength(Result, 1); |