XEEN: Allow for screenshots in cutscenes

This commit is contained in:
Paul Gilbert 2020-10-08 20:28:35 -07:00
parent 1f25347dd5
commit 759c954cf2
3 changed files with 17 additions and 1 deletions

View File

@ -31,6 +31,7 @@ For a more comprehensive changelog of the latest experimental code, see:
Xeen:
- Fixed occasional border corruption during fights.
- Improvements to cutscenes to better match the original games.
#### 2.2.0 "Interactive Fantasy" (2020-09-27)

View File

@ -84,7 +84,8 @@ void EventsManager::pollEvents() {
case Common::EVENT_RETURN_TO_LAUNCHER:
return;
case Common::EVENT_KEYDOWN:
addEvent(event.kbd);
if (!isModifierKey(event.kbd.keycode))
addEvent(event.kbd);
break;
case Common::EVENT_MOUSEMOVE:
_mousePos = event.mouse;
@ -207,4 +208,13 @@ void EventsManager::nextFrame() {
_vm->_screen->update();
}
bool EventsManager::isModifierKey(const Common::KeyCode &keycode) const {
return keycode == Common::KEYCODE_LCTRL || keycode == Common::KEYCODE_LALT
|| keycode == Common::KEYCODE_RCTRL || keycode == Common::KEYCODE_RALT
|| keycode == Common::KEYCODE_LSHIFT || keycode == Common::KEYCODE_RSHIFT
|| keycode == Common::KEYCODE_LSUPER || keycode == Common::KEYCODE_RSUPER
|| keycode == Common::KEYCODE_CAPSLOCK || keycode == Common::KEYCODE_NUMLOCK
|| keycode == Common::KEYCODE_SCROLLOCK;
}
} // End of namespace Xeen

View File

@ -74,6 +74,11 @@ private:
* Handles moving to the next game frame
*/
void nextFrame();
/**
* Returns whether the keypress is a modifier key like Ctrl or Alt
*/
bool isModifierKey(const Common::KeyCode &keycode) const;
public:
Common::Point _mousePos;
public: