aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/event.cpp
AgeCommit message (Collapse)Author
2019-06-06SCI: Fix backend events treated as keyboard eventssluicebox
Prevents backend events such as EVENT_SCREEN_CHANGED from being misinterpreted as SCI keyboard events
2018-04-22JANITORIAL: Fix formattingAdrian Frühwirth
2017-10-06SCI32: Clean up scriptWidth/scriptHeight/screenWidth/screenHeightColin Snover
This removes the unnecessary Buffer subclass and stops most places where the output buffer was being interrogated about dimensions instead of GfxFrameout.
2017-09-27SCI: Add support for keyup eventsColin Snover
Basic keyup event support appears to have been added in the SCI1.1 IBM keyboard driver, and more robust support was provided in SCI32 which actually gets used by at least Lighthouse. This patch adds support for keyup events in SCI1.1+. Fixes Trac#10242.
2017-09-27SCI: Do some clean-up of event handling systemColin Snover
Convert macros and vars to enums, rename keyboard events in preparation for adding key up events, clean up unnecessary nested conditionals, add TODOs for potential future work.
2017-07-23SCI32: Improve performance when flushing events during video playbackColin Snover
Calling through EventManager::getSciEvent to flush events is pretty inefficient and created stalls that lead to dropped frames during the chapter 7 chase in Phantasmagoria 1. If necessary, performance could be improved further by extending Common::EventManager to expose SDL_FlushEvents, but this seems to finish in 0-1ms so should be OK for now. Refs Trac#9974, Trac#9975.
2017-07-16SCI: Fix control character keyboard eventsColin Snover
Used by: * All games with text inputs (Ctrl+C clears text boxes) * QFG1VGA (Ctrl+S shows stats) * Torin (Ctrl+N, Ctrl+O, Ctrl+S, etc. activate menu commands) The branch that used to shift control keys for SCI versions <= SCI_VERSION_1_MIDDLE was bogus; history indicates it was intended to be used to fix backends that sent control characters when Ctrl+Alt were used together, but that case is already handled by the Alt-checking code just prior to that code. Games expect to receive control characters only when Ctrl is the only active modifier, and this seems to be consistent across all versions of SCI engine from SCI0 all the way through at least SCI2.1. Fixes Trac#6703, Trac#9837.
2016-10-14SCI32: Fix mouse position clampingColin Snover
2016-10-10SCI32: Reset active hot rect index when changing hot rectsColin Snover
2016-10-05SCI32: Fix Return to Launcher in F5 menuColin Snover
Closes #837.
2016-09-29SCI32: Implement kSetHotRectanglesColin Snover
Used only by chapter 7 of Phant1.
2016-09-29SCI: Move SciEngine::sleep to correct source fileColin Snover
2016-09-29SCI32: Update screen on frameout, instead of in the event loopColin Snover
2016-08-19SCI32: Implement SCI32 cursor supportColin Snover
2016-07-02SCI32: Add const to getCurrentBufferColin Snover
2016-03-06SCI32: Implement kEditTextColin Snover
2016-03-01SCI: Use uint32 instead of unsigned intFilippos Karapetis
2016-02-13SCI: Formatting fix.Johannes Schickel
2016-02-13SCI: Make variable name in line with our guidelines.Johannes Schickel
(cherry picked from commit 7d7c36b5933d1e777e1246c8fe84a3c2379f082d)
2016-02-09SCI: Small variable renaming to match our naming guidelines.Johannes Schickel
2016-02-09SCI: Take advantage of operator-> of Common::List::iterator.Johannes Schickel
2016-02-03SCI: Remove hardcoded value in getScummVMEvent()Martin Kiewitz
2016-02-02SCI: Make event handling helper tables staticMartin Kiewitz
2016-02-02SCI: Fix comment about debugger keysMartin Kiewitz
Was changed to Ctrl-Shift-D at some point, because a SCI game uses Ctrl-D. Comment wasn't changed accordingly back then.
2016-02-02SCI: Keyboard event handling cleanupMartin Kiewitz
Renamed "ourModifiers" to "scummVMKeyFlags" Now also using the flags directly from the ScummVM event in case it actually was a Keyboard event.
2016-02-02SCI: Fix regression of previous keycode commitMartin Kiewitz
7aeadba863ed1893fa6095008d35b32ce5117749 Thanks LordHoto for spotting it
2016-02-02SCI: Removed ".data" from SciEventMartin Kiewitz
Was the ScummVM-system-Keycode, sometimes modified. Changed Menu/Portrait/Controls32-code to use .character instead. Cleaned up a bit of code in getScummVMEvent()
2016-02-02SCI: fix typo in commentMartin Kiewitz
2016-02-02SCI: Do not pass/use .data for mouse button typeMartin Kiewitz
Also added comment about .data field. Should be renamed.
2016-02-02SCI: Fix control/Fx keys not working anymoreMartin Kiewitz
Was effectively caused by commit adding the keyboard driver bug for SCI0/SCI01, although the bug is actually real and happens. It seems Sierra did not check the key-modifier in kMenuSelect. We do and that's why the code didn't recognize all sorts of menu keys anymore. We now isolate the lower byte before comparing. I also noticed, that Sierra passed keyboard modifiers in mouse events. This was probably done, so that owners of a 1-button mouse were able to right-click. We do this now too. Also added information about mouse modifiers in kGetEvent. Moved the mouse modifier code into getScummVMEvent(). This should fix bug #7009.
2016-02-01SCI: Revert revert the keyboard handling changesMartin Kiewitz
It seems the issues on AmigaOS aren't actually caused by the new code. Reverting the revert.
2016-02-01SCI: Revert ascii detection for key event handlingMartin Kiewitz
Seems to cause at least issues on AmigaOS probably b/c SDL. See bug #7009. Added FIXME. Underlying issue needs to get fixed in SDL backend or in SDL itself.
2016-01-29SCI: add code to make numpad cursor keys work againMartin Kiewitz
When the users presses keys on the numpad, we get digits in .ascii even when Num-Lock is not enabled. This caused numpad cursor keys not working anymore. Imo we should only get .ascii in those cases, when Num-Lock is enabled.
2016-01-28SCI: change ascii detection for key event handlingMartin Kiewitz
New way is probably better. Sadly we get a few keys atm in the ascii field, like cursor left and the function keys. That's why a check for <= 0xFF is needed.
2014-10-18SCI: Fix bug #6703: "SCI: QFG1 VGA - Can't CTRL+S to access statistics"Filippos Karapetis
This actually affected all Control+key combinations. A regression from 0f90b8eaad0335715d5f6aea6ede32ebbb746e25
2014-02-18SCI: Make GPL headers consistent in themselves.Johannes Schickel
2013-01-14SCI: Minor formatting fixes.Johannes Schickel
2013-01-14SCI: Event handling: Include modifier flags in null events.Lars Skovlund
Fixes bug #3580473
2012-06-08SCI: Fix mouse up eventsWillem Jan Palenstijn
Regression from 906f0248317e1a4167190a666fe308a09334bfac. Fixes bug #3533069.
2011-10-29SCI: Allow alt key combinations in all SCI gamesFilippos Karapetis
Such key combos are used for the game debugger in SCI1.1 and GK1
2011-06-20ALL: Remove trailing whitespacesMax Horn
This tries to make our code a bit more compliant with our code formatting conventions. For future use, this is the command I used: git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-05-21SCI: Fix probable alt/shift mixupWillem Jan Palenstijn
A check for alt was changed into this check for shift in the cleanup commit 906f0248317e1a4167190a666fe308a09334bfac.
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-04-03SCI: Changed debug console hotkey to Control-Shift-D instead of Control-D.md5
Applied from patch #3258985. The previous hotkey interfered with the hotkeys of some games (e.g. the "time of day" hotkey in QFG2, bug #3250996).
2011-03-10SCI: Fix mouse positions in upscaled gamesMatthew Hoops
A regression from 463e475bd65
2011-03-10SCI: Fixed regression (shift key) in the latest event code cleanupmd5
2011-03-09SCI: Save mouse position in SciEvent.Johannes Schickel
Instead of querying the event manager for the current mouse cursor coordinates kGetEvent now uses the saved mouse positions, which will assure every event will be processed with the correct coordinates instead of the current ones. Various other functions using SciEvent directly were adapted too. This fixes cursor click positions for the WinCE backend. Thanks to wjp and waltervn for helping me with this.
2011-03-09SCI: Cleanup of the event codemd5
2011-02-15SCI: Cleaned up kMapKeyToDir and removed an incorrect heuristicmd5
The heuristic in question was used to detect the pseudo mouse control functionality, however the change in controls seems to have occurred with the transition to cursor views. Fixes keypad control in Conquest of the Longbow. Moreover, the code also checked for key scan code 76 when checking for the middle keypad button, which seems to be a mistake, as that case never occurred.
2010-11-26SCI: Fixed keyboard input when numlock is on, and cleaned up the way some ↵Filippos Karapetis
special keys are translated svn-id: r54493