Author: shadowmaster
Date: Sun Apr 5 01:47:10 2009
New Revision: 34507
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34507&view=rev
Log:
Expose the [deprecated_message] code for use elsewhere than EventWML.
Modified:
trunk/src/game_events.cpp
trunk/src/game_events.hpp
Modified: trunk/src/game_events.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=34507&r1=34506&r2=34507&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Sun Apr 5 01:47:10 2009
@@ -464,6 +464,13 @@
const std::string& msg = cfg["message"];
put_wml_message(logger,msg);
+ }
+
+ void handle_deprecated_message(const config& cfg)
+ {
+ // Note: no need to translate the string, since only used for
deprecated things.
+ const std::string& message = cfg["message"];
+ lg::wml_error << message << '\n';
}
} // end namespace game_events (1)
@@ -2080,9 +2087,7 @@
WML_HANDLER_FUNCTION(deprecated_message,/*handler*/,/*event_info*/,cfg)
{
- // Note: no need to translate the string, since only used for
deprecated things.
- const std::string message = cfg["message"];
- lg::wml_error << message << '\n';
+ game_events::handle_deprecated_message( cfg.get_parsed_config()
);
}
WML_HANDLER_FUNCTION(wml_message,/*handler*/,/*event_info*/,cfg)
Modified: trunk/src/game_events.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.hpp?rev=34507&r1=34506&r2=34507&view=diff
==============================================================================
--- trunk/src/game_events.hpp (original)
+++ trunk/src/game_events.hpp Sun Apr 5 01:47:10 2009
@@ -283,7 +283,10 @@
bool unit_matches_filter(unit_map::const_iterator itor, const vconfig
filter);
+ /** Used for [wml_message]. */
void handle_wml_log_message(const config& cfg);
+ /** Used for [deprecated_message]. */
+ void handle_deprecated_message(const config& cfg);
/**
* Function to fire an event.
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits