add missing tools/pngdump to the repo
[gbajam22] / src / input.h
index b7694c8..55a7f27 100644 (file)
@@ -16,15 +16,18 @@ enum {
        BN_LT           = 0x0200
 };
 
-#define BN_DPAD        (BN_RIGHT | BN_LEFT | BN_UP | BN_DOWN)
-
-void select_input(uint16_t bmask);
-uint16_t get_input(void);
-
 #ifdef BUILD_GBA
-#define read_input()   (~REG_KEYINPUT)
-#else
-#define read_input()   get_input()
+#define keyb_vblank()  (keystate = ~REG_KEYINPUT)
 #endif
 
+#define KEYPRESS(key)  ((keystate & (key)) && (keydelta & (key)))
+#define KEYRELEASE(key)        ((keystate & (key)) == 0 && (keydelta & (key)))
+
+volatile uint16_t keystate, keydelta;
+
+/*void key_repeat(int start, int rep, uint16_t mask);*/
+
+void update_keyb(void);
+
+
 #endif /* INPUT_H_ */