Skip to content

Commit

Permalink
Remove redundant gamestate::bind()
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Apr 1, 2016
1 parent 1368a05 commit d9eab21
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
5 changes: 0 additions & 5 deletions src/game_state.cpp
Expand Up @@ -222,11 +222,6 @@ void game_state::init(const config& level, play_controller & pc)
lua_kernel_.reset(new game_lua_kernel(nullptr, *this, pc, *reports_));
}

void game_state::bind(wb::manager *, game_display * gd)
{
set_game_display(gd);
}

void game_state::set_game_display(game_display * gd)
{
lua_kernel_->set_game_display(gd);
Expand Down
2 changes: 0 additions & 2 deletions src/game_state.hpp
Expand Up @@ -82,8 +82,6 @@ class game_state : public filter_context

void init(const config& level, play_controller &);

void bind(wb::manager *, game_display *);

void set_game_display(game_display *);

void write(config& cfg) const;
Expand Down
4 changes: 2 additions & 2 deletions src/play_controller.cpp
Expand Up @@ -276,7 +276,7 @@ void play_controller::init(CVideo& video, const config& level)
// This *needs* to be created before the show_intro and show_map_scene
// as that functions use the manager state_of_game
// Has to be done before registering any events!
gamestate().bind(whiteboard_manager_.get(), gui_.get());
gamestate().set_game_display(gui_.get());
gui2::tloadscreen::progress("init lua");
resources::lua_kernel = gamestate().lua_kernel_.get();

Expand Down Expand Up @@ -336,7 +336,7 @@ void play_controller::reset_gamestate(const config& level, int replay_pos)
resources::game_events = gamestate().events_manager_.get();

gamestate_->init(level, *this);
gamestate().bind(whiteboard_manager_.get(), gui_.get());
gamestate().set_game_display(gui_.get());
resources::lua_kernel = gamestate().lua_kernel_.get();
resources::tunnels = gamestate().pathfind_manager_.get();

Expand Down

0 comments on commit d9eab21

Please sign in to comment.