48 *present |=
bits << (
i * 8);
74 int two_byte =
value & 0x80;
110 else if (present & 16)
115 else if (present & 32)
120 else if (present & 64)
125 else if (present & 128)
188 DEBUG((
"DESTBLT(op=0x%x,x=%d,y=%d,cx=%d,cy=%d)\n",
202 if (present & 0x0001)
205 if (present & 0x0002)
208 if (present & 0x0004)
211 if (present & 0x0008)
214 if (present & 0x0010)
217 if (present & 0x0020)
220 if (present & 0x0040)
225 DEBUG((
"PATBLT(op=0x%x,x=%d,y=%d,cx=%d,cy=%d,bs=%d,bg=0x%x,fg=0x%x)\n", os->
opcode, os->
x,
241 if (present & 0x0001)
244 if (present & 0x0002)
247 if (present & 0x0004)
250 if (present & 0x0008)
253 if (present & 0x0010)
256 if (present & 0x0020)
259 if (present & 0x0040)
262 DEBUG((
"SCREENBLT(op=0x%x,x=%d,y=%d,cx=%d,cy=%d,srcx=%d,srcy=%d)\n",
276 if (present & 0x0001)
279 if (present & 0x0002)
282 if (present & 0x0004)
285 if (present & 0x0008)
288 if (present & 0x0010)
291 if (present & 0x0020)
294 if (present & 0x0040)
299 DEBUG((
"LINE(op=0x%x,sx=%d,sy=%d,dx=%d,dy=%d,fg=0x%x)\n",
350 DEBUG((
"RECT(x=%d,y=%d,cx=%d,cy=%d,fg=0x%x)\n", os->
x, os->
y, os->
cx, os->
cy, os->
colour));
379 DEBUG((
"DESKSAVE(l=%d,t=%d,r=%d,b=%d,off=%d,op=%d)\n",
397 if (present & 0x0001)
403 if (present & 0x0002)
406 if (present & 0x0004)
409 if (present & 0x0008)
412 if (present & 0x0010)
415 if (present & 0x0020)
418 if (present & 0x0040)
421 if (present & 0x0080)
424 if (present & 0x0100)
427 DEBUG((
"MEMBLT(op=0x%x,x=%d,y=%d,cx=%d,cy=%d,id=%d,idx=%d)\n",
447 if (present & 0x000001)
453 if (present & 0x000002)
456 if (present & 0x000004)
459 if (present & 0x000008)
462 if (present & 0x000010)
465 if (present & 0x000020)
468 if (present & 0x000040)
471 if (present & 0x000080)
474 if (present & 0x000100)
477 if (present & 0x000200)
482 if (present & 0x008000)
485 if (present & 0x010000)
488 DEBUG((
"TRIBLT(op=0x%x,x=%d,y=%d,cx=%d,cy=%d,id=%d,idx=%d,bs=%d,bg=0x%x,fg=0x%x)\n",
532 DEBUG((
"POLYGON(x=%d,y=%d,op=0x%x,fm=%d,fg=0x%x,n=%d,sz=%d)\n",
562 if ((
next - 1) % 4 == 0)
583 error(
"polygon parse error\n");
596 if (present & 0x0001)
599 if (present & 0x0002)
602 if (present & 0x0004)
605 if (present & 0x0008)
608 if (present & 0x0010)
611 if (present & 0x0020)
616 if (present & 0x0800)
619 if (present & 0x1000)
625 DEBUG((
"POLYGON2(x=%d,y=%d,op=0x%x,fm=%d,bs=%d,bg=0x%x,fg=0x%x,n=%d,sz=%d)\n",
656 if ((
next - 1) % 4 == 0)
677 error(
"polygon2 parse error\n");
712 DEBUG((
"POLYLINE(x=%d,y=%d,op=0x%x,fg=0x%x,n=%d,sz=%d)\n",
744 if ((
next - 1) % 4 == 0)
763 error(
"polyline parse error\n");
793 DEBUG((
"ELLIPSE(l=%d,t=%d,r=%d,b=%d,op=0x%x,fm=%d,fg=0x%x)\n", os->
left, os->
top,
809 if (present & 0x0001)
812 if (present & 0x0002)
815 if (present & 0x0004)
818 if (present & 0x0008)
821 if (present & 0x0010)
824 if (present & 0x0020)
827 if (present & 0x0040)
830 if (present & 0x0080)
835 DEBUG((
"ELLIPSE2(l=%d,t=%d,r=%d,b=%d,op=0x%x,fm=%d,bs=%d,bg=0x%x,fg=0x%x)\n",
854 if (present & 0x000001)
857 if (present & 0x000002)
860 if (present & 0x000004)
863 if (present & 0x000008)
866 if (present & 0x000010)
869 if (present & 0x000020)
872 if (present & 0x000040)
875 if (present & 0x000080)
878 if (present & 0x000100)
881 if (present & 0x000200)
884 if (present & 0x000400)
887 if (present & 0x000800)
890 if (present & 0x001000)
893 if (present & 0x002000)
898 if (present & 0x080000)
901 if (present & 0x100000)
904 if (present & 0x200000)
910 DEBUG((
"TEXT2(x=%d,y=%d,cl=%d,ct=%d,cr=%d,cb=%d,bl=%d,bt=%d,br=%d,bb=%d,bs=%d,bg=0x%x,fg=0x%x,font=%d,fl=0x%x,op=0x%x,mix=%d,n=%d)\n", os->
x, os->
y, os->
clipleft, os->
cliptop, os->
clipright, os->
clipbottom, os->
boxleft, os->
boxtop, os->
boxright, os->
boxbottom, os->
brush.style, os->
bgcolour, os->
fgcolour, os->
font, os->
flags, os->
opcode, os->
mixmode, os->
length));
953 DEBUG((
"RAW_BMPCACHE(cx=%d,cy=%d,id=%d,idx=%d)\n",
width,
height, cache_id, cache_idx));
984 pad2 = row_size = final_size = 0xffff;
1012 DEBUG((
"BMPCACHE(cx=%d,cy=%d,id=%d,idx=%d,bpp=%d,size=%d,pad1=%d,bufsize=%d,pad2=%d,rs=%d,fs=%d)\n",
width,
height, cache_id, cache_idx,
bpp,
size, pad1,
bufsize, pad2, row_size, final_size));
1026 DEBUG((
"Failed to decompress bitmap data\n"));
1068 cache_idx = ((cache_idx ^
LONG_FORMAT) << 8) + cache_idx_low;
1073 DEBUG((
"BMPCACHE2(compr=%d,flags=%x,cx=%d,cy=%d,id=%d,idx=%d,Bpp=%d,bs=%d)\n",
1085 DEBUG((
"Failed to decompress bitmap data\n"));
1112 DEBUG((
"process_bmpcache2: ui_create_bitmap failed\n"));
1140 for (
i = 0;
i <
map.ncolours;
i++)
1149 DEBUG((
"COLCACHE(id=%d,n=%d)\n", cache_id,
map.ncolours));
1172 DEBUG((
"FONTCACHE(font=%d,n=%d)\n",
font, nglyphs));
1174 for (
i = 0;
i < nglyphs;
i++)
1257 error(
"order parsing failed\n");
1378 if (
s->p !=
This->next_packet)
1379 error(
"%d bytes remaining\n", (
int) (
This->next_packet -
s->p));
1388 memset(&
This->orders.order_state, 0,
sizeof(
This->orders.order_state));
RD_BOOL bitmap_decompress(uint8 *output, int width, int height, uint8 *input, int size, int Bpp)
void cache_put_font(uint8 font, uint16 character, uint16 offset, uint16 baseline, uint16 width, uint16 height, RD_HGLYPH pixmap)
RD_HBITMAP cache_get_bitmap(uint8 id, uint16 idx)
void cache_put_bitmap(uint8 id, uint16 idx, RD_HBITMAP bitmap)
static RD_BOOL rdp_parse_brush(STREAM s, BRUSH *brush, uint32 present)
static void process_rect(STREAM s, RECT_ORDER *os, uint32 present, RD_BOOL delta)
static int parse_delta(uint8 *buffer, int *offset)
static void process_bmpcache(STREAM s)
void process_orders(STREAM s, uint16 num_orders)
static void process_polygon2(STREAM s, POLYGON2_ORDER *os, uint32 present, RD_BOOL delta)
static void process_bmpcache2(STREAM s, uint16 flags, RD_BOOL compressed)
static void process_desksave(STREAM s, DESKSAVE_ORDER *os, uint32 present, RD_BOOL delta)
static void process_triblt(STREAM s, TRIBLT_ORDER *os, uint32 present, RD_BOOL delta)
static void process_ellipse2(STREAM s, ELLIPSE2_ORDER *os, uint32 present, RD_BOOL delta)
static void rdp_in_colour(STREAM s, uint32 *colour)
static void process_destblt(STREAM s, DESTBLT_ORDER *os, uint32 present, RD_BOOL delta)
static void process_polygon(STREAM s, POLYGON_ORDER *os, uint32 present, RD_BOOL delta)
static void rdp_in_coord(STREAM s, sint16 *coord, RD_BOOL delta)
static void process_ellipse(STREAM s, ELLIPSE_ORDER *os, uint32 present, RD_BOOL delta)
static void rdp_in_present(STREAM s, uint32 *present, uint8 flags, int size)
static void process_fontcache(STREAM s)
static void process_raw_bmpcache(STREAM s)
static void process_screenblt(STREAM s, SCREENBLT_ORDER *os, uint32 present, RD_BOOL delta)
void reset_order_state(void)
static void process_memblt(STREAM s, MEMBLT_ORDER *os, uint32 present, RD_BOOL delta)
static void process_colcache(STREAM s)
static void process_text2(STREAM s, TEXT2_ORDER *os, uint32 present, RD_BOOL delta)
static void process_polyline(STREAM s, POLYLINE_ORDER *os, uint32 present, RD_BOOL delta)
static RD_BOOL rdp_parse_pen(STREAM s, PEN *pen, uint32 present)
static RD_BOOL rdp_parse_bounds(STREAM s, BOUNDS *bounds)
static void process_secondary_order(STREAM s)
static void process_patblt(STREAM s, PATBLT_ORDER *os, uint32 present, RD_BOOL delta)
static void process_line(STREAM s, LINE_ORDER *os, uint32 present, RD_BOOL delta)
#define RDP_ORDER_SECONDARY
#define RDP_ORDER_STANDARD
#define RDP_ORDER_LASTBOUNDS
@ RDP_ORDER_RAW_BMPCACHE2
#define in_uint16_le(s, v)
#define in_uint8p(s, v, n)
#define in_uint8a(s, v, n)
#define in_uint16_be(s, v)
#define in_uint32_le(s, v)
void ui_memblt(uint8 opcode, int x, int y, int cx, int cy, RD_HBITMAP src, int srcx, int srcy)
void ui_rect(int x, int y, int cx, int cy, int colour)
void ui_patblt(uint8 opcode, int x, int y, int cx, int cy, BRUSH *brush, int bgcolour, int fgcolour)
RD_HBITMAP ui_create_bitmap(int width, int height, uint8 *data)
RD_BOOL pstcache_save_bitmap(uint8 cache_id, uint16 cache_idx, uint8 *key, uint8 width, uint8 height, uint16 length, uint8 *data)
void ui_polygon(uint8 opcode, uint8 fillmode, RD_POINT *point, int npoints, BRUSH *brush, int bgcolour, int fgcolour)
void ui_screenblt(uint8 opcode, int x, int y, int cx, int cy, int srcx, int srcy)
void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy)
void ui_ellipse(uint8 opcode, uint8 fillmode, int x, int y, int cx, int cy, BRUSH *brush, int bgcolour, int fgcolour)
RD_HGLYPH ui_create_glyph(int width, int height, uint8 *data)
void ui_draw_text(uint8 font, uint8 flags, uint8 opcode, int mixmode, int x, int y, int clipx, int clipy, int clipcx, int clipcy, int boxx, int boxy, int boxcx, int boxcy, BRUSH *brush, int bgcolour, int fgcolour, uint8 *text, uint8 length)
void ui_set_colourmap(RD_HCOLOURMAP map)
void unimpl(char *format,...)
void ui_line(uint8 opcode, int startx, int starty, int endx, int endy, PEN *pen)
void ui_destblt(uint8 opcode, int x, int y, int cx, int cy)
void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy)
void ui_set_clip(int x, int y, int cx, int cy)
void ui_polyline(uint8 opcode, RD_POINT *points, int npoints, PEN *pen)
RD_HCOLOURMAP ui_create_colourmap(COLOURMAP *colours)
void ui_triblt(uint8 opcode, int x, int y, int cx, int cy, RD_HBITMAP src, int srcx, int srcy, BRUSH *brush, int bgcolour, int fgcolour)
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLuint GLsizei GLsizei * length
GLenum GLuint GLsizei bufsize
GLsizei const GLfloat * points
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define memcpy(s1, s2, n)
static unsigned __int64 next
SCREENBLT_ORDER screenblt
static int processed(const type_t *type)