$treeview $search $mathjax
Stratagus
2.2.6
$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 <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "stratagus.h"
#include "unit.h"
#include "unit_manager.h"
#include "unittype.h"
#include "animation.h"
#include "upgrade.h"
#include "player.h"
#include "script.h"
#include "spells.h"
#include "pathfinder.h"
#include "map.h"
#include "trigger.h"
#include "actions.h"
#include "construct.h"
Functions | |
script_unit.cpp - The unit ccl functions. | |
unsigned | CclGetResourceByName (lua_State *l) |
Get resource by name. | |
static int | CclSetTrainingQueue (lua_State *l) |
static int | CclSetBuildingCapture (lua_State *l) |
static int | CclSetRevealAttacker (lua_State *l) |
static CUnit * | CclGetUnit (lua_State *l) |
CUnit * | CclGetUnitFromRef (lua_State *l) |
template<typename T> | |
static void | CclGetPos (lua_State *l, T *x, T *y, const int offset=-1) |
void | CclParseOrder (lua_State *l, COrderPtr order) |
Parse order. | |
static void | CclParseOrders (lua_State *l, CUnit *unit) |
static void | CclParseBuilt (lua_State *l, CUnit *unit) |
static void | CclParseResource (lua_State *l, CUnit *unit) |
static void | CclParseResWorker (lua_State *l, CUnit *unit) |
static void | CclParseResearch (lua_State *l, CUnit *unit) |
static void | CclParseUpgradeTo (lua_State *l, CUnit *unit) |
static void | CclParseTrain (lua_State *l, CUnit *unit) |
static void | CclParseMove (lua_State *l, CUnit *unit) |
static int | CclUnit (lua_State *l) |
static int | CclMoveUnit (lua_State *l) |
static int | CclCreateUnit (lua_State *l) |
static int | CclSetResourcesHeld (lua_State *l) |
static int | CclOrderUnit (lua_State *l) |
static int | CclKillUnit (lua_State *l) |
static int | CclKillUnitAt (lua_State *l) |
static int | CclGetUnits (lua_State *l) |
static int | CclGetUnitVariable (lua_State *l) |
static int | CclSetUnitVariable (lua_State *l) |
static int | CclSlotUsage (lua_State *l) |
void | UnitCclRegister () |
register CCL units features |
static int CclCreateUnit | ( | lua_State * | l | ) | [static] |
Create a unit and place it on the map
l | Lua state. |
static void CclGetPos | ( | lua_State * | l, | |
T * | x, | |||
T * | y, | |||
const int | offset = -1 | |||
) | [inline, static] |
Get a position from lua state
l | Lua state. | |
x | pointer to output x position. | |
y | pointer to output y position. |
unsigned CclGetResourceByName | ( | lua_State * | l | ) |
Get resource by name.
Get the resource ID from a SCM object.
l | Lua state. |
static CUnit* CclGetUnit | ( | lua_State * | l | ) | [static] |
Get a unit pointer
l | Lua state. |
CUnit* CclGetUnitFromRef | ( | lua_State * | l | ) |
Get a unit pointer from ref string
l | Lua state. |
static int CclGetUnits | ( | lua_State * | l | ) | [static] |
Get a player's units
l | Lua state. |
static int CclGetUnitVariable | ( | lua_State * | l | ) | [static] |
Get the value of the unit variable.
l | Lua state. |
static int CclKillUnit | ( | lua_State * | l | ) | [static] |
Kill a unit
l | Lua state. |
static int CclKillUnitAt | ( | lua_State * | l | ) | [static] |
Kill a unit at a location
l | Lua state. |
static int CclMoveUnit | ( | lua_State * | l | ) | [static] |
Move a unit on map.
l | Lua state. |
static int CclOrderUnit | ( | lua_State * | l | ) | [static] |
Order a unit
l | Lua state. |
static void CclParseBuilt | ( | lua_State * | l, | |
CUnit * | unit | |||
) | [static] |
Parse built
l | Lua state. | |
unit | Unit pointer which should be filled with the data. |
static void CclParseMove | ( | lua_State * | l, | |
CUnit * | unit | |||
) | [static] |
Parse stored data for move order
l | Lua state. | |
unit | Unit pointer which should be filled with the data. |
void CclParseOrder | ( | lua_State * | l, | |
COrderPtr | order | |||
) |
Parse order.
Parse order
l | Lua state. | |
order | OUT: resulting order. |
static void CclParseOrders | ( | lua_State * | l, | |
CUnit * | unit | |||
) | [static] |
Parse orders.
l | Lua state. | |
unit | Unit pointer which should get the orders. |
static void CclParseResearch | ( | lua_State * | l, | |
CUnit * | unit | |||
) | [static] |
Parse research
l | Lua state. | |
unit | Unit pointer which should be filled with the data. |
static void CclParseResource | ( | lua_State * | l, | |
CUnit * | unit | |||
) | [static] |
Parse built
l | Lua state. | |
unit | Unit pointer which should be filled with the data. |
static void CclParseResWorker | ( | lua_State * | l, | |
CUnit * | unit | |||
) | [static] |
Parse res worker data
l | Lua state. | |
unit | Unit pointer which should be filled with the data. |
static void CclParseTrain | ( | lua_State * | l, | |
CUnit * | unit | |||
) | [static] |
Parse stored data for train order
l | Lua state. | |
unit | Unit pointer which should be filled with the data. |
static void CclParseUpgradeTo | ( | lua_State * | l, | |
CUnit * | unit | |||
) | [static] |
Parse upgrade to
l | Lua state. | |
unit | Unit pointer which should be filled with the data. |
static int CclSetBuildingCapture | ( | lua_State * | l | ) | [static] |
Set capture buildings
l | Lua state. |
static int CclSetResourcesHeld | ( | lua_State * | l | ) | [static] |
Set resources held by a unit
l | Lua state. |
static int CclSetRevealAttacker | ( | lua_State * | l | ) | [static] |
Set reveal attacker
l | Lua state. |
static int CclSetTrainingQueue | ( | lua_State * | l | ) | [static] |
Set training queue
l | Lua state. |
static int CclSetUnitVariable | ( | lua_State * | l | ) | [static] |
Set the value of the unit variable.
l | Lua state. |
static int CclSlotUsage | ( | lua_State * | l | ) | [static] |
Get the usage of unit slots during load to allocate memory
l | Lua state. |
static int CclUnit | ( | lua_State * | l | ) | [static] |
void UnitCclRegister | ( | ) |
register CCL units features
Register CCL features for unit.