31 |
#include "rdesktop.h" |
#include "rdesktop.h" |
32 |
|
|
33 |
#define CVAL(p) (*(p++)) |
#define CVAL(p) (*(p++)) |
34 |
#define CVAL2(p) (*(((uint16*)p)++)) /* for 16 bit */ |
#ifdef NEED_ALIGN |
35 |
|
#ifdef L_ENDIAN |
36 |
|
#define CVAL2(p, v) { v = (*(p++)); v |= (*(p++)) << 8; } |
37 |
|
#else |
38 |
|
#define CVAL2(p, v) { v = (*(p++)) << 8; v |= (*(p++)); } |
39 |
|
#endif /* L_ENDIAN */ |
40 |
|
#else |
41 |
|
#define CVAL2(p, v) v = (*(((uint16*)p)++)); |
42 |
|
#endif /* NEED_ALIGN */ |
43 |
|
|
44 |
#define UNROLL8(exp) { exp exp exp exp exp exp exp exp } |
#define UNROLL8(exp) { exp exp exp exp exp exp exp exp } |
45 |
|
|
338 |
insertmix = True; |
insertmix = True; |
339 |
break; |
break; |
340 |
case 8: /* Bicolour */ |
case 8: /* Bicolour */ |
341 |
#ifdef NEED_ALIGNMENT |
CVAL2(input, colour1); |
|
memcpy(&colour1,&CVAL2(input),2); |
|
|
#else |
|
|
colour1 = CVAL2(input); |
|
|
#endif |
|
342 |
case 3: /* Colour */ |
case 3: /* Colour */ |
343 |
#ifdef NEED_ALIGNMENT |
CVAL2(input, colour2); |
|
memcpy(&colour2,&CVAL2(input),2); |
|
|
#else |
|
|
colour2 = CVAL2(input); |
|
|
#endif |
|
344 |
break; |
break; |
345 |
case 6: /* SetMix/Mix */ |
case 6: /* SetMix/Mix */ |
346 |
case 7: /* SetMix/FillOrMix */ |
case 7: /* SetMix/FillOrMix */ |
347 |
#ifdef NEED_ALIGNMENT |
CVAL2(input, mix); |
|
memcpy(&mix,&CVAL2(input),2); |
|
|
#else |
|
|
mix = CVAL2(input); |
|
|
#endif |
|
348 |
opcode -= 5; |
opcode -= 5; |
349 |
break; |
break; |
350 |
case 9: /* FillOrMix_1 */ |
case 9: /* FillOrMix_1 */ |
432 |
REPEAT(line[x] = colour2) |
REPEAT(line[x] = colour2) |
433 |
break; |
break; |
434 |
case 4: /* Copy */ |
case 4: /* Copy */ |
435 |
#ifdef NEED_ALIGNMENT |
REPEAT(CVAL2(input, line[x])) |
|
REPEAT(memcpy(&line[x],&CVAL2(input),2)) |
|
|
#else |
|
|
REPEAT(line[x] = CVAL2(input)) |
|
|
#endif |
|
436 |
break; |
break; |
437 |
case 8: /* Bicolour */ |
case 8: /* Bicolour */ |
438 |
REPEAT |
REPEAT |