____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       A futuristic real-time strategy game.
          This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project. Distributed under the "GNU General Public License"

CDecoVarSpriteBar Class Reference

Sprite contains frame from full (left)to empty state (right). More...

#include <unittype.h>

Inheritance diagram for CDecoVarSpriteBar:

CDecoVar

List of all members.

Public Member Functions

 CDecoVarSpriteBar ()
virtual void Draw (int x, int y, const CUnit *unit) const
 function to draw the decorations.

Public Attributes

char SpriteIndex
 Index of number. (.


Detailed Description

Sprite contains frame from full (left)to empty state (right).

Definition at line 477 of file unittype.h.


Constructor & Destructor Documentation

CDecoVarSpriteBar::CDecoVarSpriteBar (  )  [inline]

Definition at line 480 of file unittype.h.


Member Function Documentation

void CDecoVarSpriteBar::Draw ( int  x,
int  y,
const CUnit unit 
) const [virtual]

function to draw the decorations.

Draw a sprite with is like a bar (several stages)

Parameters:
x X screen pixel position
y Y screen pixel position
unit Unit pointer
Todo:
fix sprite configuration.

Implements CDecoVar.

Definition at line 318 of file unit_draw.cpp.

References Assert, CGraphic::DrawFrameClip(), CGraphic::Height, Decoration::HotX, Decoration::HotY, CDecoVar::Index, int(), CDecoVar::IsCenteredInX, CDecoVar::IsCenteredInY, CVariable::Max, CGraphic::NumFrames, Decoration::Sprite, DecoSpriteType::SpriteArray, SpriteIndex, CVariable::Value, CUnit::Variable, and CGraphic::Width.


Member Data Documentation

Index of number. (.

See also:
DefineSprites and

GetSpriteIndex)

Definition at line 484 of file unittype.h.

Referenced by CclDefineDecorations(), and Draw().


The documentation for this class was generated from the following files:

Generated on Sat Feb 21 00:28:23 2009 for Bos Wars by  doxygen 1.5.6