aboutsummaryrefslogtreecommitdiff
path: root/plugins/dfinput/main.h
diff options
context:
space:
mode:
authornotaz2011-08-09 01:16:59 +0300
committernotaz2011-08-13 00:56:33 +0300
commit4c08b9e7dd350a48fc3e0515913d6ccc8b15e5ae (patch)
tree22f29a06fda180d8269878b3cdb413044a5e351e /plugins/dfinput/main.h
parent19e57cbf170d1ce49f00097f3cc3a4ed96d77374 (diff)
downloadpcsx_rearmed-4c08b9e7dd350a48fc3e0515913d6ccc8b15e5ae.tar.gz
pcsx_rearmed-4c08b9e7dd350a48fc3e0515913d6ccc8b15e5ae.tar.bz2
pcsx_rearmed-4c08b9e7dd350a48fc3e0515913d6ccc8b15e5ae.zip
add guncon support
a bit basic but works
Diffstat (limited to 'plugins/dfinput/main.h')
-rw-r--r--plugins/dfinput/main.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/plugins/dfinput/main.h b/plugins/dfinput/main.h
new file mode 100644
index 0000000..ee30165
--- /dev/null
+++ b/plugins/dfinput/main.h
@@ -0,0 +1,26 @@
+#include "../../libpcsxcore/psemu_plugin_defs.h"
+
+extern unsigned char CurPad, CurByte, CurCmd, CmdLen;
+
+/* analog pad */
+unsigned char PADpoll_pad(unsigned char value);
+unsigned char PADstartPoll_pad(int pad);
+void pad_init(void);
+
+/* GunCon */
+unsigned char PADpoll_guncon(unsigned char value);
+unsigned char PADstartPoll_guncon(int pad);
+void guncon_init(void);
+
+void dfinput_activate(void);
+
+/* get button state and pad type from main emu */
+extern long (*PAD1_readPort1)(PadDataS *pad);
+extern long (*PAD2_readPort2)(PadDataS *pad);
+
+/* get gunstate from emu frontend, x range 0-1023 */
+#define GUNIN_TRIGGER (1<<0)
+#define GUNIN_BTNA (1<<1)
+#define GUNIN_BTNB (1<<2)
+#define GUNIN_TRIGGER2 (1<<3) /* offscreen trigger */
+extern void pl_update_gun(int *xn, int *xres, int *y, int *in);