- Moviment
This commit is contained in:
29
source/jinput.h
Normal file
29
source/jinput.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
namespace input
|
||||
{
|
||||
/// @brief Inicialitza els sistemes de teclat, ratolí i gamepad
|
||||
void init();
|
||||
|
||||
/// @brief Determina si la tecla especificada està sent polsada ara mateix
|
||||
/// @param key tecla a consultar
|
||||
/// @return true si està polsada, false si no
|
||||
bool keyDown(const uint8_t key);
|
||||
|
||||
/// @brief Determina si la tecla especificada ha sigut polsada, pero no tornarà a ser true fins
|
||||
/// @brief que no se solte la tecla i se torne a polsar.
|
||||
/// @param key tecla a consultar
|
||||
/// @return true si està polsada, false si no
|
||||
bool keyPressed(const uint8_t key);
|
||||
|
||||
/// @brief Determina si hi ha alguna tecla polsada ara mateix
|
||||
/// @return true si hi ha alguna tecla polsada, false si no
|
||||
bool anyKey();
|
||||
|
||||
/// @brief Torna el codi de la tecla que està sent polsada ara mateix
|
||||
/// @return Quina tecla està sent polsada
|
||||
const uint8_t whichKey();
|
||||
|
||||
void update(uint8_t key, uint8_t keyp);
|
||||
}
|
||||
Reference in New Issue
Block a user