hedgewars/uStore.pas
changeset 16001 cee831693af1
parent 15775 72f735c03fec
child 16004 2146cb7be36f
equal deleted inserted replaced
16000:a803428704fd 16001:cee831693af1
   472                         Width:= tmpsurf^.w;
   472                         Width:= tmpsurf^.w;
   473                         Height:= tmpsurf^.h
   473                         Height:= tmpsurf^.h
   474                         end;
   474                         end;
   475                 if (ii in [sprAMAmmos, sprAMAmmosBW]) then
   475                 if (ii in [sprAMAmmos, sprAMAmmosBW]) then
   476                     begin
   476                     begin
       
   477                     // Optionally add ammos overlay from HWP file
   477                     tmpoverlay := LoadDataImage(Path, copy(FileName, 1, length(FileName)-5), (imflags and (not ifCritical)));
   478                     tmpoverlay := LoadDataImage(Path, copy(FileName, 1, length(FileName)-5), (imflags and (not ifCritical)));
   478                     if tmpoverlay <> nil then
   479                     if tmpoverlay <> nil then
   479                         begin
   480                         begin
   480                         copyToXY(tmpoverlay, tmpsurf, 0, 0);
   481                         copyToXY(tmpoverlay, tmpsurf, 0, 0);
   481                         SDL_FreeSurface(tmpoverlay)
   482                         SDL_FreeSurface(tmpoverlay)
   482                         end
   483                         end;
       
   484 
       
   485                     // Replace ExtraDamage icon with a variant showing "1,5" instead of "1.5"
       
   486                     // if the current locale uses a comma as a decimal separator.
       
   487                     if lDecimalSeparator = ',' then
       
   488                         begin
       
   489                         if ii = sprAMAmmos then
       
   490                             tmpoverlay:= LoadDataImage(ptAmmoMenu, 'Ammos_ExtraDamage_comma', ifNone)
       
   491                         else
       
   492                             tmpoverlay:= LoadDataImage(ptAmmoMenu, 'Ammos_bw_ExtraDamage_comma', ifNone);
       
   493                         if tmpoverlay <> nil then
       
   494                             begin
       
   495                             copyToXY(tmpoverlay, tmpsurf,
       
   496                                GetSurfaceFrameCoordinateX(tmpsurf, ord(amExtraDamage)-1, SpritesData[ii].Width, SpritesData[ii].Height),
       
   497                                GetSurfaceFrameCoordinateY(tmpsurf, ord(amExtraDamage)-1, SpritesData[ii].Height));
       
   498                             SDL_FreeSurface(tmpoverlay);
       
   499                             end;
       
   500                         end;
   483                     end;
   501                     end;
   484                 if (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR]) then
   502                 if (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR]) then
   485                     begin
   503                     begin
   486                     Texture:= Surface2Tex(tmpsurf, true);
   504                     Texture:= Surface2Tex(tmpsurf, true);
   487                     Texture^.Scale:= 2
   505                     Texture^.Scale:= 2