• Jeffrey Lee's avatar
    Add support for *iconspriting of alpha-masked sprites. Fix icon... · 03e27cbe
    Jeffrey Lee authored
    Add support for *iconspriting of alpha-masked sprites. Fix icon shading/inverting to work with true colour sprites.
    
    Detail:
      Options/s/!Default, s/NewSWIs, s/Wimp01:
    
      Updated ROM sprite find code, *IconSprites and Wimp_Extend 13 to understand a new spritefile suffix.
      If the Wimp detects that RISC OS Select style alpha masked sprites are supported, and we're not using the mode 23 sprites, then the code will enable support for alpha masked sprites of the form !SpritesA1, !SpritesA2, !SpritesA, etc. Alpha-masked sprites are only looked for when looking for square pixel sprites or just before looking for the default sprites. This means the full search pattern for (e.g.) a !Sprites21 mode would be as follows:
    
      !Sprites21  (original mode)
      !SpritesA2  (next squarer mode, alpha sprites)
      !Sprites22  (next squarer mode)
      !SpritesA   (default alpha sprites)
      !Sprites    (default sprites)
    
      Like with !Sprites11 support, this feature can be toggled off via the SpritesA option if necessary.
    
      s/Wimp01, s/Wimp04:
    
      Updated icon plotting code (wimp_SpriteOp_putsprite and calculateinverse) to allow true colour sprites/icons to be rendered shaded/inverted.
      For this to work the Wimp needs a version of SpriteExtend which supports colour mapping (specifically it checks for the relevant ROOL version number).
      The colour mapping function which is used to build the translation tables used for shading/inverting palettised sprites is too slow to be sensibly used on a per-pixel basis, so the first time a shaded/inverted true colour sprite is requested the Wimp will generate a set of lookup tables which can be used by a much simpler colour mapping routine.
      To keep memory usage down these lookup tables only use 4K colours each; however the quality isn't always that great and so this may need revising in future.
    
    Admin:
      Tested on BB-xM
    
    
    Version 5.34. Tagged as 'Wimp-5_34'
    03e27cbe
Wimp04 238 KB