summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dlua.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-19 22:53:57 +0200
committerRobert Vollmert <rvollmert@gmx.net>2009-10-19 22:53:57 +0200
commit5bb58a2e08721ad69df30f5b10af6fef46a4b0d3 (patch)
tree121bb9b21c66aa56f95866b98a88fe80fa3ed315 /crawl-ref/source/dlua.cc
parent49eb883334f3e7ab343251cdcd161b77cb3ba784 (diff)
downloadcrawl-ref-5bb58a2e08721ad69df30f5b10af6fef46a4b0d3.tar.gz
crawl-ref-5bb58a2e08721ad69df30f5b10af6fef46a4b0d3.zip
Split out crawl_lib from dlua.cc.
Also fix error in previous commit.
Diffstat (limited to 'crawl-ref/source/dlua.cc')
-rw-r--r--crawl-ref/source/dlua.cc49
1 files changed, 1 insertions, 48 deletions
diff --git a/crawl-ref/source/dlua.cc b/crawl-ref/source/dlua.cc
index 7d26c87d24..769a5b1752 100644
--- a/crawl-ref/source/dlua.cc
+++ b/crawl-ref/source/dlua.cc
@@ -1,5 +1,5 @@
/*
- * File: luadgn.cc
+ * File: dlua.cc
* Summary: Dungeon-builder Lua interface.
* Created by: dshaligram on Sat Jun 23 20:02:09 2007 UTC
*/
@@ -23,7 +23,6 @@
#include "hiscores.h"
#include "initfile.h"
#include "items.h"
-#include "l_los.h"
#include "los.h"
#include "mapdef.h"
#include "mapmark.h"
@@ -320,52 +319,6 @@ std::string dlua_chunk::get_chunk_prefix(const std::string &sorig) const
return rewrite_chunk_prefix(sorig, true);
}
-LUAFN(_crawl_args)
-{
- return dlua_stringtable(ls, SysEnv.cmd_args);
-}
-
-LUAFN(_crawl_milestone)
-{
-#ifdef DGL_MILESTONES
- mark_milestone(luaL_checkstring(ls, 1),
- luaL_checkstring(ls, 2));
-#endif
- return (0);
-}
-
-LUAFN(_crawl_redraw_view)
-{
- viewwindow(true, false);
- return (0);
-}
-
-#ifdef UNIX
-LUAFN(_crawl_millis)
-{
- struct timeval tv;
- struct timezone tz;
- const int error = gettimeofday(&tv, &tz);
- if (error)
- luaL_error(ls, make_stringf("Failed to get time: %s",
- strerror(error)).c_str());
-
- lua_pushnumber(ls, tv.tv_sec * 1000 + tv.tv_usec / 1000);
- return (1);
-}
-#endif
-
-static const struct luaL_reg crawl_lib[] =
-{
- { "args", _crawl_args },
- { "mark_milestone", _crawl_milestone },
- { "redraw_view", _crawl_redraw_view },
-#ifdef UNIX
- { "millis", _crawl_millis },
-#endif
- { NULL, NULL }
-};
-
static int file_marshall(lua_State *ls)
{
if (lua_gettop(ls) != 2)