diff options
author | 2014-02-24 03:25:05 +0000 | |
---|---|---|
committer | 2014-02-24 03:25:05 +0000 | |
commit | 172056e7598d3447c682a694d824041076f3255e (patch) | |
tree | 3ba150866d6bbcc337932e3fc59a3af9715d0d85 /hge/input.cpp | |
parent | 8cb1a0f4fcf8e7ecd54134e8d6f431b613c69091 (diff) | |
download | bullet-lab-remix-172056e7598d3447c682a694d824041076f3255e.tar.xz |
M trunk/CHANGELOG.TXT
M trunk/background.h
M trunk/effects.h
M trunk/global.h
M trunk/hge/CxImage/ximagif.cpp
M trunk/hge/CxImage/ximaint.cpp
M trunk/hge/CxImage/ximapng.cpp
M trunk/hge/graphics.cpp
M trunk/hge/input.cpp
M trunk/hge/resource.cpp
M trunk/hge/sound.cpp
M trunk/hge/system.cpp
M trunk/hgehelp/hgefont.cpp
M trunk/levels.h
M trunk/libcgh.h
M trunk/libcghEx.cpp
M trunk/menuitem.cpp
M trunk/menuitem.h
M trunk/menus.h
M trunk/music.h
M trunk/scorec.h
M trunk/scoresystem.h
M trunk/towernbullet.h
Diffstat (limited to 'hge/input.cpp')
-rw-r--r-- | hge/input.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hge/input.cpp b/hge/input.cpp index 4392edd..4cd2c97 100644 --- a/hge/input.cpp +++ b/hge/input.cpp @@ -264,7 +264,7 @@ void HGE_Impl::_BuildEvent(int type, int key, int scan, int flags, int x, int y) if(type==INPUT_KEYDOWN) { key = SDLKeyToHGEKey(key); - if ( (key < 0) || (key > (sizeof (keyz) / sizeof (keyz[0]))) ) return; + if ( (key < 0) || (key > (int)(sizeof (keyz) / sizeof (keyz[0]))) ) return; keyz[key] |= 4; if((flags & HGEINP_REPEAT) == 0) keyz[key] |= 1; eptr->event.chr = (char) ((key >= 32) && (key <= 127)) ? key : 0; // these map to ASCII in sdl. @@ -272,7 +272,7 @@ void HGE_Impl::_BuildEvent(int type, int key, int scan, int flags, int x, int y) if(type==INPUT_KEYUP) { key = SDLKeyToHGEKey(key); - if ( (key < 0) || (key > (sizeof (keyz) / sizeof (keyz[0]))) ) return; + if ( (key < 0) || (key > (int)(sizeof (keyz) / sizeof (keyz[0]))) ) return; keyz[key] &= ~4; keyz[key] |= 2; eptr->event.chr = (char) ((key >= 32) && (key <= 127)) ? key : 0; // these map to ASCII in sdl. @@ -349,7 +349,7 @@ void HGE_Impl::_ClearQueue() CInputEventList *nexteptr, *eptr=queue; //memset(&keyz, 0, sizeof(keyz)); - for (int i = 0; i < sizeof (keyz) / sizeof (keyz[0]); i++) + for (int i = 0; i < (int)(sizeof (keyz) / sizeof (keyz[0])); i++) keyz[i] &= ~3; // only reset some of the bits. while(eptr) |