/[rdesktop]/sourceforge.net/trunk/rdesktop/uiports/qtewin.cpp
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/uiports/qtewin.cpp

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

revision 795 by jsorg71, Wed Nov 3 03:27:53 2004 UTC revision 796 by jsorg71, Fri Nov 5 03:13:33 2004 UTC
# Line 1509  void ui_destblt(uint8 opcode, int x, int Line 1509  void ui_destblt(uint8 opcode, int x, int
1509  {  {
1510    int i, j;    int i, j;
1511    
1512    for (i = 0; i < cy; i++)  
1513      for (j = 0; j < cx; j++)    if (opcode == 0x0) /* black */
1514        set_pixel(x + j, y + i, get_pixel(x + j, y + i), opcode);    {
1515        for (i = 0; i < cy; i++)
1516          for (j = 0; j < cx; j++)
1517            set_pixel(x + j, y + i, 0, 0xc);
1518      }
1519      else if (opcode == 0xf) /* white */
1520      {
1521        for (i = 0; i < cy; i++)
1522          for (j = 0; j < cx; j++)
1523            set_pixel(x + j, y + i, 0xffffff, 0xc);
1524      }
1525      else
1526      {
1527        for (i = 0; i < cy; i++)
1528          for (j = 0; j < cx; j++)
1529            set_pixel(x + j, y + i, get_pixel(x + j, y + i), opcode);
1530      }
1531    redraw(x, y, cx, cy);    redraw(x, y, cx, cy);
1532  }  }
1533    
# Line 1601  void ui_screenblt(uint8 opcode, int x, i Line 1617  void ui_screenblt(uint8 opcode, int x, i
1617    uint8 * temp;    uint8 * temp;
1618    
1619    temp = (uint8*)xmalloc(cx * cy * 4);    temp = (uint8*)xmalloc(cx * cy * 4);
1620    if (g_server_bpp == 8)  #ifdef QT_OPTI
1621    {    if (opcode == 0xc)
     for (i = 0; i < cy; i++)  
       for (j = 0; j < cx; j++)  
         temp[i * cx + j] = get_pixel(srcx + j, srcy + i);  
     for (i = 0; i < cy; i++)  
       for (j = 0; j < cx; j++)  
         set_pixel(x + j, y + i, temp[i * cx + j], opcode);  
   }  
   else if (g_server_bpp == 16)  
1622    {    {
1623      for (i = 0; i < cy; i++)      if (WarpCoords(&x, &y, &cx, &cy, &srcx, &srcy))
1624        for (j = 0; j < cx; j++)      {
1625          if (g_server_bpp == 8)
1626        {        {
1627          pixel = get_pixel(srcx + j, srcy + i);          for (i = 0; i < cy; i++)
1628          SETPIXEL16(temp, j, i, cx, pixel);            for (j = 0; j < cx; j++)
1629              {
1630                pixel = GETPIXEL8(g_BS, srcx + j, srcy + i, g_width);
1631                SETPIXEL8(temp, j, i, cx, pixel);
1632              }
1633            for (i = 0; i < cy; i++)
1634              for (j = 0; j < cx; j++)
1635              {
1636                pixel = GETPIXEL8(temp, j, i, cx);
1637                SETPIXEL8(g_BS, x + j, y + i, g_width, pixel);
1638              }
1639        }        }
1640      for (i = 0; i < cy; i++)        else if (g_server_bpp == 16)
1641        for (j = 0; j < cx; j++)        {
1642            for (i = 0; i < cy; i++)
1643              for (j = 0; j < cx; j++)
1644              {
1645                pixel = GETPIXEL16(g_BS, srcx + j, srcy + i, g_width);
1646                SETPIXEL16(temp, j, i, cx, pixel);
1647              }
1648            for (i = 0; i < cy; i++)
1649              for (j = 0; j < cx; j++)
1650              {
1651                pixel = GETPIXEL16(temp, j, i, cx);
1652                SETPIXEL16(g_BS, x + j, y + i, g_width, pixel);
1653              }
1654          }
1655          else if (g_server_bpp == 24)
1656        {        {
1657          pixel = GETPIXEL16(temp, j, i, cx);          for (i = 0; i < cy; i++)
1658          set_pixel(x + j, y + i, pixel, opcode);            for (j = 0; j < cx; j++)
1659              {
1660                pixel = GETPIXEL32(g_BS, srcx + j, srcy + i, g_width);
1661                SETPIXEL32(temp, j, i, cx, pixel);
1662              }
1663            for (i = 0; i < cy; i++)
1664              for (j = 0; j < cx; j++)
1665              {
1666                pixel = GETPIXEL32(temp, j, i, cx);
1667                SETPIXEL32(g_BS, x + j, y + i, g_width, pixel);
1668              }
1669        }        }
1670        }
1671    }    }
1672    else if (g_server_bpp == 24)    else
1673    #endif
1674    {    {
1675      for (i = 0; i < cy; i++)      if (g_server_bpp == 8)
1676        for (j = 0; j < cx; j++)      {
1677          *(((uint32*)temp) + (i * cx + j)) = get_pixel(srcx + j, srcy + i);        for (i = 0; i < cy; i++)
1678      for (i = 0; i < cy; i++)          for (j = 0; j < cx; j++)
1679        for (j = 0; j < cx; j++)            temp[i * cx + j] = get_pixel(srcx + j, srcy + i);
1680          set_pixel(x + j, y + i, *(((uint32*)temp) + (i * cx + j)), opcode);        for (i = 0; i < cy; i++)
1681            for (j = 0; j < cx; j++)
1682              set_pixel(x + j, y + i, temp[i * cx + j], opcode);
1683        }
1684        else if (g_server_bpp == 16)
1685        {
1686          for (i = 0; i < cy; i++)
1687            for (j = 0; j < cx; j++)
1688            {
1689              pixel = get_pixel(srcx + j, srcy + i);
1690              SETPIXEL16(temp, j, i, cx, pixel);
1691            }
1692          for (i = 0; i < cy; i++)
1693            for (j = 0; j < cx; j++)
1694            {
1695              pixel = GETPIXEL16(temp, j, i, cx);
1696              set_pixel(x + j, y + i, pixel, opcode);
1697            }
1698        }
1699        else if (g_server_bpp == 24)
1700        {
1701          for (i = 0; i < cy; i++)
1702            for (j = 0; j < cx; j++)
1703              *(((uint32*)temp) + (i * cx + j)) = get_pixel(srcx + j, srcy + i);
1704          for (i = 0; i < cy; i++)
1705            for (j = 0; j < cx; j++)
1706              set_pixel(x + j, y + i, *(((uint32*)temp) + (i * cx + j)), opcode);
1707        }
1708    }    }
1709    xfree(temp);    xfree(temp);
1710    redraw(x, y, cx, cy);    redraw(x, y, cx, cy);

Legend:
Removed from v.795  
changed lines
  Added in v.796

  ViewVC Help
Powered by ViewVC 1.1.26