# HG changeset patch # User nemo # Date 1493140427 14400 # Node ID 69a37922353bb94985d4690327d4dad289f17922 # Parent 7c04b4c4ffc2983212a0fe2fd58e37cf7caf52ab turn hwp Ammos overrides into overlays. untested. diff -r 7c04b4c4ffc2 -r 69a37922353b hedgewars/uStore.pas --- a/hedgewars/uStore.pas Tue Apr 25 17:51:03 2017 +0200 +++ b/hedgewars/uStore.pas Tue Apr 25 13:13:47 2017 -0400 @@ -374,7 +374,7 @@ ii: TSprite; fi: THWFont; ai: TAmmoType; - tmpsurf: PSDL_Surface; + tmpsurf, tmpoverlay: PSDL_Surface; i, imflags: LongInt; begin AddFileLog('StoreLoad()'); @@ -445,6 +445,15 @@ Width:= tmpsurf^.w; Height:= tmpsurf^.h end; + if (ii in [sprAMAmmos, sprAMAmmosBW]) then + begin + tmpoverlay := LoadDataImage(Path, copy(FileName, 1, length(FileName)-5), (imflags and not ifCritical)); + if tmpoverlay <> nil then + begin + copyToXY(tmpoverlay, tmpsurf, 0, 0); + SDL_FreeSurface(tmpoverlay) + end + end; if (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR]) then begin Texture:= Surface2Tex(tmpsurf, true); diff -r 7c04b4c4ffc2 -r 69a37922353b hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Tue Apr 25 17:51:03 2017 +0200 +++ b/hedgewars/uVariables.pas Tue Apr 25 13:13:47 2017 -0400 @@ -404,9 +404,9 @@ Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: true; getImageDimensions: true),// sprSkyR (FileName: 'Slot'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAMSlot - (FileName: 'Ammos'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; + (FileName: 'Ammos_base'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAMAmmos - (FileName: 'Ammos_bw'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; + (FileName: 'Ammos_bw_base'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprAMAmmosBW (FileName: 'SlotKeys'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAMSlotKeys diff -r 7c04b4c4ffc2 -r 69a37922353b share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png has changed diff -r 7c04b4c4ffc2 -r 69a37922353b share/hedgewars/Data/Graphics/AmmoMenu/Ammos_base.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos_base.png has changed diff -r 7c04b4c4ffc2 -r 69a37922353b share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png has changed diff -r 7c04b4c4ffc2 -r 69a37922353b share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw_base.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw_base.png has changed