[Scummvm-cvs-logs] SF.net SVN: scummvm: [27612] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Jun 22 19:51:52 CEST 2007
Revision: 27612
http://scummvm.svn.sourceforge.net/scummvm/?rev=27612&view=rev
Author: fingolfin
Date: 2007-06-22 10:51:51 -0700 (Fri, 22 Jun 2007)
Log Message:
-----------
Heavily modified/reduced version of patch #1741454 (EVENTS: ASCII enum)
Modified Paths:
--------------
scummvm/trunk/backends/platform/sdl/events.cpp
scummvm/trunk/common/events.h
Modified: scummvm/trunk/backends/platform/sdl/events.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/events.cpp 2007-06-22 17:51:17 UTC (rev 27611)
+++ scummvm/trunk/backends/platform/sdl/events.cpp 2007-06-22 17:51:51 UTC (rev 27612)
@@ -52,7 +52,7 @@
static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode)
{
if (key >= SDLK_F1 && key <= SDLK_F9) {
- return key - SDLK_F1 + 315;
+ return key - SDLK_F1 + ASCII_F1;
} else if (key >= SDLK_KP0 && key <= SDLK_KP9) {
return key - SDLK_KP0 + '0';
} else if (key >= SDLK_UP && key <= SDLK_PAGEDOWN) {
Modified: scummvm/trunk/common/events.h
===================================================================
--- scummvm/trunk/common/events.h 2007-06-22 17:51:17 UTC (rev 27611)
+++ scummvm/trunk/common/events.h 2007-06-22 17:51:51 UTC (rev 27612)
@@ -217,6 +217,25 @@
};
/**
+ * List of fake 'ascii' values used in keyboard events.
+ * The values here are based on what certain SCUMM games require
+ * in their scripts.
+ * @todo Get rid of this, and instead enforce that engines use the
+ * keycode instead to handle these.
+ */
+enum {
+ ASCII_F1 = 315,
+ ASCII_F2 = 316,
+ ASCII_F3 = 317,
+ ASCII_F4 = 318,
+ ASCII_F5 = 319,
+ ASCII_F6 = 320,
+ ASCII_F7 = 321,
+ ASCII_F8 = 322,
+ ASCII_F9 = 323
+};
+
+/**
* Keyboard modifier flags, used for Event::kbd::flags.
*/
enum {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list