772 |
in_uint8p(s, data, bufsize); |
in_uint8p(s, data, bufsize); |
773 |
|
|
774 |
DEBUG(("BMPCACHE2(compr=%d,flags=%x,cx=%d,cy=%d,id=%d,idx=%d,Bpp=%d,bs=%d)\n", |
DEBUG(("BMPCACHE2(compr=%d,flags=%x,cx=%d,cy=%d,id=%d,idx=%d,Bpp=%d,bs=%d)\n", |
775 |
compressed, flags, width, height, cache_id, cache_idx, Bpp, bufsize)); |
compressed, flags, width, height, cache_id, cache_idx, Bpp, bufsize)); |
776 |
|
|
777 |
bmpdata = (uint8 *) xmalloc(width * height * Bpp); |
bmpdata = (uint8 *) xmalloc(width * height * Bpp); |
778 |
|
|
789 |
{ |
{ |
790 |
for (y = 0; y < height; y++) |
for (y = 0; y < height; y++) |
791 |
memcpy(&bmpdata[(height - y - 1) * (width * Bpp)], |
memcpy(&bmpdata[(height - y - 1) * (width * Bpp)], |
792 |
&data[y * (width * Bpp)], width * Bpp); |
&data[y * (width * Bpp)], width * Bpp); |
793 |
} |
} |
794 |
|
|
795 |
bitmap = ui_create_bitmap(width, height, bmpdata); |
bitmap = ui_create_bitmap(width, height, bmpdata); |
799 |
cache_put_bitmap(cache_id, cache_idx, bitmap, 0); |
cache_put_bitmap(cache_id, cache_idx, bitmap, 0); |
800 |
if (flags & PERSIST) |
if (flags & PERSIST) |
801 |
pstcache_put_bitmap(cache_id, cache_idx, bitmap_id, width, height, |
pstcache_put_bitmap(cache_id, cache_idx, bitmap_id, width, height, |
802 |
width * height * Bpp, bmpdata); |
width * height * Bpp, bmpdata); |
803 |
} |
} |
804 |
else |
else |
805 |
{ |
{ |
885 |
uint8 *next_order; |
uint8 *next_order; |
886 |
|
|
887 |
in_uint16_le(s, length); |
in_uint16_le(s, length); |
888 |
in_uint16_le(s, flags); /* used by bmpcache2 */ |
in_uint16_le(s, flags); /* used by bmpcache2 */ |
889 |
in_uint8(s, type); |
in_uint8(s, type); |
890 |
|
|
891 |
next_order = s->p + (sint16)length + 7; |
next_order = s->p + (sint16) length + 7; |
892 |
|
|
893 |
switch (type) |
switch (type) |
894 |
{ |
{ |