605 |
if (present & 0x002000) |
if (present & 0x002000) |
606 |
in_uint16_le(s, os->boxbottom); |
in_uint16_le(s, os->boxbottom); |
607 |
|
|
608 |
|
if (present & 0x004000) /* fix for connecting to a server that */ |
609 |
|
in_uint8s(s, 10); /* was disconnected with mstsc.exe */ |
610 |
|
/* 0x008000, 0x020000, and 0x040000 are present too ??? */ |
611 |
|
|
612 |
if (present & 0x080000) |
if (present & 0x080000) |
613 |
in_uint16_le(s, os->x); |
in_uint16_le(s, os->x); |
614 |
|
|
645 |
{ |
{ |
646 |
HBITMAP bitmap; |
HBITMAP bitmap; |
647 |
uint16 cache_idx, bufsize; |
uint16 cache_idx, bufsize; |
648 |
uint8 cache_id, width, height, bpp; |
uint8 cache_id, width, height, bpp, Bpp; |
649 |
uint8 *data, *inverted; |
uint8 *data, *inverted; |
650 |
int y; |
int y; |
651 |
|
|
654 |
in_uint8(s, width); |
in_uint8(s, width); |
655 |
in_uint8(s, height); |
in_uint8(s, height); |
656 |
in_uint8(s, bpp); |
in_uint8(s, bpp); |
657 |
|
Bpp = (bpp + 7) / 8; |
658 |
in_uint16_le(s, bufsize); |
in_uint16_le(s, bufsize); |
659 |
in_uint16_le(s, cache_idx); |
in_uint16_le(s, cache_idx); |
660 |
in_uint8p(s, data, bufsize); |
in_uint8p(s, data, bufsize); |
|
if (bpp != 8) /* todo */ |
|
|
return; |
|
661 |
|
|
662 |
DEBUG(("RAW_BMPCACHE(cx=%d,cy=%d,id=%d,idx=%d)\n", width, height, cache_id, cache_idx)); |
DEBUG(("RAW_BMPCACHE(cx=%d,cy=%d,id=%d,idx=%d)\n", width, height, cache_id, cache_idx)); |
663 |
inverted = xmalloc(width * height); |
inverted = xmalloc(width * height * Bpp); |
664 |
for (y = 0; y < height; y++) |
for (y = 0; y < height; y++) |
665 |
{ |
{ |
666 |
memcpy(&inverted[(height - y - 1) * width], &data[y * width], width); |
memcpy(&inverted[(height - y - 1) * (width * Bpp)], &data[y * (width * Bpp)], |
667 |
|
width * Bpp); |
668 |
} |
} |
669 |
|
|
670 |
bitmap = ui_create_bitmap(width, height, inverted); |
bitmap = ui_create_bitmap(width, height, inverted); |
678 |
{ |
{ |
679 |
HBITMAP bitmap; |
HBITMAP bitmap; |
680 |
uint16 cache_idx, size; |
uint16 cache_idx, size; |
681 |
uint8 cache_id, width, height, bpp; |
uint8 cache_id, width, height, bpp, Bpp; |
682 |
uint8 *data, *bmpdata; |
uint8 *data, *bmpdata; |
683 |
|
|
684 |
in_uint8(s, cache_id); |
in_uint8(s, cache_id); |
686 |
in_uint8(s, width); |
in_uint8(s, width); |
687 |
in_uint8(s, height); |
in_uint8(s, height); |
688 |
in_uint8(s, bpp); |
in_uint8(s, bpp); |
689 |
|
Bpp = (bpp + 7) / 8; |
690 |
in_uint8s(s, 2); /* bufsize */ |
in_uint8s(s, 2); /* bufsize */ |
691 |
in_uint16_le(s, cache_idx); |
in_uint16_le(s, cache_idx); |
692 |
in_uint8s(s, 2); /* pad */ |
in_uint8s(s, 2); /* pad */ |
693 |
in_uint16_le(s, size); |
in_uint16_le(s, size); |
694 |
in_uint8s(s, 4); /* row_size, final_size */ |
in_uint8s(s, 4); /* row_size, final_size */ |
695 |
in_uint8p(s, data, size); |
in_uint8p(s, data, size); |
|
if (bpp != 8) /* todo */ |
|
|
return; |
|
696 |
|
|
697 |
DEBUG(("BMPCACHE(cx=%d,cy=%d,id=%d,idx=%d)\n", width, height, cache_id, cache_idx)); |
DEBUG(("BMPCACHE(cx=%d,cy=%d,id=%d,idx=%d)\n", width, height, cache_id, cache_idx)); |
698 |
|
|
699 |
bmpdata = xmalloc(width * height); |
bmpdata = xmalloc(width * height * Bpp); |
700 |
|
|
701 |
if (bitmap_decompress(bmpdata, width, height, data, size, bpp)) |
if (bitmap_decompress(bmpdata, width, height, data, size, Bpp)) |
702 |
{ |
{ |
703 |
bitmap = ui_create_bitmap(width, height, bmpdata); |
bitmap = ui_create_bitmap(width, height, bmpdata); |
704 |
cache_put_bitmap(cache_id, cache_idx, bitmap); |
cache_put_bitmap(cache_id, cache_idx, bitmap); |