typedef struct _icon_ Icon;
This structure contains all informations about an icon. Currently only rectangular static icons of 46x38 pixels are supported. In the future it is planned to support animated and not rectangular icons and icons of different sizes.
The icon structure members:
Unique identifier of the icon, used to reference it in config files and during startup. Don't use this in game, use instead the pointer to this structure.
Unique identifier of the tileset, used to allow different graphics for the same icons depending on the tileset. Resolved during startup in InitIcons().
Pointer to icon file (file containing the graphics), each icon could have an own icon file or some up to all icons could share the same icon file.
Index into the icon file. You know one up to all icons could be in the same file. This index distinguishes them.
X pixel index into the graphic image. (Icon::Index5)*IconWidth.
Y pixel index into the graphic image. (Icon::Index/5)*IconHeight.
Icon width in pixels.
Icon height in pixels.
Graphic image containing the loaded graphics. Loaded by LoadIcons(). All icons belonging to the same icon file shares this structure.
|Tileset identifier. |
|Icon width. |
|File containing the data. |
|Icon height. |
|Icon identifier. |
|Index into file. |