From 258c5ce03f86f169f9ef8fe2a57bb5afc27d4385 Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Wed, 8 Nov 2006 19:59:11 +0000 Subject: [PATCH] fixed the cavegenerator to work again. --- README.BRANCH | 1 + src/cavegen.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.BRANCH b/README.BRANCH index dfa26a8ecce..77b79772165 100644 --- a/README.BRANCH +++ b/README.BRANCH @@ -23,6 +23,7 @@ Main TODO list is here FIXED BUT NOT TESTED, NOTE the code looks ugly with the calls to terrain_translation, this needs to be fixed after the final conversion +* cavegen works again, can be tested with Httt scepter of fire * The editor is broken has to be fixed, won't compiler * move all things name xx2 back to xx The rename is done to trace down the entire caller tree diff --git a/src/cavegen.cpp b/src/cavegen.cpp index 8cf0f47233a..ec61a3a165a 100644 --- a/src/cavegen.cpp +++ b/src/cavegen.cpp @@ -109,7 +109,7 @@ config cave_map_generator::create_scenario(const std::vector& /*arg std::stringstream out; for(size_t y = 0; y != height_; ++y) { for(size_t x = 0; x != width_; ++x) { - out << map_[x][y]; + out << terrain_translation().set_letter(map_[x][y]); //FIXME MdW, should this be done by the map converter?? } out << "\n"; @@ -361,7 +361,7 @@ void cave_map_generator::set_terrain(gamemap::location loc, terrain_translation: void cave_map_generator::place_castle(const std::string& side, gamemap::location loc) { if(side != "") { - set_terrain(loc,side[0]); + set_terrain(loc, terrain_translation().get_letter(side)); } gamemap::location adj[6];