Import coco-planes 0.1.0 upstream source snapshot
Original author: Pierre Sarrazin. Preserve upstream GPLv3-or-later and file-specific notices. Source: http://sarrazip.com/dev/coco-planes-0.1.0.tar.gz Archive SHA-256: 29191e6ba225965caa637ee726e1189639dc7fcdf2b68310fb93fbffd56c9c52
This commit is contained in:
commit
7939132267
78 files changed
+6990
No files matched your search
+28
@@ -0,0 +1,28 @@
|
||||
#ifndef _H_KeyState
|
||||
#define _H_KeyState
|
||||
|
||||
#include <coco.h>
|
||||
|
||||
|
||||
typedef struct KeyState
|
||||
{
|
||||
byte probeBit; // KEY_PROBE_*
|
||||
byte testBit; // KEY_BIT_*
|
||||
BOOL pressedPreviously;
|
||||
} KeyState;
|
||||
|
||||
|
||||
// probeBit: KEY_PROBE_* enum value.
|
||||
// testBit: KEY_BIT_* enum value.
|
||||
//
|
||||
void KeyState_init(KeyState *self, byte probeBit, byte testBit);
|
||||
|
||||
|
||||
// Must be called at each frame.
|
||||
// Returns TRUE if the key has just been pressed (since the last time
|
||||
// that this function was called on this KeyState).
|
||||
//
|
||||
BOOL KeyState_update(KeyState *self);
|
||||
|
||||
|
||||
#endif /* _H_KeyState */
|
||||
Reference in new issue
Block a user