add missing tools/pngdump to the repo
[gbajam22] / src / input.h
index 3ed22a0..55a7f27 100644 (file)
@@ -16,9 +16,18 @@ enum {
        BN_LT           = 0x0200
 };
 
-#define BN_DPAD        (BN_RIGHT | BN_LEFT | BN_UP | BN_DOWN)
+#ifdef BUILD_GBA
+#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);
 
-void select_input(uint16_t bmask);
-uint16_t get_input(void);
 
 #endif /* INPUT_H_ */