78051 Commits

Author SHA1 Message Date
Charles Dang
3e26cba475 Teambuilder: only pass in the necessary team 2021-01-04 04:54:09 +11:00
Charles Dang
19d7fb6827 Teambuilder: fixed a well-hidden bug involving this class being copyable
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).
2021-01-04 04:47:58 +11:00
doofus-01
4ca64655cb
terrain-graphics - de-link flagging of Eff and Eqf (#5408) 2021-01-03 09:22:04 -08:00
Charles Dang
3f40a8374c Fixup b3e77a6 (singleton use I missed) 2021-01-03 22:18:44 +11:00
Charles Dang
95dc1f994d Teambuilder: big cleanup
* 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
2021-01-03 22:14:29 +11:00
Charles Dang
b3e77a656f Menu Events: avoid resource pointers where possible 2021-01-03 21:40:10 +11:00
Charles Dang
f430b03c2a Menu Handler: removed unit, team, and map getters
Used the ones in play_controller instead of defining others in this class.
Also added a non-const play_controller::get_units to facilitate the switch.
2021-01-03 21:34:05 +11:00
Charles Dang
49034e4629 Play Controller: droped _const suffixes from getters 2021-01-03 21:17:54 +11:00
Charles Dang
479252f9b5 Fixup 0c0c42c (this can't be explicit else it doesn't work with brace-init lists) 2021-01-03 21:10:40 +11:00
Pentarctagon
d8af4ffdad
Slightly simplify a method. 2021-01-03 03:45:15 -06:00
Pentarctagon
3f66fac2fe
Add doxygen comments to forum_user_handler.
Also get rid of `use_phpbb_encryption()` since the only place it's used is hard-coded to true.
2021-01-03 03:07:44 -06:00
Charles Dang
2c4d9dff7f Game Board: removed game_lua_kernel as friend 2021-01-03 19:09:03 +11:00
Charles Dang
c2c45aa085 Game Board: removed mouse_handler and menu_handler as friends 2021-01-03 18:54:38 +11:00
Charles Dang
627bde781e Made more use of play_controller::get_teams
Looks like some of these (esp in mouse_handler) would not have worked before without the non-const overload of get_teams.
2021-01-03 18:43:47 +11:00
Charles Dang
3006359321 Game Board: play_controller and game_state are no longer friends
A non-const overload of game_board::map was added in the process
2021-01-03 18:26:27 +11:00
Charles Dang
8e13e8811d Campaign Controller: don't use resource pointers 2021-01-03 17:54:43 +11:00
Charles Dang
801a02f40f Play Controller: added non-const get_teams, renamed get_teams_const 2021-01-03 17:51:50 +11:00
Charles Dang
0c0c42c257 Saved Game: minor code cleanup 2021-01-03 17:44:04 +11:00
Pentarctagon
96243ad778 Store content names for game history viewer. 2021-01-02 23:45:45 -06:00
Charles Dang
ba7ea3ca98 Added utils::has_optional_value 2021-01-03 15:50:59 +11:00
doofus-01
4b685a93e6
Sprite work - mostly Orc Archer (#5404)
* 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
2021-01-02 20:42:03 -08:00
Charles Dang
f86168ab26 Game Launcher: removed set_tutorial
Since 4282d0b112f78746c01ca15e918389a8cfd1f0c6 the tutorial no longer has a dedicated titlescreen button,
which was the only use of this.
2021-01-03 06:04:46 +11:00
Charles Dang
4b12410086 Game Classification: added convenience type check functions
Shortens a bunch of code
2021-01-03 04:45:49 +11:00
Charles Dang
158cb4ed7c Campaign Controller: minor code cleanup, some more minor formatting 2021-01-03 04:17:27 +11:00
Charles Dang
586b7e991f Campaign Controller: merge static report_victory function with show_carryover_message 2021-01-03 04:10:11 +11:00
Charles Dang
8dc933dd0b Campaign Controller: code formatting 2021-01-03 03:39:47 +11:00
Charles Dang
af57de14f7 MP Manager: made manager own its own saved_game object
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.
2021-01-03 01:17:42 +11:00
Charles Dang
265277fb75 Fixup build 2021-01-03 00:56:13 +11:00
Charles Dang
3948034c67 Cleaned up game_classification.hpp includes 2021-01-02 23:59:30 +11:00
Charles Dang
9d36056dc1 Saved Game: used a scoped enum for starting_point 2021-01-02 23:43:45 +11:00
Charles Dang
0ed489013f Saved Game: don't use this to access members 2021-01-02 23:28:38 +11:00
Charles Dang
d16404b756 Cleaned up terrain/type_data.hpp includes 2021-01-02 22:43:23 +11:00
Charles Dang
d4a8fa8373 GUI2/Minimap: removed game_config_view pointer
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.
2021-01-02 22:18:19 +11:00
Charles Dang
88fdb32147 Fixup 75e9d8a (unused parameters) 2021-01-02 22:02:28 +11:00
Charles Dang
5fcdb9d983 Fake Display Manager: code formatting 2021-01-02 22:02:21 +11:00
Charles Dang
ba1279bc6f Fake Display Manager: removed unused dummy_cfg_view member
Unused as of 028f291c94f41fcfd032b4abec831300095df6ac
2021-01-02 22:01:38 +11:00
Charles Dang
75e9d8a0f1 Move terrain_type_data pointer handling directly to gamemap
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.
2021-01-02 21:45:47 +11:00
Charles Dang
ba55d3823c Forum User Handler: removed excess level of indent 2021-01-02 21:36:37 +11:00
Charles Dang
028f291c94 Updated tests for a4b7495 2021-01-02 20:04:23 +11:00
Charles Dang
4338b266e0 Fixup 3dba789 (assignment should return a reference) 2021-01-02 17:04:29 +11:00
Charles Dang
a4b749524b Cleaned up ridiculously excessive passing around of terrain data cache
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.
2021-01-02 17:03:15 +11:00
Charles Dang
bd8b5be3fe Game State: formatted constructors 2021-01-02 03:53:12 +11:00
Charles Dang
740e94c1ab MP Manager: fixed crash when dismissing password prompt
I wasn't properly accounting for the cases where open_connection returns a nullptr.
2021-01-02 03:42:24 +11:00
Charles Dang
86cf7478f4 MP Manager: flagged enter_*_mode functions as const as appropriate 2021-01-02 03:29:24 +11:00
Charles Dang
3dba789518 Used standard definitions for deleted copy constructors 2021-01-02 03:24:22 +11:00
Charles Dang
8f8976ff3a Refactored out preferences::is_authenticated and friends
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.
2021-01-02 03:23:39 +11:00
Pentarctagon
2416793174 Change doxygen graphs from PNG to SVG. 2020-12-31 23:59:28 -06:00
Pentarctagon
551aa31390 Add a CI check for doxygen issues. 2020-12-31 23:59:28 -06:00
Pentarctagon
4c2b725ec0 Change all doxygen comments to the same format. 2020-12-31 23:59:28 -06:00
Pentarctagon
30362084cf Fix all Doxygen warnings. 2020-12-31 23:59:28 -06:00