l_mons.cc File Reference

#include "AppHdr.h"
#include "cluautil.h"
#include "l_libs.h"
#include "delay.h"
#include "dlua.h"
#include "initfile.h"
#include "libutil.h"
#include "mon-act.h"
#include "mon-behv.h"
#include "mon-util.h"
#include "mon-stuff.h"

Include dependency graph for l_mons.cc:


Classes

struct  MonsAccessor

Defines

#define WRAPPED_MONSTER(ls, name)
#define MDEF(name)
#define MDEFN(name, closure)
#define LUANAMEFN(name, expr)

Functions

void push_monster (lua_State *ls, monster *mons)
 MDEF (unique)
 MDEF (base_name)
 MDEF (full_name)
 MDEF (db_name)
 MDEF (type_name)
 MDEF (entry_name)
 MDEF (x)
 MDEF (y)
 MDEF (beh)
 MDEF (energy)
 LUAFN (l_mons_add_energy)
 LUANAMEFN (mname, mons->name(dtype, true)) LUANAMEFN(mfull_name
mons full_name (dtype, true)) LUANAMEFN(mbase_name
mons mons base_name (dtype, true)) MDEF(hd)
 MDEF (targetx)
 MDEF (targety)
 MDEF (shapeshifter)
 MDEF (mimic)
 MDEF (dancing_weapon)
 MDEF (muse)
 MDEF (meat)
 MDEF (experience)
 MDEF (you_can_see)
void dluaopen_monsters (lua_State *ls)

Define Documentation

#define LUANAMEFN ( name,
expr   ) 

Value:

static int l_mons_##name##_fn(lua_State *ls) {      \
       ASSERT_DLUA;                              \
       const monster* mons =                                    \
           clua_get_lightuserdata<monster>(ls, lua_upvalueindex(1)); \
       const description_level_type dtype =                          \
           lua_isstring(ls, 1)?                                      \
           description_type_by_name(luaL_checkstring(ls, 1))         \
           : DESC_PLAIN;                                             \
       PLUARET(string, expr.c_str());             \
    }                                             \
    MDEFN(name, name##_fn)                        \

MDEF ( name   ) 

Value:

static int l_mons_##name(lua_State *ls, monster* mons,             \
                             const char *attr)                         \

#define MDEFN ( name,
closure   ) 

Value:

static int l_mons_##name(lua_State *ls, monster* mons, const char *attrs) \
    {                                                                   \
    lua_pushlightuserdata(ls, mons);                                    \
    lua_pushcclosure(ls, l_mons_##closure, 1);                          \
    return (1);                                                         \
    }

#define WRAPPED_MONSTER ( ls,
name   ) 

Value:

MonsterWrap *___mw = clua_get_userdata< MonsterWrap >(ls, MONS_METATABLE); \
    if (!___mw                                                          \
        || !___mw->mons                                              \
        || CLua::get_vm(ls).managed_vm && ___mw->turn != you.num_turns) \
    {                                                                \
        luaL_argerror(ls, 1, "Invalid monster wrapper");             \
    } \
    monster *name(___mw->mons)


Function Documentation

mons mons base_name ( dtype  ,
true   
)

void dluaopen_monsters ( lua_State *  ls  ) 

mons full_name ( dtype  ,
true   
)

LUAFN ( l_mons_add_energy   ) 

LUANAMEFN ( mname  ,
mons->  namedtype, true 
)

MDEF ( you_can_see   ) 

Here is the call graph for this function:

MDEF ( experience   ) 

Here is the call graph for this function:

MDEF ( meat   ) 

MDEF ( muse   ) 

MDEF ( dancing_weapon   ) 

Here is the call graph for this function:

MDEF ( mimic   ) 

Here is the call graph for this function:

MDEF ( shapeshifter   ) 

MDEF ( targety   ) 

MDEF ( targetx   ) 

MDEF ( energy   ) 

MDEF ( beh   ) 

MDEF (  ) 

Here is the call graph for this function:

MDEF (  ) 

Here is the call graph for this function:

MDEF ( entry_name   ) 

Here is the call graph for this function:

MDEF ( type_name   ) 

Here is the call graph for this function:

MDEF ( db_name   ) 

MDEF ( full_name   ) 

MDEF ( base_name   ) 

MDEF ( unique   ) 

Here is the call graph for this function:

void push_monster ( lua_State *  ls,
monster mons 
)


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