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

Classes
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, AnimationLuaCallback, AnimationWiggle
}
 
enum  SetVar_ModifyTypes {
  modSet = 0, modAdd, modSub, modMul,
  modDiv, modMod, modAnd, modOr,
  modXor, modNot
}
 
std::string ExtraDeathTypes [ANIMATIONS_DEATHTYPES]
 
CAnimationsAnimationsByIdent (const std::string &ident)
 Get the animations structure by ident. More...
 
void AnimationCclRegister ()
 
int UnitShowAnimationScaled (CUnit &unit, const CAnimation *anim, int scale)
 Handle the animation of a unit. More...
 
int UnitShowAnimation (CUnit &unit, const CAnimation *anim)
 Handle the animation of a unit. More...
 
int ParseAnimInt (const CUnit &unit, const char *parseint)
 
int ParseAnimFlags (const CUnit &unit, const char *parseflag)
 
void FindLabelLater (CAnimation **anim, const std::string &name)
 
void FreeAnimations ()
 

Macro Definition Documentation

◆ ANIMATIONS_DEATHTYPES

#define ANIMATIONS_DEATHTYPES   40

Enumeration Type Documentation

◆ AnimationType

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

◆ SetVar_ModifyTypes

Enumerator
modSet 
modAdd 

Set value to this.

modSub 

Addition.

modMul 

Subtraction.

modDiv 

Multiplication.

modMod 

Division.

modAnd 

Modulo.

modOr 

Bitwise AND.

modXor 

Bitwise OR.

modNot 

Bitwise XOR.

Function Documentation

◆ AnimationCclRegister()

void AnimationCclRegister ( )

◆ AnimationsByIdent()

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

Get the animations structure by ident.

Get the animations structure by ident.

Parameters
identIdentifier for the animation.
Returns
Pointer to the animation structure.

◆ FindLabelLater()

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

Find a label later

◆ FreeAnimations()

void FreeAnimations ( )

◆ ParseAnimFlags()

int ParseAnimFlags ( const CUnit unit,
const char *  parseflag 
)

Parse flags list in animation frame.

Parameters
unitUnit of the animation.
parseflagFlag list to parse.
Returns
The parsed value.

◆ ParseAnimInt()

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

Parse integer in animation frame.

Parameters
unitUnit of the animation.
parseintInteger to parse.
Returns
The parsed value.

◆ UnitShowAnimation()

int UnitShowAnimation ( CUnit unit,
const CAnimation anim 
)

Handle the animation of a unit.

Handle the animation of a unit.

Show unit animation.

Parameters
unitUnit of the animation.
animAnimation script to handle.
Returns
The flags of the current script step.

◆ UnitShowAnimationScaled()

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

Handle the animation of a unit.

Show unit animation.

Parameters
unitUnit of the animation.
animAnimation script to handle.
scaleScaling factor of the wait times in animation (8 means no scaling).
Returns
The flags of the current script step.

Variable Documentation

◆ ExtraDeathTypes

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.