equal
deleted
inserted
replaced
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); |