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

_construction_ Struct Reference

#include <construct.h>

List of all members.


Detailed Description

Construction shown during construction of a building.

#include "construct.h"

typedef struct _construction_ Construction;

Each building perhaps also units can have its own construction frames. This construction frames are currently not animated, this is planned for the future. What construction frames a building has, is handled by UnitType::Construction.

The construction structure members:

Construction::OType

Object type (future extensions).

Construction::Ident

Unique identifier of the construction, used to reference it in the config files and during startup. As convention they start with "construction-" fe. "construction-land".

Note:
Don't use this member in game, use instead the pointer to this structure. See ConstructionByIdent().
Construction::File[TilesetMax]

Path file name of sprite files for the different tilesets.

Note:
It is planned to change this to support more and better tilesets.
Construction::File[TilesetMax]

Path file name of shadow sprite file for the different tilesets.

Construction::Nr

Slot number of the construction, used for saving. This should be removed, if we use symbol identifiers.

Todo:
can now be removed
Construction::Width Construction::Height

Size of a sprite frame in pixels. All frames of a sprite have the same size. Also all sprites (tilesets) must have the same size.

Construction::ShadowWidth Construction::ShadowHeight

Size of a shadow sprite frame in pixels. All frames of a sprite have the same size. Also all sprites (tilesets) must have the same size.

Construction::Sprite

Sprite image.

Construction::ShadowSprite

Shadow sprite image.

Todo:
Need TilesetByName, ... Only fixed number of constructions supported, more than a single construction frame is not supported, animated constructions aren't supported.

Definition at line 116 of file construct.h.


Public Attributes

char * File [TilesetMax]
 construction identifier
int Height
 sprite width
char * Ident
 Object type (future extensions).
const void * OType
char * ShadowFile
 sprite file
int ShadowHeight
 shadow sprite width
GraphicShadowSprite
 construction sprite image
int ShadowWidth
 sprite height
GraphicSprite
 shadow sprite height
int Width
 shadow sprite file

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

Generated by  Doxygen 1.6.0   Back to index