diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-23 20:02:09 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-23 20:02:09 +0000 |
commit | dd633d4ba9abc5e8384ec12974ea18c3bbaefe2d (patch) | |
tree | 9d3210276b7cb9b141571e3eb75503c81c3d39ef /crawl-ref/source/luadgn.h | |
parent | 32ba97b96685241b1e30299f313c15d20d103998 (diff) | |
download | crawl-ref-dd633d4ba9abc5e8384ec12974ea18c3bbaefe2d.tar.gz crawl-ref-dd633d4ba9abc5e8384ec12974ea18c3bbaefe2d.zip |
Oops, missed luadgn.cc
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1630 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/luadgn.h')
-rw-r--r-- | crawl-ref/source/luadgn.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/crawl-ref/source/luadgn.h b/crawl-ref/source/luadgn.h new file mode 100644 index 0000000000..ca778c4b19 --- /dev/null +++ b/crawl-ref/source/luadgn.h @@ -0,0 +1,48 @@ +/* + * File: luadgn.h + * Summary: Dungeon-builder Lua interface. + * + * Modified for Crawl Reference by $Author: dshaligram $ on $Date: 2007-06-21T19:20:47.183838Z $ + */ + +#ifndef LUADGN_H +#define LUADGN_H + +#include "AppHdr.h" +#include "clua.h" + +extern CLua dlua; + +class dlua_chunk +{ +private: + std::string file; + std::string chunk; + int first, last; // First and last lines of the original source. + +private: + int check_op(CLua *, int); + +public: + std::string error; + +public: + dlua_chunk(); + void clear(); + void add(int line, const std::string &line); + + int load(CLua *interp); + int load_call(CLua *interp, const char *function); + void set_file(const std::string &s); + + const std::string &lua_string() const { return chunk; } + std::string orig_error() const; + + bool empty() const; +}; + +void init_dungeon_lua(); +std::string dgn_set_default_depth(const std::string &s); +void dgn_reset_default_depth(); + +#endif |