Steam Fort 0.5
Classes | Typedefs | Enumerations | Functions

src/mobile.hpp File Reference

#include <string>
#include "libtcod.hpp"
#include "gui/gui.hpp"

Go to the source code of this file.

Classes

class  Mobile
 Contains all informations and functions about mobiles. More...

Typedefs

typedef enum MobileTypes MOBILETYPE
 Contains mobile types.
typedef enum MobileLocations MOBILELOCATION

Enumerations

enum  MobileTypes { PLAYER, ROBOT, ANIMAL, MONSTER }
 

Contains mobile types.

More...
enum  MobileLocations { FORTONLY, ADVENTUREONLY }

Functions

int find_proto_mob (std::string name, int type=-1)
 Find proto mobile by name or type.
void buildMobileUI ()
 Build crew user interface.
void setVisibleCrew (bool visible)
 Show/hide information about fort crew.
int showMobInfo (int index)
 Show informations about selected mobile.
int find_mob (std::string name="", int x=-1, int y=-1)
 Find mobile by name or position.
TCODList< int > find_all_proto_mobs (int type, int notlocation=-1, int maxlevel=-1)
 Find all prototypes with selected type.
int find_near_mob (std::string name, int x, int y, int radius, TCODList< int > *types, int fovradius, bool visible=true)
 Find nearest mobile from selected position.
void drawItems (int index)
 Draw all items which can be put to inventory.
TCODList< int > find_all_mobs (int type)
 Find all mobiles with selected type.
void mobClb (Widget *w, void *data)
 Show information about selected mobile.

Typedef Documentation

typedef enum MobileTypes MOBILETYPE

Contains mobile types.


Enumeration Type Documentation

Enumerator:
FORTONLY 
ADVENTUREONLY 

Contains mobile types.

Enumerator:
PLAYER 
ROBOT 
ANIMAL 
MONSTER 

Function Documentation

void buildMobileUI ( )

Build crew user interface.

void drawItems ( int  index)

Draw all items which can be put to inventory.

Parameters:
indexIndex of mob.
TCODList<int> find_all_mobs ( int  type)

Find all mobiles with selected type.

Parameters:
typeType of mobiles to find.
Returns:
List of indexes of mobiles.
TCODList<int> find_all_proto_mobs ( int  type,
int  notlocation,
int  maxlevel 
)

Find all prototypes with selected type.

Parameters:
typeMobile type to find.
notlocationFrom which location mobiles should be avoid.
maxlevelMax level of mobs to find.
Returns:
List of indexes of mobiles.
int find_mob ( string  name,
int  x,
int  y 
)

Find mobile by name or position.

Parameters:
nameName of mobile to find. Default is empty.
xX-axis position of mob. Default is -1.
yY-axis position of mob. Default is -1.
Returns:
Index of mobile in fortmobiles vector. If not found, return -1.
int find_near_mob ( std::string  name,
int  x,
int  y,
int  radius,
TCODList< int > *  types,
int  fovradius,
bool  visible 
)

Find nearest mobile from selected position.

Parameters:
nameName of mob to find.
xX-axis of start search position.
yY-axis of start search position.
radiusSize of radius to search.
typesTypes of mob to find. Default empty.
fovradiusSize of radius of field of view.
visibleSearch only for visible mobs. Default is true.
Returns:
Index of mobile in fortmobs vector. If mobile not found, return -1.
int find_proto_mob ( std::string  name,
int  type 
)

Find proto mobile by name or type.

Parameters:
nameName of object to find
typeType of object to find
Returns:
Object index in protoobjs
void mobClb ( Widget *  w,
void *  data 
)

Show information about selected mobile.

Parameters:
wUnused.
dataSelected mob name.
void setVisibleCrew ( bool  visible)

Show/hide information about fort crew.

Parameters:
visibleIf true, show fort crew, otherwise hide menu.
int showMobInfo ( int  index)

Show informations about selected mobile.

Parameters:
indexIndex of selected mobile.
Returns:
Index of selected mobile.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines