l_moninf.cc File Reference

#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"

Include dependency graph for l_moninf.cc:


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 Documentation

#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"


Function Documentation

mname c_str (  ) 

Type Constraints

void cluaopen_moninf ( lua_State *  ls  ) 

Here is the call graph for this function:

bool in_show_bounds ( const coord_def s  ) 

Here is the call graph for this function:

void lua_push_moninf ( lua_State *  ls,
monster_info mi 
)

LUAFN ( mi_get_monster_at   ) 

Here is the call graph for this function:

LUAFN ( moninf_get_desc   ) 

LUAFN ( moninf_get_damage_desc   ) 

MIRET1 ( boolean  ,
is_safe  ,
is(MB_SAFE)   
)


Variable Documentation


Generated on Thu Jan 13 13:08:13 2011 by  doxygen 1.5.6