$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 <SDL.h>
#include <vector>
#include <algorithm>
#include <map>
#include "upgrade_structs.h"
#include "util.h"
#include "unitsound.h"
#include "icons.h"
#include "missileconfig.h"
#include "vec2i.h"
Go to the source code of this file.
#define CanTargetAir 4 |
#define CanTargetLand 1 |
Which units can it attack.
#define CanTargetSea 2 |
#define MaxAttackPos 5 |
#define MouseActionAttack 1 |
#define MouseActionHarvest 3 |
#define MouseActionMove 2 |
#define MouseActionNone 0 |
Right click action.
#define MouseActionSail 6 |
#define MouseActionSpellCast 5 |
#define UnitSides 8 |
anonymous enum |
anonymous enum |
enum DistanceTypeType |
enum GroupSelectionMode |
enum UnitTypeType |
CUnitType* CclGetUnitType | ( | lua_State * | l | ) |
Access unit-type object
l | Lua state. |
void CleanUnitTypes | ( | ) |
Load the unit-type data.
Cleanup the unit-type module.
void DefineVariableField | ( | lua_State * | l, | |
CVariable * | var, | |||
int | lua_index | |||
) |
Cleanup unit-type module.
Parse User Variables field.
Define the field of the UserDefined variables.
l | Lua state. | |
var | Variable to set. | |
lua_index | Index of the table where are the infos |
void DrawUnitType | ( | const CUnitType & | type, | |
CPlayerColorGraphic * | sprite, | |||
int | player, | |||
int | frame, | |||
const PixelPos & | screenPos | |||
) |
Draw the sprite frame of unit-type.
Allocate an empty unit-type slot
Draw unit-type on map.
type | Unit-type pointer. | |
sprite | Sprite to use for drawing | |
player | Player number for color substitution. | |
frame | Animation frame of unit-type. | |
screenPos | Screen pixel (top left) postion to draw unit-type. |
void InitUnitTypes | ( | int | reset_player_stats | ) |
Init unit types.
void LoadUnitTypes | ( | ) |
Load the sprite for a unittype.
Load the graphics for the unit-types.
void LoadUnitTypeSprite | ( | CUnitType & | type | ) |
Init unit-type table.
Loads the Sprite for a unit type
type | type of unit to load |
CUnitType* NewUnitTypeSlot | ( | const std::string & | ident | ) |
Save the unit-type table.
Allocate an empty unit-type slot.
ident | Identifier to identify the slot (malloced by caller!). |
void SaveUnitTypes | ( | CFile & | file | ) |
Get unit-type by ident.
Save state of the unit-type table to file.
file | Output file. |
CUnitType * UnitTypeByIdent | ( | const std::string & | ident | ) |
Update unit stats.
Find unit-type by identifier.
ident | The unit-type identifier. |
void UnitTypeCclRegister | ( | ) |
Access unit-type object.
Register CCL features for unit-type.
void UpdateStats | ( | int | reset | ) |
Register ccl features.
Update the player stats for changed unit types.
reset | indicates wether default value should be set to each stat (level, upgrades) |
void UpdateUnitVariables | ( | CUnit & | unit | ) |
Update custom Variables with other variable (like Hp, ...).
Update unit variables which are not user defined.
Human wall.