segatools/hkbio/hkbio.h

48 lines
1.3 KiB
C

#pragma once
#include <windows.h>
#include <stdint.h>
enum {
HKB_IO_OPBTN_TEST = 0x01,
HKB_IO_OPBTN_SERVICE = 0x02,
HKB_IO_OPBTN_COIN = 0x04,
};
enum {
HKB_IO_GAMEBTN_RIGHT = 0x01,
HKB_IO_GAMEBTN_LEFT = 0x02,
HKB_IO_GAMEBTN_UP = 0x04,
HKB_IO_GAMEBTN_DOWN = 0x08,
HKB_IO_GAMEBTN_ENTER = 0x10,
HKB_IO_GAMEBTN_CANCEL = 0x20,
HKB_IO_GAMEBTN_ARR_RIGHT = 0x40,
HKB_IO_GAMEBTN_ARR_LEFT = 0x80,
};
/* Get the version of the Ongeki 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 hkb_io_get_api_version(void);
/* Initialize the IO DLL. This is the second function that will be called on
your DLL, after hkb_io_get_api_version.
All subsequent calls to this API may originate from arbitrary threads.
Minimum API version: 0x0100 */
HRESULT hkb_io_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 hkb_io_poll(uint8_t *opbtn, uint8_t *gamebtn);