/[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 27 by matty, Sat Jan 6 03:47:04 2001 UTC revision 28 by matty, Wed Jun 20 13:54:48 2001 UTC
# Line 21  Line 21 
21  #include "rdesktop.h"  #include "rdesktop.h"
22  #include "orders.h"  #include "orders.h"
23    
24  extern unsigned char *next_packet;  extern uint8 *next_packet;
25  static RDP_ORDER_STATE order_state;  static RDP_ORDER_STATE order_state;
26    
27  /* Read field indicating which parameters are present */  /* Read field indicating which parameters are present */
# Line 533  process_polyline(STREAM s, POLYLINE_ORDE Line 533  process_polyline(STREAM s, POLYLINE_ORDE
533                  if (flags & 0x80)                  if (flags & 0x80)
534                          y += parse_delta(os->data, &data);                          y += parse_delta(os->data, &data);
535    
536                  ui_line(ROP2_COPY, xfrom, yfrom, x, y, &pen);                  ui_line(ROP2_NXOR, xfrom, yfrom, x, y, &pen);
537    
538                  flags <<= 2;                  flags <<= 2;
539          }          }
# Line 649  process_raw_bmpcache(STREAM s) Line 649  process_raw_bmpcache(STREAM s)
649          HBITMAP bitmap;          HBITMAP bitmap;
650          uint16 cache_idx, bufsize;          uint16 cache_idx, bufsize;
651          uint8 cache_id, width, height, bpp;          uint8 cache_id, width, height, bpp;
652          uint8 *data;          uint8 *data, *inverted;
653            int y;
654    
655          in_uint8(s, cache_id);          in_uint8(s, cache_id);
656          in_uint8s(s, 1);        /* pad */          in_uint8s(s, 1);        /* pad */
# Line 662  process_raw_bmpcache(STREAM s) Line 663  process_raw_bmpcache(STREAM s)
663    
664          DEBUG("RAW_BMPCACHE(cx=%d,cy=%d,id=%d,idx=%d)\n",          DEBUG("RAW_BMPCACHE(cx=%d,cy=%d,id=%d,idx=%d)\n",
665                width, height, cache_id, cache_idx);                width, height, cache_id, cache_idx);
666            inverted = xmalloc(width * height);
667            for (y = 0; y < height; y++)
668            {
669                    memcpy(&inverted[(height - y - 1) * width], &data[y * width],
670                           width);
671            }
672    
673          bitmap = ui_create_bitmap(width, height, data);          bitmap = ui_create_bitmap(width, height, inverted);
674            xfree(inverted);
675          cache_put_bitmap(cache_id, cache_idx, bitmap);          cache_put_bitmap(cache_id, cache_idx, bitmap);
676  }  }
677    
# Line 948  void Line 956  void
956  reset_order_state()  reset_order_state()
957  {  {
958          memset(&order_state, 0, sizeof(order_state));          memset(&order_state, 0, sizeof(order_state));
959            order_state.order_type = RDP_ORDER_PATBLT;
960  }  }

Legend:
Removed from v.27  
changed lines
  Added in v.28

  ViewVC Help
Powered by ViewVC 1.1.26