_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

Classes
contenttype.cpp File Reference
#include "stratagus.h"
#include "ui/contenttype.h"
#include "actions.h"
#include "action/action_built.h"
#include "font.h"
#include "translate.h"
#include "unit.h"
#include "ui.h"
#include "video.h"

Classes

struct  UStrInt
 

contenttype.cpp - .

enum  UStrIntType {
  USTRINT_STR, USTRINT_INT, USTRINT_STR, USTRINT_INT,
  USTRINT_STR, USTRINT_INT
}
 
UStrInt GetComponent (const CUnit &unit, int index, EnumVariable e, int t)
 Get component for unit variable. More...
 
UStrInt GetComponent (const CUnitType &type, int index, EnumVariable e)
 
static const CUnitGetUnitRef (const CUnit &unit, EnumUnit e)
 
static EnumUnit Str2EnumUnit (lua_State *l, const char *s)
 

Enumeration Type Documentation

◆ UStrIntType

Enumerator
USTRINT_STR 
USTRINT_INT 
USTRINT_STR 
USTRINT_INT 
USTRINT_STR 
USTRINT_INT 

Function Documentation

◆ GetComponent() [1/2]

UStrInt GetComponent ( const CUnit unit,
int  index,
EnumVariable  e,
int  t 
)

Get component for unit variable.

Return the value corresponding.

Parameters
unitUnit.
indexIndex of the variable.
eComponent of the variable.
tWhich var use (0:unit, 1:Type, 2:Stats)
Returns
Value corresponding

◆ GetComponent() [2/2]

UStrInt GetComponent ( const CUnitType type,
int  index,
EnumVariable  e 
)

◆ GetUnitRef()

static const CUnit* GetUnitRef ( const CUnit unit,
EnumUnit  e 
)
static

Get unit from a unit depending of the relation.

Parameters
unitunit reference.
erelation with unit.
Returns
The desired unit.

◆ Str2EnumUnit()

static EnumUnit Str2EnumUnit ( lua_State *  l,
const char *  s 
)
static

Return enum from string about variable component.

Parameters
lLua State.
sstring to convert.
Returns
Corresponding value.
Note
Stop on error.
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.