hedgewars/uStore.pas
changeset 4787 e353f2211cea
parent 4782 603916ddf4b6
child 4809 9c7d5f802618
equal deleted inserted replaced
4747:095398eba689 4787:e353f2211cea
   272 
   272 
   273 AddProgress;
   273 AddProgress;
   274 for ii:= Low(TSprite) to High(TSprite) do
   274 for ii:= Low(TSprite) to High(TSprite) do
   275     with SpritesData[ii] do
   275     with SpritesData[ii] do
   276         // FIXME - add a sprite attribute
   276         // FIXME - add a sprite attribute
   277         if ((cReducedQuality and rqNoBackground) = 0) or (not (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR, sprFlake, sprSplash, sprDroplet])) then // FIXME: hack
   277         if ((cReducedQuality and rqNoBackground) = 0) or (not (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR, sprFlake, sprSplash, sprDroplet, sprSDSplash, sprSDDroplet]) or (((Theme = 'Snow') or (Theme = 'Christmas')) and ((ii = sprFlake) or (ii = sprSDFlake)))) then // FIXME: hack
   278         begin
   278         begin
   279             if AltPath = ptNone then
   279             if AltPath = ptNone then
   280                 if ii in [sprHorizontL, sprHorizontR, sprSkyL, sprSkyR] then // FIXME: hack
   280                 if ii in [sprHorizontL, sprHorizontR, sprSkyL, sprSkyR] then // FIXME: hack
   281                     tmpsurf:= LoadImage(Pathz[Path] + '/' + FileName, ifAlpha or ifTransparent)
   281                     tmpsurf:= LoadImage(Pathz[Path] + '/' + FileName, ifAlpha or ifTransparent)
   282                 else
   282                 else
   305                     Texture^.Scale:= 2
   305                     Texture^.Scale:= 2
   306                 end
   306                 end
   307                 else
   307                 else
   308                 begin
   308                 begin
   309                     Texture:= Surface2Tex(tmpsurf, false);
   309                     Texture:= Surface2Tex(tmpsurf, false);
   310                     if (ii = sprWater) and ((cReducedQuality and (rq2DWater or rqClampLess)) = 0) then // HACK: We should include some sprite attribute to define the texture wrap directions
   310                     if ((ii = sprWater) or (ii = sprSDWater)) and ((cReducedQuality and (rq2DWater or rqClampLess)) = 0) then // HACK: We should include some sprite attribute to define the texture wrap directions
   311                         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
   311                         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
   312                 end;
   312                 end;
   313                 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, priority);
   313                 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, priority);
   314                 if saveSurf then
   314                 if saveSurf then
   315                     Surface:= tmpsurf else SDL_FreeSurface(tmpsurf)
   315                     Surface:= tmpsurf else SDL_FreeSurface(tmpsurf)