[Commits] [wesnoth/wesnoth] 4d7c27: move six game_events fcns to be methods of manager

GitHub noreply at github.com
Mon Dec 15 02:02:53 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 4d7c27d1139ff6fe1b37fd0eebe0a3b36efb18f1
      https://github.com/wesnoth/wesnoth/commit/4d7c27d1139ff6fe1b37fd0eebe0a3b36efb18f1
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-12-14 (Sun, 14 Dec 2014)

  Changed paths:
    M src/game_events/action_wml.cpp
    M src/game_events/handlers.cpp
    M src/game_events/handlers.hpp
    M src/game_events/menu_item.cpp
    M src/play_controller.cpp
    M src/replay_controller.cpp
    M src/resources.cpp
    M src/resources.hpp
    M src/unit.cpp

  Log Message:
  -----------
  move six game_events fcns to be methods of manager

In preparation for manager to become a non-singleton class


  Commit: 60e82d2f7009b8dc496ab22f1e840a42ca5de9f2
      https://github.com/wesnoth/wesnoth/commit/60e82d2f7009b8dc496ab22f1e840a42ca5de9f2
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-12-14 (Sun, 14 Dec 2014)

  Changed paths:
    M src/game_events/handlers.cpp
    M src/game_events/handlers.hpp
    M src/game_events/menu_item.cpp
    M src/game_events/pump.cpp

  Log Message:
  -----------
  make the game_events::manager not a singleton class

moves all of the static, filescope variables to be member variables
of the manager


  Commit: aff3cb8da5ecb824ee6d2e60b5b4893eedf7ed52
      https://github.com/wesnoth/wesnoth/commit/aff3cb8da5ecb824ee6d2e60b5b4893eedf7ed52
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-12-14 (Sun, 14 Dec 2014)

  Changed paths:
    M src/CMakeLists.txt
    M src/SConscript
    M src/game_events/action_wml.cpp
    M src/game_events/handlers.cpp
    M src/game_events/handlers.hpp
    A src/game_events/manager.cpp
    A src/game_events/manager.hpp
    A src/game_events/manager_impl.cpp
    A src/game_events/manager_impl.hpp
    M src/game_events/menu_item.cpp
    M src/game_events/pump.cpp
    M src/play_controller.cpp
    M src/replay_controller.cpp
    M src/unit.cpp

  Log Message:
  -----------
  split game_events::manager code into separate files


  Commit: 34abfe2a670e234d27d15ec1493a30ac601a95f4
      https://github.com/wesnoth/wesnoth/commit/34abfe2a670e234d27d15ec1493a30ac601a95f4
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-12-14 (Sun, 14 Dec 2014)

  Changed paths:
    M src/game_events/pump.cpp
    M src/game_events/pump.hpp

  Log Message:
  -----------
  refactor game_events::context

- Move the implementation details out of header
- Use standard C++ data structures


  Commit: f5481ce961abbccd1103e7f4620aac90892f87c7
      https://github.com/wesnoth/wesnoth/commit/f5481ce961abbccd1103e7f4620aac90892f87c7
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-12-14 (Sun, 14 Dec 2014)

  Changed paths:
    M src/actions/attack.cpp
    M src/actions/create.cpp
    M src/actions/move.cpp
    M src/actions/vision.cpp
    M src/ai/default/ai.cpp
    M src/ai/manager.cpp
    M src/game_events/action_wml.cpp
    M src/game_events/manager.cpp
    M src/game_events/manager.hpp
    M src/game_events/pump.cpp
    M src/game_events/pump.hpp
    M src/menu_events.cpp
    M src/mouse_events.cpp
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/playsingle_controller.cpp
    M src/replay_controller.cpp
    M src/scripting/game_lua_kernel.cpp
    M src/scripting/game_lua_kernel.hpp
    M src/synced_commands.cpp
    M src/team.cpp

  Log Message:
  -----------
  make game_events::pump not a singleton

Instances of this are now owned by the manager.

It would be nice to refactor this to provide all of the front-
facing methods in the manager instead of in the pump, since the
pump itself is somewhat an implementation detail. But this is
nearly the "smallest" diff change that would remove the singleton
restriction.


Compare: https://github.com/wesnoth/wesnoth/compare/6ab77b47e954...f5481ce961ab


More information about the Commits mailing list