_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

Public Member Functions | Public Attributes | List of all members
CConstruction Class Reference

Construction shown during construction of a building. More...

#include <construct.h>

Public Member Functions

 CConstruction ()
 
construct.cpp - The constructions.
 ~CConstruction ()
 
void Clean ()
 
void Load (bool force=false)
 

Public Attributes

std::string Ident
 
struct {
   std::string   File
 
   int   Width
 sprite file More...
 
   int   Height
 sprite width More...
 
File
 construction identifier More...
 
struct {
   std::string   File
 
   int   Width
 sprite file More...
 
   int   Height
 sprite width More...
 
ShadowFile
 
CConstructionFrameFrames
 
CPlayerColorGraphicSprite
 construction frames More...
 
CGraphicShadowSprite
 sprite height More...
 
int ShadowWidth
 construction shadow sprite image More...
 
int ShadowHeight
 shadow sprite width More...
 

Detailed Description

Construction shown during construction of a building.

#include "construct.h"

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:

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

CConstruction::File

Path file name of the sprite file.

CConstruction::ShadowFile

Path file name of shadow sprite file.

CConstruction::Frames

Frames of the construction sequence.

CConstruction::Sprite

Sprite image.

CConstruction::Width CConstruction::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.

CConstruction::ShadowSprite

Shadow sprite image.

CConstruction::ShadowWidth CConstruction::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.

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

Constructor & Destructor Documentation

◆ CConstruction()

CConstruction::CConstruction ( )
inline

◆ ~CConstruction()

CConstruction::~CConstruction ( )

Member Function Documentation

◆ Clean()

void CConstruction::Clean ( )

◆ Load()

void CConstruction::Load ( bool  force = false)

Member Data Documentation

◆ File [1/2]

std::string CConstruction::File

◆ File [2/2]

struct { ... } CConstruction::File

construction identifier

◆ Frames

CConstructionFrame* CConstruction::Frames

◆ Height

int CConstruction::Height

sprite width

◆ Ident

std::string CConstruction::Ident

◆ ShadowFile

struct { ... } CConstruction::ShadowFile

◆ ShadowHeight

int CConstruction::ShadowHeight

shadow sprite width

◆ ShadowSprite

CGraphic* CConstruction::ShadowSprite

sprite height

◆ ShadowWidth

int CConstruction::ShadowWidth

construction shadow sprite image

◆ Sprite

CPlayerColorGraphic* CConstruction::Sprite

construction frames

◆ Width

int CConstruction::Width

sprite file

construction sprite image


The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.