/[rdesktop]/sourceforge.net/trunk/rdesktop/bitmap.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/bitmap.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 692 by stargo, Tue Apr 27 09:04:42 2004 UTC revision 693 by stargo, Fri May 7 04:57:39 2004 UTC
# Line 31  Line 31 
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    
# Line 330  bitmap_decompress2(uint8 * output, int w Line 338  bitmap_decompress2(uint8 * output, int w
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 */
# Line 436  bitmap_decompress2(uint8 * output, int w Line 432  bitmap_decompress2(uint8 * output, int w
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

Legend:
Removed from v.692  
changed lines
  Added in v.693

  ViewVC Help
Powered by ViewVC 1.1.26