diff options
author | Steven Noonan <steven@uplinklabs.net> | 2009-10-13 06:21:48 -0700 |
---|---|---|
committer | Steven Noonan <steven@uplinklabs.net> | 2009-10-13 06:23:14 -0700 |
commit | 5d27773ad8398d0b9b32974360ad3cb2c3170806 (patch) | |
tree | 384087bf7f3299385059cbd5417fe66ae288d52d | |
parent | 6aeefc9277378d8dc87780532a66f9e3083e640b (diff) | |
download | crawl-ref-5d27773ad8398d0b9b32974360ad3cb2c3170806.tar.gz crawl-ref-5d27773ad8398d0b9b32974360ad3cb2c3170806.zip |
unit tests: fix crash when running unit tests under a tiles build
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
-rw-r--r-- | crawl-ref/source/acr.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/luadgn.cc | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index b7071a0783..bc615905ce 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -3508,6 +3508,10 @@ static bool _initialise(void) if (crawl_state.test) { #ifdef DEBUG_DIAGNOSTICS +#ifdef USE_TILE + init_player_doll(); + tiles.initialise_items(); +#endif Options.show_more_prompt = false; crawl_tests::run_tests(true); // Superfluous, just to make it clear that this is the end of diff --git a/crawl-ref/source/luadgn.cc b/crawl-ref/source/luadgn.cc index deb089d3f0..85709621e6 100644 --- a/crawl-ref/source/luadgn.cc +++ b/crawl-ref/source/luadgn.cc @@ -495,6 +495,11 @@ 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); } |