Changeset 530 for trunk


Ignore:
Timestamp:
Feb 24, 2024, 8:04:26 PM (9 months ago)
Author:
chronos
Message:
Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/CityScreen.pas

    r471 r530  
    275275
    276276    UnshareBitmap(Back);
    277     BitBltCanvas(Back.Canvas, 0, 0, Width, Height,
    278       MainTexture.Image.Canvas, 0, 0);
     277    BitBltBitmap(Back, 0, 0, Width, Height, MainTexture.Image, 0, 0);
    279278    ImageOp_B(Back, Template, 0, 0, 0, 0, Width, Height);
    280279  end;
     
    303302  Color2 := Colors.Canvas.Pixels[clkAge0 + Age, cliHouse];
    304303  SmallCityMap.Canvas.FillRect(0, 0, SmallCityMap.Width, SmallCityMap.Height);
    305   BitBltCanvas(SmallCityMap.Canvas, 0, 0, 83, hSmallMap,
    306     SmallCityMapTemplate.Canvas, 83 * SizeClass, 0);
     304  BitBltBitmap(SmallCityMap, 0, 0, 83, hSmallMap,
     305    SmallCityMapTemplate, 83 * SizeClass, 0);
    307306  if IsPort then
    308307  begin
    309     BitBltCanvas(SmallCityMap.Canvas, 83, 0, 15, hSmallMap,
    310       SmallCityMapTemplate.Canvas, 332 + 15, 0);
     308    BitBltBitmap(SmallCityMap, 83, 0, 15, hSmallMap,
     309      SmallCityMapTemplate, 332 + 15, 0);
    311310    ImageOp_CCC(SmallCityMap, 0, 0, 83, hSmallMap, Color0, Color1, Color2);
    312311    Color2 := Colors.Canvas.Pixels[clkCity, cliWater];
     
    315314  else
    316315  begin
    317     BitBltCanvas(SmallCityMap.Canvas, 83, 0, 15, hSmallMap,
    318       SmallCityMapTemplate.Canvas, 332, 0);
     316    BitBltBitmap(SmallCityMap, 83, 0, 15, hSmallMap,
     317      SmallCityMapTemplate, 332, 0);
    319318    ImageOp_CCC(SmallCityMap, 0, 0, wSmallMap, hSmallMap, Color0,
    320319      Color1, Color2);
     
    369368begin
    370369  UnshareBitmap(ZoomCityMap);
    371   BitBltCanvas(ZoomCityMap.Canvas, 0, 0, wZoomMap, hZoomMap,
    372     Back.Canvas, xZoomMap, yZoomMap);
     370  BitBltBitmap(ZoomCityMap, 0, 0, wZoomMap, hZoomMap,
     371    Back, xZoomMap, yZoomMap);
    373372  if SmallMapMode = smImprovements then begin
    374373    if ZoomArea < 3 then begin
     
    527526  RedTex.ColorTextShade := $0000FF;
    528527
    529   BitBltCanvas(Offscreen.Canvas, 0, 0, 640, 480, Back.Canvas, 0, 0);
     528  BitBltBitmap(Offscreen, 0, 0, 640, 480, Back, 0, 0);
    530529
    531530  Offscreen.Canvas.Font.Assign(UniFont[ftCaption]);
     
    599598      False, AllowChange and IsCityAlive and
    600599      (C.Status and csResourceWeightsMask = 0));
    601     BitBltCanvas(Offscreen.Canvas, xmArea + 102, 42, 90, 33, Back.Canvas,
    602       xmArea + 102, 42);
     600    BitBltBitmap(Offscreen, xmArea + 102, 42, 90, 33, Back, xmArea + 102, 42);
    603601
    604602    if IsCityAlive then
     
    630628    else
    631629      xGr := 141;
    632     BitBltCanvas(Offscreen.Canvas, xmArea - 192 + 5 + I * D, ymArea - 96 - 29,
    633       27, 30, HGrSystem.Mask.Canvas, xGr, 171, SRCAND); { shadow }
     630    BitBltBitmap(Offscreen, xmArea - 192 + 5 + I * D, ymArea - 96 - 29,
     631      27, 30, HGrSystem.Mask, xGr, 171, SRCAND); { shadow }
    634632    Sprite(Offscreen, HGrSystem, xmArea - 192 + 4 + I * D, ymArea - 96 - 30, 27,
    635633      30, xGr, 171);
     
    642640  begin
    643641    xGr := 1 + 112;
    644     BitBltCanvas(Offscreen.Canvas, xmArea + 192 - 27 + 1 - I * D, 29 + 1, 27,
    645       30, HGrSystem.Mask.Canvas, xGr, 171, SRCAND); { shadow }
     642    BitBltBitmap(Offscreen, xmArea + 192 - 27 + 1 - I * D, 29 + 1, 27,
     643      30, HGrSystem.Mask, xGr, 171, SRCAND); { shadow }
    646644    Sprite(Offscreen, HGrSystem, xmArea + 192 - 27 - I * D, 29, 27, 30,
    647645      xGr, 171);
     
    788786
    789787  // small map
    790   BitBltCanvas(Offscreen.Canvas, xSmallMap, ySmallMap, wSmallMap, hSmallMap,
    791     SmallCityMap.Canvas, 0, 0);
     788  BitBltBitmap(Offscreen, xSmallMap, ySmallMap, wSmallMap, hSmallMap,
     789    SmallCityMap, 0, 0);
    792790  if SmallMapMode = smImprovements then
    793791    Frame(Offscreen.Canvas, xSmallMap + 48 * (ZoomArea div 3),
     
    816814  Sprite(Offscreen, HGrSystem, X + 6, Y - 5, 10, 10, 154, 126);
    817815
    818   BitBltCanvas(Offscreen.Canvas, xZoomMap, yZoomMap, wZoomMap, hZoomMap,
    819     ZoomCityMap.Canvas, 0, 0);
     816  BitBltBitmap(Offscreen, xZoomMap, yZoomMap, wZoomMap, hZoomMap, ZoomCityMap, 0, 0);
    820817
    821818  for I := 0 to 5 do
  • trunk/LocalPlayer/CityType.pas

    r468 r530  
    113113        xSwitch + 38 + I * 42, ySwitch + 22, MainTexture.ColorBevelLight,
    114114        MainTexture.ColorBevelShade);
    115     BitBltCanvas(Offscreen.Canvas, xSwitch + 2 + I * 42, ySwitch + 2,
    116       xSizeSmall, ySizeSmall, SmallImp.Canvas, (I + 3) * xSizeSmall, 0);
     115    BitBltBitmap(Offscreen, xSwitch + 2 + I * 42, ySwitch + 2,
     116      xSizeSmall, ySizeSmall, SmallImp, (I + 3) * xSizeSmall, 0);
    117117  end;
    118118  RisedTextOut(Offscreen.Canvas, 8, yList + 32 * nListRow + 2,
     
    147147      yList + 16 + ySizeSmall div 2 + I div nListCol * 32,
    148148      MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    149     BitBltCanvas(Offscreen.Canvas, xList + 21 - xSizeSmall div 2 +
     149    BitBltBitmap(Offscreen, xList + 21 - xSizeSmall div 2 +
    150150      I mod nListCol * 42, yList + 16 - ySizeSmall div 2 + I div nListCol * 32,
    151       xSizeSmall, ySizeSmall, SmallImp.Canvas,
     151      xSizeSmall, ySizeSmall, SmallImp,
    152152      MyData.ImpOrder[ctype, I] mod 7 * xSizeSmall,
    153153      (MyData.ImpOrder[ctype, I] + SystemIconLines * 7) div 7 *
     
    170170        nPool div nPoolCol * 32, MainTexture.ColorBevelLight,
    171171        MainTexture.ColorBevelShade);
    172       BitBltCanvas(Offscreen.Canvas, xPool + 21 - xSizeSmall div 2 +
     172      BitBltBitmap(Offscreen, xPool + 21 - xSizeSmall div 2 +
    173173        nPool mod nPoolCol * 42, yPool + 16 - ySizeSmall div 2 +
    174         nPool div nPoolCol * 32, xSizeSmall, ySizeSmall, SmallImp.Canvas,
     174        nPool div nPoolCol * 32, xSizeSmall, ySizeSmall, SmallImp,
    175175        iix mod 7 * xSizeSmall, (iix + SystemIconLines * 7) div 7 *
    176176        ySizeSmall);
  • trunk/LocalPlayer/Draft.pas

    r471 r530  
    238238  // assemble background from 2 texture tiles
    239239  begin
    240     BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, 64,
    241       MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2,
     240    BitBltBitmap(Back, 0, 0, ClientWidth, 64,
     241      MainTexture.Image, (MainTexture.Width - ClientWidth) div 2,
    242242      MainTexture.Height - 64);
    243     BitBltCanvas(Back.Canvas, 0, 64, ClientWidth, ClientHeight - 64,
    244       MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2,
     243    BitBltBitmap(Back, 0, 64, ClientWidth, ClientHeight - 64,
     244      MainTexture.Image, (MainTexture.Width - ClientWidth) div 2,
    245245      0);
    246246  end
    247247  else
    248     BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight,
    249       MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2,
     248    BitBltBitmap(Back, 0, 0, ClientWidth, ClientHeight,
     249      MainTexture.Image, (MainTexture.Width - ClientWidth) div 2,
    250250      (MainTexture.Height - ClientHeight) div 2);
    251251  ImageOp_B(Back, Template, 0, 0, 0, 0, Template.Width, 64);
     
    253253    Template.Height - 64 - Cut);
    254254
    255   BitBltCanvas(Offscreen.Canvas, 0, 0, ClientWidth, ClientHeight,
    256     Back.Canvas, 0, 0);
     255  BitBltBitmap(Offscreen, 0, 0, ClientWidth, ClientHeight, Back, 0, 0);
    257256
    258257  Offscreen.Canvas.Font.Assign(UniFont[ftCaption]);
  • trunk/LocalPlayer/Help.pas

    r529 r530  
    551551          if 4 + I * 24 + yl > InnerHeight then
    552552            yl := InnerHeight - (4 + I * 24);
    553           BitBltCanvas(OffScreen.Canvas, 8, 4 + I * 24, ExtPic.Width, yl, ExtPic.Canvas,
    554             0, 0);
     553          BitBltBitmap(OffScreen, 8, 4 + I * 24, ExtPic.Width, yl, ExtPic, 0, 0);
    555554        end;
    556555      end;
     
    592591                8 + xSizeSmall + x0[I], 2 + 20 + I * 24, $000000, $000000);
    593592              if HelpLineInfo.Picpix = imPalace then
    594                 BitBltCanvas(OffScreen.Canvas, 8 + x0[I], 2 + I * 24,
    595                   xSizeSmall, ySizeSmall, SmallImp.Canvas,
     593                BitBltBitmap(OffScreen, 8 + x0[I], 2 + I * 24,
     594                  xSizeSmall, ySizeSmall, SmallImp,
    596595                  0 * xSizeSmall, 1 * ySizeSmall)
    597596              else
    598                 BitBltCanvas(OffScreen.Canvas, 8 + x0[I], 2 + I * 24,
    599                   xSizeSmall, ySizeSmall, SmallImp.Canvas,
     597                BitBltBitmap(OffScreen, 8 + x0[I], 2 + I * 24,
     598                  xSizeSmall, ySizeSmall, SmallImp,
    600599                  HelpLineInfo.Picpix mod 7 * xSizeSmall,
    601600                  (HelpLineInfo.Picpix + SystemIconLines * 7) div 7 *
     
    659658                $000000, $000000);
    660659              if AdvIcon[HelpLineInfo.Picpix] < 84 then
    661                 BitBltCanvas(OffScreen.Canvas, 8 + x0[I], 2 + I * 24,
    662                   xSizeSmall, ySizeSmall, SmallImp.Canvas,
     660                BitBltBitmap(OffScreen, 8 + x0[I], 2 + I * 24,
     661                  xSizeSmall, ySizeSmall, SmallImp,
    663662                  (AdvIcon[HelpLineInfo.Picpix] + SystemIconLines * 7) mod 7 *
    664663                  xSizeSmall, (AdvIcon[HelpLineInfo.Picpix] + SystemIconLines *
     
    669668                  295 + (AdvIcon[HelpLineInfo.Picpix] - 84) div 8 * 21);
    670669              J := AdvValue[HelpLineInfo.Picpix] div 1000;
    671               BitBltCanvas(OffScreen.Canvas, x0[I] + 4, 4 + I * 24, 14, 14,
    672                 HGrSystem.Mask.Canvas, 127 + J * 15, 85, SRCAND);
     670              BitBltBitmap(OffScreen, x0[I] + 4, 4 + I * 24, 14, 14,
     671                HGrSystem.Mask, 127 + J * 15, 85, SRCAND);
    673672              Sprite(OffScreen, HGrSystem, x0[I] + 3, 3 + I * 24, 14, 14,
    674673                127 + J * 15, 85);
     
    846845              ScreenTools.Frame(OffScreen.Canvas, 8 - 1 + x0[I], 2 - 1 + I * 24,
    847846                8 + xSizeSmall + x0[I], 2 + 20 + I * 24, $000000, $000000);
    848               BitBltCanvas(OffScreen.Canvas, 8 + x0[I], 2 + I * 24, xSizeSmall,
    849                 ySizeSmall, SmallImp.Canvas, (HelpLineInfo.Picpix - 1) *
     847              BitBltBitmap(OffScreen, 8 + x0[I], 2 + I * 24, xSizeSmall,
     848                ySizeSmall, SmallImp, (HelpLineInfo.Picpix - 1) *
    850849                xSizeSmall, ySizeSmall);
    851850              x0[I] := x0[I] + (8 + 8 + 36);
  • trunk/LocalPlayer/IsoEngine.pas

    r522 r530  
    8383    xxt: Integer; // half of tile size x/y
    8484    yyt: Integer; // half of tile size x/y
    85     TSpriteSize: TTerrainSpriteSize;
     85    TerrainSpriteSize: TTerrainSpriteSize;
    8686    HGrTerrain: TGraphicSet;
    8787    HGrCities: TGraphicSet;
     
    9898    procedure PaintCity(X, Y: Integer; const CityInfo: TCityInfo;
    9999      Accessory: Boolean = True);
    100     procedure BitBltBitmap(Src: TBitmap; X, Y, Width, Height, xSrc, ySrc,
     100    procedure BitBltBitmapOutput(Src: TBitmap; X, Y, Width, Height, xSrc, ySrc,
    101101      Rop: Integer);
    102102    procedure AttackBegin(const ShowMove: TShowMove);
     
    210210  IsoMap.LandPatch := LandPatch;
    211211  IsoMap.OceanPatch := OceanPatch;
    212   IsoMap.TSpriteSize := TSpriteSize;
     212  IsoMap.TerrainSpriteSize := TSpriteSize;
    213213  IsoMap.CitiesPictures := CitiesPictures;
    214214end;
     
    261261    for xSrc := 0 to TerrainIconCols - 1 do begin
    262262      I := ySrc * 9 + xSrc;
    263       TSpriteSize[I].Left := 0;
     263      TerrainSpriteSize[I].Left := 0;
    264264      repeat
    265265        Border := True;
    266266        for Y := 0 to yyt * 3 - 1 do begin
    267           MaskLine[Y].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + TSpriteSize[I].Left));
     267          MaskLine[Y].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + TerrainSpriteSize[I].Left));
    268268          if MaskLine[Y].PixelB = 0 then Border := False;
    269269        end;
    270         if Border then Inc(TSpriteSize[I].Left);
    271       until not Border or (TSpriteSize[I].Left = xxt * 2 - 1);
    272       TSpriteSize[I].Top := 0;
     270        if Border then Inc(TerrainSpriteSize[I].Left);
     271      until not Border or (TerrainSpriteSize[I].Left = xxt * 2 - 1);
     272      TerrainSpriteSize[I].Top := 0;
    273273      repeat
    274274        Border := True;
    275275        for X := 0 to xxt * 2 - 1 do begin
    276           MaskLine[TSpriteSize[I].Top].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + X));
    277           if MaskLine[TSpriteSize[I].Top].PixelB = 0 then Border := False;
     276          MaskLine[TerrainSpriteSize[I].Top].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + X));
     277          if MaskLine[TerrainSpriteSize[I].Top].PixelB = 0 then Border := False;
    278278        end;
    279         if Border then Inc(TSpriteSize[I].Top);
    280       until not Border or (TSpriteSize[I].Top = yyt * 3 - 1);
    281       TSpriteSize[I].Right := xxt * 2;
     279        if Border then Inc(TerrainSpriteSize[I].Top);
     280      until not Border or (TerrainSpriteSize[I].Top = yyt * 3 - 1);
     281      TerrainSpriteSize[I].Right := xxt * 2;
    282282      repeat
    283283        Border := True;
    284284        for Y := 0 to yyt * 3 - 1 do begin
    285           MaskLine[Y].SetX(ScaleToNative(xSrc * (xxt * 2 + 1) + TSpriteSize[I].Right));
     285          MaskLine[Y].SetX(ScaleToNative(xSrc * (xxt * 2 + 1) + TerrainSpriteSize[I].Right));
    286286          if MaskLine[Y].PixelB = 0 then Border := False;
    287287        end;
    288         if Border then Dec(TSpriteSize[I].Right);
    289       until not Border or (TSpriteSize[I].Right = TSpriteSize[I].Left);
    290       TSpriteSize[I].Bottom := yyt * 3;
     288        if Border then Dec(TerrainSpriteSize[I].Right);
     289      until not Border or (TerrainSpriteSize[I].Right = TerrainSpriteSize[I].Left);
     290      TerrainSpriteSize[I].Bottom := yyt * 3;
    291291      repeat
    292292        Border := True;
    293293        for X := 0 to xxt * 2 - 1 do begin
    294           MaskLine[TSpriteSize[I].Bottom - 1].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + X));
    295           if MaskLine[TSpriteSize[I].Bottom - 1].PixelB = 0 then Border := False;
     294          MaskLine[TerrainSpriteSize[I].Bottom - 1].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + X));
     295          if MaskLine[TerrainSpriteSize[I].Bottom - 1].PixelB = 0 then Border := False;
    296296        end;
    297         if Border then Dec(TSpriteSize[I].Bottom);
    298       until not Border or (TSpriteSize[I].Bottom = TSpriteSize[I].Top);
     297        if Border then Dec(TerrainSpriteSize[I].Bottom);
     298      until not Border or (TerrainSpriteSize[I].Bottom = TerrainSpriteSize[I].Top);
    299299    end;
    300300  end;
     
    359359  DitherMask.SetSize(xxt * 2, yyt * 2);
    360360  DitherMask.Canvas.FillRect(0, 0, DitherMask.Width, DitherMask.Height);
    361   BitBltCanvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt * 2,
    362     HGrTerrain.Mask.Canvas, 1 + 7 * (xxt * 2 + 1),
     361  BitBltBitmap(DitherMask, 0, 0, xxt * 2, yyt * 2,
     362    HGrTerrain.Mask, 1 + 7 * (xxt * 2 + 1),
    363363    1 + yyt + 15 * (yyt * 3 + 1), SRCAND);
    364364
     
    376376    end;
    377377    for Y := -1 to 6 do
    378       BitBltCanvas(LandPatch.Canvas, (X + 2) * (xxt * 2), (Y + 2) * yyt,
    379         xxt * 2, yyt, HGrTerrain.Data.Canvas, xSrc, ySrc);
     378      BitBltBitmap(LandPatch, (X + 2) * (xxt * 2), (Y + 2) * yyt,
     379        xxt * 2, yyt, HGrTerrain.Data, xSrc, ySrc);
    380380    for Y := -2 to 6 do
    381       BitBltCanvas(LandPatch.Canvas, (X + 2) * (xxt * 2), (Y + 2) * yyt, xxt,
    382         yyt, HGrTerrain.Data.Canvas, xSrc + xxt, ySrc + yyt,
     381      BitBltBitmap(LandPatch, (X + 2) * (xxt * 2), (Y + 2) * yyt, xxt,
     382        yyt, HGrTerrain.Data, xSrc + xxt, ySrc + yyt,
    383383        SRCPAINT);
    384384    for Y := -2 to 6 do
    385       BitBltCanvas(LandPatch.Canvas, (X + 2) * (xxt * 2) + xxt, (Y + 2) * yyt,
    386         xxt, yyt, HGrTerrain.Data.Canvas, xSrc, ySrc + yyt,
     385      BitBltBitmap(LandPatch, (X + 2) * (xxt * 2) + xxt, (Y + 2) * yyt,
     386        xxt, yyt, HGrTerrain.Data, xSrc, ySrc + yyt,
    387387        SRCPAINT);
    388388    for Y := -2 to 6 do
    389       BitBltCanvas(LandPatch.Canvas, (X + 2) * (xxt * 2), (Y + 2) * yyt, xxt,
    390         yyt, DitherMask.Canvas, xxt, yyt, SRCAND);
     389      BitBltBitmap(LandPatch, (X + 2) * (xxt * 2), (Y + 2) * yyt, xxt,
     390        yyt, DitherMask, xxt, yyt, SRCAND);
    391391    for Y := -2 to 6 do
    392       BitBltCanvas(LandPatch.Canvas, (X + 2) * (xxt * 2) + xxt, (Y + 2) * yyt,
    393         xxt, yyt, DitherMask.Canvas, 0, yyt, SRCAND);
     392      BitBltBitmap(LandPatch, (X + 2) * (xxt * 2) + xxt, (Y + 2) * yyt,
     393        xxt, yyt, DitherMask, 0, yyt, SRCAND);
    394394  end;
    395395
     
    407407    end;
    408408    for X := -2 to 6 do
    409       BitBltCanvas(LandMore.Canvas, (X + 2) * (xxt * 2), (Y + 2) * yyt,
    410         xxt * 2, yyt, HGrTerrain.Data.Canvas, xSrc, ySrc);
    411     BitBltCanvas(LandMore.Canvas, xxt * 2, (Y + 2) * yyt, xxt, yyt,
    412       HGrTerrain.Data.Canvas, xSrc + xxt, ySrc + yyt, SRCPAINT);
     409      BitBltBitmap(LandMore, (X + 2) * (xxt * 2), (Y + 2) * yyt,
     410        xxt * 2, yyt, HGrTerrain.Data, xSrc, ySrc);
     411    BitBltBitmap(LandMore, xxt * 2, (Y + 2) * yyt, xxt, yyt,
     412      HGrTerrain.Data, xSrc + xxt, ySrc + yyt, SRCPAINT);
    413413    for X := 0 to 7 do
    414       BitBltCanvas(LandMore.Canvas, (X + 2) * (xxt * 2) - xxt, (Y + 2) * yyt,
    415         xxt * 2, yyt, HGrTerrain.Data.Canvas, xSrc, ySrc + yyt,
     414      BitBltBitmap(LandMore, (X + 2) * (xxt * 2) - xxt, (Y + 2) * yyt,
     415        xxt * 2, yyt, HGrTerrain.Data, xSrc, ySrc + yyt,
    416416        SRCPAINT);
    417417    for X := -2 to 6 do
    418       BitBltCanvas(LandMore.Canvas, (X + 2) * (xxt * 2), (Y + 2) * yyt,
    419         xxt * 2, yyt, DitherMask.Canvas, 0, 0, SRCAND);
     418      BitBltBitmap(LandMore, (X + 2) * (xxt * 2), (Y + 2) * yyt,
     419        xxt * 2, yyt, DitherMask, 0, 0, SRCAND);
    420420  end;
    421421
     
    427427      ySrc := 1 + yyt;
    428428      if (X >= 1) = (Y >= 2) then
    429         BitBltCanvas(OceanPatch.Canvas, X * (xxt * 2), Y * yyt, xxt * 2, yyt,
    430           HGrTerrain.Data.Canvas, xSrc, ySrc);
     429        BitBltBitmap(OceanPatch, X * (xxt * 2), Y * yyt, xxt * 2, yyt,
     430          HGrTerrain.Data, xSrc, ySrc);
    431431      if (X >= 1) and ((Y < 2) or (X >= 2)) then
    432432      begin
    433         BitBltCanvas(OceanPatch.Canvas, X * (xxt * 2), Y * yyt, xxt, yyt,
    434           HGrTerrain.Data.Canvas, xSrc + xxt, ySrc + yyt,
     433        BitBltBitmap(OceanPatch, X * (xxt * 2), Y * yyt, xxt, yyt,
     434          HGrTerrain.Data, xSrc + xxt, ySrc + yyt,
    435435          SRCPAINT);
    436         BitBltCanvas(OceanPatch.Canvas, X * (xxt * 2) + xxt, Y * yyt, xxt, yyt,
    437           HGrTerrain.Data.Canvas, xSrc, ySrc + yyt, SRCPAINT);
     436        BitBltBitmap(OceanPatch, X * (xxt * 2) + xxt, Y * yyt, xxt, yyt,
     437          HGrTerrain.Data, xSrc, ySrc + yyt, SRCPAINT);
    438438      end;
    439       BitBltCanvas(OceanPatch.Canvas, X * (xxt * 2), Y * yyt, xxt, yyt,
    440         DitherMask.Canvas, xxt, yyt, SRCAND);
    441       BitBltCanvas(OceanPatch.Canvas, X * (xxt * 2) + xxt, Y * yyt, xxt, yyt,
    442         DitherMask.Canvas, 0, yyt, SRCAND);
     439      BitBltBitmap(OceanPatch, X * (xxt * 2), Y * yyt, xxt, yyt,
     440        DitherMask, xxt, yyt, SRCAND);
     441      BitBltBitmap(OceanPatch, X * (xxt * 2) + xxt, Y * yyt, xxt, yyt,
     442        DitherMask, 0, yyt, SRCAND);
    443443    end;
    444444  end;
     
    451451      ySrc := 1 + yyt;
    452452      if (X < 1) or (Y >= 2) then
    453         BitBltCanvas(OceanMore.Canvas, X * (xxt * 2), Y * yyt, xxt * 2, yyt,
    454           HGrTerrain.Data.Canvas, xSrc, ySrc);
     453        BitBltBitmap(OceanMore, X * (xxt * 2), Y * yyt, xxt * 2, yyt,
     454          HGrTerrain.Data, xSrc, ySrc);
    455455      if (X = 1) and (Y < 2) or (X >= 2) and (Y >= 1) then
    456456      begin
    457         BitBltCanvas(OceanMore.Canvas, X * (xxt * 2), Y * yyt, xxt, yyt,
    458           HGrTerrain.Data.Canvas, xSrc + xxt, ySrc + yyt,
     457        BitBltBitmap(OceanMore, X * (xxt * 2), Y * yyt, xxt, yyt,
     458          HGrTerrain.Data, xSrc + xxt, ySrc + yyt,
    459459          SRCPAINT);
    460         BitBltCanvas(OceanMore.Canvas, X * (xxt * 2) + xxt, Y * yyt, xxt, yyt,
    461           HGrTerrain.Data.Canvas, xSrc, ySrc + yyt, SRCPAINT);
     460        BitBltBitmap(OceanMore, X * (xxt * 2) + xxt, Y * yyt, xxt, yyt,
     461          HGrTerrain.Data, xSrc, ySrc + yyt, SRCPAINT);
    462462      end;
    463       BitBltCanvas(OceanMore.Canvas, X * (xxt * 2), Y * yyt, xxt * 2, yyt,
    464         DitherMask.Canvas, 0, 0, SRCAND);
     463      BitBltBitmap(OceanMore, X * (xxt * 2), Y * yyt, xxt * 2, yyt,
     464        DitherMask, 0, 0, SRCAND);
    465465    end;
    466466  end;
    467467
    468   BitBltCanvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt * 2,
    469     DitherMask.Canvas, 0, 0, DSTINVERT); { invert dither mask }
    470   BitBltCanvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt * 2,
    471     HGrTerrain.Mask.Canvas, 1, 1 + yyt, SRCPAINT);
     468  BitBltBitmap(DitherMask, 0, 0, xxt * 2, yyt * 2,
     469    DitherMask, 0, 0, DSTINVERT); { invert dither mask }
     470  BitBltBitmap(DitherMask, 0, 0, xxt * 2, yyt * 2,
     471    HGrTerrain.Mask, 1, 1 + yyt, SRCPAINT);
    472472
    473473  for X := -1 to 6 do
    474474    for Y := -2 to 6 do
    475       BitBltCanvas(LandPatch.Canvas, (X + 2) * (xxt * 2), (Y + 2) * yyt,
    476         xxt * 2, yyt, DitherMask.Canvas, 0, 0, SRCAND);
     475      BitBltBitmap(LandPatch, (X + 2) * (xxt * 2), (Y + 2) * yyt,
     476        xxt * 2, yyt, DitherMask, 0, 0, SRCAND);
    477477
    478478  for Y := -1 to 6 do
    479479    for X := -2 to 7 do
    480       BitBltCanvas(LandMore.Canvas, (X + 2) * (xxt * 2) - xxt, (Y + 2) * yyt,
    481         xxt * 2, yyt, DitherMask.Canvas, 0, yyt, SRCAND);
    482 
    483   BitBltCanvas(LandPatch.Canvas, 0, 0, (xxt * 2) * 9, yyt * 9,
    484     LandMore.Canvas, 0, 0, SRCPAINT);
     480      BitBltBitmap(LandMore, (X + 2) * (xxt * 2) - xxt, (Y + 2) * yyt,
     481        xxt * 2, yyt, DitherMask, 0, yyt, SRCAND);
     482
     483  BitBltBitmap(LandPatch, 0, 0, (xxt * 2) * 9, yyt * 9,
     484    LandMore, 0, 0, SRCPAINT);
    485485
    486486  for X := 0 to 3 do
    487487    for Y := 0 to 3 do
    488       BitBltCanvas(OceanPatch.Canvas, X * (xxt * 2), Y * yyt, xxt * 2, yyt,
    489         DitherMask.Canvas, 0, 0, SRCAND);
     488      BitBltBitmap(OceanPatch, X * (xxt * 2), Y * yyt, xxt * 2, yyt,
     489        DitherMask, 0, 0, SRCAND);
    490490
    491491  for Y := 0 to 3 do
    492492    for X := 0 to 4 do
    493       BitBltCanvas(OceanMore.Canvas, X * (xxt * 2) - xxt, Y * yyt, xxt * 2,
    494         yyt, DitherMask.Canvas, 0, yyt, SRCAND);
    495 
    496   BitBltCanvas(OceanPatch.Canvas, 0, 0, (xxt * 2) * 4, yyt * 4,
    497     OceanMore.Canvas, 0, 0, SRCPAINT);
     493      BitBltBitmap(OceanMore, X * (xxt * 2) - xxt, Y * yyt, xxt * 2,
     494        yyt, DitherMask, 0, yyt, SRCAND);
     495
     496  BitBltBitmap(OceanPatch, 0, 0, (xxt * 2) * 4, yyt * 4, OceanMore, 0, 0, SRCPAINT);
    498497
    499498  with DitherMask.Canvas do begin
     
    501500    FillRect(Rect(0, 0, xxt * 2, yyt));
    502501  end;
    503   BitBltCanvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt,
    504     HGrTerrain.Mask.Canvas, 1, 1 + yyt);
     502  BitBltBitmap(DitherMask, 0, 0, xxt * 2, yyt, HGrTerrain.Mask, 1, 1 + yyt);
    505503
    506504  for X := 0 to 6 do
    507     BitBltCanvas(LandPatch.Canvas, (X + 2) * (xxt * 2), yyt, xxt * 2, yyt,
    508       DitherMask.Canvas, 0, 0, SRCAND);
    509   BitBltCanvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt, DitherMask.Canvas,
    510     0, 0, DSTINVERT);
     505    BitBltBitmap(LandPatch, (X + 2) * (xxt * 2), yyt, xxt * 2, yyt,
     506      DitherMask, 0, 0, SRCAND);
     507  BitBltBitmap(DitherMask, 0, 0, xxt * 2, yyt, DitherMask, 0, 0, DSTINVERT);
    511508
    512509  for Y := 0 to 6 do
    513     BitBltCanvas(LandPatch.Canvas, xxt * 2, (Y + 2) * yyt, xxt * 2, yyt,
    514       DitherMask.Canvas, 0, 0, SRCAND);
     510    BitBltBitmap(LandPatch, xxt * 2, (Y + 2) * yyt, xxt * 2, yyt,
     511      DitherMask, 0, 0, SRCAND);
    515512
    516513  FreeAndNil(LandMore);
     
    595592end;
    596593
    597 procedure TIsoMap.BitBltBitmap(Src: TBitmap; X, Y, Width, Height, xSrc, ySrc,
     594procedure TIsoMap.BitBltBitmapOutput(Src: TBitmap; X, Y, Width, Height, xSrc, ySrc,
    598595  Rop: Integer);
    599596begin
     
    617614    Exit;
    618615
    619   BitBltCanvas(FOutput.Canvas, X, Y, Width, Height, Src.Canvas, xSrc, ySrc, Rop);
     616  BitBltBitmap(FOutput, X, Y, Width, Height, Src, xSrc, ySrc, Rop);
    620617end;
    621618
    622619procedure TIsoMap.Sprite(HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: Integer);
    623620begin
    624   BitBltBitmap(HGr.Mask, xDst, yDst, Width, Height, xGr, yGr, SRCAND);
    625   BitBltBitmap(HGr.Data, xDst, yDst, Width, Height, xGr, yGr, SRCPAINT);
     621  BitBltBitmapOutput(HGr.Mask, xDst, yDst, Width, Height, xGr, yGr, SRCAND);
     622  BitBltBitmapOutput(HGr.Data, xDst, yDst, Width, Height, xGr, yGr, SRCPAINT);
    626623end;
    627624
     
    634631  ySrc: Integer;
    635632begin
    636   Width := TSpriteSize[grix].Right - TSpriteSize[grix].Left;
    637   Height := TSpriteSize[grix].Bottom - TSpriteSize[grix].Top;
    638   xSrc := 1 + grix mod 9 * (xxt * 2 + 1) + TSpriteSize[grix].Left;
    639   ySrc := 1 + grix div 9 * (yyt * 3 + 1) + TSpriteSize[grix].Top;
    640   xDst := xDst + TSpriteSize[grix].Left;
    641   yDst := yDst - yyt + TSpriteSize[grix].Top;
     633  Width := TerrainSpriteSize[grix].Right - TerrainSpriteSize[grix].Left;
     634  Height := TerrainSpriteSize[grix].Bottom - TerrainSpriteSize[grix].Top;
     635  xSrc := 1 + grix mod 9 * (xxt * 2 + 1) + TerrainSpriteSize[grix].Left;
     636  ySrc := 1 + grix div 9 * (yyt * 3 + 1) + TerrainSpriteSize[grix].Top;
     637  xDst := xDst + TerrainSpriteSize[grix].Left;
     638  yDst := yDst - yyt + TerrainSpriteSize[grix].Top;
    642639  if xDst < FLeft then begin
    643640    Width := Width - (FLeft - xDst);
     
    707704        xGr := 121 + J mod 7 * 9;
    708705        yGr := 1 + J div 7 * 9;
    709         BitBltBitmap(HGrSystem.Mask, X + xsh + 3, Y + ysh + 9, 8, 8, xGr,
     706        BitBltBitmapOutput(HGrSystem.Mask, X + xsh + 3, Y + ysh + 9, 8, 8, xGr,
    710707          yGr, SRCAND);
    711708        Sprite(HGrSystem, X + xsh + 2, Y + ysh + 8, 8, 8, xGr, yGr);
     
    921918    Exit;
    922919
    923   BitBltBitmap(HGrTerrain.Data, X + xxt div 2, Y, xxt, yyt,
     920  BitBltBitmapOutput(HGrTerrain.Data, X + xxt div 2, Y, xxt, yyt,
    924921    1 + (Conn shr 6 + Conn and 1 shl 2) * (xxt * 2 + 1),
    925922    1 + yyt + (16 + Tile and fTerrain) * (yyt * 3 + 1), SRCPAINT);
    926   BitBltBitmap(HGrTerrain.Data, X + xxt, Y + yyt div 2, xxt, yyt,
     923  BitBltBitmapOutput(HGrTerrain.Data, X + xxt, Y + yyt div 2, xxt, yyt,
    927924    1 + (Conn and 7) * (xxt * 2 + 1) + xxt,
    928925    1 + yyt * 2 + (16 + Tile and fTerrain) * (yyt * 3 + 1), SRCPAINT);
    929   BitBltBitmap(HGrTerrain.Data, X + xxt div 2, Y + yyt, xxt, yyt,
     926  BitBltBitmapOutput(HGrTerrain.Data, X + xxt div 2, Y + yyt, xxt, yyt,
    930927    1 + (Conn shr 2 and 7) * (xxt * 2 + 1) + xxt,
    931928    1 + yyt + (16 + Tile and fTerrain) * (yyt * 3 + 1), SRCPAINT);
    932   BitBltBitmap(HGrTerrain.Data, X, Y + yyt div 2, xxt, yyt,
     929  BitBltBitmapOutput(HGrTerrain.Data, X, Y + yyt div 2, xxt, yyt,
    933930    1 + (Conn shr 4 and 7) * (xxt * 2 + 1),
    934931    1 + yyt * 2 + (16 + Tile and fTerrain) * (yyt * 3 + 1), SRCPAINT);
    935932  Conn := Connection4(Loc, fTerrain, fUNKNOWN); { dither to black }
    936933  if Conn and 1 <> 0 then
    937     BitBltBitmap(HGrTerrain.Mask, X + xxt, Y, xxt, yyt, 1 + 7 * (xxt * 2 + 1) +
     934    BitBltBitmapOutput(HGrTerrain.Mask, X + xxt, Y, xxt, yyt, 1 + 7 * (xxt * 2 + 1) +
    938935      xxt, 1 + yyt + 15 * (yyt * 3 + 1), SRCAND);
    939936  if Conn and 2 <> 0 then
    940     BitBltBitmap(HGrTerrain.Mask, X + xxt, Y + yyt, xxt, yyt,
     937    BitBltBitmapOutput(HGrTerrain.Mask, X + xxt, Y + yyt, xxt, yyt,
    941938      1 + 7 * (xxt * 2 + 1) + xxt, 1 + yyt * 2 + 15 * (yyt * 3 + 1), SRCAND);
    942939  if Conn and 4 <> 0 then
    943     BitBltBitmap(HGrTerrain.Mask, X, Y + yyt, xxt, yyt, 1 + 7 * (xxt * 2 + 1),
     940    BitBltBitmapOutput(HGrTerrain.Mask, X, Y + yyt, xxt, yyt, 1 + 7 * (xxt * 2 + 1),
    944941      1 + yyt * 2 + 15 * (yyt * 3 + 1), SRCAND);
    945942  if Conn and 8 <> 0 then
    946     BitBltBitmap(HGrTerrain.Mask, X, Y, xxt, yyt, 1 + 7 * (xxt * 2 + 1),
     943    BitBltBitmapOutput(HGrTerrain.Mask, X, Y, xxt, yyt, 1 + 7 * (xxt * 2 + 1),
    947944      1 + yyt + 15 * (yyt * 3 + 1), SRCAND);
    948945end;
     
    11081105        if BordersOK^ and (1 shl p1) = 0 then begin
    11091106          UnshareBitmap(Borders);
    1110           BitBltCanvas(Borders.Canvas, 0, p1 * (yyt * 2), xxt * 2,
    1111             yyt * 2, HGrTerrain.Data.Canvas,
     1107          BitBltBitmap(Borders, 0, p1 * (yyt * 2), xxt * 2,
     1108            yyt * 2, HGrTerrain.Data,
    11121109            1 + 8 * (xxt * 2 + 1), 1 + yyt + 16 * (yyt * 3 + 1));
    11131110          BitmapReplaceColor(Borders, 0, p1 * (yyt * 2), xxt * 2, yyt * 2, $636363, Tribe[p1].Color);
     
    11261123              if p2 <> p1 then
    11271124              begin
    1128                 BitBltBitmap(HGrTerrain.Mask, X + dx * xxt, Y + dy * yyt, xxt,
     1125                BitBltBitmapOutput(HGrTerrain.Mask, X + dx * xxt, Y + dy * yyt, xxt,
    11291126                  yyt, 1 + 8 * (xxt * 2 + 1) + dx * xxt,
    11301127                  1 + yyt + 16 * (yyt * 3 + 1) + dy * yyt, SRCAND);
    1131                 BitBltBitmap(Borders, X + dx * xxt, Y + dy * yyt, xxt, yyt, dx * xxt,
     1128                BitBltBitmapOutput(Borders, X + dx * xxt, Y + dy * yyt, xxt, yyt, dx * xxt,
    11321129                  p1 * (yyt * 2) + dy * yyt, SRCPAINT);
    11331130              end;
     
    15761573                  bix := 0;
    15771574                end;
    1578               BitBltBitmap(OceanPatch, X + dx * xxt, Y + dy * yyt, xxt, yyt,
     1575              BitBltBitmapOutput(OceanPatch, X + dx * xxt, Y + dy * yyt, xxt, yyt,
    15791576                Aix * (xxt * 2) + (dx + dy + 1) and 1 * xxt, bix * yyt, SRCCOPY)
    15801577            end
     
    16241621                bix := Aix;
    16251622            if Aix = -1 then
    1626               BitBltBitmap(HGrTerrain.Data, X + dx * xxt, Y + dy * yyt, xxt,
     1623              BitBltBitmapOutput(HGrTerrain.Data, X + dx * xxt, Y + dy * yyt, xxt,
    16271624                yyt, 1 + 6 * (xxt * 2 + 1) + (dx + dy + 1) and 1 * xxt, 1 + yyt,
    16281625                SRCCOPY) // arctic <-> ocean
    16291626            else if bix = -1 then
    1630               BitBltBitmap(HGrTerrain.Data, X + dx * xxt, Y + dy * yyt, xxt,
     1627              BitBltBitmapOutput(HGrTerrain.Data, X + dx * xxt, Y + dy * yyt, xxt,
    16311628                yyt, 1 + 6 * (xxt * 2 + 1) + xxt - (dx + dy + 1) and 1 * xxt,
    16321629                1 + yyt * 2, SRCCOPY) // arctic <-> ocean
    16331630            else
    1634               BitBltBitmap(LandPatch, X + dx * xxt, Y + dy * yyt, xxt, yyt,
     1631              BitBltBitmapOutput(LandPatch, X + dx * xxt, Y + dy * yyt, xxt, yyt,
    16351632                Aix * (xxt * 2) + (dx + dy + 1) and 1 * xxt, bix * yyt, SRCCOPY)
    16361633          end;
  • trunk/LocalPlayer/MessgEx.pas

    r514 r530  
    375375          ySizeBig + 2 * GlowRange, Canvas,
    376376          Width div 2 - (28 + GlowRange), 24 - GlowRange);
    377         BitBltCanvas(Buffer.Canvas, GlowRange, GlowRange, xSizeBig, ySizeBig,
    378           BigImp.Canvas, IconIndex mod 7 * xSizeBig,
     377        BitBltBitmap(Buffer, GlowRange, GlowRange, xSizeBig, ySizeBig,
     378          BigImp, IconIndex mod 7 * xSizeBig,
    379379          (IconIndex + SystemIconLines * 7) div 7 * ySizeBig);
    380380        if p1 < 0 then
  • trunk/LocalPlayer/NatStat.pas

    r496 r530  
    109109  if MainTexture.Age <> AgePrepared then begin
    110110    AgePrepared := MainTexture.Age;
    111     BitBltCanvas(Back.Canvas, 0, 0, Width, Height,
    112       MainTexture.Image.Canvas, (MainTexture.Width - Width) div 2,
     111    BitBltBitmap(Back, 0, 0, Width, Height,
     112      MainTexture.Image, (MainTexture.Width - Width) div 2,
    113113      (MainTexture.Height - Height) div 2);
    114114    ImageOp_B(Back, Template, 0, 0, 0, 0, Width, Height);
     
    263263  Extinct := 1 shl pView and MyRO.Alive = 0;
    264264
    265   BitBltCanvas(Offscreen.Canvas, 0, 0, ClientWidth, ClientHeight,
    266     Back.Canvas, 0, 0);
     265  BitBltBitmap(Offscreen, 0, 0, ClientWidth, ClientHeight, Back, 0, 0);
    267266
    268267  Offscreen.Canvas.Font.Assign(UniFont[ftCaption]);
  • trunk/LocalPlayer/Rates.pas

    r496 r530  
    9393    GlowFrame(Offscreen, ClientWidth div 2 - xSizeBig div 2, 52, xSizeBig,
    9494      ySizeBig, Tribe[Me].Color);
    95     BitBltCanvas(Offscreen.Canvas, ClientWidth div 2 - xSizeBig div 2, 52,
    96       xSizeBig, ySizeBig, BigImp.Canvas, (woLiberty mod 7) * xSizeBig,
     95    BitBltBitmap(Offscreen, ClientWidth div 2 - xSizeBig div 2, 52,
     96      xSizeBig, ySizeBig, BigImp, (woLiberty mod 7) * xSizeBig,
    9797      (woLiberty div 7 + SystemIconLines) * ySizeBig);
    9898  end
     
    120120    begin
    121121      for I := 0 to current div 8 - 1 do
    122         BitBltCanvas(Offscreen.Canvas, X + Max - 8 - I * 8, Y, 8, 7,
    123           HGrSystem.Data.Canvas, 104, 9 + 8 * 2);
    124       BitBltCanvas(Offscreen.Canvas, X + Max - current, Y, current - 8 * (current div 8), 7,
    125         HGrSystem.Data.Canvas, 104, 9 + 8 * 2);
     122        BitBltBitmap(Offscreen, X + Max - 8 - I * 8, Y, 8, 7,
     123          HGrSystem.Data, 104, 9 + 8 * 2);
     124      BitBltBitmap(Offscreen, X + Max - current, Y, current - 8 * (current div 8), 7,
     125        HGrSystem.Data, 104, 9 + 8 * 2);
    126126      Brush.Color := $000000;
    127127      FillRect(Rect(X, Y, X + Max - current, Y + 7));
  • trunk/LocalPlayer/Select.pas

    r522 r530  
    206206      if pix and cpType = 0 then
    207207        if (pix and cpIndex = imPalace) and (MyRO.Government <> gAnarchy) then
    208           BitBltCanvas(Offscreen.Canvas, X + 16, Y + (16 - 1), xSizeSmall,
    209             ySizeSmall, SmallImp.Canvas, (MyRO.Government - 1) *
     208          BitBltBitmap(Offscreen, X + 16, Y + (16 - 1), xSizeSmall,
     209            ySizeSmall, SmallImp, (MyRO.Government - 1) *
    210210            xSizeSmall, ySizeSmall)
    211211        else
    212           BitBltCanvas(Offscreen.Canvas, X + 16, Y + (16 - 1), xSizeSmall,
    213             ySizeSmall, SmallImp.Canvas, pix and cpIndex mod 7 *
     212          BitBltBitmap(Offscreen, X + 16, Y + (16 - 1), xSizeSmall,
     213            ySizeSmall, SmallImp, pix and cpIndex mod 7 *
    214214            xSizeSmall, (pix and cpIndex + SystemIconLines * 7) div 7 *
    215215            ySizeSmall)
    216216      else
    217         BitBltCanvas(Offscreen.Canvas, X + 16, Y + (16 - 1), xSizeSmall,
    218           ySizeSmall, SmallImp.Canvas, (3 + pix and cpIndex) *
     217        BitBltBitmap(Offscreen, X + 16, Y + (16 - 1), xSizeSmall,
     218          ySizeSmall, SmallImp, (3 + pix and cpIndex) *
    219219          xSizeSmall, 0);
    220220    end;
     
    578578                  MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    579579                if AdvIcon[lix] < 84 then
    580                   BitBltCanvas(Offscreen.Canvas, (8 + 16), y0, xSizeSmall,
    581                     ySizeSmall, SmallImp.Canvas,
     580                  BitBltBitmap(Offscreen, (8 + 16), y0, xSizeSmall,
     581                    ySizeSmall, SmallImp,
    582582                    (AdvIcon[lix] + SystemIconLines * 7) mod 7 * xSizeSmall,
    583583                    (AdvIcon[lix] + SystemIconLines * 7) div 7 *
     
    588588                    295 + (AdvIcon[lix] - 84) div 8 * 21);
    589589                J := AdvValue[lix] div 1000;
    590                 BitBltCanvas(Offscreen.Canvas, (8 + 16 - 4), y0 + 2, 14, 14,
    591                   HGrSystem.Mask.Canvas, 127 + J * 15,
     590                BitBltBitmap(Offscreen, (8 + 16 - 4), y0 + 2, 14, 14,
     591                  HGrSystem.Mask, 127 + J * 15,
    592592                  85, SRCAND);
    593593                Sprite(Offscreen, HGrSystem, (8 + 16 - 5), y0 + 1, 14, 14,
     
    683683              8 + 16 + xSizeSmall, y0 - 15 + (16 - 1 + ySizeSmall),
    684684              MainTexture.ColorBevelLight, MainTexture.ColorBevelShade);
    685             BitBltCanvas(Offscreen.Canvas, 8 + 16, y0 - 15 + (16 - 1),
    686               xSizeSmall, ySizeSmall, SmallImp.Canvas,
    687               (lix - 1) * xSizeSmall, ySizeSmall);
     685            BitBltBitmap(Offscreen, 8 + 16, y0 - 15 + (16 - 1),
     686              xSizeSmall, ySizeSmall, SmallImp, (lix - 1) * xSizeSmall, ySizeSmall);
    688687          end;
    689688        end;
  • trunk/LocalPlayer/Term.pas

    r525 r530  
    46564656    Exit;
    46574657
    4658   NoMap.BitBltBitmap(Panel, -xMap - MapOffset, -yMap + MapHeight - Overlap, xMidPanel,
     4658  NoMap.BitBltBitmapOutput(Panel, -xMap - MapOffset, -yMap + MapHeight - Overlap, xMidPanel,
    46594659    Overlap, 0, 0, SRCCOPY);
    4660   NoMap.BitBltBitmap(Panel, -xMap - MapOffset + xRightPanel,
     4660  NoMap.BitBltBitmapOutput(Panel, -xMap - MapOffset + xRightPanel,
    46614661    -yMap + MapHeight - Overlap, Panel.Width - xRightPanel, Overlap,
    46624662    xRightPanel, 0, SRCCOPY);
     
    48584858begin
    48594859  with MainMap do begin
    4860     BitBltCanvas(Panel.Canvas, xMini + 2, yMini + 2, G.lx * 2, G.ly,
    4861       MiniMap.Bitmap.Canvas, 0, 0);
     4860    BitBltBitmap(Panel, xMini + 2, yMini + 2, G.lx * 2, G.ly,
     4861      MiniMap.Bitmap, 0, 0);
    48624862    if MarkCityLoc >= 0 then
    48634863      Sprite(Panel, HGrSystem, xMini - 2 + (4 * G.lx + 2 * (MarkCityLoc mod G.lx)
     
    49514951          ClientWidth - xPalace + xSizeBig + 1, yPalace + ySizeBig + 1,
    49524952          $FFFFFF, $B0B0B0);
    4953         BitBltCanvas(Panel.Canvas, ClientWidth - xPalace, yPalace, xSizeBig,
    4954           ySizeBig, HGrSystem2.Data.Canvas, 70, 123);
     4953        BitBltBitmap(Panel, ClientWidth - xPalace, yPalace, xSizeBig,
     4954          ySizeBig, HGrSystem2.Data, 70, 123);
    49554955      end
    49564956      else if MyRO.NatBuilt[imPalace] > 0 then
     
    58335833      PaintLoc(MouseLoc, 2);
    58345834      MiniMapPaint;
    5835       BitBltCanvas(Panel.Canvas, xMini + 2, yMini + 2, G.lx * 2, G.ly,
    5836         MiniMap.Bitmap.Canvas, 0, 0);
     5835      BitBltBitmap(Panel, xMini + 2, yMini + 2, G.lx * 2, G.ly,
     5836        MiniMap.Bitmap, 0, 0);
    58375837      with MainMap do begin
    58385838        if ywmax <= 0 then
     
    66536653    for Step := 0 to Abs(Step1 - Step0) do
    66546654    begin
    6655       BitBltCanvas(Buffer.Canvas, 0, 0, xRange, yRange,
    6656         Offscreen.Canvas, xMin, yMin);
     6655      BitBltBitmap(Buffer, 0, 0, xRange, yRange, Offscreen, xMin, yMin);
    66576656      if Step1 <> Step0 then
    66586657      begin
     
    66966695  if Restore then
    66976696  begin
    6698     BitBltCanvas(Buffer.Canvas, 0, 0, xRange, yRange, Offscreen.Canvas, xMin, yMin);
     6697    BitBltBitmap(Buffer, 0, 0, xRange, yRange, Offscreen, xMin, yMin);
    66996698    PaintBufferToScreen(xMin, yMin, xRange, yRange);
    67006699  end;
     
    78327831          yw := ywmax;
    78337832      end;
    7834       BitBltCanvas(Buffer.Canvas, 0, 0, G.lx * 2, G.ly, MiniMap.Bitmap.Canvas, 0, 0);
     7833      BitBltBitmap(Buffer, 0, 0, G.lx * 2, G.ly, MiniMap.Bitmap, 0, 0);
    78357834      if ywmax <= 0 then
    78367835        Frame(Buffer.Canvas, X - xMini - 2 - MapWidth div (xxt * 2), 0,
     
    78417840          X - xMini - 2 + MapWidth div (xxt * 2) - 1, yw + MapHeight div yyt -
    78427841          2, MainTexture.ColorMark, MainTexture.ColorMark);
    7843       BitBltCanvas(Panel.Canvas, xMini + 2, yMini + 2, G.lx * 2, G.ly,
    7844         Buffer.Canvas, 0, 0);
     7842      BitBltBitmap(Panel, xMini + 2, yMini + 2, G.lx * 2, G.ly,
     7843        Buffer, 0, 0);
    78457844      MainOffscreenPaint;
    78467845      RectInvalidate(xMini + 2, TopBarHeight + MapHeight - Overlap + yMini + 2,
  • trunk/LocalPlayer/UnitStat.pas

    r510 r530  
    101101  if MainTexture.Age <> AgePrepared then begin
    102102    AgePrepared := MainTexture.Age;
    103     BitBltCanvas(Back.Canvas, 0, 0, wCommon, hOwnModel,
    104       MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2,
     103    BitBltBitmap(Back, 0, 0, wCommon, hOwnModel,
     104      MainTexture.Image, (MainTexture.Width - wCommon) div 2,
    105105      (MainTexture.Height - hOwnModel) div 2);
    106     BitBltCanvas(Back.Canvas, wCommon, 0, wCommon, hEnemyModel,
    107       MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2,
     106    BitBltBitmap(Back, wCommon, 0, wCommon, hEnemyModel,
     107      MainTexture.Image, (MainTexture.Width - wCommon) div 2,
    108108      (MainTexture.Height - hEnemyModel) div 2);
    109     BitBltCanvas(Back.Canvas, 2 * wCommon, 0, wCommon, hEnemyUnit,
    110       MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2,
     109    BitBltBitmap(Back, 2 * wCommon, 0, wCommon, hEnemyUnit,
     110      MainTexture.Image, (MainTexture.Width - wCommon) div 2,
    111111      (MainTexture.Height - hEnemyUnit) div 2);
    112     BitBltCanvas(Back.Canvas, 3 * wCommon, 0, wCommon, hEnemyCityDefense,
    113       MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2,
     112    BitBltBitmap(Back, 3 * wCommon, 0, wCommon, hEnemyCityDefense,
     113      MainTexture.Image, (MainTexture.Width - wCommon) div 2,
    114114      (MainTexture.Height - hEnemyCityDefense) div 2);
    115     BitBltCanvas(Back.Canvas, 4 * wCommon, 0, wCommon, hEnemyCity,
    116       MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2,
     115    BitBltBitmap(Back, 4 * wCommon, 0, wCommon, hEnemyCity,
     116      MainTexture.Image, (MainTexture.Width - wCommon) div 2,
    117117      (MainTexture.Height - hEnemyCity) div 2);
    118118    ImageOp_B(Back, Template, 0, 0, 0, 0, 5 * wCommon, hMax);
     
    378378  case Kind of
    379379    dkOwnModel: begin
    380       BitBltCanvas(Offscreen.Canvas, 0, 0, wCommon, hOwnModel,
    381         Back.Canvas, 0, 0);
     380      BitBltBitmap(Offscreen, 0, 0, wCommon, hOwnModel, Back, 0, 0);
    382381      yView := 13;
    383382      yTotal := 92;
    384383    end;
    385384    dkEnemyModel: begin
    386       BitBltCanvas(Offscreen.Canvas, 0, 0, wCommon, hEnemyModel,
    387         Back.Canvas, wCommon, 0);
     385      BitBltBitmap(Offscreen, 0, 0, wCommon, hEnemyModel, Back, wCommon, 0);
    388386      yView := 13;
    389387      yTotal := 92;
    390388    end;
    391389    dkEnemyUnit, dkOwnUnit: begin
    392       BitBltCanvas(Offscreen.Canvas, 0, 0, wCommon, hEnemyUnit,
    393         Back.Canvas, 2 * wCommon, 0);
     390      BitBltBitmap(Offscreen, 0, 0, wCommon, hEnemyUnit, Back, 2 * wCommon, 0);
    394391      yView := 13;
    395392      yTotal := 123;
    396393    end;
    397394    dkEnemyCityDefense: begin
    398       BitBltCanvas(Offscreen.Canvas, 0, 0, wCommon, hEnemyCityDefense,
    399         Back.Canvas, 3 * wCommon, 0);
     395      BitBltBitmap(Offscreen, 0, 0, wCommon, hEnemyCityDefense, Back, 3 * wCommon, 0);
    400396      yView := 171;
    401397      yTotal := 231;
    402398    end;
    403399    dkEnemyCity: begin
    404       BitBltCanvas(Offscreen.Canvas, 0, 0, wCommon, hEnemyCity,
    405         Back.Canvas, 4 * wCommon, 0);
     400      BitBltBitmap(Offscreen, 0, 0, wCommon, hEnemyCity, Back, 4 * wCommon, 0);
    406401      yView := 171;
    407402      yTotal := 231;
     
    430425          yImp + ySizeSmall, MainTexture.ColorBevelLight,
    431426          MainTexture.ColorBevelShade);
    432         BitBltCanvas(Offscreen.Canvas, X, yImp, xSizeSmall, ySizeSmall,
    433           SmallImp.Canvas, J mod 7 * xSizeSmall,
     427        BitBltBitmap(Offscreen, X, yImp, xSizeSmall, ySizeSmall,
     428          SmallImp, J mod 7 * xSizeSmall,
    434429          (J + SystemIconLines * 7) div 7 * ySizeSmall);
    435430        Inc(X, xSizeSmall + 4);
     
    549544                    * (yyt * 3 + 1));
    550545              end;
    551           BitBltCanvas(Offscreen.Canvas, xView, yView + 16, 64, 32,
    552             Buffer.Canvas, 1, 0);
     546          BitBltBitmap(Offscreen, xView, yView + 16, 64, 32, Buffer, 1, 0);
    553547
    554548          // show unit, experience and health
  • trunk/LocalPlayer/Wonders.pas

    r506 r530  
    235235        WonderDestroyed: begin
    236236          HaveWonder := True;
    237           BitBltCanvas(Offscreen.Canvas,
     237          BitBltBitmap(Offscreen,
    238238            Center.X - xSizeBig div 2 + RingPosition[I].X,
    239239            Center.Y - ySizeBig div 2 + RingPosition[I].Y, xSizeBig,
    240             ySizeBig, BigImp.Canvas, 0, (SystemIconLines + 3) *
     240            ySizeBig, BigImp, 0, (SystemIconLines + 3) *
    241241            ySizeBig);
    242242        end;
    243243        else begin
    244244          HaveWonder := True;
    245           BitBltCanvas(Offscreen.Canvas,
     245          BitBltBitmap(Offscreen,
    246246            Center.X - xSizeBig div 2 + RingPosition[I].X,
    247247            Center.Y - ySizeBig div 2 + RingPosition[I].Y, xSizeBig, ySizeBig,
    248             BigImp.Canvas, (I mod 7) * xSizeBig,
     248            BigImp, (I mod 7) * xSizeBig,
    249249            (I div 7 + SystemIconLines) * ySizeBig);
    250250        end;
  • trunk/Packages/CevoComponents/EOTButton.pas

    r471 r530  
    2121    destructor Destroy; override;
    2222    procedure SetButtonIndexFast(X: Integer);
    23     procedure SetBack(ca: TCanvas; X, Y: Integer);
     23    procedure SetBack(Canvas: TCanvas; X, Y: Integer);
    2424  private
    2525    FTemplate: TBitmap;
     
    7777    if FGraphic <> nil then begin
    7878      UnshareBitmap(Buffer);
    79       BitBltCanvas(Buffer.Canvas, 0, 0, 48, 48, Back.Canvas, 0, 0);
     79      BitBltBitmap(Buffer, 0, 0, 48, 48, Back, 0, 0);
    8080      ImageOp_CBC(Buffer, Template, 0, 0, 133, 149 + 48 * Byte(FDown), 48, 48,
    8181        $000000, $FFFFFF);
     
    109109end;
    110110
    111 procedure TEOTButton.SetBack(ca: TCanvas; X, Y: Integer);
     111procedure TEOTButton.SetBack(Canvas: TCanvas; X, Y: Integer);
    112112begin
    113   BitBltCanvas(Back.Canvas, 0, 0, 48, 48, ca, X, Y);
     113  BitBltCanvas(Back.Canvas, 0, 0, 48, 48, Canvas, X, Y);
    114114end;
    115115
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r522 r530  
    569569procedure Dump(Dst: TBitmap; HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: Integer);
    570570begin
    571   BitBltCanvas(Dst.Canvas, xDst, yDst, Width, Height,
    572     HGr.Data.Canvas, xGr, yGr);
     571  BitBltBitmap(Dst, xDst, yDst, Width, Height, HGr.Data, xGr, yGr);
    573572end;
    574573
     
    11161115    end;
    11171116  end;
    1118   BitBltCanvas(HGrSystem.Mask.Canvas, CityMark2.Left, CityMark2.Top, CityMark1.Width, CityMark1.Width,
    1119     HGrSystem.Mask.Canvas, CityMark1.Left, CityMark1.Top);
     1117  BitBltBitmap(HGrSystem.Mask, CityMark2.Left, CityMark2.Top, CityMark1.Width,
     1118    CityMark1.Width, HGrSystem.Mask, CityMark1.Left, CityMark1.Top);
    11201119end;
    11211120
     
    12161215procedure Corner(Canvas: TCanvas; X, Y, Kind: Integer; T: TTexture);
    12171216begin
    1218   { BitBltCanvas(Canvas,x,y,8,8,T.HGr.Mask.Canvas,
    1219     T.xGr+29+Kind*9,T.yGr+89,SRCAND);
    1220     BitBltCanvas(Canvas,X,Y,8,8,T.HGr.Data.Canvas,
    1221     T.xGr+29+Kind*9,T.yGr+89,SRCPAINT); }
     1217  { BitBltCanvas(Canvas, x, y, 8, 8, T.HGr.Mask.Canvas,
     1218    T.xGr + 29 + Kind * 9, T.yGr + 89, SRCAND);
     1219    BitBltCanvas(Canvas, X, Y, 8, 8, T.HGr.Data.Canvas,
     1220    T.xGr + 29 + Kind * 9, T.yGr + 89, SRCPAINT); }
    12221221end;
    12231222
     
    14541453      for I := 0 to Val mod 10 - 1 do
    14551454      begin
    1456         BitBltCanvas(Dst.Canvas, xIcon + 4 + I * (14 * ld div sd), yIcon + 2 + 1, 14,
    1457           14, HGrSystem.Mask.Canvas, 67 + Kind mod 8 * 15,
     1455        BitBltBitmap(Dst, xIcon + 4 + I * (14 * ld div sd), yIcon + 2 + 1, 14,
     1456          14, HGrSystem.Mask, 67 + Kind mod 8 * 15,
    14581457          70 + Kind div 8 * 15, SRCAND);
    14591458        Sprite(Dst, HGrSystem, xIcon + 3 + I * (14 * ld div sd), yIcon + 2,
     
    14621461      for I := 0 to Val div 10 - 1 do
    14631462      begin
    1464         BitBltCanvas(Dst.Canvas, xIcon + 4 + (Val mod 10) *
     1463        BitBltBitmap(Dst, xIcon + 4 + (Val mod 10) *
    14651464          (14 * ld div sd) + I * (14 * ld div sd), yIcon + 3, 14, 14,
    1466           HGrSystem.Mask.Canvas, 67 + 7 mod 8 * 15,
     1465          HGrSystem.Mask, 67 + 7 mod 8 * 15,
    14671466          70 + 7 div 8 * 15, SRCAND);
    14681467        Sprite(Dst, HGrSystem, xIcon + 3 + (Val mod 10) *
     
    14871486      for I := 0 to Val div 10 - 1 do
    14881487      begin
    1489         BitBltCanvas(Dst.Canvas, xIcon + 4 + I * (14 * ld div sd), yIcon + 3, 14, 14,
    1490           HGrSystem.Mask.Canvas, 67 + Kind mod 8 * 15,
     1488        BitBltBitmap(Dst, xIcon + 4 + I * (14 * ld div sd), yIcon + 3, 14, 14,
     1489          HGrSystem.Mask, 67 + Kind mod 8 * 15,
    14911490          70 + Kind div 8 * 15, SRCAND);
    14921491        Sprite(Dst, HGrSystem, xIcon + 3 + I * (14 * ld div sd), yIcon + 2,
     
    14951494      for I := 0 to Val mod 10 - 1 do
    14961495      begin
    1497         BitBltCanvas(Dst.Canvas, xIcon + 4 + (Val div 10) *
     1496        BitBltBitmap(Dst, xIcon + 4 + (Val div 10) *
    14981497          (14 * ld div sd) + I * (10 * ld div sd), yIcon + 7, 10, 10,
    1499           HGrSystem.Mask.Canvas, 66 + Kind mod 11 * 11,
     1498          HGrSystem.Mask, 66 + Kind mod 11 * 11,
    15001499          115 + Kind div 11 * 11, SRCAND);
    15011500        Sprite(Dst, HGrSystem, xIcon + 3 + (Val div 10) *
Note: See TracChangeset for help on using the changeset viewer.