changeset 2014 | ccfe4fa81a14 |
parent 2010 | 5e0b6a1d2100 |
child 2025 | 6d1723144029 |
2013:c83b52340eee | 2014:ccfe4fa81a14 |
---|---|
1374 if (bp.width <= 0) return; |
1374 if (bp.width <= 0) return; |
1375 start_x += x; |
1375 start_x += x; |
1376 } |
1376 } |
1377 bp.start_x = start_x; |
1377 bp.start_x = start_x; |
1378 |
1378 |
1379 if (info&2) { |
|
1380 int totpix = bp.height_org * bp.width_org; |
|
1381 byte *dst = (byte*)alloca(totpix); |
|
1382 const byte *src = bp.sprite_org; |
|
1383 |
|
1384 bp.sprite = dst + (bp.sprite - bp.sprite_org); |
|
1385 |
|
1386 while (totpix != 0) { |
|
1387 signed char b; |
|
1388 |
|
1389 assert(totpix > 0); |
|
1390 |
|
1391 b = *src++; |
|
1392 if (b >= 0) { |
|
1393 uint count = b; |
|
1394 uint i; |
|
1395 |
|
1396 for (i = 0; i != count; i++) dst[i] = src[i]; |
|
1397 dst += count; |
|
1398 src += count; |
|
1399 totpix -= count; |
|
1400 } else { |
|
1401 const byte *tmp = dst - (((b & 7) << 8) | *src++); |
|
1402 uint count = -(b >> 3); |
|
1403 uint i; |
|
1404 |
|
1405 for (i = 0; i != count; i++) dst[i] = tmp[i]; |
|
1406 dst += count; |
|
1407 totpix -= count; |
|
1408 } |
|
1409 } |
|
1410 } |
|
1411 zf_uncomp[dpi->zoom](&bp); |
1379 zf_uncomp[dpi->zoom](&bp); |
1412 } |
1380 } |
1413 } |
1381 } |
1414 |
1382 |
1415 #if 0 |
1383 #if 0 |