summaryrefslogtreecommitdiff
path: root/dnglib/constants.lua
diff options
context:
space:
mode:
Diffstat (limited to 'dnglib/constants.lua')
-rw-r--r--dnglib/constants.lua90
1 files changed, 90 insertions, 0 deletions
diff --git a/dnglib/constants.lua b/dnglib/constants.lua
new file mode 100644
index 0000000..df0c37a
--- /dev/null
+++ b/dnglib/constants.lua
@@ -0,0 +1,90 @@
+-- -----------------------------------------------------------------------
+-- dng
+-- ------------------------------------------------------------------------
+-- Copyright (c) 2022 Steph Enders <steph@senders.io>
+--
+-- This software is provided 'as-is', without any express or implied
+-- warranty. In no event will the authors be held liable for any damages
+-- arising from the use of this software.
+--
+-- Permission is granted to anyone to use this software for any purpose,
+-- including commercial applications, and to alter it and redistribute it
+-- freely, subject to the following restrictions:
+--
+-- 1. The origin of this software must not be misrepresented; you must not
+-- claim that you wrote the original software. If you use this software
+-- in a product, an acknowledgment in the product documentation would
+-- be appreciated but is not required.
+--
+-- 2. Altered source versions must be plainly marked as such, and must not
+-- be misrepresented as being the original software.
+--
+-- 3. This notice may not be removed or altered from any source
+-- distribution.
+--
+-- -----------------------------------------------------------------------
+-- NOTICE
+-- Keyboard enumeration values derived from:
+-- https://github.com/SFML/SFML/blob/master/include/SFML/Window/Keyboard.hpp#L48
+-- Licensed under zlib/png license Copyright (C) 2007-2022 Laurent Gomila (laurent@sfml-dev.org)
+-- ------------------------------------------------------------------------
+KEY_A = 0
+KEY_B = 1
+KEY_C = 2
+KEY_D = 3
+KEY_E = 4
+KEY_F = 5
+KEY_G = 6
+KEY_H = 7
+KEY_I = 8
+KEY_J = 9
+KEY_L = 10
+KEY_M = 11
+KEY_N = 12
+KEY_M = 13
+KEY_O = 14
+KEY_P = 15
+KEY_Q = 16
+KEY_R = 17
+KEY_S = 18
+KEY_T = 19
+KEY_U = 20
+KEY_V = 21
+KEY_W = 22
+KEY_X = 23
+KEY_Y = 24
+KEY_Z = 25
+
+-- control keys
+KEY_ESCAPE = 36
+KEY_LCONTROL = 37
+KEY_LSHIFT = 38
+KEY_LALT = 39
+KEY_LSYSTEM = 40
+KEY_RCONTROL = 41
+KEY_RSHIFT = 42
+KEY_RALT = 43
+KEY_RSYSTEM = 44
+KEY_MENU = 45
+
+KEY_SPACE = 57
+KEY_ENTER = 58
+
+-- directional keys
+KEY_LEFT = 71
+KEY_RIGHT = 72
+KEY_UP = 73
+KEY_DOWN = 74
+
+-- map values
+MAP_WALL = 1
+MAP_SPACE = 0
+MAP_VISITED = -1
+
+-- scene values
+SCENE_INTRO = 0
+SCENE_LEVEL = 1
+SCENE_WIN = 2
+SCENE_LOSS = 3
+
+MOV_TIME = 0.5 \ No newline at end of file