summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-08-22 14:46:52 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-08-22 14:46:52 +0300
commit836e43db60ff1f3c9d160d0d58ba5a631c4293fc (patch)
tree89096c3ffd4128694542ebdbfabe94b6a618e16d /src/game.cpp
parent6596e585fe844ce87a957bb7deaf2bf92d828592 (diff)
parent7e610aece52ad547d4ae263aff5297342d5a4bff (diff)
downloadminetest-836e43db60ff1f3c9d160d0d58ba5a631c4293fc.tar.gz
minetest-836e43db60ff1f3c9d160d0d58ba5a631c4293fc.tar.bz2
minetest-836e43db60ff1f3c9d160d0d58ba5a631c4293fc.zip
Merge remote-tracking branch 'oblomov/new_input'
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/game.cpp b/src/game.cpp
index c740ed252..7bf1c6f5c 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<<DTIME<<"the_game: "
<<"Launching pause menu"<<std::endl;
@@ -1417,10 +1416,8 @@ void the_game(
// Item selection
for(u16 i=0; i<10; i++)
{
- s32 keycode = irr::KEY_KEY_1 + i;
- if(i == 9)
- keycode = irr::KEY_KEY_0;
- if(input->wasKeyDown((irr::EKEY_CODE)keycode))
+ const KeyPress *kp = NumberKey + (i + 1) % 10;
+ if(input->wasKeyDown(*kp))
{
if(i < PLAYER_INVENTORY_SIZE && i < hotbar_itemcount)
{