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:

Icon::Ident

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.

Icon::Tileset

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:
Tileset::Ident
Icon::File

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.

Icon::Index

Index into the icon file. You know one up to all icons could be in the same file. This index distinguishes them.

Icon::X

X pixel index into the graphic image. (Icon::Index5)*IconWidth.

Icon::Y

Y pixel index into the graphic image. (Icon::Index/5)*IconHeight.

Icon::Width

Icon width in pixels.

Icon::Height

Icon height in pixels.

Icon::Graphic

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

IconFileFile
 Tileset identifier.
unsigned Height
 Icon width.
char * Ident
unsigned Index
 File containing the data.
GraphicSprite
 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