|
|
@ -1,10 +1,13 @@ |
|
|
|
|
|
|
|
#include <unordered_map> // std::unordered_map |
|
|
|
|
|
|
|
|
|
|
|
#include <GLFW/glfw3.h> |
|
|
|
#include <GLFW/glfw3.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "inferno/assertions.h" |
|
|
|
#include "inferno/inputcodes.h" |
|
|
|
#include "inferno/inputcodes.h" |
|
|
|
|
|
|
|
|
|
|
|
namespace Inferno { |
|
|
|
namespace Inferno { |
|
|
|
|
|
|
|
|
|
|
|
std::unordered_map<const char*, int> KeyCode ({ |
|
|
|
static std::unordered_map<const char*, int> keys ({ |
|
|
|
{ MAP_KEY(GLFW_KEY_UNKNOWN) }, |
|
|
|
{ MAP_KEY(GLFW_KEY_UNKNOWN) }, |
|
|
|
{ MAP_KEY(GLFW_KEY_SPACE) }, |
|
|
|
{ MAP_KEY(GLFW_KEY_SPACE) }, |
|
|
|
{ MAP_KEY(GLFW_KEY_APOSTROPHE) }, |
|
|
|
{ MAP_KEY(GLFW_KEY_APOSTROPHE) }, |
|
|
@ -128,4 +131,12 @@ namespace Inferno { |
|
|
|
{ MAP_KEY(GLFW_KEY_MENU) }, |
|
|
|
{ MAP_KEY(GLFW_KEY_MENU) }, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// -----------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int KeyCode(const char* name) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ASSERT(keys.find(name) != keys.end(), "Could not find KeyCode"); |
|
|
|
|
|
|
|
return keys.at(name); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|