Experiment in eliminating transparent white from LandPixels - I think it messes up on some graphics cards. Noticed a curious white border on a girder in a theme Randy is working on. At the very least it is slightly more efficient in the blit.
--- a/hedgewars/uLandObjects.pas Tue Dec 20 16:13:17 2011 -0500
+++ b/hedgewars/uLandObjects.pas Tue Dec 27 14:14:26 2011 -0500
@@ -85,24 +85,24 @@
for y:= 0 to Pred(Image^.h) do
begin
for x:= 0 to Pred(Width) do
- begin
+ if (p^[x] and AMask) <> 0 then
+ begin
if (cReducedQuality and rqBlurryLand) = 0 then
- begin
+ begin
if (LandPixels[cpY + y, cpX + x] = 0) or
(((p^[x] and AMask) <> 0) and (((LandPixels[cpY + y, cpX + x] and AMask) shr AShift) < 255)) then
LandPixels[cpY + y, cpX + x]:= p^[x];
- end
+ end
else
if LandPixels[(cpY + y) div 2, (cpX + x) div 2] = 0 then
LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= p^[x];
-
- if ((Land[cpY + y, cpX + x] and $FF00) = 0) and ((p^[x] and AMask) <> 0) then
- begin
- Land[cpY + y, cpX + x]:= lfObject;
- Land[cpY + y, cpX + x]:= Land[cpY + y, cpX + x] or extraFlags
+ if ((Land[cpY + y, cpX + x] and $FF00) = 0) and ((p^[x] and AMask) <> 0) then
+ begin
+ Land[cpY + y, cpX + x]:= lfObject;
+ Land[cpY + y, cpX + x]:= Land[cpY + y, cpX + x] or extraFlags
+ end;
end;
- end;
p:= @(p^[Image^.pitch shr 2])
end;