Changeset 188


Ignore:
Timestamp:
May 6, 2020, 11:21:12 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Simplified code by replacing BitBlt which uses always handles by BitBltCanvas which uses directly TCanvas objects. Used default ROP SRCCOPY.
Location:
trunk
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/Back.pas

    r105 r188  
    6565begin
    6666  if Assigned(Img) then
    67     BitBlt(Canvas.Handle, Screen.Width - Img.Width - (Screen.Width - 800) *
     67    BitBltCanvas(Canvas, Screen.Width - Img.Width - (Screen.Width - 800) *
    6868      3 div 8, (Screen.Height - 600) div 3, Img.Width, Img.Height,
    69       Img.Canvas.Handle, 0, 0, SRCCOPY);
     69      Img.Canvas, 0, 0);
    7070end;
    7171
  • trunk/LocalPlayer/Battle.pas

    r111 r188  
    107107    VLightGradient(ca, xm - 8, ym + 8 + LABaseDamage, LADamage - LABaseDamage,
    108108      FanaticColor);
    109   BitBlt(ca.Handle, xm - 12, ym - 12, 24, 24,
    110     GrExt[HGrSystem].Mask.Canvas.Handle, 26, 146, SRCAND);
    111   BitBlt(ca.Handle, xm - 12, ym - 12, 24, 24,
    112     GrExt[HGrSystem].Data.Canvas.Handle, 26, 146, SRCPAINT);
     109  BitBltCanvas(ca, xm - 12, ym - 12, 24, 24,
     110    GrExt[HGrSystem].Mask.Canvas, 26, 146, SRCAND);
     111  BitBltCanvas(ca, xm - 12, ym - 12, 24, 24,
     112    GrExt[HGrSystem].Data.Canvas, 26, 146, SRCPAINT);
    113113
    114114  LabelText := Format('%d', [Forecast.AStr]);
     
    132132  if Forecast.EndHealthDef <= 0 then
    133133  begin
    134     BitBlt(ca.Handle, xm + 9 + LDDamage - 7, ym - 6, 14, 17,
    135       GrExt[HGrSystem].Mask.Canvas.Handle, 51, 153, SRCAND);
    136     BitBlt(ca.Handle, xm + 8 + LDDamage - 7, ym - 7, 14, 17,
    137       GrExt[HGrSystem].Mask.Canvas.Handle, 51, 153, SRCAND);
    138     BitBlt(ca.Handle, xm + 8 + LDDamage - 7, ym - 7, 14, 17,
    139       GrExt[HGrSystem].Data.Canvas.Handle, 51, 153, SRCPAINT);
     134    BitBltCanvas(ca, xm + 9 + LDDamage - 7, ym - 6, 14, 17,
     135      GrExt[HGrSystem].Mask.Canvas, 51, 153, SRCAND);
     136    BitBltCanvas(ca, xm + 8 + LDDamage - 7, ym - 7, 14, 17,
     137      GrExt[HGrSystem].Mask.Canvas, 51, 153, SRCAND);
     138    BitBltCanvas(ca, xm + 8 + LDDamage - 7, ym - 7, 14, 17,
     139      GrExt[HGrSystem].Data.Canvas, 51, 153, SRCPAINT);
    140140  end;
    141141  LabelText := Format('%d', [DDamage]);
     
    152152  if Forecast.EndHealthAtt <= 0 then
    153153  begin
    154     BitBlt(ca.Handle, xm - 6, ym + 9 + LADamage - 7, 14, 17,
    155       GrExt[HGrSystem].Mask.Canvas.Handle, 51, 153, SRCAND);
    156     BitBlt(ca.Handle, xm - 7, ym + 8 + LADamage - 7, 14, 17,
    157       GrExt[HGrSystem].Mask.Canvas.Handle, 51, 153, SRCAND);
    158     BitBlt(ca.Handle, xm - 7, ym + 8 + LADamage - 7, 14, 17,
    159       GrExt[HGrSystem].Data.Canvas.Handle, 51, 153, SRCPAINT);
     154    BitBltCanvas(ca, xm - 6, ym + 9 + LADamage - 7, 14, 17,
     155      GrExt[HGrSystem].Mask.Canvas, 51, 153, SRCAND);
     156    BitBltCanvas(ca, xm - 7, ym + 8 + LADamage - 7, 14, 17,
     157      GrExt[HGrSystem].Mask.Canvas, 51, 153, SRCAND);
     158    BitBltCanvas(ca, xm - 7, ym + 8 + LADamage - 7, 14, 17,
     159      GrExt[HGrSystem].Data.Canvas, 51, 153, SRCPAINT);
    160160  end;
    161161  LabelText := Format('%d', [MyUn[uix].Health - Forecast.EndHealthAtt]);
     
    173173
    174174  NoMap.SetOutput(Buffer);
    175   BitBlt(Buffer.Canvas.Handle, 0, 0, 66, 48, ca.Handle, xm + 8 + 4,
    176     ym - 8 - 12 - 48, SRCCOPY);
     175  BitBltCanvas(Buffer.Canvas, 0, 0, 66, 48, ca, xm + 8 + 4,
     176    ym - 8 - 12 - 48);
    177177  { if TerrType<fForest then
    178178    Sprite(Buffer,HGrTerrain,0,16,66,32,1+TerrType*(xxt*2+1),1+yyt)
     
    185185    end; }
    186186  NoMap.PaintUnit(1, 0, UnitInfo, 0);
    187   BitBlt(ca.Handle, xm + 8 + 4, ym - 8 - 12 - 48, 66, 48, Buffer.Canvas.Handle,
    188     0, 0, SRCCOPY);
    189 
    190   BitBlt(Buffer.Canvas.Handle, 0, 0, 66, 48, ca.Handle, xm - 8 - 4 - 66,
    191     ym + 8 + 12, SRCCOPY);
     187  BitBltCanvas(ca, xm + 8 + 4, ym - 8 - 12 - 48, 66, 48, Buffer.Canvas,
     188    0, 0);
     189
     190  BitBltCanvas(Buffer.Canvas, 0, 0, 66, 48, ca, xm - 8 - 4 - 66,
     191    ym + 8 + 12);
    192192  MakeUnitInfo(me, MyUn[uix], UnitInfo);
    193193  UnitInfo.Flags := UnitInfo.Flags and not unFortified;
    194194  NoMap.PaintUnit(1, 0, UnitInfo, 0);
    195   BitBlt(ca.Handle, xm - 8 - 4 - 66, ym + 8 + 12, 66, 48, Buffer.Canvas.Handle,
    196     0, 0, SRCCOPY);
     195  BitBltCanvas(ca, xm - 8 - 4 - 66, ym + 8 + 12, 66, 48, Buffer.Canvas, 0, 0);
    197196end; { PaintBattleOutcome }
    198197
  • trunk/LocalPlayer/CityScreen.pas

    r173 r188  
    260260    Back.Canvas.FillRect(0, 0, ClientWidth, ClientHeight);
    261261
    262     bitblt(Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    263       MainTexture.Image.Canvas.Handle, 0, 0, SRCCOPY);
     262    bitbltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight,
     263      MainTexture.Image.Canvas, 0, 0);
    264264    ImageOp_B(Back, Template, 0, 0, 0, 0, ClientWidth, ClientHeight);
    265265  end;
     
    291291  Color2 := Colors.Canvas.Pixels[clkAge0 + Age, cliHouse];
    292292  SmallCityMap.Canvas.FillRect(0, 0, SmallCityMap.Width, SmallCityMap.Height);
    293   bitblt(SmallCityMap.Canvas.Handle, 0, 0, 83, hSmallMap,
    294     SmallCityMapTemplate.Canvas.Handle, 83 * SizeClass, 0, SRCCOPY);
     293  bitbltCanvas(SmallCityMap.Canvas, 0, 0, 83, hSmallMap,
     294    SmallCityMapTemplate.Canvas, 83 * SizeClass, 0);
    295295  if IsPort then
    296296  begin
    297     bitblt(SmallCityMap.Canvas.Handle, 83, 0, 15, hSmallMap,
    298       SmallCityMapTemplate.Canvas.Handle, 332 + 15, 0, SRCCOPY);
     297    bitbltCanvas(SmallCityMap.Canvas, 83, 0, 15, hSmallMap,
     298      SmallCityMapTemplate.Canvas, 332 + 15, 0);
    299299    ImageOp_CCC(SmallCityMap, 0, 0, 83, hSmallMap, Color0, Color1, Color2);
    300300    Color2 := Colors.Canvas.Pixels[clkCity, cliWater];
     
    303303  else
    304304  begin
    305     bitblt(SmallCityMap.Canvas.Handle, 83, 0, 15, hSmallMap,
    306       SmallCityMapTemplate.Canvas.Handle, 332, 0, SRCCOPY);
     305    bitbltCanvas(SmallCityMap.Canvas, 83, 0, 15, hSmallMap,
     306      SmallCityMapTemplate.Canvas, 332, 0);
    307307    ImageOp_CCC(SmallCityMap, 0, 0, wSmallMap, hSmallMap, Color0,
    308308      Color1, Color2);
     
    359359  ZoomCityMap.Canvas.FillRect(0, 0, ZoomCityMap.Width, ZoomCityMap.Height);
    360360
    361   bitblt(ZoomCityMap.Canvas.Handle, 0, 0, wZoomMap, hZoomMap,
    362     Back.Canvas.Handle, xZoomMap, yZoomMap, SRCCOPY);
     361  bitbltCanvas(ZoomCityMap.Canvas, 0, 0, wZoomMap, hZoomMap,
     362    Back.Canvas, xZoomMap, yZoomMap);
    363363  if Mode = mImp then begin
    364364    if ZoomArea < 3 then begin
     
    542542  RedTex.clTextShade := $0000FF;
    543543
    544   bitblt(offscreen.Canvas.Handle, 0, 0, 640, 480, Back.Canvas.Handle, 0,
    545     0, SRCCOPY);
     544  bitbltCanvas(offscreen.Canvas, 0, 0, 640, 480, Back.Canvas, 0, 0);
    546545
    547546  offscreen.Canvas.Font.Assign(UniFont[ftCaption]);
     
    614613    false, AllowChange and IsCityAlive and
    615614    (c.Status and csResourceWeightsMask = 0));
    616   bitblt(offscreen.Canvas.Handle, xmArea + 102, 42, 90, 33, Back.Canvas.Handle,
    617     xmArea + 102, 42, SRCCOPY);
     615  bitbltCanvas(offscreen.Canvas, xmArea + 102, 42, 90, 33, Back.Canvas,
     616    xmArea + 102, 42);
    618617
    619618  if IsCityAlive then
     
    645644    else
    646645      xGr := 141;
    647     bitblt(offscreen.Canvas.Handle, xmArea - 192 + 5 + i * d, ymArea - 96 - 29,
    648       27, 30, GrExt[HGrSystem].Mask.Canvas.Handle, xGr, 171, SRCAND); { shadow }
     646    bitbltCanvas(offscreen.Canvas, xmArea - 192 + 5 + i * d, ymArea - 96 - 29,
     647      27, 30, GrExt[HGrSystem].Mask.Canvas, xGr, 171, SRCAND); { shadow }
    649648    Sprite(offscreen, HGrSystem, xmArea - 192 + 4 + i * d, ymArea - 96 - 30, 27,
    650649      30, xGr, 171);
     
    657656  begin
    658657    xGr := 1 + 112;
    659     bitblt(offscreen.Canvas.Handle, xmArea + 192 - 27 + 1 - i * d, 29 + 1, 27,
    660       30, GrExt[HGrSystem].Mask.Canvas.Handle, xGr, 171, SRCAND); { shadow }
     658    bitbltCanvas(offscreen.Canvas, xmArea + 192 - 27 + 1 - i * d, 29 + 1, 27,
     659      30, GrExt[HGrSystem].Mask.Canvas, xGr, 171, SRCAND); { shadow }
    661660    Sprite(offscreen, HGrSystem, xmArea + 192 - 27 - i * d, 29, 27, 30,
    662661      xGr, 171);
     
    803802
    804803  // small map
    805   bitblt(offscreen.Canvas.Handle, xSmallMap, ySmallMap, wSmallMap, hSmallMap,
    806     SmallCityMap.Canvas.Handle, 0, 0, SRCCOPY);
     804  bitbltCanvas(offscreen.Canvas, xSmallMap, ySmallMap, wSmallMap, hSmallMap,
     805    SmallCityMap.Canvas, 0, 0);
    807806  if Mode = mImp then
    808807    Frame(offscreen.Canvas, xSmallMap + 48 * (ZoomArea div 3),
     
    831830  Sprite(offscreen, HGrSystem, x + 6, y - 5, 10, 10, 154, 126);
    832831
    833   bitblt(offscreen.Canvas.Handle, xZoomMap, yZoomMap, wZoomMap, hZoomMap,
    834     ZoomCityMap.Canvas.Handle, 0, 0, SRCCOPY);
     832  bitbltCanvas(offscreen.Canvas, xZoomMap, yZoomMap, wZoomMap, hZoomMap,
     833    ZoomCityMap.Canvas, 0, 0);
    835834
    836835  for i := 0 to 5 do
     
    16201619      with Canvas do
    16211620      begin
    1622         bitblt(Canvas.Handle, xView + 5, yView + 1, 64, 2, Back.Canvas.Handle,
    1623           xView + 5, yView + 1, SRCCOPY);
    1624         bitblt(Canvas.Handle, xView + 5, yView + 3, 2, 42, Back.Canvas.Handle,
    1625           xView + 5, yView + 3, SRCCOPY);
    1626         bitblt(Canvas.Handle, xView + 5 + 62, yView + 3, 2, 42,
    1627           Back.Canvas.Handle, xView + 5 + 62, yView + 3, SRCCOPY);
     1621        bitbltCanvas(Canvas, xView + 5, yView + 1, 64, 2, Back.Canvas,
     1622          xView + 5, yView + 1);
     1623        bitbltCanvas(Canvas, xView + 5, yView + 3, 2, 42, Back.Canvas,
     1624          xView + 5, yView + 3);
     1625        bitbltCanvas(Canvas, xView + 5 + 62, yView + 3, 2, 42,
     1626          Back.Canvas, xView + 5 + 62, yView + 3);
    16281627        ScreenTools.Frame(Canvas, xView + 9 - 1, yView + 5 - 1, xView + 9 + xSizeBig,
    16291628          yView + 5 + ySizeBig, $B0B0B0, $FFFFFF);
     
    16441643      else if c.Project and cpImp = 0 then
    16451644      begin // project is unit
    1646         bitblt(Canvas.Handle, xView + 9, yView + 5, xSizeBig, ySizeBig,
    1647           bigimp.Canvas.Handle, 0, 0, SRCCOPY);
     1645        bitbltCanvas(Canvas, xView + 9, yView + 5, xSizeBig, ySizeBig,
     1646          bigimp.Canvas, 0, 0);
    16481647        with Tribe[cOwner].ModelPicture[c.Project and cpIndex] do
    16491648          Sprite(Canvas, HGr, xView + 5, yView + 1, 64, 44, pix mod 10 * 65 + 1,
  • trunk/LocalPlayer/CityType.pas

    r57 r188  
    114114        xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.clBevelLight,
    115115        MainTexture.clBevelShade);
    116     BitBlt(offscreen.Canvas.Handle, xSwitch + 2 + i * 42, ySwitch + 2,
    117       xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle, (i + 3) * xSizeSmall,
    118       0, SRCCOPY)
     116    BitBltCanvas(offscreen.Canvas, xSwitch + 2 + i * 42, ySwitch + 2,
     117      xSizeSmall, ySizeSmall, SmallImp.Canvas, (i + 3) * xSizeSmall, 0);
    119118  end;
    120119  RisedTextOut(offscreen.Canvas, 8, yList + 32 * nListRow + 2,
     
    149148      yList + 16 + ySizeSmall div 2 + i div nListCol * 32,
    150149      MainTexture.clBevelLight, MainTexture.clBevelShade);
    151     BitBlt(offscreen.Canvas.Handle, xList + 21 - xSizeSmall div 2 +
     150    BitBltCanvas(offscreen.Canvas, xList + 21 - xSizeSmall div 2 +
    152151      i mod nListCol * 42, yList + 16 - ySizeSmall div 2 + i div nListCol * 32,
    153       xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
     152      xSizeSmall, ySizeSmall, SmallImp.Canvas,
    154153      MyData.ImpOrder[ctype, i] mod 7 * xSizeSmall,
    155154      (MyData.ImpOrder[ctype, i] + SystemIconLines * 7) div 7 *
    156       ySizeSmall, SRCCOPY);
     155      ySizeSmall);
    157156    inc(i);
    158157  end;
     
    172171        nPool div nPoolCol * 32, MainTexture.clBevelLight,
    173172        MainTexture.clBevelShade);
    174       BitBlt(offscreen.Canvas.Handle, xPool + 21 - xSizeSmall div 2 +
     173      BitBltCanvas(offscreen.Canvas, xPool + 21 - xSizeSmall div 2 +
    175174        nPool mod nPoolCol * 42, yPool + 16 - ySizeSmall div 2 +
    176         nPool div nPoolCol * 32, xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
     175        nPool div nPoolCol * 32, xSizeSmall, ySizeSmall, SmallImp.Canvas,
    177176        iix mod 7 * xSizeSmall, (iix + SystemIconLines * 7) div 7 *
    178         ySizeSmall, SRCCOPY);
    179       inc(nPool)
     177        ySizeSmall);
     178      inc(nPool);
    180179    end;
    181180  DeleteBtn.Visible := MyData.ImpOrder[ctype, 0] >= 0;
  • trunk/LocalPlayer/Draft.pas

    r104 r188  
    239239  // assemble background from 2 texture tiles
    240240  begin
    241     bitblt(Back.Canvas.Handle, 0, 0, ClientWidth, 64,
    242       MainTexture.Image.Canvas.Handle, (wMainTexture - ClientWidth) div 2,
    243       hMainTexture - 64, SRCCOPY);
    244     bitblt(Back.Canvas.Handle, 0, 64, ClientWidth, ClientHeight - 64,
    245       MainTexture.Image.Canvas.Handle, (wMainTexture - ClientWidth) div 2,
    246       0, SRCCOPY);
     241    bitbltCanvas(Back.Canvas, 0, 0, ClientWidth, 64,
     242      MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
     243      hMainTexture - 64);
     244    bitbltCanvas(Back.Canvas, 0, 64, ClientWidth, ClientHeight - 64,
     245      MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
     246      0);
    247247  end
    248248  else
    249     bitblt(Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    250       MainTexture.Image.Canvas.Handle, (wMainTexture - ClientWidth) div 2,
    251       (hMainTexture - ClientHeight) div 2, SRCCOPY);
     249    bitbltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight,
     250      MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
     251      (hMainTexture - ClientHeight) div 2);
    252252  ImageOp_B(Back, Template, 0, 0, 0, 0, Template.Width, 64);
    253253  ImageOp_B(Back, Template, 0, 64, 0, 64 + Cut, Template.Width,
    254254    Template.Height - 64 - Cut);
    255255
    256   bitblt(offscreen.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    257     Back.Canvas.Handle, 0, 0, SRCCOPY);
     256  bitbltCanvas(offscreen.Canvas, 0, 0, ClientWidth, ClientHeight,
     257    Back.Canvas, 0, 0);
    258258
    259259  offscreen.Canvas.Font.Assign(UniFont[ftCaption]);
  • trunk/LocalPlayer/Enhance.pas

    r57 r188  
    9696  for i := 0 to ControlCount - 1 do
    9797    if Controls[i] is TButtonC then
    98       BitBlt(Canvas.Handle, Controls[i].Left + 2, Controls[i].Top - 11, 8, 8,
    99         GrExt[HGrSystem].Data.Canvas.Handle, 121 + Controls[i].Tag mod 7 * 9,
    100         1 + Controls[i].Tag div 7 * 9, SRCCOPY);
     98      BitBltCanvas(Canvas, Controls[i].Left + 2, Controls[i].Top - 11, 8, 8,
     99        GrExt[HGrSystem].Data.Canvas, 121 + Controls[i].Tag mod 7 * 9,
     100        1 + Controls[i].Tag div 7 * 9);
    101101end;
    102102
  • trunk/LocalPlayer/Help.pas

    r172 r188  
    395395      ca.FrameRect(rect(x+1,i*24+1,x+24-1,i*24+24-1));
    396396      ca.Brush.Style:=bsClear; }
    397     BitBlt(ca.Handle, x, y - 4, 24, 24, GrExt[HGrSystem].Data.Canvas.Handle, 1,
    398       146, SRCCOPY);
     397    BitBltCanvas(ca, x, y - 4, 24, 24, GrExt[HGrSystem].Data.Canvas, 1,
     398      146);
    399399    BiColorTextOut(ca, $FFFFFF, $7F007F, x + 10 - ca.Textwidth(s[1]) div 2,
    400400      y - 3, s[1]);
     
    533533          if 4 + i * 24 + yl > InnerHeight then
    534534            yl := InnerHeight - (4 + i * 24);
    535           BitBlt(Handle, 8, 4 + i * 24, ExtPic.Width, yl, ExtPic.Canvas.Handle,
    536             0, 0, SRCCOPY);
     535          BitBltCanvas(OffScreen.Canvas, 8, 4 + i * 24, ExtPic.Width, yl, ExtPic.Canvas,
     536            0, 0);
    537537        end;
    538538      end;
     
    574574                8 + xSizeSmall + x0[i], 2 + 20 + i * 24, $000000, $000000);
    575575              if HelpLineInfo.Picpix = imPalace then
    576                 BitBlt(OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24,
    577                   xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
    578                   0 * xSizeSmall, 1 * ySizeSmall, SRCCOPY)
     576                BitBltCanvas(OffScreen.Canvas, 8 + x0[i], 2 + i * 24,
     577                  xSizeSmall, ySizeSmall, SmallImp.Canvas,
     578                  0 * xSizeSmall, 1 * ySizeSmall)
    579579              else
    580                 BitBlt(OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24,
    581                   xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
     580                BitBltCanvas(OffScreen.Canvas, 8 + x0[i], 2 + i * 24,
     581                  xSizeSmall, ySizeSmall, SmallImp.Canvas,
    582582                  HelpLineInfo.Picpix mod 7 * xSizeSmall,
    583583                  (HelpLineInfo.Picpix + SystemIconLines * 7) div 7 *
    584                   ySizeSmall, SRCCOPY);
     584                  ySizeSmall);
    585585              x0[i] := x0[i] + (8 + 8 + 36);
    586586            end;
     
    641641                $000000, $000000);
    642642              if AdvIcon[HelpLineInfo.Picpix] < 84 then
    643                 BitBlt(OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24,
    644                   xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
     643                BitBltCanvas(OffScreen.Canvas, 8 + x0[i], 2 + i * 24,
     644                  xSizeSmall, ySizeSmall, SmallImp.Canvas,
    645645                  (AdvIcon[HelpLineInfo.Picpix] + SystemIconLines * 7) mod 7 *
    646646                  xSizeSmall, (AdvIcon[HelpLineInfo.Picpix] + SystemIconLines *
    647                   7) div 7 * ySizeSmall, SRCCOPY)
     647                  7) div 7 * ySizeSmall)
    648648              else
    649649                Dump(OffScreen, HGrSystem, 8 + x0[i], 2 + i * 24, 36, 20,
     
    651651                  295 + (AdvIcon[HelpLineInfo.Picpix] - 84) div 8 * 21);
    652652              j := AdvValue[HelpLineInfo.Picpix] div 1000;
    653               BitBlt(Handle, x0[i] + 4, 4 + i * 24, 14, 14,
    654                 GrExt[HGrSystem].Mask.Canvas.Handle, 127 + j * 15, 85, SRCAND);
     653              BitBltCanvas(OffScreen.Canvas, x0[i] + 4, 4 + i * 24, 14, 14,
     654                GrExt[HGrSystem].Mask.Canvas, 127 + j * 15, 85, SRCAND);
    655655              Sprite(OffScreen, HGrSystem, x0[i] + 3, 3 + i * 24, 14, 14,
    656656                127 + j * 15, 85);
     
    828828              ScreenTools.Frame(OffScreen.Canvas, 8 - 1 + x0[i], 2 - 1 + i * 24,
    829829                8 + xSizeSmall + x0[i], 2 + 20 + i * 24, $000000, $000000);
    830               BitBlt(OffScreen.Canvas.Handle, 8 + x0[i], 2 + i * 24, xSizeSmall,
    831                 ySizeSmall, SmallImp.Canvas.Handle, (HelpLineInfo.Picpix - 1) *
    832                 xSizeSmall, ySizeSmall, SRCCOPY);
     830              BitBltCanvas(OffScreen.Canvas, 8 + x0[i], 2 + i * 24, xSizeSmall,
     831                ySizeSmall, SmallImp.Canvas, (HelpLineInfo.Picpix - 1) *
     832                xSizeSmall, ySizeSmall);
    833833              x0[i] := x0[i] + (8 + 8 + 36);
    834834            end;
  • trunk/LocalPlayer/IsoEngine.pas

    r186 r188  
    2323    procedure PaintCity(x, y: integer; const CityInfo: TCityInfo;
    2424      accessory: boolean = true);
    25     procedure BitBlt(Src: TBitmap; x, y, Width, Height, xSrc, ySrc,
     25    procedure BitBltBitmap(Src: TBitmap; x, y, Width, Height, xSrc, ySrc,
    2626      Rop: integer);
    2727
     
    3939    FLeft, FTop, FRight, FBottom, RealTop, RealBottom, AttLoc, DefLoc,
    4040      DefHealth, FAdviceLoc: integer;
    41     DataDC, MaskDC: HDC;
     41    DataCanvas: TCanvas;
     42    MaskCanvas: TCanvas;
    4243    function Connection4(Loc, Mask, Value: integer): integer;
    4344    function Connection8(Loc, Mask: integer): integer;
     
    194195  DitherMask.SetSize(xxt * 2, yyt * 2);
    195196  DitherMask.Canvas.FillRect(0, 0, DitherMask.Width, DitherMask.Height);
    196   BitBlt(DitherMask.Canvas.Handle, 0, 0, xxt * 2, yyt * 2,
    197     GrExt[HGrTerrain].Mask.Canvas.Handle, 1 + 7 * (xxt * 2 + 1),
     197  BitBltCanvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt * 2,
     198    GrExt[HGrTerrain].Mask.Canvas, 1 + 7 * (xxt * 2 + 1),
    198199    1 + yyt + 15 * (yyt * 3 + 1), SRCAND);
    199200
     
    216217    end;
    217218    for y := -1 to 6 do
    218       BitBlt(LandPatch.Canvas.Handle, (x + 2) * (xxt * 2), (y + 2) * yyt,
    219         xxt * 2, yyt, GrExt[HGrTerrain].Data.Canvas.Handle, xSrc, ySrc,
    220         SRCCOPY);
     219      BitBltCanvas(LandPatch.Canvas, (x + 2) * (xxt * 2), (y + 2) * yyt,
     220        xxt * 2, yyt, GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc);
    221221    for y := -2 to 6 do
    222       BitBlt(LandPatch.Canvas.Handle, (x + 2) * (xxt * 2), (y + 2) * yyt, xxt,
    223         yyt, GrExt[HGrTerrain].Data.Canvas.Handle, xSrc + xxt, ySrc + yyt,
     222      BitBltCanvas(LandPatch.Canvas, (x + 2) * (xxt * 2), (y + 2) * yyt, xxt,
     223        yyt, GrExt[HGrTerrain].Data.Canvas, xSrc + xxt, ySrc + yyt,
    224224        SRCPAINT);
    225225    for y := -2 to 6 do
    226       BitBlt(LandPatch.Canvas.Handle, (x + 2) * (xxt * 2) + xxt, (y + 2) * yyt,
    227         xxt, yyt, GrExt[HGrTerrain].Data.Canvas.Handle, xSrc, ySrc + yyt,
     226      BitBltCanvas(LandPatch.Canvas, (x + 2) * (xxt * 2) + xxt, (y + 2) * yyt,
     227        xxt, yyt, GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc + yyt,
    228228        SRCPAINT);
    229229    for y := -2 to 6 do
    230       BitBlt(LandPatch.Canvas.Handle, (x + 2) * (xxt * 2), (y + 2) * yyt, xxt,
    231         yyt, DitherMask.Canvas.Handle, xxt, yyt, SRCAND);
     230      BitBltCanvas(LandPatch.Canvas, (x + 2) * (xxt * 2), (y + 2) * yyt, xxt,
     231        yyt, DitherMask.Canvas, xxt, yyt, SRCAND);
    232232    for y := -2 to 6 do
    233       BitBlt(LandPatch.Canvas.Handle, (x + 2) * (xxt * 2) + xxt, (y + 2) * yyt,
    234         xxt, yyt, DitherMask.Canvas.Handle, 0, yyt, SRCAND);
     233      BitBltCanvas(LandPatch.Canvas, (x + 2) * (xxt * 2) + xxt, (y + 2) * yyt,
     234        xxt, yyt, DitherMask.Canvas, 0, yyt, SRCAND);
    235235  end;
    236236
     
    253253    end;
    254254    for x := -2 to 6 do
    255       BitBlt(LandMore.Canvas.Handle, (x + 2) * (xxt * 2), (y + 2) * yyt,
    256         xxt * 2, yyt, GrExt[HGrTerrain].Data.Canvas.Handle, xSrc, ySrc,
    257         SRCCOPY);
    258     BitBlt(LandMore.Canvas.Handle, xxt * 2, (y + 2) * yyt, xxt, yyt,
    259       GrExt[HGrTerrain].Data.Canvas.Handle, xSrc + xxt, ySrc + yyt, SRCPAINT);
     255      BitBltCanvas(LandMore.Canvas, (x + 2) * (xxt * 2), (y + 2) * yyt,
     256        xxt * 2, yyt, GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc);
     257    BitBltCanvas(LandMore.Canvas, xxt * 2, (y + 2) * yyt, xxt, yyt,
     258      GrExt[HGrTerrain].Data.Canvas, xSrc + xxt, ySrc + yyt, SRCPAINT);
    260259    for x := 0 to 7 do
    261       BitBlt(LandMore.Canvas.Handle, (x + 2) * (xxt * 2) - xxt, (y + 2) * yyt,
    262         xxt * 2, yyt, GrExt[HGrTerrain].Data.Canvas.Handle, xSrc, ySrc + yyt,
     260      BitBltCanvas(LandMore.Canvas, (x + 2) * (xxt * 2) - xxt, (y + 2) * yyt,
     261        xxt * 2, yyt, GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc + yyt,
    263262        SRCPAINT);
    264263    for x := -2 to 6 do
    265       BitBlt(LandMore.Canvas.Handle, (x + 2) * (xxt * 2), (y + 2) * yyt,
    266         xxt * 2, yyt, DitherMask.Canvas.Handle, 0, 0, SRCAND);
     264      BitBltCanvas(LandMore.Canvas, (x + 2) * (xxt * 2), (y + 2) * yyt,
     265        xxt * 2, yyt, DitherMask.Canvas, 0, 0, SRCAND);
    267266  end;
    268267
     
    276275      ySrc := 1 + yyt;
    277276      if (x >= 1) = (y >= 2) then
    278         BitBlt(OceanPatch.Canvas.Handle, x * (xxt * 2), y * yyt, xxt * 2, yyt,
    279           GrExt[HGrTerrain].Data.Canvas.Handle, xSrc, ySrc, SRCCOPY);
     277        BitBltCanvas(OceanPatch.Canvas, x * (xxt * 2), y * yyt, xxt * 2, yyt,
     278          GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc);
    280279      if (x >= 1) and ((y < 2) or (x >= 2)) then
    281280      begin
    282         BitBlt(OceanPatch.Canvas.Handle, x * (xxt * 2), y * yyt, xxt, yyt,
    283           GrExt[HGrTerrain].Data.Canvas.Handle, xSrc + xxt, ySrc + yyt,
     281        BitBltCanvas(OceanPatch.Canvas, x * (xxt * 2), y * yyt, xxt, yyt,
     282          GrExt[HGrTerrain].Data.Canvas, xSrc + xxt, ySrc + yyt,
    284283          SRCPAINT);
    285         BitBlt(OceanPatch.Canvas.Handle, x * (xxt * 2) + xxt, y * yyt, xxt, yyt,
    286           GrExt[HGrTerrain].Data.Canvas.Handle, xSrc, ySrc + yyt, SRCPAINT);
     284        BitBltCanvas(OceanPatch.Canvas, x * (xxt * 2) + xxt, y * yyt, xxt, yyt,
     285          GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc + yyt, SRCPAINT);
    287286      end;
    288       BitBlt(OceanPatch.Canvas.Handle, x * (xxt * 2), y * yyt, xxt, yyt,
    289         DitherMask.Canvas.Handle, xxt, yyt, SRCAND);
    290       BitBlt(OceanPatch.Canvas.Handle, x * (xxt * 2) + xxt, y * yyt, xxt, yyt,
    291         DitherMask.Canvas.Handle, 0, yyt, SRCAND);
     287      BitBltCanvas(OceanPatch.Canvas, x * (xxt * 2), y * yyt, xxt, yyt,
     288        DitherMask.Canvas, xxt, yyt, SRCAND);
     289      BitBltCanvas(OceanPatch.Canvas, x * (xxt * 2) + xxt, y * yyt, xxt, yyt,
     290        DitherMask.Canvas, 0, yyt, SRCAND);
    292291    end;
    293292
     
    301300      ySrc := 1 + yyt;
    302301      if (x < 1) or (y >= 2) then
    303         BitBlt(OceanMore.Canvas.Handle, x * (xxt * 2), y * yyt, xxt * 2, yyt,
    304           GrExt[HGrTerrain].Data.Canvas.Handle, xSrc, ySrc, SRCCOPY);
     302        BitBltCanvas(OceanMore.Canvas, x * (xxt * 2), y * yyt, xxt * 2, yyt,
     303          GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc);
    305304      if (x = 1) and (y < 2) or (x >= 2) and (y >= 1) then
    306305      begin
    307         BitBlt(OceanMore.Canvas.Handle, x * (xxt * 2), y * yyt, xxt, yyt,
    308           GrExt[HGrTerrain].Data.Canvas.Handle, xSrc + xxt, ySrc + yyt,
     306        BitBltCanvas(OceanMore.Canvas, x * (xxt * 2), y * yyt, xxt, yyt,
     307          GrExt[HGrTerrain].Data.Canvas, xSrc + xxt, ySrc + yyt,
    309308          SRCPAINT);
    310         BitBlt(OceanMore.Canvas.Handle, x * (xxt * 2) + xxt, y * yyt, xxt, yyt,
    311           GrExt[HGrTerrain].Data.Canvas.Handle, xSrc, ySrc + yyt, SRCPAINT);
     309        BitBltCanvas(OceanMore.Canvas, x * (xxt * 2) + xxt, y * yyt, xxt, yyt,
     310          GrExt[HGrTerrain].Data.Canvas, xSrc, ySrc + yyt, SRCPAINT);
    312311      end;
    313       BitBlt(OceanMore.Canvas.Handle, x * (xxt * 2), y * yyt, xxt * 2, yyt,
    314         DitherMask.Canvas.Handle, 0, 0, SRCAND);
     312      BitBltCanvas(OceanMore.Canvas, x * (xxt * 2), y * yyt, xxt * 2, yyt,
     313        DitherMask.Canvas, 0, 0, SRCAND);
    315314    end;
    316315
    317   BitBlt(DitherMask.Canvas.Handle, 0, 0, xxt * 2, yyt * 2,
    318     DitherMask.Canvas.Handle, 0, 0, DSTINVERT); { invert dither mask }
    319   BitBlt(DitherMask.Canvas.Handle, 0, 0, xxt * 2, yyt * 2,
    320     GrExt[HGrTerrain].Mask.Canvas.Handle, 1, 1 + yyt, SRCPAINT);
     316  BitBltCanvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt * 2,
     317    DitherMask.Canvas, 0, 0, DSTINVERT); { invert dither mask }
     318  BitBltCanvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt * 2,
     319    GrExt[HGrTerrain].Mask.Canvas, 1, 1 + yyt, SRCPAINT);
    321320
    322321  for x := -1 to 6 do
    323322    for y := -2 to 6 do
    324       BitBlt(LandPatch.Canvas.Handle, (x + 2) * (xxt * 2), (y + 2) * yyt,
    325         xxt * 2, yyt, DitherMask.Canvas.Handle, 0, 0, SRCAND);
     323      BitBltCanvas(LandPatch.Canvas, (x + 2) * (xxt * 2), (y + 2) * yyt,
     324        xxt * 2, yyt, DitherMask.Canvas, 0, 0, SRCAND);
    326325
    327326  for y := -1 to 6 do
    328327    for x := -2 to 7 do
    329       BitBlt(LandMore.Canvas.Handle, (x + 2) * (xxt * 2) - xxt, (y + 2) * yyt,
    330         xxt * 2, yyt, DitherMask.Canvas.Handle, 0, yyt, SRCAND);
    331 
    332   BitBlt(LandPatch.Canvas.Handle, 0, 0, (xxt * 2) * 9, yyt * 9,
    333     LandMore.Canvas.Handle, 0, 0, SRCPAINT);
     328      BitBltCanvas(LandMore.Canvas, (x + 2) * (xxt * 2) - xxt, (y + 2) * yyt,
     329        xxt * 2, yyt, DitherMask.Canvas, 0, yyt, SRCAND);
     330
     331  BitBltCanvas(LandPatch.Canvas, 0, 0, (xxt * 2) * 9, yyt * 9,
     332    LandMore.Canvas, 0, 0, SRCPAINT);
    334333
    335334  for x := 0 to 3 do
    336335    for y := 0 to 3 do
    337       BitBlt(OceanPatch.Canvas.Handle, x * (xxt * 2), y * yyt, xxt * 2, yyt,
    338         DitherMask.Canvas.Handle, 0, 0, SRCAND);
     336      BitBltCanvas(OceanPatch.Canvas, x * (xxt * 2), y * yyt, xxt * 2, yyt,
     337        DitherMask.Canvas, 0, 0, SRCAND);
    339338
    340339  for y := 0 to 3 do
    341340    for x := 0 to 4 do
    342       BitBlt(OceanMore.Canvas.Handle, x * (xxt * 2) - xxt, y * yyt, xxt * 2,
    343         yyt, DitherMask.Canvas.Handle, 0, yyt, SRCAND);
    344 
    345   BitBlt(OceanPatch.Canvas.Handle, 0, 0, (xxt * 2) * 4, yyt * 4,
    346     OceanMore.Canvas.Handle, 0, 0, SRCPAINT);
     341      BitBltCanvas(OceanMore.Canvas, x * (xxt * 2) - xxt, y * yyt, xxt * 2,
     342        yyt, DitherMask.Canvas, 0, yyt, SRCAND);
     343
     344  BitBltCanvas(OceanPatch.Canvas, 0, 0, (xxt * 2) * 4, yyt * 4,
     345    OceanMore.Canvas, 0, 0, SRCPAINT);
    347346
    348347  with DitherMask.Canvas do
     
    351350    FillRect(Rect(0, 0, xxt * 2, yyt));
    352351  end;
    353   BitBlt(DitherMask.Canvas.Handle, 0, 0, xxt * 2, yyt,
    354     GrExt[HGrTerrain].Mask.Canvas.Handle, 1, 1 + yyt, SRCCOPY);
     352  BitBltCanvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt,
     353    GrExt[HGrTerrain].Mask.Canvas, 1, 1 + yyt);
    355354
    356355  for x := 0 to 6 do
    357     BitBlt(LandPatch.Canvas.Handle, (x + 2) * (xxt * 2), yyt, xxt * 2, yyt,
    358       DitherMask.Canvas.Handle, 0, 0, SRCAND);
    359   BitBlt(DitherMask.Canvas.Handle, 0, 0, xxt * 2, yyt, DitherMask.Canvas.Handle,
     356    BitBltCanvas(LandPatch.Canvas, (x + 2) * (xxt * 2), yyt, xxt * 2, yyt,
     357      DitherMask.Canvas, 0, 0, SRCAND);
     358  BitBltCanvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt, DitherMask.Canvas,
    360359    0, 0, DSTINVERT);
    361360
    362361  for y := 0 to 6 do
    363     BitBlt(LandPatch.Canvas.Handle, xxt * 2, (y + 2) * yyt, xxt * 2, yyt,
    364       DitherMask.Canvas.Handle, 0, 0, SRCAND);
     362    BitBltCanvas(LandPatch.Canvas, xxt * 2, (y + 2) * yyt, xxt * 2, yyt,
     363      DitherMask.Canvas, 0, 0, SRCAND);
    365364
    366365  LandMore.Free;
     
    502501end;
    503502
    504 procedure TIsoMap.BitBlt(Src: TBitmap; x, y, Width, Height, xSrc, ySrc,
     503procedure TIsoMap.BitBltBitmap(Src: TBitmap; x, y, Width, Height, xSrc, ySrc,
    505504  Rop: integer);
    506505begin
     
    524523    exit;
    525524
    526   LCLIntf.BitBlt(FOutput.Canvas.Handle, x, y, Width, Height, Src.Canvas.Handle,
    527     xSrc, ySrc, Rop);
     525  BitBltCanvas(FOutput.Canvas, x, y, Width, Height, Src.Canvas, xSrc, ySrc, Rop);
    528526end;
    529527
    530528procedure TIsoMap.Sprite(HGr, xDst, yDst, Width, Height, xGr, yGr: integer);
    531529begin
    532   BitBlt(GrExt[HGr].Mask, xDst, yDst, Width, Height, xGr, yGr, SRCAND);
    533   BitBlt(GrExt[HGr].Data, xDst, yDst, Width, Height, xGr, yGr, SRCPAINT);
     530  BitBltBitmap(GrExt[HGr].Mask, xDst, yDst, Width, Height, xGr, yGr, SRCAND);
     531  BitBltBitmap(GrExt[HGr].Data, xDst, yDst, Width, Height, xGr, yGr, SRCPAINT);
    534532end;
    535533
     
    564562    exit;
    565563
    566   LCLIntf.BitBlt(FOutput.Canvas.Handle, xDst, yDst, Width, Height, MaskDC, xSrc, ySrc, SRCAND);
     564  BitBltCanvas(FOutput.Canvas, xDst, yDst, Width, Height, MaskCanvas, xSrc, ySrc, SRCAND);
    567565  if not PureBlack then
    568     LCLIntf.BitBlt(FOutput.Canvas.Handle, xDst, yDst, Width, Height, DataDC, xSrc, ySrc,
    569       SRCPAINT);
     566    BitBltCanvas(FOutput.Canvas, xDst, yDst, Width, Height, DataCanvas, xSrc, ySrc, SRCPAINT);
    570567end;
    571568
     
    615612        xGr := 121 + j mod 7 * 9;
    616613        yGr := 1 + j div 7 * 9;
    617         BitBlt(GrExt[HGrSystem].Mask, x + xsh + 3, y + ysh + 9, 8, 8, xGr,
     614        BitBltBitmap(GrExt[HGrSystem].Mask, x + xsh + 3, y + ysh + 9, 8, 8, xGr,
    618615          yGr, SRCAND);
    619616        Sprite(HGrSystem, x + xsh + 2, y + ysh + 8, 8, 8, xGr, yGr);
     
    822819    exit;
    823820
    824   BitBlt(GrExt[HGrTerrain].Data, x + xxt div 2, y, xxt, yyt,
     821  BitBltBitmap(GrExt[HGrTerrain].Data, x + xxt div 2, y, xxt, yyt,
    825822    1 + (Conn shr 6 + Conn and 1 shl 2) * (xxt * 2 + 1),
    826823    1 + yyt + (16 + Tile and fTerrain) * (yyt * 3 + 1), SRCPAINT);
    827   BitBlt(GrExt[HGrTerrain].Data, x + xxt, y + yyt div 2, xxt, yyt,
     824  BitBltBitmap(GrExt[HGrTerrain].Data, x + xxt, y + yyt div 2, xxt, yyt,
    828825    1 + (Conn and 7) * (xxt * 2 + 1) + xxt,
    829826    1 + yyt * 2 + (16 + Tile and fTerrain) * (yyt * 3 + 1), SRCPAINT);
    830   BitBlt(GrExt[HGrTerrain].Data, x + xxt div 2, y + yyt, xxt, yyt,
     827  BitBltBitmap(GrExt[HGrTerrain].Data, x + xxt div 2, y + yyt, xxt, yyt,
    831828    1 + (Conn shr 2 and 7) * (xxt * 2 + 1) + xxt,
    832829    1 + yyt + (16 + Tile and fTerrain) * (yyt * 3 + 1), SRCPAINT);
    833   BitBlt(GrExt[HGrTerrain].Data, x, y + yyt div 2, xxt, yyt,
     830  BitBltBitmap(GrExt[HGrTerrain].Data, x, y + yyt div 2, xxt, yyt,
    834831    1 + (Conn shr 4 and 7) * (xxt * 2 + 1),
    835832    1 + yyt * 2 + (16 + Tile and fTerrain) * (yyt * 3 + 1), SRCPAINT);
    836833  Conn := Connection4(Loc, fTerrain, fUNKNOWN); { dither to black }
    837834  if Conn and 1 <> 0 then
    838     BitBlt(GrExt[HGrTerrain].Mask, x + xxt, y, xxt, yyt, 1 + 7 * (xxt * 2 + 1) +
     835    BitBltBitmap(GrExt[HGrTerrain].Mask, x + xxt, y, xxt, yyt, 1 + 7 * (xxt * 2 + 1) +
    839836      xxt, 1 + yyt + 15 * (yyt * 3 + 1), SRCAND);
    840837  if Conn and 2 <> 0 then
    841     BitBlt(GrExt[HGrTerrain].Mask, x + xxt, y + yyt, xxt, yyt,
     838    BitBltBitmap(GrExt[HGrTerrain].Mask, x + xxt, y + yyt, xxt, yyt,
    842839      1 + 7 * (xxt * 2 + 1) + xxt, 1 + yyt * 2 + 15 * (yyt * 3 + 1), SRCAND);
    843840  if Conn and 4 <> 0 then
    844     BitBlt(GrExt[HGrTerrain].Mask, x, y + yyt, xxt, yyt, 1 + 7 * (xxt * 2 + 1),
     841    BitBltBitmap(GrExt[HGrTerrain].Mask, x, y + yyt, xxt, yyt, 1 + 7 * (xxt * 2 + 1),
    845842      1 + yyt * 2 + 15 * (yyt * 3 + 1), SRCAND);
    846843  if Conn and 8 <> 0 then
    847     BitBlt(GrExt[HGrTerrain].Mask, x, y, xxt, yyt, 1 + 7 * (xxt * 2 + 1),
     844    BitBltBitmap(GrExt[HGrTerrain].Mask, x, y, xxt, yyt, 1 + 7 * (xxt * 2 + 1),
    848845      1 + yyt + 15 * (yyt * 3 + 1), SRCAND);
    849846end;
     
    10101007        if BordersOK and (1 shl p1) = 0 then
    10111008        begin
    1012           // Clearing before bitblt SRCCOPY shouldn't be neccesary but for some
     1009          // Clearing before BitBltBitmap SRCCOPY shouldn't be neccesary but for some
    10131010          // reason without it code works different then under Delphi
    10141011          Borders.Canvas.FillRect(Bounds(0, p1 * (yyt * 2), xxt * 2, yyt * 2));
    10151012
    1016           LCLIntf.BitBlt(Borders.Canvas.Handle, 0, p1 * (yyt * 2), xxt * 2,
    1017             yyt * 2, GrExt[HGrTerrain].Data.Canvas.Handle,
    1018             1 + 8 * (xxt * 2 + 1), 1 + yyt + 16 * (yyt * 3 + 1), SRCCOPY);
     1013          BitBltCanvas(Borders.Canvas, 0, p1 * (yyt * 2), xxt * 2,
     1014            yyt * 2, GrExt[HGrTerrain].Data.Canvas,
     1015            1 + 8 * (xxt * 2 + 1), 1 + yyt + 16 * (yyt * 3 + 1));
    10191016          Borders.BeginUpdate;
    10201017          for dy := 0 to yyt * 2 - 1 do
     
    10461043              if p2 <> p1 then
    10471044              begin
    1048                 BitBlt(GrExt[HGrTerrain].Mask, x + dx * xxt, y + dy * yyt, xxt,
     1045                BitBltBitmap(GrExt[HGrTerrain].Mask, x + dx * xxt, y + dy * yyt, xxt,
    10491046                  yyt, 1 + 8 * (xxt * 2 + 1) + dx * xxt,
    10501047                  1 + yyt + 16 * (yyt * 3 + 1) + dy * yyt, SRCAND);
    1051                 BitBlt(Borders, x + dx * xxt, y + dy * yyt, xxt, yyt, dx * xxt,
     1048                BitBltBitmap(Borders, x + dx * xxt, y + dy * yyt, xxt, yyt, dx * xxt,
    10521049                  p1 * (yyt * 2) + dy * yyt, SRCPAINT);
    10531050              end
     
    14901487                  bix := 0
    14911488                end;
    1492               BitBlt(OceanPatch, x + dx * xxt, y + dy * yyt, xxt, yyt,
     1489              BitBltBitmap(OceanPatch, x + dx * xxt, y + dy * yyt, xxt, yyt,
    14931490                Aix * (xxt * 2) + (dx + dy + 1) and 1 * xxt, bix * yyt, SRCCOPY)
    14941491            end
     
    15381535                bix := Aix;
    15391536            if Aix = -1 then
    1540               BitBlt(GrExt[HGrTerrain].Data, x + dx * xxt, y + dy * yyt, xxt,
     1537              BitBltBitmap(GrExt[HGrTerrain].Data, x + dx * xxt, y + dy * yyt, xxt,
    15411538                yyt, 1 + 6 * (xxt * 2 + 1) + (dx + dy + 1) and 1 * xxt, 1 + yyt,
    15421539                SRCCOPY) // arctic <-> ocean
    15431540            else if bix = -1 then
    1544               BitBlt(GrExt[HGrTerrain].Data, x + dx * xxt, y + dy * yyt, xxt,
     1541              BitBltBitmap(GrExt[HGrTerrain].Data, x + dx * xxt, y + dy * yyt, xxt,
    15451542                yyt, 1 + 6 * (xxt * 2 + 1) + xxt - (dx + dy + 1) and 1 * xxt,
    15461543                1 + yyt * 2, SRCCOPY) // arctic <-> ocean
    15471544            else
    1548               BitBlt(LandPatch, x + dx * xxt, y + dy * yyt, xxt, yyt,
     1545              BitBltBitmap(LandPatch, x + dx * xxt, y + dy * yyt, xxt, yyt,
    15491546                Aix * (xxt * 2) + (dx + dy + 1) and 1 * xxt, bix * yyt, SRCCOPY)
    15501547          end
    15511548      end;
    15521549
    1553   DataDC := GrExt[HGrTerrain].Data.Canvas.Handle;
    1554   MaskDC := GrExt[HGrTerrain].Mask.Canvas.Handle;
     1550  DataCanvas := GrExt[HGrTerrain].Data.Canvas;
     1551  MaskCanvas := GrExt[HGrTerrain].Mask.Canvas;
    15551552  for dy := -2 to ny + 1 do
    15561553    for dx := -1 to nx do
  • trunk/LocalPlayer/MessgEx.pas

    r173 r188  
    291291
    292292  // paint
    293   BitBltCanvas(LogoBuffer.Canvas, 0, 0, wb, hb, ca, x, y, SRCCOPY);
     293  BitBltCanvas(LogoBuffer.Canvas, 0, 0, wb, hb, ca, x, y);
    294294
    295295  if IconIndex >= 0 then
     
    304304  ImageOp_BCC(LogoBuffer, Templates, 0, 0, xb, yb, wb, hb, clCover, clPage);
    305305
    306   BitBlt(ca.Handle, x, y, wb, hb, LogoBuffer.Canvas.Handle, 0, 0, SRCCOPY);
     306  BitBltCanvas(ca, x, y, wb, hb, LogoBuffer.Canvas, 0, 0);
    307307end;
    308308
     
    328328      with MyRO.EnemyModel[emix], Tribe[Owner].ModelPicture[mix] do
    329329      begin
    330         BitBlt(Canvas.Handle, x, y, 64, 48, GrExt[HGr].Mask.Canvas.Handle,
     330        BitBltCanvas(Canvas, x, y, 64, 48, GrExt[HGr].Mask.Canvas,
    331331          pix mod 10 * 65 + 1, pix div 10 * 49 + 1, SRCAND);
    332         BitBlt(Canvas.Handle, x, y, 64, 48, GrExt[HGr].Data.Canvas.Handle,
     332        BitBltCanvas(Canvas, x, y, 64, 48, GrExt[HGr].Data.Canvas,
    333333          pix mod 10 * 65 + 1, pix div 10 * 49 + 1, SRCPAINT);
    334334      end;
     
    371371      begin
    372372        p1 := MyRO.Wonder[IconIndex].EffectiveOwner;
    373         BitBlt(Buffer.Canvas.Handle, 0, 0, xSizeBig + 2 * GlowRange,
    374           ySizeBig + 2 * GlowRange, Canvas.Handle,
    375           ClientWidth div 2 - (28 + GlowRange), 24 - GlowRange, SRCCOPY);
    376         BitBlt(Buffer.Canvas.Handle, GlowRange, GlowRange, xSizeBig, ySizeBig,
    377           BigImp.Canvas.Handle, IconIndex mod 7 * xSizeBig,
    378           (IconIndex + SystemIconLines * 7) div 7 * ySizeBig, SRCCOPY);
     373        BitBltCanvas(Buffer.Canvas, 0, 0, xSizeBig + 2 * GlowRange,
     374          ySizeBig + 2 * GlowRange, Canvas,
     375          ClientWidth div 2 - (28 + GlowRange), 24 - GlowRange);
     376        BitBltCanvas(Buffer.Canvas, GlowRange, GlowRange, xSizeBig, ySizeBig,
     377          BigImp.Canvas, IconIndex mod 7 * xSizeBig,
     378          (IconIndex + SystemIconLines * 7) div 7 * ySizeBig);
    379379        if p1 < 0 then
    380380          GlowFrame(Buffer, GlowRange, GlowRange, xSizeBig, ySizeBig, $000000)
     
    382382          GlowFrame(Buffer, GlowRange, GlowRange, xSizeBig, ySizeBig,
    383383            Tribe[p1].Color);
    384         BitBlt(Canvas.Handle, ClientWidth div 2 - (28 + GlowRange),
     384        BitBltCanvas(Canvas, ClientWidth div 2 - (28 + GlowRange),
    385385          24 - GlowRange, xSizeBig + 2 * GlowRange, ySizeBig + 2 * GlowRange,
    386           Buffer.Canvas.Handle, 0, 0, SRCCOPY);
     386          Buffer.Canvas, 0, 0);
    387387      end
    388388      else
     
    400400        FrameImage(Canvas, BigImp, ClientWidth div 2 - 28, 24, xSizeBig,
    401401          ySizeBig, 0, 0);
    402         BitBlt(Canvas.Handle, ClientWidth div 2 - 32, 20, 64, 44,
    403           GrExt[HGr].Mask.Canvas.Handle, pix mod 10 * 65 + 1,
     402        BitBltCanvas(Canvas, ClientWidth div 2 - 32, 20, 64, 44,
     403          GrExt[HGr].Mask.Canvas, pix mod 10 * 65 + 1,
    404404          pix div 10 * 49 + 1, SRCAND);
    405         BitBlt(Canvas.Handle, ClientWidth div 2 - 32, 20, 64, 44,
    406           GrExt[HGr].Data.Canvas.Handle, pix mod 10 * 65 + 1,
     405        BitBltCanvas(Canvas, ClientWidth div 2 - 32, 20, 64, 44,
     406          GrExt[HGr].Data.Canvas, pix mod 10 * 65 + 1,
    407407          pix div 10 * 49 + 1, SRCPAINT);
    408408      end;
     
    415415        Frame(Canvas, ClientWidth div 2 - 32 - 1, 24 - 1,
    416416          ClientWidth div 2 + 32, 24 + 48, $000000, $000000);
    417         BitBlt(Canvas.Handle, ClientWidth div 2 - 32, 24, 64, 48,
    418           GrExt[Tribe[IconIndex].faceHGr].Data.Canvas.Handle,
     417        BitBltCanvas(Canvas, ClientWidth div 2 - 32, 24, 64, 48,
     418          GrExt[Tribe[IconIndex].faceHGr].Data.Canvas,
    419419          1 + Tribe[IconIndex].facepix mod 10 * 65,
    420           1 + Tribe[IconIndex].facepix div 10 * 49, SRCCOPY)
     420          1 + Tribe[IconIndex].facepix div 10 * 49)
    421421      end;
    422422    mikPureIcon:
     
    430430      begin
    431431        BitBltCanvas(Buffer.Canvas, 0, 0, 140, 120, Canvas,
    432           (ClientWidth - 140) div 2, 24, SRCCOPY);
     432          (ClientWidth - 140) div 2, 24);
    433433        ImageOp_BCC(Buffer, Templates, 0, 0, 1, 279, 140, 120, 0, $FFFFFF);
    434         BitBlt(Canvas.Handle, (ClientWidth - 140) div 2, 24, 140, 120,
    435           Buffer.Canvas.Handle, 0, 0, SRCCOPY);
     434        BitBltCanvas(Canvas, (ClientWidth - 140) div 2, 24, 140, 120,
     435          Buffer.Canvas, 0, 0);
    436436      end;
    437437    mikMyArmy:
  • trunk/LocalPlayer/NatStat.pas

    r104 r188  
    109109  begin
    110110    AgePrepared := MainTextureAge;
    111     bitblt(Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    112       MainTexture.Image.Canvas.Handle, (wMainTexture - ClientWidth) div 2,
    113       (hMainTexture - ClientHeight) div 2, SRCCOPY);
     111    BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight,
     112      MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
     113      (hMainTexture - ClientHeight) div 2);
    114114    ImageOp_B(Back, Template, 0, 0, 0, 0, ClientWidth, ClientHeight);
    115115  end
     
    264264  Extinct := 1 shl pView and MyRO.Alive = 0;
    265265
    266   bitblt(offscreen.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    267     Back.Canvas.Handle, 0, 0, SRCCOPY);
     266  BitBltCanvas(offscreen.Canvas, 0, 0, ClientWidth, ClientHeight,
     267    Back.Canvas, 0, 0);
    268268
    269269  offscreen.Canvas.Font.Assign(UniFont[ftCaption]);
  • trunk/LocalPlayer/Rates.pas

    r61 r188  
    9595    GlowFrame(Offscreen, ClientWidth div 2 - xSizeBig div 2, 52, xSizeBig,
    9696      ySizeBig, Tribe[me].Color);
    97     BitBlt(Offscreen.Canvas.Handle, ClientWidth div 2 - xSizeBig div 2, 52,
    98       xSizeBig, ySizeBig, BigImp.Canvas.Handle, (woLiberty mod 7) * xSizeBig,
    99       (woLiberty div 7 + SystemIconLines) * ySizeBig, SRCCOPY);
     97    BitBltCanvas(Offscreen.Canvas, ClientWidth div 2 - xSizeBig div 2, 52,
     98      xSizeBig, ySizeBig, BigImp.Canvas, (woLiberty mod 7) * xSizeBig,
     99      (woLiberty div 7 + SystemIconLines) * ySizeBig);
    100100  end
    101101  else
     
    122122    begin
    123123      for i := 0 to current div 8 - 1 do
    124         BitBlt(Handle, x + max - 8 - i * 8, y, 8, 7,
    125           GrExt[HGrSystem].Data.Canvas.Handle, 104, 9 + 8 * 2, SRCCOPY);
    126       BitBlt(Handle, x + max - current, y, current - 8 * (current div 8), 7,
    127         GrExt[HGrSystem].Data.Canvas.Handle, 104, 9 + 8 * 2, SRCCOPY);
     124        BitBltCanvas(Offscreen.Canvas, x + max - 8 - i * 8, y, 8, 7,
     125          GrExt[HGrSystem].Data.Canvas, 104, 9 + 8 * 2);
     126      BitBltCanvas(Offscreen.Canvas, x + max - current, y, current - 8 * (current div 8), 7,
     127        GrExt[HGrSystem].Data.Canvas, 104, 9 + 8 * 2);
    128128      Brush.Color := $000000;
    129129      FillRect(Rect(x, y, x + max - current, y + 7));
  • trunk/LocalPlayer/Select.pas

    r89 r188  
    197197      if pix and cpType = 0 then
    198198        if (pix and cpIndex = imPalace) and (MyRO.Government <> gAnarchy) then
    199           BitBlt(offscreen.Canvas.Handle, x + 16, y + (16 - 1), xSizeSmall,
    200             ySizeSmall, SmallImp.Canvas.Handle, (MyRO.Government - 1) *
    201             xSizeSmall, ySizeSmall, SRCCOPY)
     199          BitBltCanvas(offscreen.Canvas, x + 16, y + (16 - 1), xSizeSmall,
     200            ySizeSmall, SmallImp.Canvas, (MyRO.Government - 1) *
     201            xSizeSmall, ySizeSmall)
    202202        else
    203           BitBlt(offscreen.Canvas.Handle, x + 16, y + (16 - 1), xSizeSmall,
    204             ySizeSmall, SmallImp.Canvas.Handle, pix and cpIndex mod 7 *
     203          BitBltCanvas(offscreen.Canvas, x + 16, y + (16 - 1), xSizeSmall,
     204            ySizeSmall, SmallImp.Canvas, pix and cpIndex mod 7 *
    205205            xSizeSmall, (pix and cpIndex + SystemIconLines * 7) div 7 *
    206             ySizeSmall, SRCCOPY)
     206            ySizeSmall)
    207207      else
    208         BitBlt(offscreen.Canvas.Handle, x + 16, y + (16 - 1), xSizeSmall,
    209           ySizeSmall, SmallImp.Canvas.Handle, (3 + pix and cpIndex) *
    210           xSizeSmall, 0, SRCCOPY)
     208        BitBltCanvas(offscreen.Canvas, x + 16, y + (16 - 1), xSizeSmall,
     209          ySizeSmall, SmallImp.Canvas, (3 + pix and cpIndex) *
     210          xSizeSmall, 0);
    211211    end;
    212212  end;
     
    568568                  MainTexture.clBevelLight, MainTexture.clBevelShade);
    569569                if AdvIcon[lix] < 84 then
    570                   BitBlt(offscreen.Canvas.Handle, (8 + 16), y0, xSizeSmall,
    571                     ySizeSmall, SmallImp.Canvas.Handle,
     570                  BitBltCanvas(offscreen.Canvas, (8 + 16), y0, xSizeSmall,
     571                    ySizeSmall, SmallImp.Canvas,
    572572                    (AdvIcon[lix] + SystemIconLines * 7) mod 7 * xSizeSmall,
    573573                    (AdvIcon[lix] + SystemIconLines * 7) div 7 *
    574                     ySizeSmall, SRCCOPY)
     574                    ySizeSmall)
    575575                else
    576576                  Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20,
     
    578578                    295 + (AdvIcon[lix] - 84) div 8 * 21);
    579579                j := AdvValue[lix] div 1000;
    580                 BitBlt(Handle, (8 + 16 - 4), y0 + 2, 14, 14,
    581                   GrExt[HGrSystem].Mask.Canvas.Handle, 127 + j * 15,
     580                BitBltCanvas(Canvas, (8 + 16 - 4), y0 + 2, 14, 14,
     581                  GrExt[HGrSystem].Mask.Canvas, 127 + j * 15,
    582582                  85, SRCAND);
    583583                Sprite(offscreen, HGrSystem, (8 + 16 - 5), y0 + 1, 14, 14,
     
    673673              8 + 16 + xSizeSmall, y0 - 15 + (16 - 1 + ySizeSmall),
    674674              MainTexture.clBevelLight, MainTexture.clBevelShade);
    675             BitBlt(offscreen.Canvas.Handle, 8 + 16, y0 - 15 + (16 - 1),
    676               xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
    677               (lix - 1) * xSizeSmall, ySizeSmall, SRCCOPY);
     675            BitBltCanvas(offscreen.Canvas, 8 + 16, y0 - 15 + (16 - 1),
     676              xSizeSmall, ySizeSmall, SmallImp.Canvas,
     677              (lix - 1) * xSizeSmall, ySizeSmall);
    678678          end
    679679        end;
     
    817817          ClientHeight - 29, s);
    818818        BitBltCanvas(ScienceNationDot.Canvas, 0, 0, 17, 17, Canvas,
    819           xScreen - 10, ClientHeight - 27, SRCCOPY);
     819          xScreen - 10, ClientHeight - 27);
    820820        ImageOp_BCC(ScienceNationDot, Templates, 0, 0, 114, 211, 17, 17,
    821821          MainTexture.clBevelShade, Tribe[ScienceNation].Color);
    822         BitBlt(Canvas.Handle, xScreen - 10, ClientHeight - 27, 17, 17,
    823           ScienceNationDot.Canvas.Handle, 0, 0, SRCCOPY);
     822        BitBltCanvas(Canvas, xScreen - 10, ClientHeight - 27, 17, 17,
     823          ScienceNationDot.Canvas, 0, 0);
    824824      end;
    825825    end
  • trunk/LocalPlayer/TechTree.pas

    r170 r188  
    108108        -BlackBorder - yOffset, Paper);
    109109  end;
    110   BitBlt(Canvas.Handle, max(BlackBorder, BlackBorder + xOffset),
     110  BitBltCanvas(Canvas, max(BlackBorder, BlackBorder + xOffset),
    111111    max(BlackBorder, BlackBorder + yOffset),
    112112    min(Image.width, min(Image.width + xOffset,
     
    114114    ), min(Image.height, min(Image.height + yOffset,
    115115    min(ClientHeight - 2 * BlackBorder, ClientHeight - 2 * BlackBorder -
    116     yOffset))), Image.Canvas.Handle, max(0, -xOffset),
    117     max(0, -yOffset), SRCCOPY);
     116    yOffset))), Image.Canvas, max(0, -xOffset),
     117    max(0, -yOffset));
    118118end;
    119119
  • trunk/LocalPlayer/Term.pas

    r182 r188  
    27482748          begin
    27492749            if AILogo[pLogo] <> nil then
    2750               BitBlt(Canvas.Handle, (xRightPanel + 10) - (16 + 64),
    2751                 ClientHeight - PanelHeight, 64, 64, AILogo[pLogo].Canvas.Handle,
    2752                 0, 0, SRCCOPY);
     2750              BitBltCanvas(Canvas, (xRightPanel + 10) - (16 + 64),
     2751                ClientHeight - PanelHeight, 64, 64, AILogo[pLogo].Canvas,
     2752                0, 0);
    27532753          end
    27542754        end
     
    40384038    exit;
    40394039
    4040   NoMap.BitBlt(Panel, -xMap - MapOffset, -yMap + MapHeight - overlap, xMidPanel,
     4040  NoMap.BitBltBitmap(Panel, -xMap - MapOffset, -yMap + MapHeight - overlap, xMidPanel,
    40414041    overlap, 0, 0, SRCCOPY);
    4042   NoMap.BitBlt(Panel, -xMap - MapOffset + xRightPanel,
     4042  NoMap.BitBltBitmap(Panel, -xMap - MapOffset + xRightPanel,
    40434043    -yMap + MapHeight - overlap, Panel.width - xRightPanel, overlap,
    40444044    xRightPanel, 0, SRCCOPY);
     
    40464046  begin
    40474047    if xMap < 0 then
    4048       BitBlt(Canvas.Handle, MapOffset, TopBarHeight, width + xMap,
    4049         height + yMap, Buffer.Canvas.Handle, -xMap, -yMap, SRCCOPY)
     4048      BitBltCanvas(Canvas, MapOffset, TopBarHeight, width + xMap,
     4049        height + yMap, Buffer.Canvas, -xMap, -yMap)
    40504050    else
    4051       BitBlt(Canvas.Handle, xMap + MapOffset, TopBarHeight, width,
    4052         height + yMap, Buffer.Canvas.Handle, 0, -yMap, SRCCOPY)
     4051      BitBltCanvas(Canvas, xMap + MapOffset, TopBarHeight, width,
     4052        height + yMap, Buffer.Canvas, 0, -yMap)
    40534053  end
    40544054  else
    40554055  begin
    40564056    if xMap < 0 then
    4057       BitBlt(Canvas.Handle, MapOffset, TopBarHeight + yMap, width + xMap,
    4058         height, Buffer.Canvas.Handle, -xMap, 0, SRCCOPY)
     4057      BitBltCanvas(Canvas, MapOffset, TopBarHeight + yMap, width + xMap,
     4058        height, Buffer.Canvas, -xMap, 0)
    40594059    else
    4060       BitBlt(Canvas.Handle, xMap + MapOffset, TopBarHeight + yMap, width,
    4061         height, Buffer.Canvas.Handle, 0, 0, SRCCOPY);
     4060      BitBltCanvas(Canvas, xMap + MapOffset, TopBarHeight + yMap, width,
     4061        height, Buffer.Canvas, 0, 0);
    40624062  end
    40634063end;
     
    41844184begin
    41854185  BitBltCanvas(Canvas, lprcScroll.Left + dx, lprcScroll.Top + dy, lprcScroll.Right - lprcScroll.Left, lprcScroll.Bottom - lprcScroll.Top,
    4186     Canvas, lprcScroll.Left, lprcScroll.Top, SRCCOPY);
     4186    Canvas, lprcScroll.Left, lprcScroll.Top);
    41874187end;
    41884188{$ENDIF}
     
    43294329procedure TMainScreen.CopyMiniToPanel;
    43304330begin
    4331   BitBlt(Panel.Canvas.Handle, xMini + 2, yMini + 2, G.lx * 2, G.ly,
    4332     Mini.Canvas.Handle, 0, 0, SRCCOPY);
     4331  BitBltCanvas(Panel.Canvas, xMini + 2, yMini + 2, G.lx * 2, G.ly,
     4332    Mini.Canvas, 0, 0);
    43334333  if MarkCityLoc >= 0 then
    43344334    Sprite(Panel, HGrSystem, xMini - 2 + (4 * G.lx + 2 * (MarkCityLoc mod G.lx)
     
    44184418          ClientWidth - xPalace + xSizeBig + 1, yPalace + ySizeBig + 1,
    44194419          $FFFFFF, $B0B0B0);
    4420         BitBlt(Panel.Canvas.Handle, ClientWidth - xPalace, yPalace, xSizeBig,
    4421           ySizeBig, GrExt[HGrSystem2].Data.Canvas.Handle, 70, 123, SRCCOPY);
     4420        BitBltCanvas(Panel.Canvas, ClientWidth - xPalace, yPalace, xSizeBig,
     4421          ySizeBig, GrExt[HGrSystem2].Data.Canvas, 70, 123);
    44224422      end
    44234423      else if MyRO.NatBuilt[imPalace] > 0 then
     
    52765276      PaintLoc(MouseLoc, 2);
    52775277      MiniPaint;
    5278       BitBlt(Panel.Canvas.Handle, xMini + 2, yMini + 2, G.lx * 2, G.ly,
    5279         Mini.Canvas.Handle, 0, 0, SRCCOPY);
     5278      BitBltCanvas(Panel.Canvas, xMini + 2, yMini + 2, G.lx * 2, G.ly,
     5279        Mini.Canvas, 0, 0);
    52805280      if ywmax <= 0 then
    52815281        Frame(Panel.Canvas, xMini + 2 + G.lx - MapWidth div (2 * xxt),
     
    61006100    for Step := 0 to abs(Step1 - Step0) do
    61016101    begin
    6102       BitBlt(Buffer.Canvas.Handle, 0, 0, xRange, yRange,
    6103         offscreen.Canvas.Handle, xMin, yMin, SRCCOPY);
     6102      BitBltCanvas(Buffer.Canvas, 0, 0, xRange, yRange,
     6103        offscreen.Canvas, xMin, yMin);
    61046104      if Step1 <> Step0 then
    61056105      begin
     
    61426142  if Restore then
    61436143  begin
    6144     BitBlt(Buffer.Canvas.Handle, 0, 0, xRange, yRange, offscreen.Canvas.Handle,
    6145       xMin, yMin, SRCCOPY);
     6144    BitBltCanvas(Buffer.Canvas, 0, 0, xRange, yRange, offscreen.Canvas, xMin, yMin);
    61466145    PaintBufferToScreen(xMin, yMin, xRange, yRange);
    61476146  end;
     
    75587557          yw := ywmax;
    75597558      end;
    7560       BitBlt(Buffer.Canvas.Handle, 0, 0, G.lx * 2, G.ly, Mini.Canvas.Handle, 0,
    7561         0, SRCCOPY);
     7559      BitBltCanvas(Buffer.Canvas, 0, 0, G.lx * 2, G.ly, Mini.Canvas, 0, 0);
    75627560      if ywmax <= 0 then
    75637561        Frame(Buffer.Canvas, x - xMini - 2 - MapWidth div (xxt * 2), 0,
     
    75687566          x - xMini - 2 + MapWidth div (xxt * 2) - 1, yw + MapHeight div yyt -
    75697567          2, MainTexture.clMark, MainTexture.clMark);
    7570       BitBlt(Panel.Canvas.Handle, xMini + 2, yMini + 2, G.lx * 2, G.ly,
    7571         Buffer.Canvas.Handle, 0, 0, SRCCOPY);
     7568      BitBltCanvas(Panel.Canvas, xMini + 2, yMini + 2, G.lx * 2, G.ly,
     7569        Buffer.Canvas, 0, 0);
    75727570      MainOffscreenPaint;
    75737571      RectInvalidate(xMini + 2, TopBarHeight + MapHeight - overlap + yMini + 2,
     
    75787576  end
    75797577  else
    7580     Tracking := false
     7578    Tracking := false;
    75817579end;
    75827580
     
    77207718      Brush.Style := bsClear;
    77217719    end;
    7722   BitBlt(Canvas.Handle, MapOffset, TopBarHeight, MapWidth, MapHeight - overlap,
    7723     offscreen.Canvas.Handle, 0, 0, SRCCOPY);
    7724   BitBlt(Canvas.Handle, 0, 0, ClientWidth, TopBarHeight, TopBar.Canvas.Handle,
    7725     0, 0, SRCCOPY);
     7720  BitBltCanvas(Canvas, MapOffset, TopBarHeight, MapWidth, MapHeight - overlap,
     7721    offscreen.Canvas, 0, 0);
     7722  BitBltCanvas(Canvas, 0, 0, ClientWidth, TopBarHeight, TopBar.Canvas,
     7723    0, 0);
    77267724  if xMidPanel > MapOffset then
    7727     BitBlt(Canvas.Handle, xMidPanel, TopBarHeight + MapHeight - overlap,
    7728       ClientWidth div 2 - xMidPanel, overlap, offscreen.Canvas.Handle,
    7729       xMidPanel - MapOffset, MapHeight - overlap, SRCCOPY)
     7725    BitBltCanvas(Canvas, xMidPanel, TopBarHeight + MapHeight - overlap,
     7726      ClientWidth div 2 - xMidPanel, overlap, offscreen.Canvas,
     7727      xMidPanel - MapOffset, MapHeight - overlap)
    77307728  else
    7731     BitBlt(Canvas.Handle, MapOffset, TopBarHeight + MapHeight - overlap,
    7732       ClientWidth div 2 - MapOffset, overlap, offscreen.Canvas.Handle, 0,
    7733       MapHeight - overlap, SRCCOPY);
     7729    BitBltCanvas(Canvas, MapOffset, TopBarHeight + MapHeight - overlap,
     7730      ClientWidth div 2 - MapOffset, overlap, offscreen.Canvas, 0,
     7731      MapHeight - overlap);
    77347732  if xRightPanel < MapOffset + MapWidth then
    7735     BitBlt(Canvas.Handle, ClientWidth div 2, TopBarHeight + MapHeight - overlap,
    7736       xRightPanel - ClientWidth div 2, overlap, offscreen.Canvas.Handle,
    7737       ClientWidth div 2 - MapOffset, MapHeight - overlap, SRCCOPY)
     7733    BitBltCanvas(Canvas, ClientWidth div 2, TopBarHeight + MapHeight - overlap,
     7734      xRightPanel - ClientWidth div 2, overlap, offscreen.Canvas,
     7735      ClientWidth div 2 - MapOffset, MapHeight - overlap)
    77387736  else
    7739     BitBlt(Canvas.Handle, ClientWidth div 2, TopBarHeight + MapHeight - overlap,
     7737    BitBltCanvas(Canvas, ClientWidth div 2, TopBarHeight + MapHeight - overlap,
    77407738      MapOffset + MapWidth - ClientWidth div 2, overlap,
    7741       offscreen.Canvas.Handle, ClientWidth div 2 - MapOffset,
    7742       MapHeight - overlap, SRCCOPY);
    7743   BitBlt(Canvas.Handle, 0, TopBarHeight + MapHeight - overlap, xMidPanel,
    7744     overlap, Panel.Canvas.Handle, 0, 0, SRCCOPY);
    7745   BitBlt(Canvas.Handle, xRightPanel, TopBarHeight + MapHeight - overlap,
    7746     Panel.width - xRightPanel, overlap, Panel.Canvas.Handle, xRightPanel,
    7747     0, SRCCOPY);
    7748   BitBlt(Canvas.Handle, 0, TopBarHeight + MapHeight, Panel.width,
    7749     PanelHeight - overlap, Panel.Canvas.Handle, 0, overlap, SRCCOPY);
     7739      offscreen.Canvas, ClientWidth div 2 - MapOffset,
     7740      MapHeight - overlap);
     7741  BitBltCanvas(Canvas, 0, TopBarHeight + MapHeight - overlap, xMidPanel,
     7742    overlap, Panel.Canvas, 0, 0);
     7743  BitBltCanvas(Canvas, xRightPanel, TopBarHeight + MapHeight - overlap,
     7744    Panel.width - xRightPanel, overlap, Panel.Canvas, xRightPanel, 0);
     7745  BitBltCanvas(Canvas, 0, TopBarHeight + MapHeight, Panel.width,
     7746    PanelHeight - overlap, Panel.Canvas, 0, overlap);
    77507747  if (pLogo >= 0) and (G.RO[pLogo] = nil) and (AILogo[pLogo] <> nil) then
    7751     BitBlt(Canvas.Handle, xRightPanel + 10 - (16 + 64),
    7752       ClientHeight - PanelHeight, 64, 64, AILogo[pLogo].Canvas.Handle, 0,
    7753       0, SRCCOPY);
     7748    BitBltCanvas(Canvas, xRightPanel + 10 - (16 + 64),
     7749      ClientHeight - PanelHeight, 64, 64, AILogo[pLogo].Canvas, 0, 0);
    77547750end;
    77557751
  • trunk/LocalPlayer/UnitStat.pas

    r73 r188  
    9797  begin
    9898    AgePrepared := MainTextureAge;
    99     bitblt(Back.Canvas.Handle, 0, 0, wCommon, hOwnModel,
    100       MainTexture.Image.Canvas.Handle, (wMainTexture - wCommon) div 2,
    101       (hMainTexture - hOwnModel) div 2, SRCCOPY);
    102     bitblt(Back.Canvas.Handle, wCommon, 0, wCommon, hEnemyModel,
    103       MainTexture.Image.Canvas.Handle, (wMainTexture - wCommon) div 2,
    104       (hMainTexture - hEnemyModel) div 2, SRCCOPY);
    105     bitblt(Back.Canvas.Handle, 2 * wCommon, 0, wCommon, hEnemyUnit,
    106       MainTexture.Image.Canvas.Handle, (wMainTexture - wCommon) div 2,
    107       (hMainTexture - hEnemyUnit) div 2, SRCCOPY);
    108     bitblt(Back.Canvas.Handle, 3 * wCommon, 0, wCommon, hEnemyCityDefense,
    109       MainTexture.Image.Canvas.Handle, (wMainTexture - wCommon) div 2,
    110       (hMainTexture - hEnemyCityDefense) div 2, SRCCOPY);
    111     bitblt(Back.Canvas.Handle, 4 * wCommon, 0, wCommon, hEnemyCity,
    112       MainTexture.Image.Canvas.Handle, (wMainTexture - wCommon) div 2,
    113       (hMainTexture - hEnemyCity) div 2, SRCCOPY);
     99    BitBltCanvas(Back.Canvas, 0, 0, wCommon, hOwnModel,
     100      MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2,
     101      (hMainTexture - hOwnModel) div 2);
     102    BitBltCanvas(Back.Canvas, wCommon, 0, wCommon, hEnemyModel,
     103      MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2,
     104      (hMainTexture - hEnemyModel) div 2);
     105    BitBltCanvas(Back.Canvas, 2 * wCommon, 0, wCommon, hEnemyUnit,
     106      MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2,
     107      (hMainTexture - hEnemyUnit) div 2);
     108    BitBltCanvas(Back.Canvas, 3 * wCommon, 0, wCommon, hEnemyCityDefense,
     109      MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2,
     110      (hMainTexture - hEnemyCityDefense) div 2);
     111    BitBltCanvas(Back.Canvas, 4 * wCommon, 0, wCommon, hEnemyCity,
     112      MainTexture.Image.Canvas, (wMainTexture - wCommon) div 2,
     113      (hMainTexture - hEnemyCity) div 2);
    114114    ImageOp_B(Back, Template, 0, 0, 0, 0, 5 * wCommon, hMax);
    115115  end
     
    387387    dkOwnModel:
    388388      begin
    389         bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hOwnModel,
    390           Back.Canvas.Handle, 0, 0, SRCCOPY);
     389        BitBltCanvas(offscreen.Canvas, 0, 0, wCommon, hOwnModel,
     390          Back.Canvas, 0, 0);
    391391        yView := 13;
    392392        yTotal := 92;
     
    394394    dkEnemyModel:
    395395      begin
    396         bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyModel,
    397           Back.Canvas.Handle, wCommon, 0, SRCCOPY);
     396        BitBltCanvas(offscreen.Canvas, 0, 0, wCommon, hEnemyModel,
     397          Back.Canvas, wCommon, 0);
    398398        yView := 13;
    399399        yTotal := 92;
     
    401401    dkEnemyUnit, dkOwnUnit:
    402402      begin
    403         bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyUnit,
    404           Back.Canvas.Handle, 2 * wCommon, 0, SRCCOPY);
     403        BitBltCanvas(offscreen.Canvas, 0, 0, wCommon, hEnemyUnit,
     404          Back.Canvas, 2 * wCommon, 0);
    405405        yView := 13;
    406406        yTotal := 123;
     
    408408    dkEnemyCityDefense:
    409409      begin
    410         bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyCityDefense,
    411           Back.Canvas.Handle, 3 * wCommon, 0, SRCCOPY);
     410        BitBltCanvas(offscreen.Canvas, 0, 0, wCommon, hEnemyCityDefense,
     411          Back.Canvas, 3 * wCommon, 0);
    412412        yView := 171;
    413413        yTotal := 231;
     
    415415    dkEnemyCity:
    416416      begin
    417         bitblt(offscreen.Canvas.Handle, 0, 0, wCommon, hEnemyCity,
    418           Back.Canvas.Handle, 4 * wCommon, 0, SRCCOPY);
     417        BitBltCanvas(offscreen.Canvas, 0, 0, wCommon, hEnemyCity,
     418          Back.Canvas, 4 * wCommon, 0);
    419419      end;
    420420  end;
     
    445445          yImp + ySizeSmall, MainTexture.clBevelLight,
    446446          MainTexture.clBevelShade);
    447         bitblt(offscreen.Canvas.Handle, x, yImp, xSizeSmall, ySizeSmall,
    448           SmallImp.Canvas.Handle, j mod 7 * xSizeSmall,
    449           (j + SystemIconLines * 7) div 7 * ySizeSmall, SRCCOPY);
     447        bitbltCanvas(offscreen.Canvas, x, yImp, xSizeSmall, ySizeSmall,
     448          SmallImp.Canvas, j mod 7 * xSizeSmall,
     449          (j + SystemIconLines * 7) div 7 * ySizeSmall);
    450450        inc(x, xSizeSmall + 4)
    451451      end;
     
    564564                    * (yyt * 3 + 1));
    565565              end;
    566           bitblt(offscreen.Canvas.Handle, xView, yView + 16, 64, 32,
    567             Buffer.Canvas.Handle, 1, 0, SRCCOPY);
     566          bitbltCanvas(offscreen.Canvas, xView, yView + 16, 64, 32,
     567            Buffer.Canvas, 1, 0);
    568568
    569569          // show unit, experience and health
  • trunk/LocalPlayer/Wonders.pas

    r170 r188  
    238238    begin
    239239      case MyRO.Wonder[I].CityID of
    240         - 1: // not built yet
     240        -1: // not built yet
    241241          begin
    242242            Fill(Offscreen.Canvas, Center.X - xSizeBig div 2 + RingPosition[I].X - 3,
     
    249249          begin
    250250            HaveWonder := True;
    251             BitBlt(Offscreen.Canvas.Handle,
     251            BitBltCanvas(Offscreen.Canvas,
    252252              Center.X - xSizeBig div 2 + RingPosition[I].X,
    253253              Center.Y - ySizeBig div 2 + RingPosition[I].Y, xSizeBig,
    254               ySizeBig, BigImp.Canvas.Handle, 0, (SystemIconLines + 3) *
    255               ySizeBig, SRCCOPY);
     254              ySizeBig, BigImp.Canvas, 0, (SystemIconLines + 3) *
     255              ySizeBig);
    256256          end;
    257257      else
    258258        begin
    259259          HaveWonder := True;
    260           BitBlt(Offscreen.Canvas.Handle,
     260          BitBltCanvas(Offscreen.Canvas,
    261261            Center.X - xSizeBig div 2 + RingPosition[I].X,
    262262            Center.Y - ySizeBig div 2 + RingPosition[I].Y, xSizeBig, ySizeBig,
    263             BigImp.Canvas.Handle, (I mod 7) * xSizeBig,
    264             (I div 7 + SystemIconLines) * ySizeBig, SRCCOPY);
     263            BigImp.Canvas, (I mod 7) * xSizeBig,
     264            (I div 7 + SystemIconLines) * ySizeBig);
    265265        end;
    266266      end;
  • trunk/NoTerm.pas

    r144 r188  
    127127  RisedTextOut(State.Canvas, 0, 0, Format(Phrases.Lookup('AIT_ROUND'), [Round])
    128128    + ' ' + TurnToString(G.RO[me].Turn));
    129   BitBlt(Canvas.Handle, 64, 287 + 138, 192, 20, State.Canvas.Handle, 0,
    130     0, SRCCOPY);
     129  BitBltCanvas(Canvas, 64, 287 + 138, 192, 20, State.Canvas, 0, 0);
    131130end;
    132131
     
    331330        yBrain[i] - 16, 64, 64, 0, 0);
    332331      if 1 shl i and G.RO[me].Alive = 0 then
    333         BitBlt(Canvas.Handle, xBrain[i], yBrain[i] - 16, 64, 64,
    334           Shade.Canvas.Handle, 0, 0, SRCAND);
     332        BitBltCanvas(Canvas, xBrain[i], yBrain[i] - 16, 64, 64,
     333          Shade.Canvas, 0, 0, SRCAND);
    335334      Sprite(Canvas, HGrSystem, xBrain[i] + 30 - 14, yBrain[i] + 53, 14,
    336335        14, 1, 316);
  • trunk/Packages/CevoComponents/BaseWin.pas

    r171 r188  
    165165procedure TBufferedDrawDlg.VPaint;
    166166begin
    167   BitBlt(Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    168     Offscreen.Canvas.Handle, 0, 0, SRCCOPY);
     167  BitBltCanvas(Canvas, 0, 0, ClientWidth, ClientHeight, Offscreen.Canvas, 0, 0);
    169168end;
    170169
     
    454453    end;
    455454
    456   BitBlt(Canvas.Handle, SideFrame, TitleHeight, ClientWidth - 2 * SideFrame,
    457     InnerBottom - TitleHeight, Offscreen.Canvas.Handle, 0, 0, SRCCOPY);
     455  BitBltCanvas(Canvas, SideFrame, TitleHeight, ClientWidth - 2 * SideFrame,
     456    InnerBottom - TitleHeight, Offscreen.Canvas, 0, 0);
    458457end;
    459458
  • trunk/Packages/CevoComponents/ButtonA.pas

    r184 r188  
    44
    55uses
    6   ButtonBase, Classes, Graphics, LCLIntf, LCLType;
     6  ButtonBase, Classes, Graphics, LCLIntf, LCLType, ScreenTools;
    77
    88type
     
    4545    if FGraphic <> nil then
    4646    begin
    47       BitBlt(Canvas.Handle, 0, 0, 100, 25, Graphic.Canvas.Handle, 195,
    48         243 + 26 * Byte(Down), SRCCOPY);
     47      BitBltCanvas(Canvas, 0, 0, 100, 25, Graphic.Canvas, 195,
     48        243 + 26 * Byte(Down));
    4949      Canvas.Brush.Style := bsClear;
    5050      Textout(50 - (TextWidth(FCaption) + 1) div 2, 12 - textheight(FCaption)
  • trunk/Packages/CevoComponents/ButtonB.pas

    r184 r188  
    2828implementation
    2929
     30uses
     31  ScreenTools;
     32
    3033procedure Register;
    3134begin
     
    4447  with Canvas do
    4548    if FGraphic <> nil then begin
    46       BitBlt(Canvas.Handle, 0, 0, 25, 25, FGraphic.Canvas.Handle, 169,
    47         243 + 26 * Byte(FDown), SRCCOPY);
     49      BitBltCanvas(Canvas, 0, 0, 25, 25, FGraphic.Canvas, 169,
     50        243 + 26 * Byte(FDown));
    4851      if FIndex >= 0 then begin
    49         BitBlt(Canvas.Handle, 0, 0, 25, 25, FMask.Canvas.Handle,
     52        BitBltCanvas(Canvas, 0, 0, 25, 25, FMask.Canvas,
    5053          1 + FIndex mod 12 * 26, 337 + FIndex div 12 * 26, SRCAND);
    51         BitBlt(Canvas.Handle, 0, 0, 25, 25, FGraphic.Canvas.Handle,
     54        BitBltCanvas(Canvas, 0, 0, 25, 25, FGraphic.Canvas,
    5255          1 + FIndex mod 12 * 26, 337 + FIndex div 12 * 26, SRCPAINT);
    5356      end
  • trunk/Packages/CevoComponents/ButtonC.pas

    r184 r188  
    44
    55uses
    6   ButtonBase, Classes, Graphics, LCLIntf, LCLType;
     6  ButtonBase, Classes, Graphics, LCLIntf, LCLType, ScreenTools;
    77
    88type
     
    2121
    2222procedure Register;
     23
    2324
    2425implementation
     
    4041  with Canvas do
    4142    if FGraphic <> nil then
    42       BitBlt(Canvas.Handle, 0, 0, 12, 12, FGraphic.Canvas.Handle,
    43         169 + 13 * Byte(FDown), 159 + 13 * FIndex, SRCCOPY)
     43      BitBltCanvas(Canvas, 0, 0, 12, 12, FGraphic.Canvas,
     44        169 + 13 * Byte(FDown), 159 + 13 * FIndex)
    4445    else
    4546    begin
  • trunk/Packages/CevoComponents/ButtonN.pas

    r184 r188  
    44
    55uses
    6   Classes, Graphics, Controls, LCLIntf, LCLType;
     6  Classes, Graphics, Controls, LCLIntf, LCLType, ScreenTools;
    77
    88type
     
    6262    if FGraphic <> nil then
    6363    begin
    64       BitBlt(Canvas.Handle, 1, 1, 40, 40, FBackGraphic.Canvas.Handle,
    65         1 + 80 * BackIndex + 40 * byte(FPossible and FLit), 176, SRCCOPY);
     64      BitBltCanvas(Canvas, 1, 1, 40, 40, FBackGraphic.Canvas,
     65        1 + 80 * BackIndex + 40 * byte(FPossible and FLit), 176);
    6666      if FPossible then
    6767      begin
    68         BitBlt(Canvas.Handle, 3, 3, 36, 36, FMask.Canvas.Handle,
     68        BitBltCanvas(Canvas, 3, 3, 36, 36, FMask.Canvas,
    6969          195 + 37 * (FIndex mod 3), 21 + 37 * (FIndex div 3), SRCAND);
    70         BitBlt(Canvas.Handle, 3, 3, 36, 36, FGraphic.Canvas.Handle,
     70        BitBltCanvas(Canvas, 3, 3, 36, 36, FGraphic.Canvas,
    7171          195 + 37 * (FIndex mod 3), 21 + 37 * (FIndex div 3), SRCPAINT);
    7272      end;
  • trunk/Packages/CevoComponents/EOTButton.pas

    r184 r188  
    3838procedure Register;
    3939
     40
    4041implementation
     42
     43uses
     44  ScreenTools;
    4145
    4246procedure Register;
     
    125129    begin
    126130      // TODO: For some reason BitBlt is not working with gray background here
    127       //BitBlt(Buffer.Canvas.Handle, 0, 0, 48, 48, Back.Canvas.Handle, 0,
    128       //  0, SRCCOPY);
     131      //BitBltCanvas(Buffer.Canvas, 0, 0, 48, 48, Back.Canvas, 0, 0);
    129132      Buffer.Canvas.Draw(0, 0, Back);
    130133      ImageOp_CBC(Buffer, Template, 0, 0, 133, 149 + 48 * Byte(FDown), 48, 48,
     
    133136        ImageOp_CBC(Buffer, Template, 8, 8, 1 + 32 * Byte(FIndex), 246, 32, 32,
    134137          $000000, $FFFFFF);
    135       BitBlt(Canvas.Handle, 0, 0, 48, 48, Buffer.Canvas.Handle, 0, 0, SRCCOPY);
     138      BitBltCanvas(Canvas, 0, 0, 48, 48, Buffer.Canvas, 0, 0);
    136139    end
    137140    else
     
    165168procedure TEOTButton.SetBack(ca: TCanvas; x, y: integer);
    166169begin
    167   BitBlt(Back.Canvas.Handle, 0, 0, 48, 48, ca.Handle, x, y, SRCCOPY);
     170  BitBltCanvas(Back.Canvas, 0, 0, 48, 48, ca, x, y);
    168171end;
    169172
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r187 r188  
    4040  xDst, yDst, xSrc, ySrc, w, h, Color1, Color2: integer);
    4141procedure ImageOp_CCC(bmp: TBitmap; x, y, w, h, Color0, Color1, Color2: integer);
    42 function BitBltCanvas(DestCanvas: TCanvas; X, Y, Width, Height: integer;
    43   SrcCanvas: TCanvas; XSrc, YSrc: integer; Rop: DWORD): boolean;
     42function BitBltCanvas(DestCanvas: TCanvas; X, Y, Width, Height: Integer;
     43  SrcCanvas: TCanvas; XSrc, YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean;
    4444procedure SLine(ca: TCanvas; x0, x1, y: integer; cl: TColor);
    4545procedure DLine(ca: TCanvas; x0, x1, y: integer; cl0, cl1: TColor);
     
    153153  TGrExtDescr = record { don't use dynamic strings here! }
    154154    Name: string[31];
    155     Data, Mask: TBitmap;
    156     pixUsed: array [byte] of byte;
     155    Data: TBitmap;
     156    Mask: TBitmap;
     157    pixUsed: array [Byte] of Byte;
    157158  end;
    158159
     
    160161      TGrExtDescr, but without pixUsed }
    161162    Name: string[31];
    162     Data, Mask: TBitmap;
     163    Data: TBitmap;
     164    Mask: TBitmap;
    163165  end;
    164166
     
    519521procedure Dump(dst: TBitmap; HGr, xDst, yDst, Width, Height, xGr, yGr: integer);
    520522begin
    521   BitBlt(dst.Canvas.Handle, xDst, yDst, Width, Height,
    522     GrExt[HGr].Data.Canvas.Handle, xGr, yGr, SRCCOPY);
     523  BitBltCanvas(dst.Canvas, xDst, yDst, Width, Height,
     524    GrExt[HGr].Data.Canvas, xGr, yGr);
    523525end;
    524526
     
    703705procedure Sprite(Canvas: TCanvas; HGr, xDst, yDst, Width, Height, xGr, yGr: integer);
    704706begin
    705   BitBlt(Canvas.Handle, xDst, yDst, Width, Height,
    706     GrExt[HGr].Mask.Canvas.Handle, xGr, yGr, SRCAND);
    707   BitBlt(Canvas.Handle, xDst, yDst, Width, Height,
    708     GrExt[HGr].Data.Canvas.Handle, xGr, yGr, SRCPAINT);
     707  BitBltCanvas(Canvas, xDst, yDst, Width, Height,
     708    GrExt[HGr].Mask.Canvas, xGr, yGr, SRCAND);
     709  BitBltCanvas(Canvas, xDst, yDst, Width, Height,
     710    GrExt[HGr].Data.Canvas, xGr, yGr, SRCPAINT);
    709711end;
    710712
    711713procedure Sprite(dst: TBitmap; HGr, xDst, yDst, Width, Height, xGr, yGr: integer);
    712714begin
    713   BitBlt(dst.Canvas.Handle, xDst, yDst, Width, Height,
    714     GrExt[HGr].Mask.Canvas.Handle, xGr, yGr, SRCAND);
    715   BitBlt(dst.Canvas.Handle, xDst, yDst, Width, Height,
    716     GrExt[HGr].Data.Canvas.Handle, xGr, yGr, SRCPAINT);
    717 end;
    718 
    719 function BitBltCanvas(DestCanvas: TCanvas; X, Y, Width, Height: integer;
    720   SrcCanvas: TCanvas; XSrc, YSrc: integer; Rop: DWORD): boolean;
    721 begin
    722   Assert(Rop = SRCCOPY);
    723   DestCanvas.CopyRect(Rect(X, Y, X + Width, Y + Height), SrcCanvas,
    724     Rect(XSrc, YSrc, XSrc + Width, YSrc + Height));
    725   Result := True;
     715  BitBltCanvas(dst.Canvas, xDst, yDst, Width, Height,
     716    GrExt[HGr].Mask.Canvas, xGr, yGr, SRCAND);
     717  BitBltCanvas(dst.Canvas, xDst, yDst, Width, Height,
     718    GrExt[HGr].Data.Canvas, xGr, yGr, SRCPAINT);
     719end;
     720
     721function BitBltCanvas(DestCanvas: TCanvas; X, Y, Width, Height: Integer;
     722  SrcCanvas: TCanvas; XSrc, YSrc: Integer; Rop: DWORD = SRCCOPY): Boolean;
     723begin
     724  {Assert(Rop = SRCCOPY);}
     725  if Rop = SRCCOPY then begin
     726    DestCanvas.CopyRect(Rect(X, Y, X + Width, Y + Height), SrcCanvas,
     727      Rect(XSrc, YSrc, XSrc + Width, YSrc + Height));
     728    Result := True;
     729  end else Result := BitBlt(DestCanvas.Handle, X, Y, Width, Height, SrcCanvas.Handle, XSrc, YSrc, Rop);
    726730end;
    727731
     
    805809  end else
    806810    Frame(ca, x - 1, y - 1, x + Width, y + Height, $000000, $000000);
    807   BitBlt(ca.Handle, x, y, Width, Height, Src.Canvas.Handle, xSrc, ySrc,
    808     SRCCOPY);
     811  BitBltCanvas(ca, x, y, Width, Height, Src.Canvas, xSrc, ySrc);
    809812end;
    810813
     
    886889          $FF * intensity div $FF shl 16;
    887890      end;
    888   BitBlt(GrExt[HGrSystem].Mask.Canvas.Handle, 77, 47, 10, 10,
    889     GrExt[HGrSystem].Mask.Canvas.Handle, 66, 47, SRCCOPY);
     891  BitBltCanvas(GrExt[HGrSystem].Mask.Canvas, 77, 47, 10, 10,
     892    GrExt[HGrSystem].Mask.Canvas, 66, 47);
    890893end;
    891894
     
    894897  Assert((Left + xOffset >= 0) and (Left + xOffset + Width <= wMainTexture) and
    895898    (Top + yOffset >= 0) and (Top + yOffset + Height <= hMainTexture));
    896   BitBlt(ca.Handle, Left, Top, Width, Height, MainTexture.Image.Canvas.Handle,
    897     Left + xOffset, Top + yOffset, SRCCOPY);
     899  BitBltCanvas(ca, Left, Top, Width, Height, MainTexture.Image.Canvas,
     900    Left + xOffset, Top + yOffset);
    898901end;
    899902
     
    916919begin
    917920  for I := 0 to (x1 - xm) div wMainTexture - 1 do
    918     BitBlt(ca.Handle, xm + I * wMainTexture, y0, wMainTexture, y1 - y0,
    919       MainTexture.Image.Canvas.Handle, 0, hMainTexture div 2 + Band(I) *
    920       (y1 - y0), SRCCOPY);
    921   BitBlt(ca.Handle, xm + ((x1 - xm) div wMainTexture) * wMainTexture, y0,
     921    BitBltCanvas(ca, xm + I * wMainTexture, y0, wMainTexture, y1 - y0,
     922      MainTexture.Image.Canvas, 0, hMainTexture div 2 + Band(I) *
     923      (y1 - y0));
     924  BitBltCanvas(ca, xm + ((x1 - xm) div wMainTexture) * wMainTexture, y0,
    922925    x1 - (xm + ((x1 - xm) div wMainTexture) * wMainTexture), y1 - y0,
    923     MainTexture.Image.Canvas.Handle, 0, hMainTexture div 2 + Band(
    924     (x1 - xm) div wMainTexture) * (y1 - y0), SRCCOPY);
     926    MainTexture.Image.Canvas, 0, hMainTexture div 2 + Band(
     927    (x1 - xm) div wMainTexture) * (y1 - y0));
    925928  for I := 0 to (xm - x0) div wMainTexture - 1 do
    926     BitBlt(ca.Handle, xm - (I + 1) * wMainTexture, y0, wMainTexture, y1 - y0,
    927       MainTexture.Image.Canvas.Handle, 0, hMainTexture div 2 +
    928       Band(-I - 1) * (y1 - y0), SRCCOPY);
    929   BitBlt(ca.Handle, x0, y0, xm - ((xm - x0) div wMainTexture) *
    930     wMainTexture - x0, y1 - y0, MainTexture.Image.Canvas.Handle,
     929    BitBltCanvas(ca, xm - (I + 1) * wMainTexture, y0, wMainTexture, y1 - y0,
     930      MainTexture.Image.Canvas, 0, hMainTexture div 2 +
     931      Band(-I - 1) * (y1 - y0));
     932  BitBltCanvas(ca, x0, y0, xm - ((xm - x0) div wMainTexture) *
     933    wMainTexture - x0, y1 - y0, MainTexture.Image.Canvas,
    931934    ((xm - x0) div wMainTexture + 1) * wMainTexture - (xm - x0),
    932     hMainTexture div 2 + Band(-(xm - x0) div wMainTexture - 1) * (y1 - y0), SRCCOPY);
     935    hMainTexture div 2 + Band(-(xm - x0) div wMainTexture - 1) * (y1 - y0));
    933936end;
    934937
     
    960963      if x1cut < 0 then
    961964        x1cut := 0;
    962       BitBlt(ca.Handle, x * Texture.Width + x0cut - xOffset,
     965      BitBltCanvas(ca, x * Texture.Width + x0cut - xOffset,
    963966        y * Texture.Height + y0cut - yOffset, Texture.Width - x0cut - x1cut,
    964         Texture.Height - y0cut - y1cut, Texture.Canvas.Handle, x0cut,
    965         y0cut, SRCCOPY);
     967        Texture.Height - y0cut - y1cut, Texture.Canvas, x0cut, y0cut);
    966968    end;
    967969  end;
     
    982984procedure Corner(ca: TCanvas; x, y, Kind: Integer; const T: TTexture);
    983985begin
    984   { BitBlt(ca.Handle,x,y,8,8,GrExt[T.HGr].Mask.Canvas.Handle,
     986  { BitBltCanvas(ca,x,y,8,8,GrExt[T.HGr].Mask.Canvas,
    985987    T.xGr+29+Kind*9,T.yGr+89,SRCAND);
    986     BitBlt(ca.Handle,x,y,8,8,GrExt[T.HGr].Data.Canvas.Handle,
     988    BitBltCanvas(ca,x,y,8,8,GrExt[T.HGr].Data.Canvas,
    987989    T.xGr+29+Kind*9,T.yGr+89,SRCPAINT); }
    988990end;
     
    992994  procedure PaintIcon(x, y, Kind: Integer);
    993995  begin
    994     BitBlt(ca.Handle, x, y + 6, 10, 10, GrExt[HGrSystem].Mask.Canvas.Handle,
     996    BitBltCanvas(ca, x, y + 6, 10, 10, GrExt[HGrSystem].Mask.Canvas,
    995997      66 + Kind mod 11 * 11, 115 + Kind div 11 * 11, SRCAND);
    996     BitBlt(ca.Handle, x, y + 6, 10, 10, GrExt[HGrSystem].Data.Canvas.Handle,
     998    BitBltCanvas(ca, x, y + 6, 10, 10, GrExt[HGrSystem].Data.Canvas,
    997999      66 + Kind mod 11 * 11, 115 + Kind div 11 * 11, SRCPAINT);
    9981000  end;
     
    12161218      for i := 0 to val mod 10 - 1 do
    12171219      begin
    1218         BitBlt(Handle, xIcon + 4 + i * (14 * ld div sd), yIcon + 2 + 1, 14,
    1219           14, GrExt[HGrSystem].Mask.Canvas.Handle, 67 + Kind mod 8 * 15,
     1220        BitBltCanvas(dst.Canvas, xIcon + 4 + i * (14 * ld div sd), yIcon + 2 + 1, 14,
     1221          14, GrExt[HGrSystem].Mask.Canvas, 67 + Kind mod 8 * 15,
    12201222          70 + Kind div 8 * 15, SRCAND);
    12211223        Sprite(dst, HGrSystem, xIcon + 3 + i * (14 * ld div sd), yIcon + 2,
     
    12241226      for i := 0 to val div 10 - 1 do
    12251227      begin
    1226         BitBlt(dst.Canvas.Handle, xIcon + 4 + (val mod 10) *
     1228        BitBltCanvas(dst.Canvas, xIcon + 4 + (val mod 10) *
    12271229          (14 * ld div sd) + i * (14 * ld div sd), yIcon + 3, 14, 14,
    1228           GrExt[HGrSystem].Mask.Canvas.Handle, 67 + 7 mod 8 * 15,
     1230          GrExt[HGrSystem].Mask.Canvas, 67 + 7 mod 8 * 15,
    12291231          70 + 7 div 8 * 15, SRCAND);
    12301232        Sprite(dst, HGrSystem, xIcon + 3 + (val mod 10) *
     
    12491251      for i := 0 to val div 10 - 1 do
    12501252      begin
    1251         BitBlt(Handle, xIcon + 4 + i * (14 * ld div sd), yIcon + 3, 14, 14,
    1252           GrExt[HGrSystem].Mask.Canvas.Handle, 67 + Kind mod 8 * 15,
     1253        BitBltCanvas(dst.Canvas, xIcon + 4 + i * (14 * ld div sd), yIcon + 3, 14, 14,
     1254          GrExt[HGrSystem].Mask.Canvas, 67 + Kind mod 8 * 15,
    12531255          70 + Kind div 8 * 15, SRCAND);
    12541256        Sprite(dst, HGrSystem, xIcon + 3 + i * (14 * ld div sd), yIcon + 2,
     
    12571259      for i := 0 to val mod 10 - 1 do
    12581260      begin
    1259         BitBlt(dst.Canvas.Handle, xIcon + 4 + (val div 10) *
     1261        BitBltCanvas(dst.Canvas, xIcon + 4 + (val div 10) *
    12601262          (14 * ld div sd) + i * (10 * ld div sd), yIcon + 7, 10, 10,
    1261           GrExt[HGrSystem].Mask.Canvas.Handle, 66 + Kind mod 11 * 11,
     1263          GrExt[HGrSystem].Mask.Canvas, 66 + Kind mod 11 * 11,
    12621264          115 + Kind div 11 * 11, SRCAND);
    12631265        Sprite(dst, HGrSystem, xIcon + 3 + (val div 10) *
     
    12941296  begin
    12951297    for i := 0 to pos div 8 - 1 do
    1296       BitBlt(Handle, x + i * 8, y, 8, 7,
    1297         GrExt[HGrSystem].Data.Canvas.Handle, 104, 9 + 8 * Kind, SRCCOPY);
    1298     BitBlt(Handle, x + 8 * (pos div 8), y, pos - 8 * (pos div 8), 7,
    1299       GrExt[HGrSystem].Data.Canvas.Handle, 104, 9 + 8 * Kind, SRCCOPY);
     1298      BitBltCanvas(ca, x + i * 8, y, 8, 7,
     1299        GrExt[HGrSystem].Data.Canvas, 104, 9 + 8 * Kind);
     1300    BitBltCanvas(ca, x + 8 * (pos div 8), y, pos - 8 * (pos div 8), 7,
     1301      GrExt[HGrSystem].Data.Canvas, 104, 9 + 8 * Kind);
    13001302    if Growth > 0 then
    13011303    begin
    13021304      for i := 0 to Growth div 8 - 1 do
    1303         BitBlt(Handle, x + pos + i * 8, y, 8, 7,
    1304           GrExt[HGrSystem].Data.Canvas.Handle, 112, 9 + 8 * Kind, SRCCOPY);
    1305       BitBlt(Handle, x + pos + 8 * (Growth div 8), y,
    1306         Growth - 8 * (Growth div 8), 7, GrExt[HGrSystem].Data.Canvas.Handle,
    1307         112, 9 + 8 * Kind, SRCCOPY);
     1305        BitBltCanvas(ca, x + pos + i * 8, y, 8, 7,
     1306          GrExt[HGrSystem].Data.Canvas, 112, 9 + 8 * Kind);
     1307      BitBltCanvas(ca, x + pos + 8 * (Growth div 8), y,
     1308        Growth - 8 * (Growth div 8), 7, GrExt[HGrSystem].Data.Canvas,
     1309        112, 9 + 8 * Kind);
    13081310    end
    13091311    else if Growth < 0 then
    13101312    begin
    13111313      for i := 0 to -Growth div 8 - 1 do
    1312         BitBlt(Handle, x + pos + i * 8, y, 8, 7,
    1313           GrExt[HGrSystem].Data.Canvas.Handle, 104, 1, SRCCOPY);
    1314       BitBlt(Handle, x + pos + 8 * (-Growth div 8), y, -Growth -
     1314        BitBltCanvas(ca, x + pos + i * 8, y, 8, 7,
     1315          GrExt[HGrSystem].Data.Canvas, 104, 1);
     1316      BitBltCanvas(ca, x + pos + 8 * (-Growth div 8), y, -Growth -
    13151317        8 * (-Growth div 8), 7,
    1316         GrExt[HGrSystem].Data.Canvas.Handle, 104, 1, SRCCOPY);
     1318        GrExt[HGrSystem].Data.Canvas, 104, 1);
    13171319    end;
    13181320    Brush.Color := $000000;
     
    13391341procedure PaintLogo(ca: TCanvas; x, y, clLight, clShade: Integer);
    13401342begin
    1341   BitBltCanvas(LogoBuffer.Canvas, 0, 0, wLogo, hLogo, ca, x,
    1342     y, SRCCOPY);
     1343  BitBltCanvas(LogoBuffer.Canvas, 0, 0, wLogo, hLogo, ca, x, y);
    13431344  ImageOp_BCC(LogoBuffer, Templates, 0, 0, 1, 1, wLogo, hLogo,
    13441345    clLight, clShade);
    1345   BitBlt(ca.Handle, x, y, wLogo, hLogo, LogoBuffer.Canvas.Handle, 0,
    1346     0, SRCCOPY);
     1346  BitBltCanvas(ca, x, y, wLogo, hLogo, LogoBuffer.Canvas, 0, 0);
    13471347end;
    13481348
  • trunk/Start.pas

    r187 r188  
    534534  Brains[0].Picture := TBitmap.Create;
    535535  Brains[0].Picture.SetSize(64, 64);
    536   BitBlt(Brains[0].Picture.Canvas.Handle, 0, 0, 64, 64,
    537     GrExt[HGrSystem2].Data.Canvas.Handle, 1, 111, SRCCOPY);
     536  BitBltCanvas(Brains[0].Picture.Canvas, 0, 0, 64, 64,
     537    GrExt[HGrSystem2].Data.Canvas, 1, 111);
    538538  Brains[1].Picture := TBitmap.Create;
    539539  Brains[1].Picture.SetSize(64, 64);
    540   BitBlt(Brains[1].Picture.Canvas.Handle, 0, 0, 64, 64,
    541     GrExt[HGrSystem2].Data.Canvas.Handle, 66, 111, SRCCOPY);
     540  BitBltCanvas(Brains[1].Picture.Canvas, 0, 0, 64, 64,
     541    GrExt[HGrSystem2].Data.Canvas, 66, 111);
    542542  Brains[2].Picture := TBitmap.Create;
    543543  Brains[2].Picture.SetSize(64, 64);
    544   BitBlt(Brains[2].Picture.Canvas.Handle, 0, 0, 64, 64,
    545     GrExt[HGrSystem2].Data.Canvas.Handle, 131, 111, SRCCOPY);
     544  BitBltCanvas(Brains[2].Picture.Canvas, 0, 0, 64, 64,
     545    GrExt[HGrSystem2].Data.Canvas, 131, 111);
    546546  Brains[3].Picture := TBitmap.Create;
    547547  Brains[3].Picture.SetSize(64, 64);
    548   BitBlt(Brains[3].Picture.Canvas.Handle, 0, 0, 64, 64,
    549     GrExt[HGrSystem2].Data.Canvas.Handle, 131, 46, SRCCOPY);
     548  BitBltCanvas(Brains[3].Picture.Canvas, 0, 0, 64, 64,
     549    GrExt[HGrSystem2].Data.Canvas, 131, 46);
    550550
    551551  AIBrains := TBrains.Create(False);
     
    699699    $000000, xAction, y + 21, Phrases2.Lookup(TextItem));
    700700  BitBltCanvas(LogoBuffer.Canvas, 0, 0, 50, 50, Canvas,
    701     xActionIcon - 2, y - 2, SRCCOPY);
     701    xActionIcon - 2, y - 2);
    702702  GlowFrame(LogoBuffer, 8, 8, 34, 34, $202020);
    703   BitBlt(Canvas.Handle, xActionIcon - 2, y - 2, 50, 50,
    704     LogoBuffer.Canvas.Handle, 0, 0, SRCCOPY);
    705   BitBlt(Canvas.Handle, xActionIcon, y, 40, 40, BigImp.Canvas.Handle,
    706     (IconIndex mod 7) * xSizeBig + 8, (IconIndex div 7) * ySizeBig, SRCCOPY);
     703  BitBltCanvas(Canvas, xActionIcon - 2, y - 2, 50, 50,
     704    LogoBuffer.Canvas, 0, 0);
     705  BitBltCanvas(Canvas, xActionIcon, y, 40, 40, BigImp.Canvas,
     706    (IconIndex mod 7) * xSizeBig + 8, (IconIndex div 7) * ySizeBig);
    707707  RFrame(Canvas, xActionIcon - 1, y - 1, xActionIcon + 40, y + 40,
    708708    $000000, $000000);
     
    795795      MainTexture.clBevelShade); // Tab shadow
    796796  BitBltCanvas(LogoBuffer.Canvas, 0, 0, 36, 36, Canvas, 6,
    797     3 + 2 * integer(Tab <> tbMain), SRCCOPY);
     797    3 + 2 * integer(Tab <> tbMain));
    798798
    799799  ImageOp_BCC(LogoBuffer, Templates, 0, 0, 145, 38, 36, 27, $BFBF20, $4040DF);
     
    801801  ImageOp_BCC(LogoBuffer, Templates, 10, 27, 155, 38 + 27, 26, 9, $BFBF20,
    802802    $4040DF); // logo part 2
    803   BitBlt(Canvas.Handle, 6, 3 + 2 * integer(Tab <> tbMain), 36, 36,
    804     LogoBuffer.Canvas.Handle, 0, 0, SRCCOPY);
     803  BitBltCanvas(Canvas, 6, 3 + 2 * integer(Tab <> tbMain), 36, 36,
     804    LogoBuffer.Canvas, 0, 0);
    805805
    806806  if Page = pgMain then
     
    819819        BitBltCanvas(LogoBuffer.Canvas, 0, 0, w, h, Canvas,
    820820          ActionSideBorder + i * wBuffer, yAction + Integer(SelectedAction) * ActionPitch
    821           - 8, SRCCOPY);
     821          - 8);
    822822        MakeBlue(LogoBuffer, 0, 0, w, h);
    823         BitBlt(Canvas.Handle, ActionSideBorder + i * wBuffer,
     823        BitBltCanvas(Canvas, ActionSideBorder + i * wBuffer,
    824824          yAction + Integer(SelectedAction) * ActionPitch - 8, w, h,
    825           LogoBuffer.Canvas.Handle, 0, 0, SRCCOPY);
     825          LogoBuffer.Canvas, 0, 0);
    826826      end;
    827827    y := yAction;
     
    846846              Canvas.Font.Assign(UniFont[ftNormal]);
    847847              BitBltCanvas(LogoBuffer.Canvas, 0, 0, 91, 25, Canvas,
    848                 xActionIcon, y + 2, SRCCOPY);
     848                xActionIcon, y + 2);
    849849              ImageOp_BCC(LogoBuffer, Templates, 0, 0, 1, 400, 91, 25, 0,
    850850                Colors.Canvas.Pixels[clkAge0 - 1, cliDimmedText]);
    851               BitBlt(Canvas.Handle, xActionIcon, y + 2, 91, 25,
    852                 LogoBuffer.Canvas.Handle, 0, 0, SRCCOPY);
     851              BitBltCanvas(Canvas, xActionIcon, y + 2, 91, 25,
     852                LogoBuffer.Canvas, 0, 0);
    853853            end;
    854854        end;
     
    874874        if (i < 13) or (i > 17) then
    875875        begin
    876           BitBlt(Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,
    877             GrExt[HGrSystem2].Mask.Canvas.Handle, xOrna, yOrna, SRCAND);
    878           BitBlt(Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,
    879             GrExt[HGrSystem2].Data.Canvas.Handle, xOrna, yOrna, SRCPAINT);
     876          BitBltCanvas(Canvas, 9 + i * 27, yLogo - 2, wOrna, hOrna,
     877            GrExt[HGrSystem2].Mask.Canvas, xOrna, yOrna, SRCAND);
     878          BitBltCanvas(Canvas, 9 + i * 27, yLogo - 2, wOrna, hOrna,
     879            GrExt[HGrSystem2].Data.Canvas, xOrna, yOrna, SRCPAINT);
    880880        end;
    881881      PaintLogo(Canvas, 69 + 11 * 27, yLogo, MainTexture.clBevelLight,
     
    893893          if Assigned(PlayersBrain[I]) and (PlayersBrain[i].Kind in [btTerm, btRandom, btAI]) then
    894894          begin
    895             BitBlt(Canvas.Handle, xBrain[i] - 18, yBrain[i] + 19, 12, 14,
    896               GrExt[HGrSystem].Data.Canvas.Handle, 134 + (Difficulty[i] - 1) *
    897               13, 28, SRCCOPY);
     895            BitBltCanvas(Canvas, xBrain[i] - 18, yBrain[i] + 19, 12, 14,
     896              GrExt[HGrSystem].Data.Canvas, 134 + (Difficulty[i] - 1) *
     897              13, 28);
    898898            Frame(Canvas, xBrain[i] - 19, yBrain[i] + 18, xBrain[i] - 18 + 12,
    899899              yBrain[i] + (19 + 14), $000000, $000000);
     
    913913                PlayerSlots[I].MultiBtn.left + 12, PlayerSlots[I].MultiBtn.top + 12,
    914914                MainTexture.clBevelShade, MainTexture.clBevelLight);
    915               BitBlt(Canvas.Handle, xBrain[i] - 31, yBrain[i], 13, 12,
    916                 GrExt[HGrSystem].Data.Canvas.Handle, 88, 47, SRCCOPY);
     915              BitBltCanvas(Canvas, xBrain[i] - 31, yBrain[i], 13, 12,
     916                GrExt[HGrSystem].Data.Canvas, 88, 47);
    917917            end;
    918918          end;
     
    958958        if (i < 2) or (i > 6) then
    959959        begin
    960           BitBlt(Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,
    961             GrExt[HGrSystem2].Mask.Canvas.Handle, xOrna, yOrna, SRCAND);
    962           BitBlt(Canvas.Handle, 9 + i * 27, yLogo - 2, wOrna, hOrna,
    963             GrExt[HGrSystem2].Data.Canvas.Handle, xOrna, yOrna, SRCPAINT);
     960          BitBltCanvas(Canvas, 9 + i * 27, yLogo - 2, wOrna, hOrna,
     961            GrExt[HGrSystem2].Mask.Canvas, xOrna, yOrna, SRCAND);
     962          BitBltCanvas(Canvas, 9 + i * 27, yLogo - 2, wOrna, hOrna,
     963            GrExt[HGrSystem2].Data.Canvas, xOrna, yOrna, SRCPAINT);
    964964        end;
    965965      PaintLogo(Canvas, 69, yLogo, MainTexture.clBevelLight,
     
    10541054  if MiniMap.Mode = mmPicture then
    10551055  begin
    1056     BitBlt(Canvas.Handle, xMini + 2, yMini + 2, MiniMap.Size.X * 2, MiniMap.Size.Y,
    1057       MiniMap.Bitmap.Canvas.Handle, 0, 0, SRCCOPY);
     1056    BitBltCanvas(Canvas, xMini + 2, yMini + 2, MiniMap.Size.X * 2, MiniMap.Size.Y,
     1057      MiniMap.Bitmap.Canvas, 0, 0);
    10581058    if Page = pgStartRandom then
    10591059      s := Phrases.Lookup('RANMAP')
Note: See TracChangeset for help on using the changeset viewer.