#include <config.h>
-#include "controller.h"
+#include "controller.hpp"
extern Controller* main_controller;
"action",
"pause-menu",
"menu-select",
+ "console",
0
};
Controller::Controller()
{
- for(int i = 0; i < CONTROLCOUNT; ++i) {
- controls[i] = false;
- oldControls[i] = false;
- }
+ reset();
}
Controller::~Controller()
return oldControls[control] == false && controls[control] == true;
}
+bool
+Controller::released(Control control)
+{
+ return oldControls[control] == true && controls[control] == false;
+}
+
void
Controller::update()
{