diff --git a/applications/fpchess/chessdrawer.pas b/applications/fpchess/chessdrawer.pas
index 9e168f609..4da457dd2 100644
--- a/applications/fpchess/chessdrawer.pas
+++ b/applications/fpchess/chessdrawer.pas
@@ -137,9 +137,10 @@ procedure TChessDrawer.DrawImageWithTransparentColor(ADest: TLazIntfImage;
const ADestX, ADestY: Integer; AColor: TFPColor; AImage: TFPImageBitmap);
var
x, y, CurX, CurY: Integer;
- CurColor: TFPColor;
IntfImage: TLazIntfImage;
lDrawWidth, lDrawHeight: Integer;
+ CurColor: TFPColor;
+ lCurColorDiv, lTranspColorDiv: Byte;
begin
IntfImage := TLazIntfImage.Create(0,0);
try
@@ -158,8 +159,10 @@ begin
// Never draw outside the destination
if (CurX < 0) or (CurY < 0) then Continue;
- // CurColor := IntfImage.Colors[x, y]; // Just for debugging
- if IntfImage.Colors[x, y].Green <> AColor.Green then
+ CurColor := IntfImage.Colors[x, y]; // Good for debugging
+ lCurColorDiv := CurColor.Green div $FF;
+ lTranspColorDiv := AColor.Green div $FF;
+ if lCurColorDiv <> lTranspColorDiv then
ADest.Colors[CurX, CurY] := IntfImage.Colors[x, y];
end;
end;
diff --git a/applications/fpchess/chessgame.pas b/applications/fpchess/chessgame.pas
index 03eed0fa6..841ce54a2 100644
--- a/applications/fpchess/chessgame.pas
+++ b/applications/fpchess/chessgame.pas
@@ -20,7 +20,7 @@ const
INT_CHESSTILE_SIZE = 40;
INT_CHESSBOARD_SIZE = 40 * 8;
- FPCOLOR_TRANSPARENT_TILE: TFPColor = (Red: $0000; Green: $8000; Blue: $8000; Alpha: alphaOpaque); //colTeal
+ FPCOLOR_TRANSPARENT_TILE: TFPColor = (Red: $0000; Green: $8100; Blue: $8100; Alpha: alphaOpaque); //+/-colTeal
type
diff --git a/applications/fpchess/fpchess.lpi b/applications/fpchess/fpchess.lpi
index fd5a64be4..cf3c18874 100644
--- a/applications/fpchess/fpchess.lpi
+++ b/applications/fpchess/fpchess.lpi
@@ -31,7 +31,7 @@
-
+
@@ -161,11 +161,10 @@
-
-
-
+
+
@@ -220,10 +219,11 @@
+
-
-
+
+
@@ -241,32 +241,26 @@
-
-
-
-
-
-
@@ -283,8 +277,18 @@
+
+
+
+
+
+
+
+
+
+
-
+
@@ -334,77 +338,61 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-