Table of Contents

calc_AM_GetIDfromColour

This function has been removed from the core API, and is now available via the 'calc.AM.GetIDfromColour' zeofunc.

Description

Get the 16-bit ID of a land type in the attributes map, as represented by an AttributesPixel structure, that corresponds to a given display colour.

Function prototype

AttributesPixel CExtAPI::calc_AM_GetIDfromColour(COLORREF col);

Arguments

Name Type Comment
col COLORREF A Windows COLORREF structure containing the (supposed) display colour of a land type, the ID of which is to be determined.

Return value

Zero if the given colour does not match the display colour of a known land type, and non-zero otherwise.

Comments

This function is used when loading the attributes map from a colour-mapped image file.