$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
#include "stratagus.h"
#include "action/action_spellcast.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_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 "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 1024 |
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. | |
static int | ParseAnimPlayer (const CUnit &unit, const char *parseint) |
int | ParseAnimInt (const CUnit *unit, const char *parseint) |
int | UnitShowAnimationScaled (CUnit &unit, const CAnimation *anim, int scale) |
Handle the animation of a unit. | |
CAnimations * | AnimationsByIdent (const std::string &ident) |
Get the animations structure by ident. | |
void | FreeAnimations () |
static int | GetAdvanceIndex (const CAnimation *base, const CAnimation *anim) |
static const CAnimation * | Advance (const CAnimation *anim, int n) |
static void | AddLabel (lua_State *, 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 1024 |
static void AddAnimationToArray | ( | CAnimation * | anim | ) | [static] |
Add animation to AnimationsArray
static void AddLabel | ( | lua_State * | , | |
CAnimation * | anim, | |||
const std::string & | name | |||
) | [static] |
Add a label
static const CAnimation* Advance | ( | const CAnimation * | anim, | |
int | n | |||
) | [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 int CclDefineAnimations | ( | lua_State * | l | ) | [static] |
Define a unit-type animation set.
l | Lua state. |
static CAnimation* FindLabel | ( | lua_State * | l, | |
const std::string & | name | |||
) | [static] |
Find a label
void FindLabelLater | ( | CAnimation ** | anim, | |
const std::string & | name | |||
) |
Find a label later
static void FixLabels | ( | lua_State * | l | ) | [static] |
Fix labels
void FreeAnimations | ( | ) |
static int GetAdvanceIndex | ( | const CAnimation * | base, | |
const CAnimation * | anim | |||
) | [static] |
static CAnimation* ParseAnimation | ( | lua_State * | l, | |
int | idx | |||
) | [static] |
Parse an animation
static CAnimation* ParseAnimationFrame | ( | lua_State * | l, | |
const char * | str | |||
) | [static] |
Parse an animation frame
str | string formated as "animationType extraArgs" |
int ParseAnimInt | ( | const CUnit * | unit, | |
const char * | parseint | |||
) |
Parse integer in animation frame.
unit | Unit of the animation. | |
parseint | Integer to parse. |
static int ParseAnimPlayer | ( | const CUnit & | unit, | |
const char * | parseint | |||
) | [static] |
Parse player number in animation frame
unit | Unit of the animation. | |
parseint | Integer to parse. |
int UnitShowAnimation | ( | CUnit & | unit, | |
const CAnimation * | anim | |||
) |
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] |
std::vector<LabelsStruct> Labels [static] |
std::vector<LabelsLaterStruct> LabelsLater [static] |
int NumAnimations |