#include "AppHdr.h"
#include "l_libs.h"
#include "cluautil.h"
#include "coord.h"
#include "env.h"
#include "libutil.h"
#include "mon-info.h"
#include "player.h"
Defines | |
#define | MONINF_METATABLE "monster.info" |
#define | MONINF(ls, n, var) |
#define | MIRET1(type, field, cfield) |
#define | MIREG(field) { #field, moninf_get_##field } |
Functions | |
void | lua_push_moninf (lua_State *ls, monster_info *mi) |
MIRET1 (boolean, is_safe, is(MB_SAFE)) MIRET1(string | |
mname | c_str ()) LUAFN(moninf_get_is) |
LUAFN (moninf_get_damage_desc) | |
LUAFN (moninf_get_desc) | |
bool | in_show_bounds (const coord_def &s) |
LUAFN (mi_get_monster_at) | |
void | cluaopen_moninf (lua_State *ls) |
Variables | |
mname |
#define MIREG | ( | field | ) | { #field, moninf_get_##field } |
#define MIRET1 | ( | type, | |||
field, | |||||
cfield | ) |
Value:
static int moninf_get_##field(lua_State *ls) \ { \ MONINF(ls, 1, mi); \ lua_push##type(ls, mi->cfield); \ return (1); \ }
#define MONINF | ( | ls, | |||
n, | |||||
var | ) |
Value:
monster_info *var = *(monster_info **) \ luaL_checkudata(ls, n, MONINF_METATABLE)
#define MONINF_METATABLE "monster.info" |
mname c_str | ( | ) |
void cluaopen_moninf | ( | lua_State * | ls | ) |
bool in_show_bounds | ( | const coord_def & | s | ) |
void lua_push_moninf | ( | lua_State * | ls, | |
monster_info * | mi | |||
) |
LUAFN | ( | mi_get_monster_at | ) |
LUAFN | ( | moninf_get_desc | ) |
LUAFN | ( | moninf_get_damage_desc | ) |
MIRET1 | ( | boolean | , | |
is_safe | , | |||
is(MB_SAFE) | ||||
) |