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, sprSDSplash, sprSDDroplet]) or (((Theme = 'Snow') or (Theme = 'Christmas')) and ((ii = sprFlake) or (ii = sprSDFlake)))) then // FIXME: hack |
277 if ((cReducedQuality and rqNoBackground) = 0) or // FIXME: should check for both rqNoBackground and rqKillFlakes |
|
278 (not (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR, sprFlake, sprSplash, sprDroplet, sprSDSplash, sprSDDroplet]) or |
|
279 (((Theme = 'Snow') or (Theme = 'Christmas')) and ((ii = sprFlake) or (ii = sprSDFlake)))) then // FIXME: hack; also should checked against rqLowRes |
278 begin |
280 begin |
279 if AltPath = ptNone then |
281 if AltPath = ptNone then |
280 if ii in [sprHorizontL, sprHorizontR, sprSkyL, sprSkyR] then // FIXME: hack |
282 if ii in [sprHorizontL, sprHorizontR, sprSkyL, sprSkyR] then // FIXME: hack |
281 tmpsurf:= LoadImage(Pathz[Path] + '/' + FileName, ifAlpha or ifTransparent) |
283 tmpsurf:= LoadImage(Pathz[Path] + '/' + FileName, ifAlpha or ifTransparent) |
282 else |
284 else |
305 Texture^.Scale:= 2 |
307 Texture^.Scale:= 2 |
306 end |
308 end |
307 else |
309 else |
308 begin |
310 begin |
309 Texture:= Surface2Tex(tmpsurf, false); |
311 Texture:= Surface2Tex(tmpsurf, false); |
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 |
312 // HACK: We should include some sprite attribute to define the texture wrap directions |
|
313 if ((ii = sprWater) or (ii = sprSDWater)) and ((cReducedQuality and (rq2DWater or rqClampLess)) = 0) then |
311 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); |
314 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); |
312 end; |
315 end; |
313 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, priority); |
316 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, priority); |
314 if saveSurf then |
317 if saveSurf then |
315 Surface:= tmpsurf else SDL_FreeSurface(tmpsurf) |
318 Surface:= tmpsurf else SDL_FreeSurface(tmpsurf) |