Changeset 188 for trunk/LocalPlayer


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/LocalPlayer
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.