2022-09-11 18:45:19 +00:00
|
|
|
#ifndef __ICONTROLLER_HPP__
|
|
|
|
#define __ICONTROLLER_HPP__
|
|
|
|
|
|
|
|
#include <types.h>
|
|
|
|
|
|
|
|
#include "Kyoto/Input/CControllerGamepadData.hpp"
|
2022-09-18 06:05:46 +00:00
|
|
|
#include "Kyoto/Input/InputTypes.hpp"
|
2022-09-11 18:45:19 +00:00
|
|
|
|
|
|
|
class COsContext;
|
|
|
|
class IController {
|
2022-09-13 04:52:59 +00:00
|
|
|
protected:
|
2022-09-18 06:05:46 +00:00
|
|
|
static const float kAbsoluteMinimum;
|
|
|
|
static const float kAbsoluteMaximum;
|
|
|
|
static const float kRelativeMinimum;
|
|
|
|
static const float kRelativeMaximum;
|
2022-09-11 18:45:19 +00:00
|
|
|
|
|
|
|
public:
|
2022-09-18 06:05:46 +00:00
|
|
|
IController();
|
|
|
|
virtual ~IController();
|
|
|
|
virtual void Poll() = 0;
|
|
|
|
virtual uint GetDeviceCount() const = 0;
|
|
|
|
virtual CControllerGamepadData& GetGamepadData(int controller) = 0;
|
|
|
|
virtual uint GetControllerType(int) const = 0;
|
|
|
|
virtual void SetMotorState(EIOPort port, EMotorState state) = 0;
|
2022-09-11 18:45:19 +00:00
|
|
|
|
2022-09-18 06:05:46 +00:00
|
|
|
static IController* Create(const COsContext& ctx);
|
2022-09-11 18:45:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __ICONTROLLER_HPP__
|