summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_dgn.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-20 11:19:41 +0200
committerRobert Vollmert <rvollmert@gmx.net>2009-10-20 11:19:41 +0200
commite4018b3ebf7d7e14787a04420014acf581d69978 (patch)
tree743aeabfc897ac9eac50334aefdd55254173a2d9 /crawl-ref/source/l_dgn.cc
parentb00943ff50ceecafa35b13e6286f04b4e4e30070 (diff)
downloadcrawl-ref-e4018b3ebf7d7e14787a04420014acf581d69978.tar.gz
crawl-ref-e4018b3ebf7d7e14787a04420014acf581d69978.zip
Split debug lua bindings out to new library "debug".
Diffstat (limited to 'crawl-ref/source/l_dgn.cc')
-rw-r--r--crawl-ref/source/l_dgn.cc66
1 files changed, 0 insertions, 66 deletions
diff --git a/crawl-ref/source/l_dgn.cc b/crawl-ref/source/l_dgn.cc
index fc34cee72c..3555c541b8 100644
--- a/crawl-ref/source/l_dgn.cc
+++ b/crawl-ref/source/l_dgn.cc
@@ -6,13 +6,10 @@
#include <cmath>
#include "branch.h"
-#include "chardump.h"
#include "cloud.h"
#include "initfile.h"
#include "mapmark.h"
#include "maps.h"
-#include "message.h"
-#include "place.h"
#include "spl-util.h"
#include "view.h"
@@ -100,47 +97,6 @@ static int dgn_depth(lua_State *ls)
return dgn_depth_proc(ls, map->depths, 2);
}
-// WARNING: This is a very low-level call.
-LUAFN(dgn_dbg_goto_place)
-{
- try
- {
- const level_id id = level_id::parse_level_id(luaL_checkstring(ls, 1));
- you.level_type = id.level_type;
- if (id.level_type == LEVEL_DUNGEON)
- {
- you.where_are_you = static_cast<branch_type>(id.branch);
- you.your_level = absdungeon_depth(id.branch, id.depth);
- }
- }
- catch (const std::string &err)
- {
- luaL_error(ls, err.c_str());
- }
- return (0);
-}
-
-LUAFN(dgn_dbg_flush_map_memory)
-{
- dgn_flush_map_memory();
- init_level_connectivity();
- return (0);
-}
-
-LUAFN(dgn_dbg_generate_level)
-{
- no_messages mx;
- env.show.init(0);
- env.map.init(map_cell());
-#ifdef USE_TILE
- tile_init_default_flavour();
- tile_clear_flavour();
- TileNewLevel(true);
-#endif
- builder(you.your_level, you.level_type);
- return (0);
-}
-
static int dgn_place(lua_State *ls)
{
MAP(ls, 1, map);
@@ -1533,32 +1489,10 @@ LUAFN(_dgn_reuse_map)
return (0);
}
-LUAFN(dgn_dbg_dump_map)
-{
- const int pos = lua_isuserdata(ls, 1) ? 2 : 1;
- if (lua_isstring(ls, pos))
- dump_map(lua_tostring(ls, pos), true);
- return (0);
-}
-
-LUAFN(dgn_dbg_test_explore)
-{
-#ifdef WIZARD
- debug_test_explore();
-#endif
- return (0);
-}
-
LUAWRAP(_dgn_reset_level, dgn_reset_level())
const struct luaL_reg dgn_lib[] =
{
-{ "dbg_goto_place", dgn_dbg_goto_place },
-{ "dbg_flush_map_memory", dgn_dbg_flush_map_memory },
-{ "dbg_generate_level", dgn_dbg_generate_level },
-{ "dbg_dump_map", dgn_dbg_dump_map },
-{ "dbg_test_explore", dgn_dbg_test_explore },
-
{ "reset_level", _dgn_reset_level },
{ "default_depth", dgn_default_depth },