74 Commits

Author SHA1 Message Date
Mark de Wever
92f5f92ce5 New year copyright update. 2010-01-01 13:16:49 +00:00
Guillaume Melquiond
2ce41e58d2 Enabled warning only when dubious attributes/children are about to be created. 2009-12-24 08:22:09 +00:00
Mark de Wever
66076dd89f Pre instead of post increment a variable.
Issue found by cppcheck.
2009-11-27 22:59:52 +00:00
Gunter Labes
8565377fd7 corrected off-by-1 error in log messages 2009-07-23 21:01:18 +00:00
Guillaume Melquiond
b181364752 Cleaned code a bit. 2009-07-19 16:30:17 +00:00
Eugen Jiresch
7775ac8ad0 removed unused player_info reference 2009-07-09 09:53:16 +00:00
Eugen Jiresch
271879ba3a replaced player_info references in variable.cpp by team references 2009-07-09 09:46:31 +00:00
Tomasz Śniatowski
204c2017d0 make the code call the proper vconfig ctor
- config*,config* instead of config&,bool
2009-05-01 23:29:09 +01:00
Guillaume Melquiond
14abb2f0f4 The dependency graph of Wesnoth is plain idiotic.
As if pathfind.cpp needed to depend on font.hpp...
2009-05-01 16:14:33 +00:00
Guillaume Melquiond
789736ac91 Removed specialized domains from log.hpp,
...so that adding a new domain no longer forces to recompile the whole
game.
2009-04-24 23:18:31 +00:00
Guillaume Melquiond
55ab65ecec Removed config::all_children_iterator...
...and vconfig::all_children_iterator default constructors.
2009-04-12 14:13:46 +00:00
Patrick Parker
4ffceb57a8 fix a bug with auto-stored WML variables...
...not being restored correctly to their previous state afterwards
(spotted by silene)
2009-04-05 19:07:06 +00:00
Guillaume Melquiond
84ed1d6117 Removed almost unused and redundant functions. 2009-04-05 18:03:14 +00:00
Guillaume Melquiond
4dd3b62080 Removed config::get_children.
Note that the code does not make sense to me, hence the FIXME
comments; we are most certainly destroying WML variables there.
2009-04-05 17:05:07 +00:00
Guillaume Melquiond
60808a88ba Got rid of pointers to config objects. Removed code duplication along the way. 2009-04-04 17:51:20 +00:00
Guillaume Melquiond
3b70748b6e Moved to loops based on config::all_children_range. 2009-03-21 18:44:49 +00:00
Guillaume Melquiond
cf8325c20c Replaced field config::values by function...
...config::attribute_range which returns opaque iterators.
2009-03-20 07:08:43 +00:00
Guillaume Melquiond
75937cea1a Removed config::values. 2009-03-20 07:08:24 +00:00
Guillaume Melquiond
bee7ad1385 Modified config::child_range so that it returns opaque iterators. 2009-03-20 07:06:27 +00:00
Patrick Parker
cd378cecfa make the public memory-managed vconfig constructor a little friendlier
eliminate one vconfig pass-by-value (many more remain)
2009-02-26 01:34:22 +00:00
Mark de Wever
20c52979b8 Add some support for default constructed vconfigs.
Before a default constructed vconfig would crash on operator[]. This has
been fixed, some other issues remain, see the @todo.
2009-01-28 20:44:42 +00:00
Patrick Parker
0ecc9308df real fix for bug #12803 (revert workaround)
* make sure all event handlers created from WML menu item commands use
  memory managed vconfigs

* a flaw with vconfig::all_children_iterator losing track of the
  volatility flag
2009-01-02 04:09:46 +00:00
Mark de Wever
a5d1d2e969 New year copyright update. 2009-01-01 10:27:41 +00:00
Sergey Popov
495f481fdf Split off formula_string_utils from string_utils.
Break the dependency of string_utils.cpp on formula ai since it pulls
in practically everything else as result. Since servers use
string_utils.cpp this is unacceptable.
2008-12-21 15:26:11 +00:00
Eric S. Raymond
9223460daa Remove unused headers. 2008-11-09 04:35:13 +00:00
Tomasz Śniatowski
c54a538139 Refactor gamemap::location -- rename to map_location,
...move into separate cpp/hpp pair. The code under src/ was modified
mainly using a global search-and-replace. This change allows reducing
code dependencies and gets rid of inner-class confusion (parts of the
code had to use "location" when referring to gamemap::location, it is
now consistent across the codebase.)
2008-10-15 17:38:51 +01:00
Ignacio R. Morelle
ef256c7233 Made weapon and second_weapon variables be autostored on events. 2008-09-06 18:54:36 +00:00
Patrick Parker
b9c5c9b744 fix the XP tracking code in tutorial scenario1
fix a problem where the "advance" event was ignoring any unit modifications

add some more logging to variable.cpp
2008-08-18 05:18:59 +00:00
Mark de Wever
2be073ce08 Added constructor to initialize all members and initialize all members. 2008-08-11 17:50:49 +00:00
Mark de Wever
384c3ef6b0 Remove the const of returned copies of strings. 2008-07-23 20:13:33 +00:00
Patrick Parker
a00bf368fd a real fix for [insert_tag] infinite recursion...
...(for example, inside spawned events.)

attempt to fix the unit_map problem with duplicate ID's (but
apparently not successfully)
2008-06-10 08:51:23 +00:00
Mark de Wever
30c19f0704 Update doxygen comment style. 2008-05-18 13:59:35 +00:00
Patrick Parker
915acf1aed replace the evil space characters with lovely tabs 2008-04-22 03:25:15 +00:00
Patrick Parker
73a5b58d18 fixed a missing bit of code in the vconfig constructor
added a more advanced [insert_tag] usage to scenario-test.cfg

(right click on the Elvish Avenger to test it)
2008-04-22 03:13:28 +00:00
Patrick Parker
07b5b732ef memorizing the hash of constant configs was a good idea 2008-04-21 07:01:27 +00:00
Patrick Parker
5dbc350bcc memorizing the hash of variable configs was a misguided optimization 2008-04-21 06:01:35 +00:00
Patrick Parker
85b3eb65bb remove a pointless string copy 2008-04-18 05:04:10 +00:00
Patrick Parker
c6b6c20bd9 prevent [insert_tag] from infinite recursion in vconfig::get_parsed_config()
optimize hash_memory_manager lookups using std::set instead of std::vector
2008-04-18 04:29:37 +00:00
Patrick Parker
d42e83a20e slight change in a deletion order 2008-04-17 09:01:40 +00:00
Patrick Parker
bf481d299c preventing the WML from doing very bad things with memory...
...when using [insert_tag], and I spotted some minor bugs in other
game_events as I was making the change
2008-04-17 08:52:03 +00:00
Patrick Parker
1348cf80d2 new tag [insert_tag], as discussed on wiki/FutureWML
* note: there are ways you can make this crash with bad WML
  these will be safeguarded against further in a later update
2008-04-13 06:43:09 +00:00
Mark de Wever
d9bd18057c Make sure #include "variable.hpp" can be used...
...without the need to include more items.
2008-04-12 09:43:57 +00:00
Mark de Wever
001af46e6e Updated all headers to 2008. 2008-02-16 08:47:16 +00:00
Mark de Wever
324bfdb415 Unified the two different max_loop counters and used highest maximum (65536). 2008-02-07 17:32:16 +00:00
Mark de Wever
9f1c18a262 wassert -> assert 2007-12-10 18:38:50 +00:00
Patrick Parker
093439695c fix a bug with array.length side-effects causing empty arrays to increase to size 1 2007-09-08 05:57:06 +00:00
Gunter Labes
ae9e10f260 codeclean run
set svn:eol-style to native where missing
2007-08-31 19:09:40 +00:00
Patrick Parker
789c997f94 added some comments to variable_info constructor,
and re-arranged one clause slightly
2007-08-23 04:34:59 +00:00
Hans Joachim Gurt
7dcb2280be doxygen, comments 2007-08-22 01:56:59 +00:00
Patrick Parker
969b0791ad return "0" instead of empty string for the length of non-existant WML arrays 2007-08-22 00:36:49 +00:00