From 7e610aece52ad547d4ae263aff5297342d5a4bff Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sat, 13 Aug 2011 22:44:31 +0200 Subject: Overhaul the input system This allows us to map the keys which are not considered in irrlicht's EKEY_CODE system, such as \, [, /, ] etc. --- src/game.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index a3a5f424a..ab3852137 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -28,7 +28,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "materials.h" #include "config.h" #include "clouds.h" -#include "keycode.h" #include "farmesh.h" #include "mapblock.h" @@ -1314,7 +1313,7 @@ void the_game( menu->drop(); } - else if(input->wasKeyDown(KEY_ESCAPE)) + else if(input->wasKeyDown(EscapeKey)) { dstream<wasKeyDown((irr::EKEY_CODE)keycode)) + const KeyPress *kp = NumberKey + (i + 1) % 10; + if(input->wasKeyDown(*kp)) { if(i < PLAYER_INVENTORY_SIZE && i < hotbar_itemcount) { -- cgit v1.2.3