// v0.3 #ifndef MARIO_KEYBOARD_H #define MARIO_KEYBOARD_H #define KONAMI /* Reduced keyboard It simulates a nes controller */ typedef enum { MK_NONE=-1, MK_LEFT=0, MK_RIGHT, MK_DOWN, MK_UP, MK_JUMP, // Shift MK_RUN // Alpha } MKB_t; /* This function has been coded to replace the following array `extern mkey_t keys[6];` It returns the specific key state 2=newly pressed 1=currently down 0=up */ int MKB_getKeyState(MKB_t const k); // Update the keyboard, should be called at each frame void MKB_update(); // Reset followed keys' states void MKB_clear(); // Experimental getkey, designed to compensate for a strange bug introduced by original getkey // /!\ return gint keycodes int MKB_getkey(); #endif