26 Commits

Author SHA1 Message Date
Chris Beck
ba51524f6e update copyright to year 2016
using this shell script:

find src -type f -print0 | xargs -0 sed -i "s|Copyright (C) \([[:digit:]]*\)\([ ]*\)-\([ ]*\)2015|Copyright (C) \1\2-\32016|g"
2016-01-02 23:59:31 -05:00
gfgtdf
33bf5c60b8 Revert "replace play_controller::loading_game_ member"
This reverts commit 46786c9fa358fdb3947c3e7a45b20944e0980649.

The other implementation did not work becasue game_data phase was reset to PRELOAD in fire_preload()

Conflicts:
	src/play_controller.cpp
	src/playsingle_controller.cpp
	src/replay_controller.cpp
2015-03-28 15:51:02 +01:00
gfgtdf
46786c9fa3 replace play_controller::loading_game_ member 2015-03-27 21:19:08 +01:00
gfgtdf
17afc39e8a remove unneeded function 2015-03-27 21:19:06 +01:00
gfgtdf
c39598e723 fix resetting of variables in replay
I also moved wml_emnu_items member out of game_data to to prevent possible problems when resetting game_data.
2015-03-27 21:19:05 +01:00
gfgtdf
35887b066f remove unused scenario_ variable in game_data 2015-03-27 21:19:01 +01:00
Ignacio R. Morelle
57ae45387a New Year copyright update 2015-01-01 19:07:35 -03:00
gfgtdf
f55d96cba0 remove unneeded include. 2014-12-31 15:43:06 +01:00
gfgtdf
b1ccca6b17 Cleanup game_data.cpp/hpp 2014-12-31 15:02:59 +01:00
gfgtdf
6e02488b61 move teambuilder functions to new file teambuilder.cpp
They are not related to game_data so there is no reason why they should
be there.
2014-12-31 15:02:58 +01:00
gfgtdf
9f28fc8f37 don't do variable subsitution when parsing [team][village]
Becasue are no posibilities to change the variables or the positions of
the villages before this code happens, i cannot see any common usecase
for this feature, Also it's not documented in the wiki.

Note that it is of course still possible to change village owners
depending on variables in a prestart event.
2014-12-31 15:02:56 +01:00
Chris Beck
da4074e882 use boost mersenne twister rng, add boost::random dependency
This is a squash of work done in april, see closed github pull
request. #160
2014-11-03 11:24:24 -05:00
Mark de Wever
c119584895 Strip trailing whitespace. 2014-07-13 12:41:43 +02:00
gfgtdf
5a2d187d5a remove unused variable 2014-07-09 21:30:49 +02:00
gfgtdf
fc28c17c3d remove unused variable
the variable was only used for a log message and it's not worth the
additional code complexity
2014-07-09 21:30:46 +02:00
gfgtdf
459630a67b remove unused variable. 2014-07-09 17:32:42 +02:00
Chris Beck
4286b13a79 team::build takes a pointer to the game_data obj we want to use
This eliminates another use of resources:: in class team
2014-07-06 18:45:30 -04:00
gfgtdf
1a8d3c6fa2 refactor variable_info
we now use const correctness to ensure that we sont change teh game
config if we just want to read values.

Also we use a new algorithm that is a little slower when parsing small
variablenames and much faster when parsing long variablenames.
2014-07-01 04:49:49 +02:00
gfgtdf
23b0c5343f catch invalid variablename exception when using
these exceptiosn are not thrown yet in all cases. This patch prepares a
patch taht makes use of it.
2014-06-30 00:45:02 +02:00
gfgtdf
c366acb96e make different functions for different variable access
the const_cast there is an improvement of the previous solution where we
just hided it by using resources::gamedata which is never const.
2014-06-30 00:44:58 +02:00
gfgtdf
ff70a7da83 add variable_info::add_child method 2014-06-30 00:44:54 +02:00
gfgtdf
ac88831e98 add method variable_info::as_scalar_const 2014-06-30 00:44:53 +02:00
gfgtdf
eb9ef2d16e add variable_info::clear method
move code from game_data

the plan is to make variable_info s member private.
2014-06-30 00:44:51 +02:00
gfgtdf
5d3040c0b8 move variable_info to own file
and also move game_data::temporarites_ to that file as a static
variable.

This fixes variable_info being dependent on game_data.
2014-06-30 00:44:49 +02:00
gfgtdf
16938d397d add game_data::get_variable_accesss method. 2014-06-30 00:44:48 +02:00
Chris Beck
b51d6a15d1 rename gamestatus.?pp -> game_data.?pp, b/c of content changes 2014-06-24 13:44:25 -04:00