make the editor able to load maps referenced in scenario files...
...and load and save maps embedded in scenario files. If you wanted to make just that little change in the test scenario's map, rejoice. Also some doc comments.
This commit is contained in:
parent
5f2fc39085
commit
8489a88d70
7 changed files with 261 additions and 87 deletions
|
@ -33,6 +33,9 @@ Version 1.7.0-svn:
|
|||
* Made "wesnoth -e --load DIR" (and consequently "wesnoth -e DIR") set
|
||||
DIR as the default map directory for the current session, and start with
|
||||
the map load dialog open
|
||||
* Added ability to load maps referenced in scenario files
|
||||
* Added ability to work with maps embedded in scenario files (saving works
|
||||
in a limited scope)
|
||||
* FormulaAI:
|
||||
* Fixed bug #13230: added debug_float FormulaAI function to allow debugging
|
||||
via floating popups on the specified hex
|
||||
|
|
|
@ -423,15 +423,7 @@ void editor_controller::load_map_dialog(bool force_same_context /* = false */)
|
|||
}
|
||||
int res = dialogs::show_file_chooser_dialog(gui(), fn, _("Choose a Map to Open"));
|
||||
if (res == 0) {
|
||||
for (size_t i = 0; i < map_contexts_.size(); ++i) {
|
||||
if (map_contexts_[i]->get_filename() == fn) {
|
||||
gui::dialog(gui(), "", _("This map is already open.") + std::string("\n") + fn).show();
|
||||
switch_context(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
load_map(fn, force_same_context ? false : use_mdi_);
|
||||
}
|
||||
load_map(fn, force_same_context ? false : use_mdi_); }
|
||||
}
|
||||
|
||||
void editor_controller::new_map_dialog()
|
||||
|
@ -512,8 +504,8 @@ void editor_controller::apply_mask_dialog()
|
|||
int res = dialogs::show_file_chooser_dialog(gui(), fn, _("Choose a mask to apply"));
|
||||
if (res == 0) {
|
||||
try {
|
||||
editor_map mask = editor_map::load_from_file(game_config_, fn);
|
||||
editor_action_apply_mask a(mask);
|
||||
map_context mask(game_config_, fn);
|
||||
editor_action_apply_mask a(mask.get_map());
|
||||
perform_refresh(a);
|
||||
} catch (editor_map_load_exception& e) {
|
||||
gui::message_dialog(gui(), _("Error loading mask"), e.what()).show();
|
||||
|
@ -534,8 +526,8 @@ void editor_controller::create_mask_to_dialog()
|
|||
int res = dialogs::show_file_chooser_dialog(gui(), fn, _("Choose target map"));
|
||||
if (res == 0) {
|
||||
try {
|
||||
editor_map map = editor_map::load_from_file(game_config_, fn);
|
||||
editor_action_create_mask a(map);
|
||||
map_context map(game_config_, fn);
|
||||
editor_action_create_mask a(map.get_map());
|
||||
perform_refresh(a);
|
||||
} catch (editor_map_load_exception& e) {
|
||||
gui::message_dialog(gui(), _("Error loading map"), e.what()).show();
|
||||
|
@ -612,10 +604,18 @@ void editor_controller::resize_map_dialog()
|
|||
|
||||
bool editor_controller::save_map_as(const std::string& filename)
|
||||
{
|
||||
size_t is_open = check_open_map(filename);
|
||||
if (is_open < map_contexts_.size() && is_open != current_context_index_) {
|
||||
gui::dialog(gui(), _("This map is already open."), filename).show();
|
||||
return false;
|
||||
}
|
||||
std::string old_filename = get_map_context().get_filename();
|
||||
bool embedded = get_map_context().is_embedded();
|
||||
get_map_context().set_filename(filename);
|
||||
get_map_context().set_embedded(false);
|
||||
if (!save_map(true)) {
|
||||
get_map_context().set_filename(old_filename);
|
||||
get_map_context().set_embedded(embedded);
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
@ -629,26 +629,67 @@ bool editor_controller::save_map(bool display_confirmation)
|
|||
if (display_confirmation) {
|
||||
gui::message_dialog(gui(), "", _("Map saved.")).show();
|
||||
}
|
||||
} catch (io_exception& e) {
|
||||
utils::string_map symbols;
|
||||
symbols["msg"] = e.what();
|
||||
const std::string msg = vgettext("Could not save the map: $msg", symbols);
|
||||
gui::message_dialog(gui(), "", msg).show();
|
||||
} catch (editor_map_save_exception& e) {
|
||||
gui::message_dialog(gui(), "", e.what()).show();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
size_t editor_controller::check_open_map(const std::string& fn) const
|
||||
{
|
||||
size_t i = 0;
|
||||
while (i < map_contexts_.size() && map_contexts_[i]->get_filename() != fn) ++i;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
bool editor_controller::check_switch_open_map(const std::string& fn)
|
||||
{
|
||||
size_t i = check_open_map(fn);
|
||||
if (i < map_contexts_.size()) {
|
||||
gui::dialog(gui(), _("This map is already open."), fn).show();
|
||||
switch_context(i);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void editor_controller::load_map(const std::string& filename, bool new_context)
|
||||
{
|
||||
if (check_switch_open_map(filename)) return;
|
||||
LOG_ED << "Load map: " << filename << (new_context ? " (new)" : " (same)") << "\n";
|
||||
try {
|
||||
std::auto_ptr<map_context> mc(new map_context(game_config_, filename));
|
||||
if (mc->get_filename() != filename) {
|
||||
if (check_switch_open_map(mc->get_filename())) return;
|
||||
}
|
||||
if (new_context) {
|
||||
std::auto_ptr<map_context> mc(new map_context(game_config_, filename));
|
||||
int new_id = add_map_context(mc.release());
|
||||
switch_context(new_id);
|
||||
} else {
|
||||
replace_map_context(map_context(game_config_, filename));
|
||||
replace_map_context(*mc);
|
||||
}
|
||||
if (get_map_context().is_embedded()) {
|
||||
const char* msg = _("Loaded embedded map data");
|
||||
gui::message_dialog(gui(), _("Map loaded from scenario"), msg).show();
|
||||
} else {
|
||||
if (get_map_context().get_filename() != filename) {
|
||||
if (get_map_context().get_map_data_key().empty()) {
|
||||
ERR_ED << "Internal error, map context filename changed: "
|
||||
<< filename << " -> " << get_map_context().get_filename()
|
||||
<< " with no apparent scenario load\n";
|
||||
} else {
|
||||
utils::string_map symbols;
|
||||
symbols["old"] = filename;
|
||||
const char* msg = _("Loaded referenced map file:\n"
|
||||
"$new");
|
||||
symbols["new"] = get_map_context().get_filename();
|
||||
symbols["map_data"] = get_map_context().get_map_data_key();
|
||||
gui::message_dialog(gui(), _("Map loaded from scenario"),
|
||||
vgettext(msg, symbols)).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (editor_map_load_exception& e) {
|
||||
gui::message_dialog(gui(), _("Error loading map"), e.what()).show();
|
||||
|
@ -941,7 +982,8 @@ bool editor_controller::execute_command(hotkey::HOTKEY_COMMAND command, int inde
|
|||
new_map_dialog();
|
||||
return true;
|
||||
case HOTKEY_EDITOR_MAP_SAVE:
|
||||
if (get_map_context().get_filename().empty()) {
|
||||
if (get_map_context().get_filename().empty()
|
||||
|| is_directory(get_map_context().get_filename())) {
|
||||
save_map_as_dialog();
|
||||
} else {
|
||||
save_map();
|
||||
|
@ -1004,6 +1046,9 @@ void editor_controller::expand_open_maps_menu(std::vector<std::string>& items)
|
|||
}
|
||||
std::string label = "[" + lexical_cast<std::string>(mci) + "] "
|
||||
+ filename;
|
||||
if (map_contexts_[mci]->is_embedded()) {
|
||||
label += " (E)";
|
||||
}
|
||||
contexts.push_back(label);
|
||||
}
|
||||
items.insert(items.begin() + i, contexts.begin(), contexts.end());
|
||||
|
|
|
@ -164,6 +164,27 @@ class editor_controller : public controller_base,
|
|||
*/
|
||||
void new_map(int width, int height, t_translation::t_terrain fill, bool new_context);
|
||||
|
||||
/**
|
||||
* Check if a map is already open.
|
||||
* @return index of the map context containg the given filename,
|
||||
* or map_contexts_.size() if not found.
|
||||
*/
|
||||
size_t check_open_map(const std::string& fn) const;
|
||||
|
||||
/**
|
||||
* check_open_map shorthand
|
||||
* @return true if the map is open, false otherwise
|
||||
*/
|
||||
bool map_is_open(const std::string& fn) const {
|
||||
return check_open_map(fn) < map_contexts_.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a map is already open. If yes, switch to it
|
||||
* and return true, return false otherwise.
|
||||
*/
|
||||
bool check_switch_open_map(const std::string& fn);
|
||||
|
||||
/**
|
||||
* Load a map given the filename
|
||||
*/
|
||||
|
|
|
@ -27,11 +27,8 @@
|
|||
#include "../wml_exception.hpp"
|
||||
|
||||
|
||||
|
||||
namespace editor2 {
|
||||
|
||||
namespace {
|
||||
|
||||
editor_map_load_exception wrap_exc(const char* type, const std::string& e_msg, const std::string& filename)
|
||||
{
|
||||
WRN_ED << type << " error in load map " << filename << ": " << e_msg << "\n";
|
||||
|
@ -44,7 +41,11 @@ editor_map_load_exception wrap_exc(const char* type, const std::string& e_msg, c
|
|||
return editor_map_load_exception(filename, msg);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
editor_map::editor_map(const config& terrain_cfg)
|
||||
: gamemap(terrain_cfg, gamemap::default_map_header)
|
||||
, selection_()
|
||||
{
|
||||
}
|
||||
|
||||
editor_map::editor_map(const config& terrain_cfg, const std::string& data)
|
||||
: gamemap(terrain_cfg, data)
|
||||
|
@ -53,6 +54,19 @@ editor_map::editor_map(const config& terrain_cfg, const std::string& data)
|
|||
sanity_check();
|
||||
}
|
||||
|
||||
editor_map editor_map::from_string(const config& terrain_cfg, const std::string& data)
|
||||
{
|
||||
try {
|
||||
return editor_map(terrain_cfg, data);
|
||||
} catch (incorrect_map_format_exception& e) {
|
||||
throw wrap_exc("format", e.msg_, "");
|
||||
} catch (twml_exception& e) {
|
||||
throw wrap_exc("wml", e.user_message, "");
|
||||
} catch (config::error& e) {
|
||||
throw wrap_exc("config", e.message, "");
|
||||
}
|
||||
}
|
||||
|
||||
editor_map::editor_map(const config& terrain_cfg, size_t width, size_t height, t_translation::t_terrain filler)
|
||||
: gamemap(terrain_cfg, gamemap::default_map_header + t_translation::write_game_map(
|
||||
t_translation::t_map(width + 2, t_translation::t_list(height + 2, filler))))
|
||||
|
@ -61,13 +75,6 @@ editor_map::editor_map(const config& terrain_cfg, size_t width, size_t height, t
|
|||
sanity_check();
|
||||
}
|
||||
|
||||
editor_map::editor_map(const config& /*terrain_cfg*/, const gamemap& map)
|
||||
: gamemap(map)
|
||||
, selection_()
|
||||
{
|
||||
sanity_check();
|
||||
}
|
||||
|
||||
editor_map::editor_map(const gamemap& map)
|
||||
: gamemap(map)
|
||||
, selection_()
|
||||
|
@ -75,29 +82,6 @@ editor_map::editor_map(const gamemap& map)
|
|||
sanity_check();
|
||||
}
|
||||
|
||||
editor_map editor_map::load_from_file(const config& game_config, const std::string& filename)
|
||||
{
|
||||
log_scope2(editor, "Loading map " + filename);
|
||||
std::string map_string = read_file(filename);
|
||||
|
||||
|
||||
if (map_string.empty()) {
|
||||
std::string message = _("Empty map file or file not found");
|
||||
throw editor_map_load_exception(filename, message);
|
||||
}
|
||||
try {
|
||||
editor_map new_map(game_config, map_string);
|
||||
return new_map;
|
||||
} catch (incorrect_map_format_exception& e) {
|
||||
throw wrap_exc("format", e.msg_, filename);
|
||||
} catch (twml_exception& e) {
|
||||
throw wrap_exc("wml", e.user_message, filename);
|
||||
} catch (config::error& e) {
|
||||
throw wrap_exc("config", e.message, filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
editor_map::~editor_map()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -50,6 +50,20 @@ struct editor_map_load_exception : public editor_exception
|
|||
std::string filename;
|
||||
};
|
||||
|
||||
struct editor_map_save_exception : public editor_exception
|
||||
{
|
||||
editor_map_save_exception(const std::string& msg)
|
||||
: editor_exception(msg)
|
||||
{
|
||||
}
|
||||
~editor_map_save_exception() throw() {}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Exception wrapping utility
|
||||
*/
|
||||
editor_map_load_exception wrap_exc(const char* type, const std::string& e_msg, const std::string& filename);
|
||||
|
||||
/**
|
||||
* This class adds extra editor-specific functionality to a normal gamemap.
|
||||
|
@ -58,16 +72,36 @@ class editor_map : public gamemap
|
|||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Empty map constructor
|
||||
*/
|
||||
explicit editor_map(const config& terrain_cfg);
|
||||
|
||||
/**
|
||||
* Create an editor map from a map data string
|
||||
*/
|
||||
editor_map(const config& terrain_cfg, const std::string& data);
|
||||
|
||||
/**
|
||||
* Wrapper around editor_map(cfg, data) that catches possible exceptions
|
||||
* and wraps them in a editor_map_load_exception
|
||||
*/
|
||||
static editor_map from_string(const config& terrain_cfg, const std::string& data);
|
||||
|
||||
/**
|
||||
* Create an editor map with the given dimensions and filler terrain
|
||||
*/
|
||||
editor_map(const config& terrain_cfg, size_t width, size_t height, t_translation::t_terrain filler);
|
||||
|
||||
editor_map(const config& terrain_cfg, const gamemap& map);
|
||||
|
||||
/**
|
||||
* Create an editor_map by upgrading an existing gamemap. The map data is
|
||||
* copied. Marked "explicit" to avoid potentially harmful autmatic conversions.
|
||||
*/
|
||||
explicit editor_map(const gamemap& map);
|
||||
|
||||
static editor_map load_from_file(const config& game_config, const std::string& filename);
|
||||
|
||||
/**
|
||||
* editor_map destructor
|
||||
*/
|
||||
~editor_map();
|
||||
|
||||
/**
|
||||
|
@ -137,7 +171,7 @@ public:
|
|||
|
||||
/**
|
||||
* Resize the map. If the filler is NONE, the border terrain will be copied
|
||||
* when expanding, otherwise the fill er terrain will be inserted there
|
||||
* when expanding, otherwise the filler terrain will be inserted there
|
||||
*/
|
||||
void resize(int width, int height, int x_offset, int y_offset,
|
||||
t_translation::t_terrain filler = t_translation::NONE_TERRAIN);
|
||||
|
@ -148,11 +182,17 @@ public:
|
|||
*/
|
||||
gamemap mask_to(const gamemap& target) const;
|
||||
|
||||
/**
|
||||
* A precondition to several map operations
|
||||
* @return true if this map has the same dimensions as the other map
|
||||
*/
|
||||
bool same_size_as(const gamemap& other) const;
|
||||
|
||||
protected:
|
||||
void swap_starting_position(int x1, int y1, int x2, int y2);
|
||||
t_translation::t_list clone_column(int x, t_translation::t_terrain filler);
|
||||
|
||||
//helper functions for resizing
|
||||
void expand_right(int count, t_translation::t_terrain filler);
|
||||
void expand_left(int count, t_translation::t_terrain filler);
|
||||
void expand_top(int count, t_translation::t_terrain filler);
|
||||
|
|
|
@ -19,8 +19,14 @@
|
|||
#include "../display.hpp"
|
||||
#include "../filesystem.hpp"
|
||||
#include "../foreach.hpp"
|
||||
#include "../gettext.hpp"
|
||||
#include "../map_exception.hpp"
|
||||
#include "../map_label.hpp"
|
||||
#include "../wml_exception.hpp"
|
||||
|
||||
#include "formula_string_utils.hpp"
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
|
||||
namespace editor2 {
|
||||
|
@ -28,8 +34,10 @@ namespace editor2 {
|
|||
const size_t map_context::max_action_stack_size_ = 100;
|
||||
|
||||
map_context::map_context(const editor_map& map)
|
||||
: map_(map)
|
||||
, filename_()
|
||||
: filename_()
|
||||
, map_data_key_()
|
||||
, embedded_(false)
|
||||
, map_(map)
|
||||
, undo_stack_()
|
||||
, redo_stack_()
|
||||
, actions_since_save_(0)
|
||||
|
@ -43,8 +51,10 @@ map_context::map_context(const editor_map& map)
|
|||
}
|
||||
|
||||
map_context::map_context(const config& game_config, const std::string& filename)
|
||||
: map_(editor_map::load_from_file(game_config, filename)) //will throw on error
|
||||
, filename_(filename)
|
||||
: filename_(filename)
|
||||
, map_data_key_()
|
||||
, embedded_(false)
|
||||
, map_(game_config)
|
||||
, undo_stack_()
|
||||
, redo_stack_()
|
||||
, actions_since_save_(0)
|
||||
|
@ -55,6 +65,41 @@ map_context::map_context(const config& game_config, const std::string& filename)
|
|||
, changed_locations_()
|
||||
, everything_changed_(false)
|
||||
{
|
||||
log_scope2(editor, "Loading map " + filename);
|
||||
if (!file_exists(filename) || is_directory(filename)) {
|
||||
throw editor_map_load_exception(filename, _("File not found"));
|
||||
}
|
||||
std::string map_string = read_file(filename);
|
||||
boost::regex re("map_data\\s*=\\s*\"(.+?)\"");
|
||||
boost::smatch m;
|
||||
if (boost::regex_search(map_string, m, re, boost::regex_constants::match_not_dot_null)) {
|
||||
boost::regex re2("\\{(.+?)\\}");
|
||||
boost::smatch m2;
|
||||
std::string m1 = m[1];
|
||||
if (boost::regex_search(m1, m2, re2)) {
|
||||
map_data_key_ = m1;
|
||||
LOG_ED << "Map looks like a scenario, trying {" << m2[1] << "}\n";
|
||||
std::string new_filename = get_wml_location(m2[1], directory_name(m2[1]));
|
||||
if (new_filename.empty()) {
|
||||
std::string message = _("The map file looks like a scenario, "
|
||||
"but the map_data value does not point to an existing file")
|
||||
+ std::string("\n") + m2[1];
|
||||
throw editor_map_load_exception(filename, message);
|
||||
}
|
||||
LOG_ED << "New filename is: " << new_filename << "\n";
|
||||
filename_ = new_filename;
|
||||
map_string = read_file(filename_);
|
||||
} else {
|
||||
LOG_ED << "Loading embedded map file\n";
|
||||
embedded_ = true;
|
||||
map_string = m[1];
|
||||
}
|
||||
}
|
||||
if (map_string.empty()) {
|
||||
std::string message = _("Empty map file");
|
||||
throw editor_map_load_exception(filename, message);
|
||||
}
|
||||
map_ = editor_map::from_string(game_config, map_string); //throws on error
|
||||
}
|
||||
|
||||
map_context::~map_context()
|
||||
|
@ -157,21 +202,33 @@ void map_context::reset_starting_position_labels(display& disp)
|
|||
bool map_context::save()
|
||||
{
|
||||
std::string data = map_.write();
|
||||
write_file(get_filename(), data);
|
||||
clear_modified();
|
||||
try {
|
||||
if (!is_embedded()) {
|
||||
write_file(get_filename(), data);
|
||||
} else {
|
||||
std::string map_string = read_file(get_filename());
|
||||
boost::regex re("(.*map_data\\s*=\\s*\")(.+?)(\".*)");
|
||||
boost::smatch m;
|
||||
if (boost::regex_search(map_string, m, re, boost::regex_constants::match_not_dot_null)) {
|
||||
std::stringstream ss;
|
||||
ss << m[1];
|
||||
ss << data;
|
||||
ss << m[3];
|
||||
write_file(get_filename(), ss.str());
|
||||
} else {
|
||||
throw editor_map_save_exception(_("Could not save into scenario"));
|
||||
}
|
||||
}
|
||||
clear_modified();
|
||||
} catch (io_exception& e) {
|
||||
utils::string_map symbols;
|
||||
symbols["msg"] = e.what();
|
||||
const std::string msg = vgettext("Could not save the map: $msg", symbols);
|
||||
throw editor_map_save_exception(msg);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void map_context::load_map(const config& game_config, const std::string& filename)
|
||||
{
|
||||
editor_map new_map = editor_map::load_from_file(game_config, filename);
|
||||
set_filename(filename);
|
||||
set_map(new_map);
|
||||
//TODO when this fails see if it's a scenario with a
|
||||
//mapdata= key and give the user an option of loading
|
||||
//that map instead of just failing
|
||||
}
|
||||
|
||||
void map_context::set_map(const editor_map& map)
|
||||
{
|
||||
if (map_.h() != map.h() || map_.w() != map.w()) {
|
||||
|
|
|
@ -35,17 +35,25 @@ class map_context
|
|||
{
|
||||
public:
|
||||
/**
|
||||
* A map context can only by created from an existing map
|
||||
* Create a map context from an existing map. The filename is set to be
|
||||
* empty, indicating a new map.
|
||||
* Marked "explicit" to avoid automatic conversions.
|
||||
*/
|
||||
explicit map_context(const editor_map& map);
|
||||
|
||||
/**
|
||||
* Create map_context from a map file. If the map cannot be
|
||||
* loaded, an exception will be thrown and the object will
|
||||
* not be constructed.
|
||||
* Create map_context from a map file. If the map cannot be loaded, an
|
||||
* exception will be thrown and the object will not be constructed. If the
|
||||
* map file is a scenario, the map specified in its map_data key will be
|
||||
* loaded, and the stored filename updated accordingly. Maps embedded
|
||||
* inside scenarios do not change the filename, but set the "embedded" flag
|
||||
* instead.
|
||||
*/
|
||||
map_context(const config& game_config, const std::string& filename);
|
||||
|
||||
/**
|
||||
* Map context destructor
|
||||
*/
|
||||
~map_context();
|
||||
|
||||
/**
|
||||
|
@ -126,14 +134,18 @@ public:
|
|||
|
||||
void set_filename(const std::string& fn) { filename_ = fn; }
|
||||
|
||||
const std::string& get_map_data_key() const { return map_data_key_; }
|
||||
|
||||
bool is_embedded() const { return embedded_; }
|
||||
|
||||
void set_embedded(bool v) { embedded_ = v; }
|
||||
|
||||
/**
|
||||
* Saves the map under the current filename. Filename must be valid.
|
||||
* May throw an exception on failure.
|
||||
*/
|
||||
bool save();
|
||||
|
||||
void load_map(const config& game_config, const std::string& filename);
|
||||
|
||||
void set_map(const editor_map& map);
|
||||
|
||||
/**
|
||||
|
@ -194,6 +206,23 @@ public:
|
|||
void clear_undo_redo();
|
||||
|
||||
protected:
|
||||
/**
|
||||
* The actual filename of this map. An empty string indicates a new map.
|
||||
*/
|
||||
std::string filename_;
|
||||
|
||||
/**
|
||||
* When a scenario file is loaded, the referenced map is loaded instead.
|
||||
* The verbatim form of the reference is kept here.
|
||||
*/
|
||||
std::string map_data_key_;
|
||||
|
||||
/**
|
||||
* Whether the map context refers to a map embedded in a scenario file.
|
||||
* This distinction is important in order to avoid overwriting the scenario.
|
||||
*/
|
||||
bool embedded_;
|
||||
|
||||
/**
|
||||
* The map object of this map_context.
|
||||
*/
|
||||
|
@ -221,11 +250,6 @@ protected:
|
|||
*/
|
||||
void perform_action_between_stacks(action_stack& from, action_stack& to);
|
||||
|
||||
/**
|
||||
* The actual filename of this map. An empty string indicates a new map.
|
||||
*/
|
||||
std::string filename_;
|
||||
|
||||
/**
|
||||
* The undo stack. A double-ended queues due to the need to add items to one end,
|
||||
* and remove from both when performing the undo or when trimming the size. This container owns
|
||||
|
|
Loading…
Add table
Reference in a new issue