$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

src/include/animation.h File Reference

#include <string>
#include <map>
#include "upgrade_structs.h"

Go to the source code of this file.


Classes

class  CAnimation
class  CAnimations

animation.h - The animations headerfile.

#define ANIMATIONS_DEATHTYPES   40
enum  AnimationType {
  AnimationNone, AnimationFrame, AnimationExactFrame, AnimationWait,
  AnimationRandomWait, AnimationSound, AnimationRandomSound, AnimationAttack,
  AnimationRotate, AnimationRandomRotate, AnimationMove, AnimationUnbreakable,
  AnimationLabel, AnimationGoto, AnimationRandomGoto, AnimationSpawnMissile,
  AnimationSpawnUnit, AnimationIfVar, AnimationSetVar, AnimationSetPlayerVar,
  AnimationDie
}
std::string ExtraDeathTypes [ANIMATIONS_DEATHTYPES]
CAnimationsAnimationsByIdent (const std::string &ident)
 Get the animations structure by ident.
void AnimationCclRegister ()
int UnitShowAnimationScaled (CUnit &unit, const CAnimation *anim, int scale)
 Handle the animation of a unit.
int UnitShowAnimation (CUnit &unit, const CAnimation *anim)
 Handle the animation of a unit.
int ParseAnimInt (const CUnit *unit, const char *parseint)
void FindLabelLater (CAnimation **anim, const std::string &name)

Define Documentation

#define ANIMATIONS_DEATHTYPES   40


Enumeration Type Documentation

Enumerator:
AnimationNone 
AnimationFrame 
AnimationExactFrame 
AnimationWait 
AnimationRandomWait 
AnimationSound 
AnimationRandomSound 
AnimationAttack 
AnimationRotate 
AnimationRandomRotate 
AnimationMove 
AnimationUnbreakable 
AnimationLabel 
AnimationGoto 
AnimationRandomGoto 
AnimationSpawnMissile 
AnimationSpawnUnit 
AnimationIfVar 
AnimationSetVar 
AnimationSetPlayerVar 
AnimationDie 


Function Documentation

void AnimationCclRegister (  ) 

CAnimations* AnimationsByIdent ( const std::string &  ident  ) 

Get the animations structure by ident.

Get the animations structure by ident.

Parameters:
ident Identifier for the animation.
Returns:
Pointer to the animation structure.

void FindLabelLater ( CAnimation **  anim,
const std::string &  name 
)

Find a label later

int ParseAnimInt ( const CUnit unit,
const char *  parseint 
)

Parse integer in animation frame.

Parameters:
unit Unit of the animation.
parseint Integer to parse.
Returns:
The parsed value.

int UnitShowAnimation ( CUnit unit,
const CAnimation anim 
)

Handle the animation of a unit.

Handle the animation of a unit.

Show unit animation.

Parameters:
unit Unit of the animation.
anim Animation script to handle.
Returns:
The flags of the current script step.

int UnitShowAnimationScaled ( CUnit unit,
const CAnimation anim,
int  scale 
)

Handle the animation of a unit.

Show unit animation.

Parameters:
unit Unit of the animation.
anim Animation script to handle.
scale Scaling factor of the wait times in animation (8 means no scaling).
Returns:
The flags of the current script step.


Variable Documentation

std::string ExtraDeathTypes[ANIMATIONS_DEATHTYPES]

Default names for the extra death types.

Default names for the resources.

(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.