--- a/hedgewars/uLand.pas Sun Nov 06 12:40:35 2011 -0500
+++ b/hedgewars/uLand.pas Sun Nov 06 13:00:25 2011 -0500
@@ -36,7 +36,7 @@
implementation
uses uConsole, uStore, uRandom, uLandObjects, uIO, uLandTexture, sysutils,
- uVariables, uUtils, uCommands, Adler32, uDebug, uLandPainted;
+ uVariables, uUtils, uCommands, Adler32, uDebug, uLandPainted, uTextures;
operator=(const a, b: direction) c: Boolean;
begin
@@ -302,6 +302,7 @@
// freed in freeModule() below
LandBackSurface:= LoadImage(UserPathz[ptCurrTheme] + '/LandBackTex', ifIgnoreCaps or ifTransparent);
if LandBackSurface = nil then LandBackSurface:= LoadImage(Pathz[ptCurrTheme] + '/LandBackTex', ifIgnoreCaps or ifTransparent);
+ if (LandBackSurface <> nil) and cGrayScale then Surface2GrayScale(LandBackSurface);
tmpsurf:= LoadImage(UserPathz[ptCurrTheme] + '/Border', ifIgnoreCaps or ifTransparent);
if tmpsurf = nil then tmpsurf:= LoadImage(Pathz[ptCurrTheme] + '/Border', ifCritical or ifIgnoreCaps or ifTransparent);
@@ -1180,7 +1181,8 @@
begin
// freed in freeModule() below
LandBackSurface:= LoadImage(UserPathz[ptCurrTheme] + '/LandBackTex', ifIgnoreCaps or ifTransparent);
- if LandBackSurface = nil then LandBackSurface:= LoadImage(Pathz[ptCurrTheme] + '/LandBackTex', ifIgnoreCaps or ifTransparent)
+ if LandBackSurface = nil then LandBackSurface:= LoadImage(Pathz[ptCurrTheme] + '/LandBackTex', ifIgnoreCaps or ifTransparent);
+ if (LandBackSurface <> nil) and cGrayScale then Surface2GrayScale(LandBackSurface)
end;
end;
if (tmpsurf <> nil) then