equal
deleted
inserted
replaced
55 SDL_FreeSurface(tmpsurf); |
55 SDL_FreeSurface(tmpsurf); |
56 |
56 |
57 // freed in freeModule() below |
57 // freed in freeModule() below |
58 LandBackSurface:= LoadImage(UserPathz[ptCurrTheme] + '/LandBackTex', ifIgnoreCaps or ifTransparent); |
58 LandBackSurface:= LoadImage(UserPathz[ptCurrTheme] + '/LandBackTex', ifIgnoreCaps or ifTransparent); |
59 if LandBackSurface = nil then LandBackSurface:= LoadImage(Pathz[ptCurrTheme] + '/LandBackTex', ifIgnoreCaps or ifTransparent); |
59 if LandBackSurface = nil then LandBackSurface:= LoadImage(Pathz[ptCurrTheme] + '/LandBackTex', ifIgnoreCaps or ifTransparent); |
60 if (LandBackSurface <> nil) and cGrayScale then Surface2GrayScale(LandBackSurface); |
60 if (LandBackSurface <> nil) and GrayScale then Surface2GrayScale(LandBackSurface); |
61 |
61 |
62 tmpsurf:= LoadImage(UserPathz[ptCurrTheme] + '/Border', ifIgnoreCaps or ifTransparent); |
62 tmpsurf:= LoadImage(UserPathz[ptCurrTheme] + '/Border', ifIgnoreCaps or ifTransparent); |
63 if tmpsurf = nil then tmpsurf:= LoadImage(Pathz[ptCurrTheme] + '/Border', ifCritical or ifIgnoreCaps or ifTransparent); |
63 if tmpsurf = nil then tmpsurf:= LoadImage(Pathz[ptCurrTheme] + '/Border', ifCritical or ifIgnoreCaps or ifTransparent); |
64 for x:= 0 to LAND_WIDTH - 1 do |
64 for x:= 0 to LAND_WIDTH - 1 do |
65 begin |
65 begin |
456 begin |
456 begin |
457 // freed in freeModule() below |
457 // freed in freeModule() below |
458 LandBackSurface:= LoadImage(UserPathz[ptCurrTheme] + '/LandBackTex', ifIgnoreCaps or ifTransparent); |
458 LandBackSurface:= LoadImage(UserPathz[ptCurrTheme] + '/LandBackTex', ifIgnoreCaps or ifTransparent); |
459 if LandBackSurface = nil then |
459 if LandBackSurface = nil then |
460 LandBackSurface:= LoadImage(Pathz[ptCurrTheme] + '/LandBackTex', ifIgnoreCaps or ifTransparent); |
460 LandBackSurface:= LoadImage(Pathz[ptCurrTheme] + '/LandBackTex', ifIgnoreCaps or ifTransparent); |
461 if (LandBackSurface <> nil) and cGrayScale then |
461 if (LandBackSurface <> nil) and GrayScale then |
462 Surface2GrayScale(LandBackSurface) |
462 Surface2GrayScale(LandBackSurface) |
463 end; |
463 end; |
464 end; |
464 end; |
465 if (tmpsurf <> nil) then |
465 if (tmpsurf <> nil) then |
466 SDL_FreeSurface(tmpsurf); |
466 SDL_FreeSurface(tmpsurf); |
645 else |
645 else |
646 AddProgress(); |
646 AddProgress(); |
647 |
647 |
648 FreeLandObjects; |
648 FreeLandObjects; |
649 |
649 |
650 if cGrayScale then |
650 if GrayScale then |
651 begin |
651 begin |
652 if (cReducedQuality and rqBlurryLand) = 0 then |
652 if (cReducedQuality and rqBlurryLand) = 0 then |
653 for x:= leftX to rightX do |
653 for x:= leftX to rightX do |
654 for y:= topY to LAND_HEIGHT-1 do |
654 for y:= topY to LAND_HEIGHT-1 do |
655 begin |
655 begin |