Fumofumotris/source/fumotris/fumotris.h

117 lines
1.1 KiB
C
Raw Normal View History

2024-05-07 22:10:15 +00:00
#include "fumocommon.h"
#include "fumoengine.h"
#include "tetr.h"
2024-05-08 22:07:31 +00:00
#define BINDS_N 12
2024-05-07 22:10:15 +00:00
2024-05-09 16:59:33 +00:00
enum FumotrisControls {
2024-05-07 22:10:15 +00:00
LEFT,
RIGHT,
SOFT_DROP,
HARD_DROP,
ROTATE_CCW,
ROTATE_CW,
ROTATE_180,
SWAP,
ESC,
2024-05-09 16:59:33 +00:00
2024-05-07 22:10:15 +00:00
VSCROLL,
HSCROLL,
2024-05-09 16:59:33 +00:00
2024-05-07 22:10:15 +00:00
MOUSE
};
2024-05-08 22:07:31 +00:00
2024-05-09 16:59:33 +00:00
u16 controls_g[BINDS_N] = {
LEFT,
RIGHT,
SOFT_DROP,
HARD_DROP,
ROTATE_CCW,
ROTATE_CW,
ROTATE_180,
SWAP,
ESC,
VSCROLL,
HSCROLL,
MOUSE,
};
u16 codes_g[BINDS_N] = {
0x25,
0x27,
0x28,
0x20,
'Z',
'X',
'A',
'C',
0x1B,
0,
1,
0
};
u16 types_g[BINDS_N] = {
BUTTON,
BUTTON,
BUTTON,
BUTTON,
BUTTON,
BUTTON,
BUTTON,
BUTTON,
BUTTON,
AXIS,
AXIS,
JOYSTICK
2024-05-07 22:10:15 +00:00
};
2024-05-09 16:59:33 +00:00
u8 I[16] = {
2024-05-07 22:10:15 +00:00
0, 0, 0, 0,
0, 0, 0, 0,
1, 1, 1, 1,
0, 0, 0, 0
};
2024-05-09 16:59:33 +00:00
u8 O[4] = {
2024-05-07 22:10:15 +00:00
1, 1,
1, 1
};
2024-05-09 16:59:33 +00:00
u8 T[9] = {
2024-05-07 22:10:15 +00:00
0, 1, 0,
1, 1, 1,
0, 0, 0
};
2024-05-09 16:59:33 +00:00
u8 S[9] = {
2024-05-07 22:10:15 +00:00
0, 1, 1,
1, 1, 0,
0, 0, 0
};
2024-05-09 16:59:33 +00:00
u8 Z[9] = {
2024-05-07 22:10:15 +00:00
1, 1, 0,
0, 1, 1,
0, 0, 0
};
2024-05-09 16:59:33 +00:00
u8 J[9] = {
2024-05-07 22:10:15 +00:00
1, 0, 0,
1, 1, 1,
0, 0, 0
};
2024-05-09 16:59:33 +00:00
u8 L[9] = {
2024-05-07 22:10:15 +00:00
0, 0, 1,
1, 1, 1,
0, 0, 0
};