Ignore:
Timestamp:
Feb 24, 2024, 8:04:26 PM (9 months ago)
Author:
chronos
Message:
File:
1 edited

Legend:

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