Author: mordante
Date: Mon Dec  8 22:09:57 2008
New Revision: 31381

URL: http://svn.gna.org/viewcvs/wesnoth?rev=31381&view=rev
Log:
Added a extra preprocessor symbol.

For the new drawing engine some parts of the engine are heavily
rewritten so it's wanted to get a special preprocessor symbol for that.
Also fixed a bug, it seemed the new widgets never parsed the
preprocessor symbols before.

Modified:
    trunk/src/config_cache.cpp
    trunk/src/gui/widgets/settings.cpp

Modified: trunk/src/config_cache.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/config_cache.cpp?rev=31381&r1=31380&r2=31381&view=diff
==============================================================================
--- trunk/src/config_cache.cpp (original)
+++ trunk/src/config_cache.cpp Mon Dec  8 22:09:57 2008
@@ -83,6 +83,9 @@
                defines_map_["APPLE"] = preproc_define();
 #endif
 
+#ifdef NEW_DRAW
+               defines_map_["NEW_DRAW"] = preproc_define();
+#endif
        }
 
        void config_cache::get_config(const std::string& path, config& cfg)

Modified: trunk/src/gui/widgets/settings.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/settings.cpp?rev=31381&r1=31380&r2=31381&view=diff
==============================================================================
--- trunk/src/gui/widgets/settings.cpp (original)
+++ trunk/src/gui/widgets/settings.cpp Mon Dec  8 22:09:57 2008
@@ -19,6 +19,7 @@
 
 
 #include "asserts.hpp"
+#include "config_cache.hpp"
 #include "filesystem.hpp"
 #include "gettext.hpp"
 #include "gui/widgets/window.hpp"
@@ -99,7 +100,10 @@
        config cfg;
        const std::string& filename = "data/gui/default.cfg";
        try {
-               scoped_istream stream = preprocess_file(filename);
+               preproc_map preproc(
+                               
game_config::config_cache::instance().get_preproc_map());
+               scoped_istream stream = preprocess_file(filename, &preproc);
+
                read(cfg, *stream);
        } catch(config::error&) {
                ERR_G_P << "Setting: could not read file '" << filename << 
"'.\n";


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to