Feature #1085

action color / pure white detection

Added by Hirundo almost 7 years ago. Updated over 2 years ago.

Status:ClosedStart date:2010-07-08
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:-
Target version:-

Description

We should, in some way, warn the user about action colours and pure white (0xFFFFFF) when encoding sprites.

Upon encountering such a colour, one of the following actions could be taken
- Remap these colours to 'safe' alternatives.
- Raise an error
- Raise a warning
- Do nothing

This probably needs a parameter or something.

How does grfcodec handle this?

Associated revisions

Revision 663:87de94978f00
Added by Rubidium over 6 years ago

Feature: pure white detection (#1085)

Revision 663:87de94978f00
Added by Rubidium over 6 years ago

Feature: pure white detection (#1085)

Revision 2251:28c72ea7f8b6
Added by frosch over 2 years ago

Feature #1085: Warn about usage of animation and semi-transparent colours, and add spriteset flags to enable/disable the checks.

History

#1 Updated by Ammler over 6 years ago

grfcodec simply does "error"-output the amount of pure white pixels in relation to the total size of the sprite.

"autoremap" can at max be an option

#2 Updated by planetmaker over 6 years ago

An error should only be rised when the palette is wrong or the gfx is not usable / readable for some reason.

Pure white pixels might be worth a warning, as I don't know a case where they're desired (except in newspaper?). All other colours, including action colours, should not even raise a warning by default as they're perfectly legal colours.

It might be a useful thing to have the possibility to enable an action-colour warning.

Automatic re-mapping is imho out-of-question, except if NML caters for that by extending the syntax concerning inclusion of real sprites which allows the user to set flags like 'no action', 'no CC'.

#3 Updated by Ammler over 6 years ago

There are still 3 bits free from http://wiki.ttdpatch.net/tiki-index.php?page=RealSprites#compression, maybe those could be used to define, "noaction" and "nocompany" for autoremap?

#4 Updated by frosch over 2 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

Also available in: Atom PDF