hedgewars/uStore.pas
changeset 3558 86a4437e614b
parent 3537 8f5b3108f29c
child 3594 aeca3d8f1b29
equal deleted inserted replaced
3556:4bdc59101ce5 3558:86a4437e614b
   404                     tmpsurf:= LoadImage(Pathz[AltPath] + '/' + FileName, ifAlpha or ifCritical or ifTransparent);
   404                     tmpsurf:= LoadImage(Pathz[AltPath] + '/' + FileName, ifAlpha or ifCritical or ifTransparent);
   405                 end;
   405                 end;
   406 
   406 
   407             if tmpsurf <> nil then
   407             if tmpsurf <> nil then
   408             begin
   408             begin
   409                 if imageWidth = 0 then imageWidth:= tmpsurf^.w;
   409                 if getImageDimensions then
   410                 if imageHeight = 0 then imageHeight:= tmpsurf^.h;
   410                     begin
   411                 if Width = 0 then Width:= tmpsurf^.w;
   411                     imageWidth:= tmpsurf^.w;
   412                 if Height = 0 then Height:= tmpsurf^.h;
   412                     imageHeight:= tmpsurf^.h
       
   413                     end;
       
   414                 if getDimensions then
       
   415                     begin
       
   416                     Width:= tmpsurf^.w;
       
   417                     Height:= tmpsurf^.h
       
   418                     end;
   413                 if (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR]) then
   419                 if (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR]) then
   414                     begin
   420                     begin
   415                     Texture:= Surface2Tex(tmpsurf, true);
   421                     Texture:= Surface2Tex(tmpsurf, true);
   416                     Texture^.Scale:= 2
   422                     Texture^.Scale:= 2
   417                     end
   423                     end