Allow theme-customizable water and girder
authorunc0rr
Fri, 08 Aug 2008 20:38:26 +0000
changeset 1184 852f8872da1a
parent 1183 540cea859395
child 1185 a17732fbaf35
Allow theme-customizable water and girder
hedgewars/uConsts.pas
hedgewars/uLandObjects.pas
--- a/hedgewars/uConsts.pas	Fri Aug 08 20:33:57 2008 +0000
+++ b/hedgewars/uConsts.pas	Fri Aug 08 20:38:26 2008 +0000
@@ -275,7 +275,7 @@
                      Width, Height: LongInt;
                      saveSurf: boolean;
                      end = (
-                     (FileName:  'BlueWater'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+                     (FileName:  'BlueWater'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
                       Width: 256; Height: 32; saveSurf: false),// sprWater
                      (FileName:     'Clouds'; Path: ptCurrTheme;AltPath: ptGraphics; Texture: nil; Surface: nil;
                       Width: 256; Height:128; saveSurf: false),// sprCloud
--- a/hedgewars/uLandObjects.pas	Fri Aug 08 20:33:57 2008 +0000
+++ b/hedgewars/uLandObjects.pas	Fri Aug 08 20:38:26 2008 +0000
@@ -182,7 +182,9 @@
 if x1 > 0 then
 	begin
 	Result:= true;
-	tmpsurf:= LoadImage(Pathz[ptGraphics] + '/Girder', false, true, true);
+	tmpsurf:= LoadImage(Pathz[ptCurrTheme] + '/Girder', false, false, true);
+	if tmpsurf = nil then LoadImage(Pathz[ptGraphics] + '/Girder', false, true, true);
+	
 	rr.x:= x1;
 	while rr.x < x2 do
 		begin