From 8e94f180081dc6d88069afefe9a7f92828d32729 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Mon, 19 Oct 2009 23:20:59 +0200 Subject: Split out lib_mapmark from dlua.cc. --- crawl-ref/source/dlua.cc | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'crawl-ref/source/dlua.cc') diff --git a/crawl-ref/source/dlua.cc b/crawl-ref/source/dlua.cc index 718438b9e9..b83dad752c 100644 --- a/crawl-ref/source/dlua.cc +++ b/crawl-ref/source/dlua.cc @@ -342,35 +342,6 @@ static void luaopen_dgnevent(lua_State *ls) luaopen_setmeta(ls, "dgnevent", dgnevent_lib, DEVENT_METATABLE); } -static int mapmarker_pos(lua_State *ls) -{ - MAPMARKER(ls, 1, mark); - lua_pushnumber(ls, mark->pos.x); - lua_pushnumber(ls, mark->pos.y); - return (2); -} - -static int mapmarker_move(lua_State *ls) -{ - MAPMARKER(ls, 1, mark); - const coord_def dest( luaL_checkint(ls, 2), luaL_checkint(ls, 3) ); - env.markers.move_marker(mark, dest); - return (0); -} - -static const struct luaL_reg mapmarker_lib[] = -{ - { "pos", mapmarker_pos }, - { "move", mapmarker_move }, - { NULL, NULL } -}; - -static void luaopen_mapmarker(lua_State *ls) -{ - luaopen_setmeta(ls, "mapmarker", mapmarker_lib, MAPMARK_METATABLE); -} - - // Return the integer stored in the table (on the stack) with the key name. // If the key doesn't exist or the value is the wrong type, return defval. static int _table_int(lua_State *ls, int idx, const char *name, int defval) -- cgit v1.2.3-54-g00ecf