_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include "stratagus.h"
#include "action/action_spellcast.h"
#include "action/action_build.h"
#include "animation.h"
#include "animation/animation_attack.h"
#include "animation/animation_die.h"
#include "animation/animation_exactframe.h"
#include "animation/animation_frame.h"
#include "animation/animation_goto.h"
#include "animation/animation_ifvar.h"
#include "animation/animation_label.h"
#include "animation/animation_luacallback.h"
#include "animation/animation_move.h"
#include "animation/animation_randomgoto.h"
#include "animation/animation_randomrotate.h"
#include "animation/animation_randomsound.h"
#include "animation/animation_randomwait.h"
#include "animation/animation_rotate.h"
#include "animation/animation_setplayervar.h"
#include "animation/animation_setvar.h"
#include "animation/animation_sound.h"
#include "animation/animation_spawnmissile.h"
#include "animation/animation_spawnunit.h"
#include "animation/animation_unbreakable.h"
#include "animation/animation_wait.h"
#include "animation/animation_wiggle.h"
#include "actions.h"
#include "iolib.h"
#include "player.h"
#include "script.h"
#include "spells.h"
#include "unit.h"
#include "unittype.h"
Classes | |
struct | LabelsStruct |
struct | LabelsLaterStruct |
actions.cpp - The actions. | |
#define | ANIMATIONS_MAXANIM 4096 |
static std::vector< LabelsStruct > | Labels |
static std::vector< LabelsLaterStruct > | LabelsLater |
CAnimation * | AnimationsArray [ANIMATIONS_MAXANIM] |
int | NumAnimations |
std::map< std::string, CAnimations * > | AnimationMap |
int | UnitShowAnimation (CUnit &unit, const CAnimation *anim) |
Animation map. More... | |
static int | ParseAnimPlayer (const CUnit &unit, char *parseint) |
int | ParseAnimInt (const CUnit &unit, const char *parseint) |
int | ParseAnimFlags (const CUnit &unit, const char *parseflag) |
int | UnitShowAnimationScaled (CUnit &unit, const CAnimation *anim, int scale) |
Handle the animation of a unit. More... | |
CAnimations * | AnimationsByIdent (const std::string &ident) |
Get the animations structure by ident. More... | |
void | FreeAnimations () |
static int | GetAdvanceIndex (const CAnimation *base, const CAnimation *anim) |
static const CAnimation * | Advance (const CAnimation *anim, int n) |
static void | AddLabel (CAnimation *anim, const std::string &name) |
static CAnimation * | FindLabel (lua_State *l, const std::string &name) |
void | FindLabelLater (CAnimation **anim, const std::string &name) |
static void | FixLabels (lua_State *l) |
static CAnimation * | ParseAnimationFrame (lua_State *l, const char *str) |
static CAnimation * | ParseAnimation (lua_State *l, int idx) |
static void | AddAnimationToArray (CAnimation *anim) |
static int | CclDefineAnimations (lua_State *l) |
void | AnimationCclRegister () |
#define ANIMATIONS_MAXANIM 4096 |
|
static |
Add animation to AnimationsArray
|
static |
Add a label
|
static |
void AnimationCclRegister | ( | ) |
CAnimations* AnimationsByIdent | ( | const std::string & | ident | ) |
Get the animations structure by ident.
Get the animations structure by ident.
ident | Identifier for the animation. |
|
static |
Define a unit-type animation set.
l | Lua state. |
|
static |
Find a label
void FindLabelLater | ( | CAnimation ** | anim, |
const std::string & | name | ||
) |
Find a label later
|
static |
Fix labels
void FreeAnimations | ( | ) |
|
static |
|
static |
Parse an animation
|
static |
Parse an animation frame
str | string formated as "animationType extraArgs" |
int ParseAnimFlags | ( | const CUnit & | unit, |
const char * | parseflag | ||
) |
Parse flags list in animation frame.
unit | Unit of the animation. |
parseflag | Flag list to parse. |
int ParseAnimInt | ( | const CUnit & | unit, |
const char * | parseint | ||
) |
Parse integer in animation frame.
unit | Unit of the animation. |
parseint | Integer to parse. |
|
static |
Parse player number in animation frame
unit | Unit of the animation. |
parseint | Integer to parse. |
int UnitShowAnimation | ( | CUnit & | unit, |
const CAnimation * | anim | ||
) |
Animation map.
Handle the animation of a unit.
Show unit animation.
unit | Unit of the animation. |
anim | Animation script to handle. |
int UnitShowAnimationScaled | ( | CUnit & | unit, |
const CAnimation * | anim, | ||
int | scale | ||
) |
Handle the animation of a unit.
Show unit animation.
unit | Unit of the animation. |
anim | Animation script to handle. |
scale | Scaling factor of the wait times in animation (8 means no scaling). |
std::map<std::string, CAnimations *> AnimationMap |
CAnimation* AnimationsArray[ANIMATIONS_MAXANIM] |
|
static |
|
static |
int NumAnimations |