Bug #2282

Company Colour recolouring.

Added by Lakie over 9 years ago. Updated over 9 years ago.

Status:ClosedStart date:2011-02-08
Priority:LowDue date:
Assignee:-% Done:

100%

Category:-
Target version:-

Description

I'm unsure if this is a bug in my code, but to my understanding in house/industry/object spritelayouts, shouldn't adding 'recolour : 0;' cause recolouring to company colours?

Currently the NFO output would imply that it doesn't output the recolouring marker (bit 15) on the output sprite. Using the following spritelayout for my basic object (NML) which exhibits the issue.

spritelayout obj_basic_tile
{
    ground
    {
        ttdsprite : 1420;
    }
    building
    {
        ttdsprite : 2632;
        recolour  : 0;
        xextent   : 16;
        yextent   : 16;
        zextent   : 30;
    }
}

Associated revisions

Revision 1184:f2fae042d3c8
Added by Hirundo over 9 years ago

Feature #2282: Introduce a new layout sprite property 'recolour_mode' to determine the type of colour remapping to use.

Revision 1184:f2fae042d3c8
Added by Hirundo over 9 years ago

Feature #2282: Introduce a new layout sprite property 'recolour_mode' to determine the type of colour remapping to use.

History

#1 Updated by Hirundo over 9 years ago

Suggested change:

Add a new property 'recolour_mode'. Usage:
recolour_mode: RECOLOUR_XXX; // XXX = NONE | TRANSPARENT | REMAP

'recolour' is renamed to 'recolour_sprite' to make its meaning more clear. Setting this property is forbidden when recolour_mode is set to RECOLOUR_NONE and obligatory otherwise. Its value is the recolour sprite numbers to use. Two special values are available:

RECOLOUR_SPRITE_ITEM_COLOUR = 0 => recolour to item (company) colour
RECOLOUR_SPRITE_TRANSPARENT = 802 => make all colours slightly darker (like station roof)

Thoughts?

#2 Updated by yexo over 9 years ago

Is the current approach not enough? We could just make the default value -2 (and print 0 without the recolour flag). However I'm not sure how TRANSPARENT sprites are handled, so that might not work for that.

#3 Updated by Hirundo over 9 years ago

The issue is that drawing transparent sprites (bit 14 set) requires a recolour sprite. Often this is sprite 802 (NML doesn't do this currently, IMO a bug), but the user may specify his own sprite. An example of this is the glass station roof in MB's newstations.

So, a single flag 'TRANSPARENT' doesn't cut it.

#4 Updated by yexo over 9 years ago

Ok, than your solution is the way to go.

#5 Updated by yexo over 9 years ago

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

Also available in: Atom PDF