* Key buffer update : Add functions & clean the file
This commit is contained in:
jean.chalard
2008-11-21 14:13:01 +00:00
parent bd5df274e8
commit d7ea37233c
2 changed files with 727 additions and 707 deletions
+22 -2
View File
@@ -31,13 +31,17 @@
BOOL JGEGetKeyState(int key); BOOL JGEGetKeyState(int key);
bool JGEGetButtonState(u32 button); bool JGEGetButtonState(u32 button);
bool JGEGetButtonClick(u32 button); bool JGEGetButtonClick(u32 button);
u32 JGEReadKey();
void JGEResetInput();
#elif LINUX #elif LINUX
void JGEControl(); void JGEControl();
BOOL JGEGetKeyState(int key); BOOL JGEGetKeyState(int key);
bool JGEGetButtonState(uint32_t button); bool JGEGetButtonState(u32 button);
bool JGEGetButtonClick(uint32_t button); bool JGEGetButtonClick(u32 button);
u32 JGEReadKey();
void JGEResetInput();
#else #else
@@ -173,6 +177,22 @@ public:
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
bool GetButtonClick(u32 button); bool GetButtonClick(u32 button);
//////////////////////////////////////////////////////////////////////////
/// Get the next keypress.
///
/// @return Next pressed button, or 0 if none.
//////////////////////////////////////////////////////////////////////////
u32 ReadButton();
//////////////////////////////////////////////////////////////////////////
/// Reset the input buffer.
/// This is necessary because there might be phases when GetButtonState
/// or GetButtonClick are used, thereby accumulating keypresses in the
/// key buffer.
///
//////////////////////////////////////////////////////////////////////////
void ResetInput();
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
/// Get x value of the analog pad. /// Get x value of the analog pad.
/// ///