hedgewars/uTextures.pas
changeset 12765 d01e9dd5c439
parent 11532 bf86c6cb9341
child 12843 8599a7d4df54
equal deleted inserted replaced
12764:272fcd3833d2 12765:d01e9dd5c439
   242     if SDLCheck(SDL_LockSurface(surf) >= 0, 'Lock surface', true) then
   242     if SDLCheck(SDL_LockSurface(surf) >= 0, 'Lock surface', true) then
   243         exit(nil);
   243         exit(nil);
   244 
   244 
   245 fromP4:= Surf^.pixels;
   245 fromP4:= Surf^.pixels;
   246 
   246 
       
   247 // FIXME move out of surface2tex
   247 if GrayScale then
   248 if GrayScale then
   248     Surface2GrayScale(Surf);
   249     Surface2GrayScale(Surf);
   249 
   250 
       
   251 // FIXME move out of surface2tex
   250 PrettifySurfaceAlpha(surf, fromP4);
   252 PrettifySurfaceAlpha(surf, fromP4);
   251 
   253 
   252 if (not SupportNPOTT) and (not (isPowerOf2(Surf^.w) and isPowerOf2(Surf^.h))) then
   254 if (not SupportNPOTT) and (not (isPowerOf2(Surf^.w) and isPowerOf2(Surf^.h))) then
   253     begin
   255     begin
   254     tw:= toPowerOf2(Surf^.w);
   256     tw:= toPowerOf2(Surf^.w);