Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #pragma once
00022
00023 #define RDP_ORDER_STANDARD 0x01
00024 #define RDP_ORDER_SECONDARY 0x02
00025 #define RDP_ORDER_BOUNDS 0x04
00026 #define RDP_ORDER_CHANGE 0x08
00027 #define RDP_ORDER_DELTA 0x10
00028 #define RDP_ORDER_LASTBOUNDS 0x20
00029 #define RDP_ORDER_SMALL 0x40
00030 #define RDP_ORDER_TINY 0x80
00031
00032 enum RDP_ORDER_TYPE
00033 {
00034 RDP_ORDER_DESTBLT = 0,
00035 RDP_ORDER_PATBLT = 1,
00036 RDP_ORDER_SCREENBLT = 2,
00037 RDP_ORDER_LINE = 9,
00038 RDP_ORDER_RECT = 10,
00039 RDP_ORDER_DESKSAVE = 11,
00040 RDP_ORDER_MEMBLT = 13,
00041 RDP_ORDER_TRIBLT = 14,
00042 RDP_ORDER_POLYGON = 20,
00043 RDP_ORDER_POLYGON2 = 21,
00044 RDP_ORDER_POLYLINE = 22,
00045 RDP_ORDER_ELLIPSE = 25,
00046 RDP_ORDER_ELLIPSE2 = 26,
00047 RDP_ORDER_TEXT2 = 27
00048 };
00049
00050 enum RDP_SECONDARY_ORDER_TYPE
00051 {
00052 RDP_ORDER_RAW_BMPCACHE = 0,
00053 RDP_ORDER_COLCACHE = 1,
00054 RDP_ORDER_BMPCACHE = 2,
00055 RDP_ORDER_FONTCACHE = 3,
00056 RDP_ORDER_RAW_BMPCACHE2 = 4,
00057 RDP_ORDER_BMPCACHE2 = 5,
00058 RDP_ORDER_BRUSHCACHE = 7
00059 };
00060
00061 typedef struct _DESTBLT_ORDER
00062 {
00063 sint16 x;
00064 sint16 y;
00065 sint16 cx;
00066 sint16 cy;
00067 uint8 opcode;
00068
00069 }
00070 DESTBLT_ORDER;
00071
00072 typedef struct _PATBLT_ORDER
00073 {
00074 sint16 x;
00075 sint16 y;
00076 sint16 cx;
00077 sint16 cy;
00078 uint8 opcode;
00079 uint32 bgcolour;
00080 uint32 fgcolour;
00081 BRUSH brush;
00082
00083 }
00084 PATBLT_ORDER;
00085
00086 typedef struct _SCREENBLT_ORDER
00087 {
00088 sint16 x;
00089 sint16 y;
00090 sint16 cx;
00091 sint16 cy;
00092 uint8 opcode;
00093 sint16 srcx;
00094 sint16 srcy;
00095
00096 }
00097 SCREENBLT_ORDER;
00098
00099 typedef struct _LINE_ORDER
00100 {
00101 uint16 mixmode;
00102 sint16 startx;
00103 sint16 starty;
00104 sint16 endx;
00105 sint16 endy;
00106 uint32 bgcolour;
00107 uint8 opcode;
00108 PEN pen;
00109
00110 }
00111 LINE_ORDER;
00112
00113 typedef struct _RECT_ORDER
00114 {
00115 sint16 x;
00116 sint16 y;
00117 sint16 cx;
00118 sint16 cy;
00119 uint32 colour;
00120
00121 }
00122 RECT_ORDER;
00123
00124 typedef struct _DESKSAVE_ORDER
00125 {
00126 uint32 offset;
00127 sint16 left;
00128 sint16 top;
00129 sint16 right;
00130 sint16 bottom;
00131 uint8 action;
00132
00133 }
00134 DESKSAVE_ORDER;
00135
00136 typedef struct _TRIBLT_ORDER
00137 {
00138 uint8 colour_table;
00139 uint8 cache_id;
00140 sint16 x;
00141 sint16 y;
00142 sint16 cx;
00143 sint16 cy;
00144 uint8 opcode;
00145 sint16 srcx;
00146 sint16 srcy;
00147 uint32 bgcolour;
00148 uint32 fgcolour;
00149 BRUSH brush;
00150 uint16 cache_idx;
00151 uint16 unknown;
00152
00153 }
00154 TRIBLT_ORDER;
00155
00156 typedef struct _MEMBLT_ORDER
00157 {
00158 uint8 colour_table;
00159 uint8 cache_id;
00160 sint16 x;
00161 sint16 y;
00162 sint16 cx;
00163 sint16 cy;
00164 uint8 opcode;
00165 sint16 srcx;
00166 sint16 srcy;
00167 uint16 cache_idx;
00168
00169 }
00170 MEMBLT_ORDER;
00171
00172 #define MAX_DATA 256
00173
00174 typedef struct _POLYGON_ORDER
00175 {
00176 sint16 x;
00177 sint16 y;
00178 uint8 opcode;
00179 uint8 fillmode;
00180 uint32 fgcolour;
00181 uint8 npoints;
00182 uint8 datasize;
00183 uint8 data[MAX_DATA];
00184
00185 }
00186 POLYGON_ORDER;
00187
00188 typedef struct _POLYGON2_ORDER
00189 {
00190 sint16 x;
00191 sint16 y;
00192 uint8 opcode;
00193 uint8 fillmode;
00194 uint32 bgcolour;
00195 uint32 fgcolour;
00196 BRUSH brush;
00197 uint8 npoints;
00198 uint8 datasize;
00199 uint8 data[MAX_DATA];
00200
00201 }
00202 POLYGON2_ORDER;
00203
00204 typedef struct _POLYLINE_ORDER
00205 {
00206 sint16 x;
00207 sint16 y;
00208 uint8 opcode;
00209 uint32 fgcolour;
00210 uint8 lines;
00211 uint8 datasize;
00212 uint8 data[MAX_DATA];
00213
00214 }
00215 POLYLINE_ORDER;
00216
00217 typedef struct _ELLIPSE_ORDER
00218 {
00219 sint16 left;
00220 sint16 top;
00221 sint16 right;
00222 sint16 bottom;
00223 uint8 opcode;
00224 uint8 fillmode;
00225 uint32 fgcolour;
00226
00227 }
00228 ELLIPSE_ORDER;
00229
00230 typedef struct _ELLIPSE2_ORDER
00231 {
00232 sint16 left;
00233 sint16 top;
00234 sint16 right;
00235 sint16 bottom;
00236 uint8 opcode;
00237 uint8 fillmode;
00238 BRUSH brush;
00239 uint32 bgcolour;
00240 uint32 fgcolour;
00241
00242 }
00243 ELLIPSE2_ORDER;
00244
00245 #define MAX_TEXT 256
00246
00247 typedef struct _TEXT2_ORDER
00248 {
00249 uint8 font;
00250 uint8 flags;
00251 uint8 opcode;
00252 uint8 mixmode;
00253 uint32 bgcolour;
00254 uint32 fgcolour;
00255 sint16 clipleft;
00256 sint16 cliptop;
00257 sint16 clipright;
00258 sint16 clipbottom;
00259 sint16 boxleft;
00260 sint16 boxtop;
00261 sint16 boxright;
00262 sint16 boxbottom;
00263 BRUSH brush;
00264 sint16 x;
00265 sint16 y;
00266 uint8 length;
00267 uint8 text[MAX_TEXT];
00268
00269 }
00270 TEXT2_ORDER;
00271
00272 typedef struct _RDP_ORDER_STATE
00273 {
00274 uint8 order_type;
00275 BOUNDS bounds;
00276
00277 DESTBLT_ORDER destblt;
00278 PATBLT_ORDER patblt;
00279 SCREENBLT_ORDER screenblt;
00280 LINE_ORDER line;
00281 RECT_ORDER rect;
00282 DESKSAVE_ORDER desksave;
00283 MEMBLT_ORDER memblt;
00284 TRIBLT_ORDER triblt;
00285 POLYGON_ORDER polygon;
00286 POLYGON2_ORDER polygon2;
00287 POLYLINE_ORDER polyline;
00288 ELLIPSE_ORDER ellipse;
00289 ELLIPSE2_ORDER ellipse2;
00290 TEXT2_ORDER text2;
00291
00292 }
00293 RDP_ORDER_STATE;
00294
00295 typedef struct _RDP_RAW_BMPCACHE_ORDER
00296 {
00297 uint8 cache_id;
00298 uint8 pad1;
00299 uint8 width;
00300 uint8 height;
00301 uint8 bpp;
00302 uint16 bufsize;
00303 uint16 cache_idx;
00304 uint8 *data;
00305
00306 }
00307 RDP_RAW_BMPCACHE_ORDER;
00308
00309 typedef struct _RDP_BMPCACHE_ORDER
00310 {
00311 uint8 cache_id;
00312 uint8 pad1;
00313 uint8 width;
00314 uint8 height;
00315 uint8 bpp;
00316 uint16 bufsize;
00317 uint16 cache_idx;
00318 uint16 pad2;
00319 uint16 size;
00320 uint16 row_size;
00321 uint16 final_size;
00322 uint8 *data;
00323
00324 }
00325 RDP_BMPCACHE_ORDER;
00326
00327
00328 #define ID_MASK 0x0007
00329 #define MODE_MASK 0x0038
00330 #define SQUARE 0x0080
00331 #define PERSIST 0x0100
00332 #define FLAG_51_UNKNOWN 0x0800
00333
00334 #define MODE_SHIFT 3
00335
00336 #define LONG_FORMAT 0x80
00337 #define BUFSIZE_MASK 0x3FFF
00338
00339 #define MAX_GLYPH 32
00340
00341 typedef struct _RDP_FONT_GLYPH
00342 {
00343 uint16 character;
00344 uint16 unknown;
00345 uint16 baseline;
00346 uint16 width;
00347 uint16 height;
00348 uint8 data[MAX_GLYPH];
00349
00350 }
00351 RDP_FONT_GLYPH;
00352
00353 #define MAX_GLYPHS 256
00354
00355 typedef struct _RDP_FONTCACHE_ORDER
00356 {
00357 uint8 font;
00358 uint8 nglyphs;
00359 RDP_FONT_GLYPH glyphs[MAX_GLYPHS];
00360
00361 }
00362 RDP_FONTCACHE_ORDER;
00363
00364 typedef struct _RDP_COLCACHE_ORDER
00365 {
00366 uint8 cache_id;
00367 COLOURMAP map;
00368
00369 }
00370 RDP_COLCACHE_ORDER;