refactor: JI_* a Ji:: i JG_* a Jg::
This commit is contained in:
+36
-27
@@ -1,27 +1,36 @@
|
||||
#pragma once
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
void JI_DisableKeyboard(Uint32 time);
|
||||
|
||||
// Bloqueja tot l'input cap al joc (JI_KeyPressed retorna false per a tot)
|
||||
void JI_SetInputBlocked(bool blocked);
|
||||
|
||||
// Estableix l'estat d'una tecla virtual. Múltiples fonts (gamepad, remap)
|
||||
// s'agrupen per OR. JI_KeyPressed retorna true si el teclat real O qualsevol
|
||||
// font virtual està premuda.
|
||||
enum JI_VirtualSource : std::uint8_t {
|
||||
JI_VSRC_GAMEPAD = 0,
|
||||
JI_VSRC_REMAP = 1,
|
||||
JI_VSRC_COUNT = 2
|
||||
};
|
||||
void JI_SetVirtualKey(int scancode, int source, bool pressed);
|
||||
|
||||
void JI_Update();
|
||||
|
||||
auto JI_KeyPressed(int key) -> bool;
|
||||
|
||||
auto JI_CheatActivated(const char* cheat_code) -> bool;
|
||||
|
||||
auto JI_AnyKey() -> bool;
|
||||
#pragma once
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace Ji {
|
||||
|
||||
void disableKeyboard(Uint32 time);
|
||||
|
||||
// Bloqueja tot l'input cap al joc (Ji::keyPressed retorna false per a tot)
|
||||
void setInputBlocked(bool blocked);
|
||||
|
||||
// Estableix l'estat d'una tecla virtual. Múltiples fonts (gamepad, remap)
|
||||
// s'agrupen per OR. Ji::keyPressed retorna true si el teclat real O qualsevol
|
||||
// font virtual està premuda.
|
||||
enum class VirtualSource : std::uint8_t {
|
||||
GAMEPAD = 0,
|
||||
REMAP = 1,
|
||||
COUNT = 2
|
||||
};
|
||||
void setVirtualKey(int scancode, VirtualSource source, bool pressed);
|
||||
|
||||
void update();
|
||||
|
||||
// Avança el buffer rotatori de cheats afegint `scancode` per detectar
|
||||
// seqüències com "reviu", "alone", "obert". Usat pel Director quan rep
|
||||
// un KEY_DOWN; el joc no l'ha de cridar directament.
|
||||
void moveCheats(Uint8 scancode);
|
||||
|
||||
auto keyPressed(int key) -> bool;
|
||||
|
||||
auto cheatActivated(const char* cheat_code) -> bool;
|
||||
|
||||
auto anyKey() -> bool;
|
||||
|
||||
} // namespace Ji
|
||||
|
||||
Reference in New Issue
Block a user