mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
Move g_defaultVideoModes[] and g_keyAsciiTable[] from baselayer.cpp to baselayer.h and make them constexpr
git-svn-id: https://svn.eduke32.com/eduke32@7159 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
22e1c21f47
commit
06f0e5e946
2 changed files with 14 additions and 15 deletions
|
@ -122,14 +122,26 @@ struct glinfo_t {
|
|||
|
||||
extern struct glinfo_t glinfo;
|
||||
#endif
|
||||
extern vec2_t const g_defaultVideoModes[];
|
||||
|
||||
vec2_t CONSTEXPR const g_defaultVideoModes []
|
||||
={ { 2560, 1440 }, { 2560, 1200 }, { 2560, 1080 }, { 1920, 1440 }, { 1920, 1200 }, { 1920, 1080 }, { 1680, 1050 },
|
||||
{ 1600, 1200 }, { 1600, 900 }, { 1366, 768 }, { 1280, 1024 }, { 1280, 960 }, { 1280, 720 }, { 1152, 864 },
|
||||
{ 1024, 768 }, { 1024, 600 }, { 800, 600 }, { 640, 480 }, { 640, 400 }, { 512, 384 }, { 480, 360 },
|
||||
{ 400, 300 }, { 320, 240 }, { 320, 200 }, { 0, 0 } };
|
||||
|
||||
extern char inputdevices;
|
||||
|
||||
// keys
|
||||
#define NUMKEYS 256
|
||||
#define KEYFIFOSIZ 64
|
||||
extern char const g_keyAsciiTable[128];
|
||||
|
||||
char CONSTEXPR const g_keyAsciiTable[128] ={
|
||||
0 , 0, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', 0, 0, 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p',
|
||||
'[', ']', 0, 0, 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 39, '`', 0, 92, 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',',
|
||||
'.', '/', 0, '*', 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '7', '8', '9', '-', '4', '5', '6',
|
||||
'+', '1', '2', '3', '0', '.', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
extern char keystatus[NUMKEYS];
|
||||
extern char g_keyFIFO[KEYFIFOSIZ];
|
||||
|
|
|
@ -18,11 +18,6 @@ extern "C"
|
|||
}
|
||||
#endif // _WIN32
|
||||
|
||||
vec2_t const g_defaultVideoModes[]
|
||||
= { { 2560, 1440 }, { 2560, 1200 }, { 2560, 1080 }, { 1920, 1440 }, { 1920, 1200 }, { 1920, 1080 }, { 1680, 1050 },
|
||||
{ 1600, 1200 }, { 1600, 900 }, { 1366, 768 }, { 1280, 1024 }, { 1280, 960 }, { 1280, 720 }, { 1152, 864 },
|
||||
{ 1024, 768 }, { 1024, 600 }, { 800, 600 }, { 640, 480 }, { 640, 400 }, { 512, 384 }, { 480, 360 },
|
||||
{ 400, 300 }, { 320, 240 }, { 320, 200 }, { 0, 0 } };
|
||||
|
||||
// input
|
||||
char inputdevices = 0;
|
||||
|
@ -40,14 +35,6 @@ void (*keypresscallback)(int32_t, int32_t);
|
|||
|
||||
void keySetCallback(void (*callback)(int32_t, int32_t)) { keypresscallback = callback; }
|
||||
|
||||
char const g_keyAsciiTable[128] = {
|
||||
0 , 0, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', 0, 0, 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p',
|
||||
'[', ']', 0, 0, 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 39, '`', 0, 92, 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',',
|
||||
'.', '/', 0, '*', 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '7', '8', '9', '-', '4', '5', '6',
|
||||
'+', '1', '2', '3', '0', '.', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
int32_t keyGetState(int32_t key) { return keystatus[g_keyRemapTable[key]]; }
|
||||
|
||||
void keySetState(int32_t key, int32_t state)
|
||||
|
|
Loading…
Reference in a new issue