Logo Search packages:      
Sourcecode: freecraft version File versions  Download package

_icon_ Struct Reference

#include <icons.h>

List of all members.

Detailed Description

Icon: rectangle image used in menus.

#include "icons.h"

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().

See also:

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.

Definition at line 165 of file icons.h.

Public Attributes

 Tileset identifier.
unsigned Height
 Icon width.
char * Ident
unsigned Index
 File containing the data.
 Icon height.
char * Tileset
 Icon identifier.
unsigned Width
 Index into file.

The documentation for this struct was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index