• Robert Sprowson's avatar
    Insert default palette when translucent merging into <= 256 colours · 6642be39
    Robert Sprowson authored
    Detail:
      This locally replicates what ColourTrans 1.96 did, without the side effects
      which that caused. When stamping/tinting with a translucent shade of a sprite
      into a <= 256 colour target which has no palette, temporarily add one.
      As memory moving an entire sprite file is expensive, instead
      1. clone the sprite header on the stack
      2. append a palette
      3. fix up the pointers to point at the original sprite/mask data
      4. do the paint operation
      5. adjust the pointers back to the original (unpaletted) sprite header
      Also remove the test of ColourTrans 1.96 since this is no longer needed.
    6642be39