See comments for info. The space reserve in game_state isn't strictly necessary to fix this
(the move constructor was enough, but I figured might as well).
* Moved definition to the header
* Code formatting
* Removed global create_team_builder, build_team_stage_one, and build_team_stage_two functions in favor of calling the class members directly
* Stop using shared_ptrs in game_state and instead use vector::emplace
* Cleaned up includes
* units - touch-up to orcish crossbow
* remove iCCP chunk from some PNGs
* units - initial n-facing orcish archer sprite frames
* units - orcish archer north bow attack anim
* units - orcish archer north idle anim
* units - add north-facing melee defense anim for orcish archer
* unit sprites - remove iCCP chunk from PNGs
* units - orcish archer north wounded-bobbing anim
* units - minor touch-ups to bowman and orc warrior
* ran wmlindent
Based on work by @stevecotton. Currently, game_launcher owns a single saved_game object that is then passed around by
reference. This changes that for MP mode so that the mp_manager now owns its own saved_game object.
In the process, 86cf7478f494b8b33c8987ce652904ce439f342a was reverted.
No longer needed since 75e9d8a0f1eb22b25a0c85640ac5b754b71d4c4e as gamemap no longer takes a terrain_type_data
pointer. The whole functionality for having separate terrain configs wasn't utilized anyway; the main game config
was passed in in all cases.
Drops the ctor argument from gamemap. I checked editor_map, and while it was creating its own terrain_type_data object,
it was using the same data as in the game_config_manager, so there's little point in not simply using the gcm's ttd
object in all cases. If the GCM singleton is null, a dummy object is created. Should cover the unit tests case.
This also removes the game_config_view arguments from the editor_map ctors since they're no longer needed.
Keep in mind ter_data_cache is simply a shared_ptr, and in all call locations it was grabbed from game_config_manager::terrain_types().
1. campaign_controller took and kept a member, which was passed to either...
2. playsingle_controller or playmp_controller, which passed it to their parent class...
3. play_controller, which kept a member to initialize...
4. game_state, which passed it on to...
5. game_board, which passed it on to...
6. gamemap, where it was *finally* actually needed.
This entire chain has been replaced with a single call to game_config_manager::terrain_types() in the game_board constructor.
gamemap retains its ctor parameter since editor_map passes in its own object.
The ter_data_cache alias has also been removed. It was just confusing.
This moves all the is-autenticated (really is-moderator) stuff out of preferences and into a new session_metadata class.
Note this does remove the ability to [de]auth as a mod while logged in for now.
This also makes open_connection a member of mp_manager and splits some implementations out from their declarations.