$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 "unit.h"
#include "unit_manager.h"
#include "unittype.h"
#include "script.h"
#include "iolib.h"
Classes | |
struct | CUnitGroup |
groups.cpp - The units' groups handling. | |
#define | NUM_GROUPS 10 |
static CUnitGroup | Groups [NUM_GROUPS] |
group of units | |
void | InitGroups () |
Number of groups predefined. | |
void | SaveGroups (CFile &file) |
Save groups. | |
void | CleanGroups () |
Cleanup groups. | |
bool | IsGroupTainted (int num) |
int | GetNumberUnitsOfGroup (int num, GroupSelectionMode mode) |
Get the number of units in a particular group. | |
CUnit ** | GetUnitsOfGroup (int num) |
Get the array of units of a particular group. | |
void | ClearGroup (int num) |
Remove all units from a group. | |
void | AddToGroup (CUnit **units, int nunits, int num) |
Add the array of units to the group. | |
void | SetGroup (CUnit **units, int nunits, int num) |
Set the contents of a particular group with an array of units. | |
void | RemoveUnitFromGroups (CUnit &unit) |
Remove a unit from a group. | |
static int | CclGroup (lua_State *l) |
void | GroupCclRegister () |
Register CCL group features. |
#define NUM_GROUPS 10 |
How many groups supported
void AddToGroup | ( | CUnit ** | units, | |
int | nunits, | |||
int | num | |||
) |
Add the array of units to the group.
Add units to group num contents from unit array "units"
units | Array of units to place into group. | |
nunits | Number of units in array. | |
num | Group number for storage. |
static int CclGroup | ( | lua_State * | l | ) | [static] |
Define the group.
l | Lua state. |
void CleanGroups | ( | ) |
Cleanup groups.
Clean up group part.
void ClearGroup | ( | int | num | ) |
Remove all units from a group.
Clear contents of group num
num | Group number. |
int GetNumberUnitsOfGroup | ( | int | num, | |
GroupSelectionMode | mode | |||
) |
Get the number of units in a particular group.
Return the number of units of group num
num | Group number. |
CUnit** GetUnitsOfGroup | ( | int | num | ) |
Get the array of units of a particular group.
Return the units of group num
num | Group number. |
void GroupCclRegister | ( | ) |
Register CCL group features.
Register CCL features for groups.
void InitGroups | ( | ) |
Number of groups predefined.
Initialize data structures for groups.
Initialize group part.
bool IsGroupTainted | ( | int | num | ) |
void RemoveUnitFromGroups | ( | CUnit & | unit | ) |
Remove a unit from a group.
Remove unit from its groups
unit | Unit to remove from group. |
void SaveGroups | ( | CFile & | file | ) |
Save groups.
Save groups.
file | Output file. |
void SetGroup | ( | CUnit ** | units, | |
int | nunits, | |||
int | num | |||
) |
Set the contents of a particular group with an array of units.
Set group num contents to unit array "units"
units | Array of units to place into group. | |
nunits | Number of units in array. | |
num | Group number for storage. |
CUnitGroup Groups[NUM_GROUPS] [static] |
group of units