Changeset 530 for trunk/LocalPlayer/IsoEngine.pas
- Timestamp:
- Feb 24, 2024, 8:04:26 PM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/IsoEngine.pas
r522 r530 83 83 xxt: Integer; // half of tile size x/y 84 84 yyt: Integer; // half of tile size x/y 85 T SpriteSize: TTerrainSpriteSize;85 TerrainSpriteSize: TTerrainSpriteSize; 86 86 HGrTerrain: TGraphicSet; 87 87 HGrCities: TGraphicSet; … … 98 98 procedure PaintCity(X, Y: Integer; const CityInfo: TCityInfo; 99 99 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, 101 101 Rop: Integer); 102 102 procedure AttackBegin(const ShowMove: TShowMove); … … 210 210 IsoMap.LandPatch := LandPatch; 211 211 IsoMap.OceanPatch := OceanPatch; 212 IsoMap.T SpriteSize := TSpriteSize;212 IsoMap.TerrainSpriteSize := TSpriteSize; 213 213 IsoMap.CitiesPictures := CitiesPictures; 214 214 end; … … 261 261 for xSrc := 0 to TerrainIconCols - 1 do begin 262 262 I := ySrc * 9 + xSrc; 263 T SpriteSize[I].Left := 0;263 TerrainSpriteSize[I].Left := 0; 264 264 repeat 265 265 Border := True; 266 266 for Y := 0 to yyt * 3 - 1 do begin 267 MaskLine[Y].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + T SpriteSize[I].Left));267 MaskLine[Y].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + TerrainSpriteSize[I].Left)); 268 268 if MaskLine[Y].PixelB = 0 then Border := False; 269 269 end; 270 if Border then Inc(T SpriteSize[I].Left);271 until not Border or (T SpriteSize[I].Left = xxt * 2 - 1);272 T SpriteSize[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; 273 273 repeat 274 274 Border := True; 275 275 for X := 0 to xxt * 2 - 1 do begin 276 MaskLine[T SpriteSize[I].Top].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + X));277 if MaskLine[T SpriteSize[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; 278 278 end; 279 if Border then Inc(T SpriteSize[I].Top);280 until not Border or (T SpriteSize[I].Top = yyt * 3 - 1);281 T SpriteSize[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; 282 282 repeat 283 283 Border := True; 284 284 for Y := 0 to yyt * 3 - 1 do begin 285 MaskLine[Y].SetX(ScaleToNative(xSrc * (xxt * 2 + 1) + T SpriteSize[I].Right));285 MaskLine[Y].SetX(ScaleToNative(xSrc * (xxt * 2 + 1) + TerrainSpriteSize[I].Right)); 286 286 if MaskLine[Y].PixelB = 0 then Border := False; 287 287 end; 288 if Border then Dec(T SpriteSize[I].Right);289 until not Border or (T SpriteSize[I].Right = TSpriteSize[I].Left);290 T SpriteSize[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; 291 291 repeat 292 292 Border := True; 293 293 for X := 0 to xxt * 2 - 1 do begin 294 MaskLine[T SpriteSize[I].Bottom - 1].SetX(ScaleToNative(1 + xSrc * (xxt * 2 + 1) + X));295 if MaskLine[T SpriteSize[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; 296 296 end; 297 if Border then Dec(T SpriteSize[I].Bottom);298 until not Border or (T SpriteSize[I].Bottom = TSpriteSize[I].Top);297 if Border then Dec(TerrainSpriteSize[I].Bottom); 298 until not Border or (TerrainSpriteSize[I].Bottom = TerrainSpriteSize[I].Top); 299 299 end; 300 300 end; … … 359 359 DitherMask.SetSize(xxt * 2, yyt * 2); 360 360 DitherMask.Canvas.FillRect(0, 0, DitherMask.Width, DitherMask.Height); 361 BitBlt Canvas(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), 363 363 1 + yyt + 15 * (yyt * 3 + 1), SRCAND); 364 364 … … 376 376 end; 377 377 for Y := -1 to 6 do 378 BitBlt Canvas(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); 380 380 for Y := -2 to 6 do 381 BitBlt Canvas(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, 383 383 SRCPAINT); 384 384 for Y := -2 to 6 do 385 BitBlt Canvas(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, 387 387 SRCPAINT); 388 388 for Y := -2 to 6 do 389 BitBlt Canvas(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); 391 391 for Y := -2 to 6 do 392 BitBlt Canvas(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); 394 394 end; 395 395 … … 407 407 end; 408 408 for X := -2 to 6 do 409 BitBlt Canvas(LandMore.Canvas, (X + 2) * (xxt * 2), (Y + 2) * yyt,410 xxt * 2, yyt, HGrTerrain.Data .Canvas, xSrc, ySrc);411 BitBlt Canvas(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); 413 413 for X := 0 to 7 do 414 BitBlt Canvas(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, 416 416 SRCPAINT); 417 417 for X := -2 to 6 do 418 BitBlt Canvas(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); 420 420 end; 421 421 … … 427 427 ySrc := 1 + yyt; 428 428 if (X >= 1) = (Y >= 2) then 429 BitBlt Canvas(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); 431 431 if (X >= 1) and ((Y < 2) or (X >= 2)) then 432 432 begin 433 BitBlt Canvas(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, 435 435 SRCPAINT); 436 BitBlt Canvas(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); 438 438 end; 439 BitBlt Canvas(OceanPatch.Canvas, X * (xxt * 2), Y * yyt, xxt, yyt,440 DitherMask .Canvas, xxt, yyt, SRCAND);441 BitBlt Canvas(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); 443 443 end; 444 444 end; … … 451 451 ySrc := 1 + yyt; 452 452 if (X < 1) or (Y >= 2) then 453 BitBlt Canvas(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); 455 455 if (X = 1) and (Y < 2) or (X >= 2) and (Y >= 1) then 456 456 begin 457 BitBlt Canvas(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, 459 459 SRCPAINT); 460 BitBlt Canvas(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); 462 462 end; 463 BitBlt Canvas(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); 465 465 end; 466 466 end; 467 467 468 BitBlt Canvas(DitherMask.Canvas, 0, 0, xxt * 2, yyt * 2,469 DitherMask .Canvas, 0, 0, DSTINVERT); { invert dither mask }470 BitBlt Canvas(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); 472 472 473 473 for X := -1 to 6 do 474 474 for Y := -2 to 6 do 475 BitBlt Canvas(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); 477 477 478 478 for Y := -1 to 6 do 479 479 for X := -2 to 7 do 480 BitBlt Canvas(LandMore.Canvas, (X + 2) * (xxt * 2) - xxt, (Y + 2) * yyt,481 xxt * 2, yyt, DitherMask .Canvas, 0, yyt, SRCAND);482 483 BitBlt Canvas(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); 485 485 486 486 for X := 0 to 3 do 487 487 for Y := 0 to 3 do 488 BitBlt Canvas(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); 490 490 491 491 for Y := 0 to 3 do 492 492 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); 498 497 499 498 with DitherMask.Canvas do begin … … 501 500 FillRect(Rect(0, 0, xxt * 2, yyt)); 502 501 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); 505 503 506 504 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); 511 508 512 509 for Y := 0 to 6 do 513 BitBlt Canvas(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); 515 512 516 513 FreeAndNil(LandMore); … … 595 592 end; 596 593 597 procedure TIsoMap.BitBltBitmap (Src: TBitmap; X, Y, Width, Height, xSrc, ySrc,594 procedure TIsoMap.BitBltBitmapOutput(Src: TBitmap; X, Y, Width, Height, xSrc, ySrc, 598 595 Rop: Integer); 599 596 begin … … 617 614 Exit; 618 615 619 BitBlt Canvas(FOutput.Canvas, X, Y, Width, Height, Src.Canvas, xSrc, ySrc, Rop);616 BitBltBitmap(FOutput, X, Y, Width, Height, Src, xSrc, ySrc, Rop); 620 617 end; 621 618 622 619 procedure TIsoMap.Sprite(HGr: TGraphicSet; xDst, yDst, Width, Height, xGr, yGr: Integer); 623 620 begin 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); 626 623 end; 627 624 … … 634 631 ySrc: Integer; 635 632 begin 636 Width := T SpriteSize[grix].Right - TSpriteSize[grix].Left;637 Height := T SpriteSize[grix].Bottom - TSpriteSize[grix].Top;638 xSrc := 1 + grix mod 9 * (xxt * 2 + 1) + T SpriteSize[grix].Left;639 ySrc := 1 + grix div 9 * (yyt * 3 + 1) + T SpriteSize[grix].Top;640 xDst := xDst + T SpriteSize[grix].Left;641 yDst := yDst - yyt + T SpriteSize[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; 642 639 if xDst < FLeft then begin 643 640 Width := Width - (FLeft - xDst); … … 707 704 xGr := 121 + J mod 7 * 9; 708 705 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, 710 707 yGr, SRCAND); 711 708 Sprite(HGrSystem, X + xsh + 2, Y + ysh + 8, 8, 8, xGr, yGr); … … 921 918 Exit; 922 919 923 BitBltBitmap (HGrTerrain.Data, X + xxt div 2, Y, xxt, yyt,920 BitBltBitmapOutput(HGrTerrain.Data, X + xxt div 2, Y, xxt, yyt, 924 921 1 + (Conn shr 6 + Conn and 1 shl 2) * (xxt * 2 + 1), 925 922 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, 927 924 1 + (Conn and 7) * (xxt * 2 + 1) + xxt, 928 925 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, 930 927 1 + (Conn shr 2 and 7) * (xxt * 2 + 1) + xxt, 931 928 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, 933 930 1 + (Conn shr 4 and 7) * (xxt * 2 + 1), 934 931 1 + yyt * 2 + (16 + Tile and fTerrain) * (yyt * 3 + 1), SRCPAINT); 935 932 Conn := Connection4(Loc, fTerrain, fUNKNOWN); { dither to black } 936 933 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) + 938 935 xxt, 1 + yyt + 15 * (yyt * 3 + 1), SRCAND); 939 936 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, 941 938 1 + 7 * (xxt * 2 + 1) + xxt, 1 + yyt * 2 + 15 * (yyt * 3 + 1), SRCAND); 942 939 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), 944 941 1 + yyt * 2 + 15 * (yyt * 3 + 1), SRCAND); 945 942 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), 947 944 1 + yyt + 15 * (yyt * 3 + 1), SRCAND); 948 945 end; … … 1108 1105 if BordersOK^ and (1 shl p1) = 0 then begin 1109 1106 UnshareBitmap(Borders); 1110 BitBlt Canvas(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, 1112 1109 1 + 8 * (xxt * 2 + 1), 1 + yyt + 16 * (yyt * 3 + 1)); 1113 1110 BitmapReplaceColor(Borders, 0, p1 * (yyt * 2), xxt * 2, yyt * 2, $636363, Tribe[p1].Color); … … 1126 1123 if p2 <> p1 then 1127 1124 begin 1128 BitBltBitmap (HGrTerrain.Mask, X + dx * xxt, Y + dy * yyt, xxt,1125 BitBltBitmapOutput(HGrTerrain.Mask, X + dx * xxt, Y + dy * yyt, xxt, 1129 1126 yyt, 1 + 8 * (xxt * 2 + 1) + dx * xxt, 1130 1127 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, 1132 1129 p1 * (yyt * 2) + dy * yyt, SRCPAINT); 1133 1130 end; … … 1576 1573 bix := 0; 1577 1574 end; 1578 BitBltBitmap (OceanPatch, X + dx * xxt, Y + dy * yyt, xxt, yyt,1575 BitBltBitmapOutput(OceanPatch, X + dx * xxt, Y + dy * yyt, xxt, yyt, 1579 1576 Aix * (xxt * 2) + (dx + dy + 1) and 1 * xxt, bix * yyt, SRCCOPY) 1580 1577 end … … 1624 1621 bix := Aix; 1625 1622 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, 1627 1624 yyt, 1 + 6 * (xxt * 2 + 1) + (dx + dy + 1) and 1 * xxt, 1 + yyt, 1628 1625 SRCCOPY) // arctic <-> ocean 1629 1626 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, 1631 1628 yyt, 1 + 6 * (xxt * 2 + 1) + xxt - (dx + dy + 1) and 1 * xxt, 1632 1629 1 + yyt * 2, SRCCOPY) // arctic <-> ocean 1633 1630 else 1634 BitBltBitmap (LandPatch, X + dx * xxt, Y + dy * yyt, xxt, yyt,1631 BitBltBitmapOutput(LandPatch, X + dx * xxt, Y + dy * yyt, xxt, yyt, 1635 1632 Aix * (xxt * 2) + (dx + dy + 1) and 1 * xxt, bix * yyt, SRCCOPY) 1636 1633 end;
Note:
See TracChangeset
for help on using the changeset viewer.