/[rdesktop]/sourceforge.net/trunk/rdesktop/orders.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/orders.c

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

revision 308 by matthewc, Thu Jan 30 11:15:00 2003 UTC revision 309 by jsorg71, Tue Feb 4 05:32:13 2003 UTC
# Line 71  rdp_in_coord(STREAM s, uint16 * coord, B Line 71  rdp_in_coord(STREAM s, uint16 * coord, B
71    
72  /* Read a colour entry */  /* Read a colour entry */
73  static void  static void
74  rdp_in_colour(STREAM s, uint8 * colour)  rdp_in_colour(STREAM s, uint32 * colour)
75  {  {
76          in_uint8(s, *colour);          uint32 i;
77          s->p += 2;          in_uint8(s, i);
78            *colour = i;
79            in_uint8(s, i);
80            *colour |= i << 8;
81            in_uint8(s, i);
82            *colour |= i << 16;
83  }  }
84    
85  /* Parse bounds information */  /* Parse bounds information */
# Line 279  process_line(STREAM s, LINE_ORDER * os, Line 284  process_line(STREAM s, LINE_ORDER * os,
284  static void  static void
285  process_rect(STREAM s, RECT_ORDER * os, uint32 present, BOOL delta)  process_rect(STREAM s, RECT_ORDER * os, uint32 present, BOOL delta)
286  {  {
287            uint32 i;
288          if (present & 0x01)          if (present & 0x01)
289                  rdp_in_coord(s, &os->x, delta);                  rdp_in_coord(s, &os->x, delta);
290    
# Line 292  process_rect(STREAM s, RECT_ORDER * os, Line 298  process_rect(STREAM s, RECT_ORDER * os,
298                  rdp_in_coord(s, &os->cy, delta);                  rdp_in_coord(s, &os->cy, delta);
299    
300          if (present & 0x10)          if (present & 0x10)
301                  in_uint8(s, os->colour);          {
302                    in_uint8(s, i);
303                    os->colour = (os->colour & 0xffffff00) | i;
304            }
305    
306            if (present & 0x20)
307            {
308                    in_uint8(s, i);
309                    os->colour = (os->colour & 0xffff00ff) | (i << 8);
310            }
311    
312            if (present & 0x40)
313            {
314                    in_uint8(s, i);
315                    os->colour = (os->colour & 0xff00ffff) | (i << 16);
316            }
317    
318          DEBUG(("RECT(x=%d,y=%d,cx=%d,cy=%d,fg=0x%x)\n", os->x, os->y, os->cx, os->cy, os->colour));          DEBUG(("RECT(x=%d,y=%d,cx=%d,cy=%d,fg=0x%x)\n", os->x, os->y, os->cx, os->cy, os->colour));
319    
# Line 632  process_raw_bmpcache(STREAM s) Line 653  process_raw_bmpcache(STREAM s)
653          in_uint16_le(s, bufsize);          in_uint16_le(s, bufsize);
654          in_uint16_le(s, cache_idx);          in_uint16_le(s, cache_idx);
655          in_uint8p(s, data, bufsize);          in_uint8p(s, data, bufsize);
656            if (bpp != 8) /* todo */
657                    return;
658    
659          DEBUG(("RAW_BMPCACHE(cx=%d,cy=%d,id=%d,idx=%d)\n", width, height, cache_id, cache_idx));          DEBUG(("RAW_BMPCACHE(cx=%d,cy=%d,id=%d,idx=%d)\n", width, height, cache_id, cache_idx));
660          inverted = xmalloc(width * height);          inverted = xmalloc(width * height);
# Line 665  process_bmpcache(STREAM s) Line 688  process_bmpcache(STREAM s)
688          in_uint16_le(s, size);          in_uint16_le(s, size);
689          in_uint8s(s, 4);        /* row_size, final_size */          in_uint8s(s, 4);        /* row_size, final_size */
690          in_uint8p(s, data, size);          in_uint8p(s, data, size);
691            if (bpp != 8) /* todo */
692                    return;
693    
694          DEBUG(("BMPCACHE(cx=%d,cy=%d,id=%d,idx=%d)\n", width, height, cache_id, cache_idx));          DEBUG(("BMPCACHE(cx=%d,cy=%d,id=%d,idx=%d)\n", width, height, cache_id, cache_idx));
695    
696          bmpdata = xmalloc(width * height);          bmpdata = xmalloc(width * height);
697    
698          if (bitmap_decompress(bmpdata, width, height, data, size))          if (bitmap_decompress(bmpdata, width, height, data, size, bpp))
699          {          {
700                  bitmap = ui_create_bitmap(width, height, bmpdata);                  bitmap = ui_create_bitmap(width, height, bmpdata);
701                  cache_put_bitmap(cache_id, cache_idx, bitmap);                  cache_put_bitmap(cache_id, cache_idx, bitmap);

Legend:
Removed from v.308  
changed lines
  Added in v.309

  ViewVC Help
Powered by ViewVC 1.1.26