added key() / keyp() LUA api

This commit is contained in:
BADIM-PC\Vadim
2017-12-29 17:59:07 +03:00
parent c3a57954aa
commit ca0a7c7167
6 changed files with 172 additions and 124 deletions

View File

@@ -34,6 +34,7 @@ extern "C" {
#define TIC80_FULLWIDTH_BITS 8
#define TIC80_FULLWIDTH (1 << TIC80_FULLWIDTH_BITS)
#define TIC80_FULLHEIGHT (TIC80_FULLWIDTH*9/16)
#define TIC_KEY_BUFFER 4
typedef struct
{
@@ -104,9 +105,11 @@ typedef struct
};
} tic80_mouse;
typedef u8 tic_key;
typedef union
{
u8 keys[4];
tic_key keys[TIC_KEY_BUFFER];
u32 data;
} tic80_keyboard;