#include <Cockpit/panel_io.hxx>
#include <GUI/gui.h>
-#ifndef FG_OLD_WEATHER
-# include <WeatherCM/FGLocalWeatherDatabase.h>
-#else
-# include <Weather/weather.hxx>
-#endif
-
#include <Main/globals.hxx>
#include <Main/fg_props.hxx>
-#include <Main/options.hxx>
#include "input.hxx"
FGBinding::~FGBinding ()
{
- delete _arg; // Delete the saved arguments
- delete _command_state; // Delete the saved command state
+// delete _arg; // Delete the saved arguments
+// delete _command_state; // Delete the saved command state
}
void
FGInput::~FGInput ()
{
- // TODO: delete all FGBinding objects explicitly
+ // no op
}
void
}
void
-FGInput::update ()
+FGInput::update (int dt)
{
_update_keyboard();
_update_joystick();
}
+\f
+////////////////////////////////////////////////////////////////////////
+// Implementation of FGInput::button.
+////////////////////////////////////////////////////////////////////////
+
+FGInput::button::button ()
+ : is_repeatable(false),
+ last_state(-1)
+{
+}
+
+FGInput::button::~button ()
+{
+ // FIXME: memory leak
+// for (int i = 0; i < FG_MOD_MAX; i++)
+// for (int j = 0; i < bindings[i].size(); j++)
+// delete bindings[i][j];
+}
+
+
+\f
+////////////////////////////////////////////////////////////////////////
+// Implementation of FGInput::axis.
+////////////////////////////////////////////////////////////////////////
+
+FGInput::axis::axis ()
+ : last_value(9999999),
+ tolerance(0.002),
+ low_threshold(-0.9),
+ high_threshold(0.9)
+{
+}
+
+FGInput::axis::~axis ()
+{
+// for (int i = 0; i < FG_MOD_MAX; i++)
+// for (int j = 0; i < bindings[i].size(); j++)
+// delete bindings[i][j];
+}
+
+
+\f
+////////////////////////////////////////////////////////////////////////
+// Implementation of FGInput::joystick.
+////////////////////////////////////////////////////////////////////////
+
+FGInput::joystick::joystick ()
+{
+}
+
+FGInput::joystick::~joystick ()
+{
+// delete js;
+// delete[] axes;
+// delete[] buttons;
+}
+
+
+\f
+////////////////////////////////////////////////////////////////////////
+// Implementation of GLUT callbacks.
+////////////////////////////////////////////////////////////////////////
+
+
/**
* Construct the modifiers.
*/