21 |
#include "rdesktop.h" |
#include "rdesktop.h" |
22 |
#include "orders.h" |
#include "orders.h" |
23 |
|
|
24 |
extern unsigned char *next_packet; |
extern uint8 *next_packet; |
25 |
static RDP_ORDER_STATE order_state; |
static RDP_ORDER_STATE order_state; |
26 |
|
|
27 |
/* Read field indicating which parameters are present */ |
/* Read field indicating which parameters are present */ |
533 |
if (flags & 0x80) |
if (flags & 0x80) |
534 |
y += parse_delta(os->data, &data); |
y += parse_delta(os->data, &data); |
535 |
|
|
536 |
ui_line(ROP2_COPY, xfrom, yfrom, x, y, &pen); |
ui_line(ROP2_NXOR, xfrom, yfrom, x, y, &pen); |
537 |
|
|
538 |
flags <<= 2; |
flags <<= 2; |
539 |
} |
} |
649 |
HBITMAP bitmap; |
HBITMAP bitmap; |
650 |
uint16 cache_idx, bufsize; |
uint16 cache_idx, bufsize; |
651 |
uint8 cache_id, width, height, bpp; |
uint8 cache_id, width, height, bpp; |
652 |
uint8 *data; |
uint8 *data, *inverted; |
653 |
|
int y; |
654 |
|
|
655 |
in_uint8(s, cache_id); |
in_uint8(s, cache_id); |
656 |
in_uint8s(s, 1); /* pad */ |
in_uint8s(s, 1); /* pad */ |
663 |
|
|
664 |
DEBUG("RAW_BMPCACHE(cx=%d,cy=%d,id=%d,idx=%d)\n", |
DEBUG("RAW_BMPCACHE(cx=%d,cy=%d,id=%d,idx=%d)\n", |
665 |
width, height, cache_id, cache_idx); |
width, height, cache_id, cache_idx); |
666 |
|
inverted = xmalloc(width * height); |
667 |
|
for (y = 0; y < height; y++) |
668 |
|
{ |
669 |
|
memcpy(&inverted[(height - y - 1) * width], &data[y * width], |
670 |
|
width); |
671 |
|
} |
672 |
|
|
673 |
bitmap = ui_create_bitmap(width, height, data); |
bitmap = ui_create_bitmap(width, height, inverted); |
674 |
|
xfree(inverted); |
675 |
cache_put_bitmap(cache_id, cache_idx, bitmap); |
cache_put_bitmap(cache_id, cache_idx, bitmap); |
676 |
} |
} |
677 |
|
|
956 |
reset_order_state() |
reset_order_state() |
957 |
{ |
{ |
958 |
memset(&order_state, 0, sizeof(order_state)); |
memset(&order_state, 0, sizeof(order_state)); |
959 |
|
order_state.order_type = RDP_ORDER_PATBLT; |
960 |
} |
} |