#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
Enumeration Type Documentation
Contains mobile types.
- Enumerator:
PLAYER |
|
ROBOT |
|
ANIMAL |
|
MONSTER |
|
Function Documentation
Build crew user interface.
void drawItems |
( |
int |
index | ) |
|
Draw all items which can be put to inventory.
- Parameters:
-
TCODList<int> find_all_mobs |
( |
int |
type | ) |
|
Find all mobiles with selected type.
- Parameters:
-
type | Type 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:
-
type | Mobile type to find. |
notlocation | From which location mobiles should be avoid. |
maxlevel | Max 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:
-
name | Name of mobile to find. Default is empty. |
x | X-axis position of mob. Default is -1. |
y | Y-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:
-
name | Name of mob to find. |
x | X-axis of start search position. |
y | Y-axis of start search position. |
radius | Size of radius to search. |
types | Types of mob to find. Default empty. |
fovradius | Size of radius of field of view. |
visible | Search 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:
-
name | Name of object to find |
type | Type of object to find |
- Returns:
- Object index in protoobjs
void mobClb |
( |
Widget * |
w, |
|
|
void * |
data |
|
) |
| |
Show information about selected mobile.
- Parameters:
-
w | Unused. |
data | Selected mob name. |
void setVisibleCrew |
( |
bool |
visible | ) |
|
Show/hide information about fort crew.
- Parameters:
-
visible | If true, show fort crew, otherwise hide menu. |
int showMobInfo |
( |
int |
index | ) |
|
Show informations about selected mobile.
- Parameters:
-
index | Index of selected mobile. |
- Returns:
- Index of selected mobile.