hedgewars/uStore.pas
changeset 12595 0d4a6ea7f071
parent 12592 00b539e6115d
child 12596 c9711561f947
--- a/hedgewars/uStore.pas	Fri Sep 29 21:44:35 2017 +0200
+++ b/hedgewars/uStore.pas	Fri Sep 29 22:39:31 2017 +0200
@@ -152,7 +152,7 @@
 
     texsurf:= SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 32, RMask, GMask, BMask, AMask);
     if not checkFails(texsurf <> nil, errmsgCreateSurface, true) then
-        checkFails(SDL_SetColorKey(texsurf, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true);
+        checkFails(SDL_SetColorKey(texsurf, SDL_TRUE, 0) = 0, errmsgTransparentSet, true);
 
     if not allOK then exit(nil);
 
@@ -201,7 +201,7 @@
         r.h:= 32;
         texsurf:= SDL_CreateRGBSurface(SDL_SWSURFACE, r.w, r.h, 32, RMask, GMask, BMask, AMask);
         if not checkFails(texsurf <> nil, errmsgCreateSurface, true) then
-            checkFails(SDL_SetColorKey(texsurf, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true);
+            checkFails(SDL_SetColorKey(texsurf, SDL_TRUE, 0) = 0, errmsgTransparentSet, true);
         if not allOK then exit;
 
         r.w:= 26;
@@ -344,7 +344,7 @@
             begin
             if GraveName = '' then
                 GraveName:= 'Statue';
-            texsurf:= LoadDataImageAltFile(ptGraves, GraveName, 'Statue', ifCritical or ifTransparent);
+            texsurf:= LoadDataImageAltFile(ptGraves, GraveName, 'Statue', ifCritical or ifColorKey);
             GraveTex:= Surface2Tex(texsurf, false);
             SDL_FreeSurface(texsurf)
             end
@@ -412,7 +412,7 @@
                 tmpsurf:= Surface
             else
                 begin
-                imflags := (ifAlpha or ifTransparent);
+                imflags := (ifAlpha or ifColorKey);
 
                 // these sprites are optional
                 if not (ii in [sprHorizont, sprHorizontL, sprHorizontR, sprSky, sprSkyL, sprSkyR, sprChunk, sprFlakeL, sprSDFlakeL, sprCloudL, sprSDCloudL]) then // FIXME: hack
@@ -491,7 +491,7 @@
     if not reload then
         AddProgress;
 
-    tmpsurf:= LoadDataImage(ptGraphics, cHHFileName, ifAlpha or ifCritical or ifTransparent);
+    tmpsurf:= LoadDataImage(ptGraphics, cHHFileName, ifAlpha or ifCritical or ifColorKey);
 
     HHTexture:= Surface2Tex(tmpsurf, false);
     SDL_FreeSurface(tmpsurf);
@@ -663,8 +663,8 @@
 
     tmpsurf:= doSurfaceConversion(tmpsurf);
 
-    if (imageFlags and ifTransparent) <> 0 then
-        if checkFails(SDL_SetColorKey(tmpsurf, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true) then exit;
+    if (imageFlags and ifColorKey) <> 0 then
+        if checkFails(SDL_SetColorKey(tmpsurf, SDL_TRUE, 0) = 0, errmsgTransparentSet, true) then exit;
 
     WriteLnToConsole(msgOK + ' (' + inttostr(tmpsurf^.w) + 'x' + inttostr(tmpsurf^.h) + ')');
 
@@ -799,7 +799,7 @@
     if Step = 0 then
     begin
         WriteToConsole(msgLoading + 'progress sprite: ');
-        texsurf:= LoadDataImage(ptGraphics, 'Progress', ifCritical or ifTransparent);
+        texsurf:= LoadDataImage(ptGraphics, 'Progress', ifCritical or ifColorKey);
 
         ProgrTex:= Surface2Tex(texsurf, false);