This use of handle-body idiom saves *alot* of includes, since a
huge number of objects include unit indirectly, and make no use
of the ai formula features.
Currently, the editor does not generate game_board objects, and
leaves the pointer resources::gameboard null. This commit makes
map_location, reports, and tod_manager, three things used in
editor mode, use the display_context pointer instead of the
game_board pointer. We also move a function to display_context,
which finds a const unit * to a visible unit at a hex.
This is a refactor to introduce an object encapsulating the unit map, the game map, and the list of teams. Introducing this object permits us to move a substantial amount of code out of the play_controller object, and also to give a home to some helper functions in unit.?pp that previously sat in the global namespace. It also allows us to simplify the construction of some of the clients of play_controller.
This refactor is ongoing WIP. The goals are
(1) better organize the architecture of the engine, to make saving and reloading easier.
(2) Facilitate the introduction of an improved pathfinding mechanism, which will need to sit between most of the other engine modules and the unit map / game map.
(3) Refactoring clarifies what the existing code is doing, therefore it may help us to find bugs in the current system, which may be fixed independently of the refactor in 1.12.
First, rerverted changes starting with commit
09b0aad1f837353f80bb7319543053f5a9ae66a8, the other commits were
just fixups to that. The, manually went through the resulting diff
and added/removed files which I know of or think they actually should
be added/removed. And, of course, compiled and linked.
- Add the new files introduced by gfgtdf to the VC project.
- Fix the indentation of SConscript.
- Update the README files for Code Blocks and Visual Studio.
This streamlining should make it easier for people reading this document
to get started without stumbling upon references to old packages that
aren't useful anymore, and it's also verified to work with the latest
CodeBlocks release (12.11).