#ifndef _H_KeyState #define _H_KeyState #include 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 */