1
0
mirror of synced 2024-11-23 21:40:58 +01:00
bananatools/mkacio/mkacio.h

68 lines
1.9 KiB
C
Raw Permalink Normal View History

2023-09-18 10:05:22 +02:00
#pragma once
#include <windows.h>
#include <stdint.h>
#include "mkacio/config.h"
enum {
mkac_IO_OPBTN_TEST = 0x01,
mkac_IO_OPBTN_SERVICE = 0x02,
mkac_IO_OPBTN_UP = 0x04,
mkac_IO_OPBTN_DOWN = 0x08,
mkac_IO_OPBTN_ENTER = 0x10,
mkac_IO_OPBTN_COIN = 0x20,
};
// Chagned to match xinput masks for ease of use
enum {
mkac_IO_GAMEBTN_UP = 0x0001,
mkac_IO_GAMEBTN_DOWN = 0x0002,
mkac_IO_GAMEBTN_LEFT = 0x0004,
mkac_IO_GAMEBTN_RIGHT = 0x0008,
mkac_IO_GAMEBTN_START = 0x0010,
mkac_IO_GAMEBTN_TRIGGER_L = 0x0100,
mkac_IO_GAMEBTN_TRIGGER_R = 0x0200,
mkac_IO_GAMEBTN_A = 0x2000,
mkac_IO_GAMEBTN_B = 0x1000,
mkac_IO_GAMEBTN_X = 0x8000,
mkac_IO_GAMEBTN_Y = 0x4000,
};
/* Get the version of the Pokken IO API that this DLL supports. This
function should return a positive 16-bit integer, where the high byte is
the major version and the low byte is the minor version (as defined by the
Semantic Versioning standard).
The latest API version as of this writing is 0x0100. */
uint16_t mkac_io_get_api_version(void);
/* Initialize the IO DLL. This is the second function that will be called on
your DLL, after mkac_io_get_api_version.
All subsequent calls to this API may originate from arbitrary threads.
Minimum API version: 0x0100 */
HRESULT mkac_io_jvs_init(void);
/* Initialize the IO DLL. This is the second function that will be called on
your DLL, after mkac_io_get_api_version.
All subsequent calls to this API may originate from arbitrary threads.
Minimum API version: 0x0100 */
HRESULT mkac_io_gamepad_init(void);
/* Send any queued outputs (of which there are currently none, though this may
change in subsequent API versions) and retrieve any new inputs.
Minimum API version: 0x0100 */
HRESULT mkac_io_jvs_poll(uint8_t *opbtn);
HRESULT mkac_io_gamepad_poll(uint16_t *gamebtn);
void mkac_io_jvs_read_coin_counter(uint16_t *coins);