Tweak icecrusher draw layers to avoid objects (such as coins) from appearing inside...
[supertux.git] / src / control / input_manager.cpp
index 6f6ab37..ce612d4 100644 (file)
 #include "util/log.hpp"
 #include "util/writer.hpp"
 
-InputManager::InputManager() :
+InputManager::InputManager(KeyboardConfig& keyboard_config,
+                           JoystickConfig& joystick_config) :
   controller(new Controller),
   m_use_game_controller(true),
-  keyboard_manager(new KeyboardManager(this)),
-  joystick_manager(new JoystickManager(this)),
+  keyboard_manager(new KeyboardManager(this, keyboard_config)),
+  joystick_manager(new JoystickManager(this, joystick_config)),
   game_controller_manager(new GameControllerManager(this))
 {
 }
@@ -55,34 +56,6 @@ InputManager::use_game_controller(bool v)
 }
 
 void
-InputManager::read(const Reader& lisp)
-{
-  const lisp::Lisp* keymap_lisp = lisp.get_lisp("keymap");
-  if (keymap_lisp) 
-  {
-    keyboard_manager->read(keymap_lisp);
-  }
-
-  const lisp::Lisp* joystick_lisp = lisp.get_lisp(_("joystick"));
-  if (joystick_lisp) 
-  {
-    joystick_manager->read(joystick_lisp);
-  }
-}
-
-void
-InputManager::write(Writer& writer)
-{
-  writer.start_list("keymap");
-  keyboard_manager->write(writer);
-  writer.end_list("keymap");
-
-  writer.start_list("joystick");
-  joystick_manager->write(writer);
-  writer.end_list("joystick");
-}
-
-void
 InputManager::update()
 {
   controller->update();