#pragma once

#include <cstdint>

namespace control {

class Gamepad
{
private:
    int id;

    uint8_t oldButtons[15];
    uint8_t buttons[15];
    float axesValues[6];

public:
    Gamepad(int number);
    ~Gamepad();

    void Update() noexcept;

    bool IsButtonPressed(uint32_t button) const noexcept;
    bool IsButtonJustPressed(uint32_t button) const noexcept;

    float GetAxis(uint32_t axis) const noexcept;
};

}

