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

CConstruction Class Reference

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

#include <construct.h>

List of all members.


Public Member Functions

 CConstruction ()
construct.cpp - The constructions.
 ~CConstruction ()
void Clean ()
void Load ()

Public Attributes

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

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 (  )  [inline]

CConstruction::~CConstruction (  ) 


Member Function Documentation

void CConstruction::Clean (  ) 

void CConstruction::Load (  ) 


Member Data Documentation

std::string CConstruction::Ident

std::string CConstruction::File

sprite file

construction sprite image

sprite width

struct { ... } CConstruction::File

construction identifier

struct { ... } CConstruction::ShadowFile

construction shadow sprite image

shadow sprite width


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.