aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/event.h
AgeCommit message (Collapse)Author
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-23SCI32: Fix hot rectangle eventsColin Snover
This fixes delayed mouse cursor updates during the chase scene in Phant1. Refs Trac#9975.
2017-07-16SCI: Fix kMenuSelect to understand control charactersColin Snover
In b4c0be8b42d63cbf3c808be1a94839483f674ce9 keyboard events were adjusted to send control characters to game scripts, which matches how keyboard input works in SSCI. Unfortunately this broke games using kMenuSelect because that kernel code was not expecting to receive control characters. Here is an amended list of known types of keyboard shortcuts, for future reference: * All games with text inputs (Ctrl+C clears text boxes) * Most games using MenuBar, like QFG1EGA (Ctrl+P pauses the game, Tab or Ctrl+I show inventory) * QFG1VGA (Ctrl+S shows stats) * Torin (Ctrl+N, Ctrl+O, Ctrl+S, etc. activate menu commands) * LSL1VGA & LSL3 (Ctrl+Alt+X to bypass age check) * Most in-game debuggers (Alt+T for teleport) The shortcut handling code is still not 100% accurate since there are some edge cases that are not implemented (e.g. in DOS/SSCI, Shift+Ctrl+<key> usually sends the same key information as Ctrl+<key>, but not if <key> is Tab), but it should now be working in a consistent and rational manner for end-users.
2016-09-29SCI32: Implement kSetHotRectanglesColin Snover
Used only by chapter 7 of Phant1.
2016-03-06SCI32: Implement kEditTextColin Snover
2016-03-01SCI: Use uint32 instead of unsigned intFilippos Karapetis
2016-02-03SCI: code/define formattingMartin Kiewitz
2016-02-03SCI: Remove hardcoded value in getScummVMEvent()Martin Kiewitz
2016-02-02SCI: make event type, modifiers + character uint16Martin Kiewitz
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: Do not pass/use .data for mouse button typeMartin Kiewitz
Also added comment about .data field. Should be renamed.
2014-02-18SCI: Make GPL headers consistent in themselves.Johannes Schickel
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
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-07-29SCI: updating screen within kAnimate as well - fixes pseudo hang in eq1 ↵Martin Kiewitz
credits (bug #3036154) svn-id: r51459
2010-06-19SCI: implemented checking of keyboard driver in case of SCI1EGA/EARLY, also ↵Martin Kiewitz
renamed SCI_EVENT_JOYSTICK to SCI_EVENT_DIRECTION svn-id: r50045
2010-06-17SCI: Turn _modifierStates into member of class EventManagerMax Horn
svn-id: r49963
2010-06-17SCI: cleanupMax Horn
svn-id: r49961
2010-06-17SCI: Rename sciEvent to SciEventMax Horn
svn-id: r49960
2010-06-17SCI: Moved the event code a little bit around.Max Horn
* Move sleep() from EventManager to SciEngine * Rename EventManager methods: get -> getSciEvent, and getFromScummVM -> getScummVMEvent * Make scancode_rows static const * Turn altify & numlockify from EventManager methods into static functions (and comment out the currently unused numlockify) svn-id: r49959
2010-06-09Renamed the SciEvent class to EventManager, to separate it from the sciEvent ↵Filippos Karapetis
structure, and removed it from the engine state svn-id: r49534
2010-04-24SCI: reverting r48787 port updates were actually introduced (heard that ↵Martin Kiewitz
before) in SCI1. I used the outdated wiki before and that one lists qfg2 and xmas90ega being SCI01. They are actually SCI1 svn-id: r48789
2010-04-24SCI: r48786 port updates were actually introduced during SCI01, qfg2 and ↵Martin Kiewitz
xmas90ega only. We enable port updates only for non-multilingual SCI01 games now - fixes percentage bar for qfg1 japanese as well svn-id: r48787
2010-04-17SCI: key presses of extended chars (umlauts, etc.) will now get ignored in ↵Martin Kiewitz
games that don't support them (which is all non-multilingual games) svn-id: r48693
2010-02-23SCI: Turn kernel_sleep() into SciEvent::sleep()Max Horn
svn-id: r48119
2010-01-25Strip trailing spaces/tabs.Johannes Schickel
svn-id: r47541
2010-01-08SCI: removed controlify() to ease readability of codeMartin Kiewitz
svn-id: r47186
2009-12-04SCI: Renamed "buckybits" to "modifiers" in SciEventMartin Kiewitz
svn-id: r46256
2009-12-04SCI: Make event constants more verboseMartin Kiewitz
svn-id: r46255
2009-12-04SCI: SciEvent created, kernel_sleep() createdMartin Kiewitz
svn-id: r46252