@@ -122,7 +122,7 @@ void CLevel::IR_OnKeyboardPress(int key)
122122
123123 bool b_ui_exist = !!CurrentGameUI ();
124124
125- EGameActions _curr = get_binded_action ((SDL_Scancode) key);
125+ EGameActions _curr = get_binded_action (key);
126126
127127#ifdef INPUT_CALLBACKS
128128 /* avo: script callback */
@@ -167,7 +167,7 @@ void CLevel::IR_OnKeyboardPress(int key)
167167 {
168168 if (b_ui_exist && CurrentGameUI ()->TopInputReceiver ())
169169 {
170- if (CurrentGameUI ()->IR_UIOnKeyboardPress ((SDL_Scancode) key))
170+ if (CurrentGameUI ()->IR_UIOnKeyboardPress (key))
171171 return ; // special case for mp and main_menu
172172 CurrentGameUI ()->TopInputReceiver ()->HideDialog ();
173173 }
@@ -183,7 +183,7 @@ void CLevel::IR_OnKeyboardPress(int key)
183183 if (!bReady || !b_ui_exist)
184184 return ;
185185
186- if (b_ui_exist && CurrentGameUI ()->IR_UIOnKeyboardPress ((SDL_Scancode) key))
186+ if (b_ui_exist && CurrentGameUI ()->IR_UIOnKeyboardPress (key))
187187 return ;
188188
189189 if (Device.Paused () && !IsDemoPlay ()
@@ -193,7 +193,7 @@ void CLevel::IR_OnKeyboardPress(int key)
193193 )
194194 return ;
195195
196- if (game && game->OnKeyboardPress (get_binded_action ((SDL_Scancode) key)))
196+ if (game && game->OnKeyboardPress (get_binded_action (key)))
197197 return ;
198198
199199 if (_curr == kQUICK_SAVE && IsGameTypeSingle ())
@@ -475,14 +475,14 @@ void CLevel::IR_OnKeyboardPress(int key)
475475 }
476476#endif // MASTER_GOLD
477477
478- if (bindConsoleCmds.execute ((SDL_Scancode) key))
478+ if (bindConsoleCmds.execute (key))
479479 return ;
480480
481481 if (CURRENT_ENTITY ())
482482 {
483483 IInputReceiver* IR = smart_cast<IInputReceiver*>(smart_cast<CGameObject*>(CURRENT_ENTITY ()));
484484 if (IR)
485- IR->IR_OnKeyboardPress (get_binded_action ((SDL_Scancode) key));
485+ IR->IR_OnKeyboardPress (get_binded_action (key));
486486 }
487487
488488#ifdef _DEBUG
@@ -508,9 +508,9 @@ void CLevel::IR_OnKeyboardRelease(int key)
508508 /* avo: end */
509509#endif
510510
511- if (CurrentGameUI () && CurrentGameUI ()->IR_UIOnKeyboardRelease ((SDL_Scancode) key))
511+ if (CurrentGameUI () && CurrentGameUI ()->IR_UIOnKeyboardRelease (key))
512512 return ;
513- if (game && game->OnKeyboardRelease (get_binded_action ((SDL_Scancode) key)))
513+ if (game && game->OnKeyboardRelease (get_binded_action (key)))
514514 return ;
515515 if (Device.Paused ()
516516#ifdef DEBUG
@@ -523,7 +523,7 @@ void CLevel::IR_OnKeyboardRelease(int key)
523523 {
524524 IInputReceiver* IR = smart_cast<IInputReceiver*>(smart_cast<CGameObject*>(CURRENT_ENTITY ()));
525525 if (IR)
526- IR->IR_OnKeyboardRelease (get_binded_action ((SDL_Scancode) key));
526+ IR->IR_OnKeyboardRelease (get_binded_action (key));
527527 }
528528}
529529
@@ -568,7 +568,7 @@ void CLevel::IR_OnKeyboardHold(int key)
568568
569569#endif // DEBUG
570570
571- if (CurrentGameUI () && CurrentGameUI ()->IR_UIOnKeyboardHold ((SDL_Scancode) key))
571+ if (CurrentGameUI () && CurrentGameUI ()->IR_UIOnKeyboardHold (key))
572572 return ;
573573 if (Device.Paused () && !Level ().IsDemoPlay ()
574574#ifdef DEBUG
@@ -580,7 +580,7 @@ void CLevel::IR_OnKeyboardHold(int key)
580580 {
581581 IInputReceiver* IR = smart_cast<IInputReceiver*>(smart_cast<CGameObject*>(CURRENT_ENTITY ()));
582582 if (IR)
583- IR->IR_OnKeyboardHold (get_binded_action ((SDL_Scancode) key));
583+ IR->IR_OnKeyboardHold (get_binded_action (key));
584584 }
585585}
586586
@@ -594,7 +594,7 @@ void CLevel::IR_OnActivate()
594594 {
595595 if (IR_GetKeyState (i))
596596 {
597- EGameActions action = get_binded_action ((SDL_Scancode) i);
597+ EGameActions action = get_binded_action (i);
598598 switch (action)
599599 {
600600 case kFWD :
0 commit comments