7 Commits

Author SHA1 Message Date
Chris Beck
74fe722119 move a helper function for unit invisibility to display_context 2014-07-24 18:31:37 -04:00
Chris Beck
8ecef3b6f0 move homeless statistics calc fcns from unit.?pp to display_context 2014-07-06 17:41:39 -04:00
Chris Beck
7fec227478 move is_observer from game_board to display_context, b/c editor uses 2014-07-06 15:26:11 -04:00
Chris Beck
f5a9de40d5 move village_owner function to display_context
I would have liked to put it in game_board, but it is needed for
reports so it can't go there
2014-06-25 22:22:07 -04:00
Chris Beck
0be1d731d5 add drawable unit class
drawable unit inherits from unit, and implements the draw function,
used only by the display. when the display wants to use the function,
it casts a unit pointer to a drawable_unit, and draws it. this
improves encapsulation.
2014-06-16 22:10:31 -04:00
Chris Beck
ab23b03b22 move actions::unit_can_move to be a method of display_context::
I would have put it in game board but it needs to be available
to display / drawing code... would be good to refactor to simplify
this.
2014-06-16 21:01:36 -04:00
Chris Beck
da552fc10e fixup segfaulting editor, favoring display_context over game_board
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.
2014-06-11 01:28:15 -04:00