diff options
author | Stephen Kennedy | 2008-08-14 23:45:02 +0000 |
---|---|---|
committer | Stephen Kennedy | 2008-08-14 23:45:02 +0000 |
commit | c61294e70f6a6acc67efdad1529038f06ea1a5e6 (patch) | |
tree | 169cc3d52008549d8ee1faa54457d7a84a71fb51 /backends/platform/sdl | |
parent | 6d0ed23b4469de23c9d93ab15329f10a8441fd29 (diff) | |
download | scummvm-rg350-c61294e70f6a6acc67efdad1529038f06ea1a5e6.tar.gz scummvm-rg350-c61294e70f6a6acc67efdad1529038f06ea1a5e6.tar.bz2 scummvm-rg350-c61294e70f6a6acc67efdad1529038f06ea1a5e6.zip |
Changed Action constructor to take a pointer to the Keymap it belongs too, meaning Keymap::addAction is automatically called
svn-id: r33885
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r-- | backends/platform/sdl/events.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/backends/platform/sdl/events.cpp b/backends/platform/sdl/events.cpp index bc8f3c8f8c..93d05822df 100644 --- a/backends/platform/sdl/events.cpp +++ b/backends/platform/sdl/events.cpp @@ -542,33 +542,26 @@ void OSystem_SDL::setupKeymapper() { evt.kbd = KeyState(kc, asc, flags); \ act->events.push_back(evt); - act = new Action('MENU', "Menu", kGenericActionCategory, kMenuAction); + act = new Action(global, 'MENU', "Menu", kGenericActionCategory, kMenuAction); ADD_KEYDOWN_EVENT(KEYCODE_F5, ASCII_F5, 0) - global->addAction(act); - act = new Action('SKCT', "Skip"); + act = new Action(global, 'SKCT', "Skip"); ADD_KEYDOWN_EVENT(KEYCODE_ESCAPE, ASCII_ESCAPE, 0); - global->addAction(act); - act = new Action('PAUS', "Pause"); + act = new Action(global, 'PAUS', "Pause"); ADD_KEYDOWN_EVENT(KEYCODE_SPACE, ' ', 0) - global->addAction(act); - act = new Action('SKLI', "Skip line"); + act = new Action(global, 'SKLI', "Skip line"); ADD_KEYDOWN_EVENT(Common::KEYCODE_PERIOD, '.', 0); - global->addAction(act); - act = new Action('JUMP', "Jump"); + act = new Action(specific, 'JUMP', "Jump"); ADD_KEYDOWN_EVENT(KEYCODE_j, 'j', 0); - specific->addAction(act); - act = new Action('DUCK', "Duck"); + act = new Action(specific, 'DUCK', "Duck"); ADD_KEYDOWN_EVENT(KEYCODE_d, 'd', 0); - specific->addAction(act); - act = new Action('RUN_', "Run"); + act = new Action(specific, 'RUN_', "Run"); ADD_KEYDOWN_EVENT(KEYCODE_r, 'r', 0); - specific->addAction(act); #undef ADD_KEYDOWN_EVENT |