Step 5: Finally... we have theme objects with alpha-channel!
authorunc0rr
Fri, 08 Aug 2008 20:54:55 +0000
changeset 1186 bf5af791d234
parent 1185 a17732fbaf35
child 1187 06d5112e9685
Step 5: Finally... we have theme objects with alpha-channel! Only nature theme converted yet, others in the next commit
hedgewars/uLandObjects.pas
share/hedgewars/Data/Themes/nature/plant1.png
share/hedgewars/Data/Themes/nature/plant2.png
share/hedgewars/Data/Themes/nature/plant3.png
share/hedgewars/Data/Themes/nature/plant4.png
--- a/hedgewars/uLandObjects.pas	Fri Aug 08 20:45:13 2008 +0000
+++ b/hedgewars/uLandObjects.pas	Fri Aug 08 20:54:55 2008 +0000
@@ -410,7 +410,7 @@
 TryDo(IOResult = 0, 'Bad data or cannot access file ' + cThemeCFGFilename, true)
 end;
 
-procedure AddThemeObjects(Surface: PSDL_Surface; var ThemeObjects: TThemeObjects; MaxCount: LongInt);
+procedure AddThemeObjects(var ThemeObjects: TThemeObjects; MaxCount: LongInt);
 var i, ii, t: LongInt;
     b: boolean;
 begin
@@ -459,11 +459,11 @@
 AddGirder(1280);
 AddGirder(1536);
 AddGirder(1792);
-{AddThemeObjects(Surface, ThemeObjects, 8);
+AddThemeObjects(ThemeObjects, 8);
 AddProgress;
-SDL_UpperBlit(InSurface, nil, Surface, nil);
-AddSprayObjects(Surface, SprayObjects, 10);
-FreeRects}
+{SDL_UpperBlit(InSurface, nil, Surface, nil);
+AddSprayObjects(Surface, SprayObjects, 10);}
+FreeRects
 end;
 
 procedure LoadThemeConfig;
Binary file share/hedgewars/Data/Themes/nature/plant1.png has changed
Binary file share/hedgewars/Data/Themes/nature/plant2.png has changed
Binary file share/hedgewars/Data/Themes/nature/plant3.png has changed
Binary file share/hedgewars/Data/Themes/nature/plant4.png has changed