diff --git a/source/build/include/baselayer.h b/source/build/include/baselayer.h index ab77abdf8..399f87d1d 100644 --- a/source/build/include/baselayer.h +++ b/source/build/include/baselayer.h @@ -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]; diff --git a/source/build/src/baselayer.cpp b/source/build/src/baselayer.cpp index 9418dacb2..dd48f5441 100644 --- a/source/build/src/baselayer.cpp +++ b/source/build/src/baselayer.cpp @@ -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)