#pragma once

#include <cstdint>
#include <psp2/ctrl.h>

class Input
{
private:
    uint32_t oldState = 0;
    uint32_t currentState = 0;
    uint64_t oldTime = 0;
    uint64_t currentTime = 0;

public:

    float deltaTime = 0;

    Input();

    void Update() noexcept;

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