Steam Fort 0.5
|
#include "libtcod.hpp"
#include "mobile.hpp"
#include "utils.hpp"
#include "main.hpp"
#include <iostream>
#include "gui/gui.hpp"
#include "ui.hpp"
#include <stdio.h>
#include "message.hpp"
#include <map>
#include "adventure.hpp"
#include "game.hpp"
Functions | |
void | buildMobileUI () |
Build crew user interface. | |
void | advanceClb (Widget *w, void *data) |
Update user stats. | |
void | equip2Clb (Widget *w, void *data) |
Wear selected item. | |
void | equipClb (Widget *w, void *data) |
Show available equipment for selected location. | |
void | renameClb (Widget *wid, char *val, void *data) |
Rename selected mob. | |
void | addinvClb (Widget *w, void *data) |
Add item to inventory. | |
void | removeinvClb (Widget *w, void *data) |
Remove item from inventory. | |
void | drawItems (int index) |
Draw all items which can be put to inventory. | |
void | inventoryClb (Widget *w, void *data) |
Manage player inventory. | |
int | showMobInfo (int index) |
Show informations about selected mobile. | |
void | mobClb (Widget *w, void *data) |
Show information about selected mobile. | |
void | setVisibleCrew (bool visible) |
Show/hide information about fort crew. | |
int | find_proto_mob (std::string name, int type) |
Find proto mobile by name or type. | |
int | find_mob (string name, int x, int y) |
Find mobile by name or position. | |
TCODList< int > | find_all_proto_mobs (int type, int notlocation, int maxlevel) |
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) |
Find nearest mobile from selected position. | |
TCODList< int > | find_all_mobs (int type) |
Find all mobiles with selected type. | |
Variables | |
Container * | mobsmenu = new Container(0, 0, SCREENWIDTH, SCREENHEIGHT) |
Container * | mobmenu = new Container(30, 10, 80, 70) |
ToolBar * | tmpbar = new ToolBar(65, 16, "Available items") |
Container * | mobinv = new Container(0, 0, SCREENWIDTH, SCREENHEIGHT) |
ToolBar * | inv = new ToolBar(2, 2, "Inventory") |
ToolBar * | available = new ToolBar(60, 2, "Available items") |
void addinvClb | ( | Widget * | w, |
void * | data | ||
) |
Add item to inventory.
w | Unused. |
data | Name of item to add to inventory. |
void advanceClb | ( | Widget * | w, |
void * | data | ||
) |
Update user stats.
w | Unused |
data | Value from button from UI. |
void buildMobileUI | ( | ) |
Build crew user interface.
void drawItems | ( | int | index | ) |
Draw all items which can be put to inventory.
index | Index of mob. |
void equip2Clb | ( | Widget * | w, |
void * | data | ||
) |
Wear selected item.
w | Unused. |
data | Location and name of item to wear. |
void equipClb | ( | Widget * | w, |
void * | data | ||
) |
Show available equipment for selected location.
w | Unused. |
data | Name of location to show. |
TCODList<int> find_all_mobs | ( | int | type | ) |
Find all mobiles with selected type.
type | Type of mobiles to find. |
TCODList<int> find_all_proto_mobs | ( | int | type, |
int | notlocation, | ||
int | maxlevel | ||
) |
Find all prototypes with selected type.
type | Mobile type to find. |
notlocation | From which location mobiles should be avoid. |
maxlevel | Max level of mobs to find. |
int find_mob | ( | string | name, |
int | x, | ||
int | y | ||
) |
Find mobile by name or position.
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. |
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.
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. |
int find_proto_mob | ( | std::string | name, |
int | type | ||
) |
Find proto mobile by name or type.
name | Name of object to find |
type | Type of object to find |
void inventoryClb | ( | Widget * | w, |
void * | data | ||
) |
Manage player inventory.
w | Unused. |
data | Index of player. |
void mobClb | ( | Widget * | w, |
void * | data | ||
) |
Show information about selected mobile.
w | Unused. |
data | Selected mob name. |
void removeinvClb | ( | Widget * | w, |
void * | data | ||
) |
Remove item from inventory.
w | Unused |
data | Index of item to remove |
void renameClb | ( | Widget * | wid, |
char * | val, | ||
void * | data | ||
) |
Rename selected mob.
wid | Unused. |
val | New name of mob. |
data | Index of mob. |
void setVisibleCrew | ( | bool | visible | ) |
Show/hide information about fort crew.
visible | If true, show fort crew, otherwise hide menu. |
int showMobInfo | ( | int | index | ) |
Show informations about selected mobile.
index | Index of selected mobile. |
ToolBar* available = new ToolBar(60, 2, "Available items") |
ToolBar* inv = new ToolBar(2, 2, "Inventory") |
Container* mobinv = new Container(0, 0, SCREENWIDTH, SCREENHEIGHT) |
Container* mobmenu = new Container(30, 10, 80, 70) |
Container* mobsmenu = new Container(0, 0, SCREENWIDTH, SCREENHEIGHT) |
ToolBar* tmpbar = new ToolBar(65, 16, "Available items") |