[Commits] [wesnoth/wesnoth] 29d9cf: Refactor handling of the ToD manager

GitHub noreply at github.com
Thu Apr 20 15:54:02 UTC 2017


  Branch: refs/heads/tod_manager_handling_refactor
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 29d9cf212499f1a9975882fc98b53b0141bddb3e
      https://github.com/wesnoth/wesnoth/commit/29d9cf212499f1a9975882fc98b53b0141bddb3e
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-04-20 (Thu, 20 Apr 2017)

  Changed paths:
    M src/actions/attack.cpp
    M src/ai/actions.cpp
    M src/ai/composite/stage.cpp
    M src/ai/contexts.cpp
    M src/ai/default/recruitment.cpp
    M src/ai/formula/ai.cpp
    M src/ai/manager.cpp
    M src/ai/testing.cpp
    M src/display.cpp
    M src/display.hpp
    M src/editor/controller/editor_controller.cpp
    M src/editor/map/context_manager.cpp
    M src/editor/map/map_context.cpp
    M src/editor/map/map_context.hpp
    M src/filter_context.hpp
    M src/game_display.cpp
    M src/game_display.hpp
    M src/game_events/action_wml.cpp
    M src/game_initialization/playcampaign.cpp
    M src/game_state.cpp
    M src/game_state.hpp
    M src/help/help_impl.cpp
    M src/menu_events.cpp
    M src/mouse_events.cpp
    M src/pathfind/teleport.cpp
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/replay_controller.cpp
    M src/resources.cpp
    M src/resources.hpp
    M src/scripting/game_lua_kernel.cpp
    M src/synced_commands.cpp
    M src/tod_manager.cpp
    M src/tod_manager.hpp

  Log Message:
  -----------
  Refactor handling of the ToD manager

Instead of the individual classes such as game_board or map_context owning a manager, we instead use a singleton-like
design where the manager is reset or cleared by individual classes, such as the two above, during their lifetime.

This also removes resources::tod_manager in favor of the singleton.





More information about the Commits mailing list