107 Commits

Author SHA1 Message Date
Zvika Haramaty
6ab0cb78e0 SCI: Improve vm_hooks ; Support Hebrew SQ3
- vm_hooks: fully support 'call*'
- make required changes to support Hebrew SQ3 (which is still a WIP
project)
2020-05-25 03:21:59 +03:00
mataniko
321a02aff2 JANITORIAL: Rename shouldRTL, resetRTL and FORCE_RTL 2020-05-12 10:36:38 +02:00
mataniko
06242a712b JANITORIAL: Rename EVENT_RTL
Now that ScummVM is adding RTL support, the EVENT_RTL should be disambigious that it is for returning to launcher
2020-05-12 10:36:38 +02:00
Paul Gilbert
ba147f5ad5 SCI: Refactor to use Engine debugger 2020-02-16 13:07:19 +02:00
Eugene Sandulenko
77adfd762e SCI: Removed unneeded debug output. The bug has been confirmed fixed 2019-12-27 19:49:37 +01:00
Eugene Sandulenko
df5a4fb027 SCI: Swap lowercase Alt+'a'/'s' for Polish, in order to avoid conflicting keybingings 2019-12-26 15:51:22 +01:00
Eugene Sandulenko
a2cbc18d61 SCI: Fix lowercase Alt+'n' for Polish 2019-12-26 15:40:54 +01:00
Eugene Sandulenko
c88da94585 SCI: Added support for typing Polish characters with 'Alt' 2019-12-26 15:10:07 +01:00
Eugene Sandulenko
ac2b6af639 SCI: Added temporary debug ouput for Polish input 2019-12-25 23:38:23 +01:00
Eugene Sandulenko
3e296bc31b SCI: Reformatted the conversion table 2019-12-25 14:05:02 +01:00
Eugene Sandulenko
f491a2562c SCI: Added detection and support for Polish LSL7
Fixes bug #11274
2019-12-25 13:24:36 +01:00
Eugene Sandulenko
c38600410e SCI: Support for Cyrillic input 2019-09-21 17:07:15 +02:00
sluicebox
a2cc90bf9b SCI: Fix backend events treated as keyboard events
Prevents backend events such as EVENT_SCREEN_CHANGED
from being misinterpreted as SCI keyboard events
2019-06-06 07:08:49 +03:00
Adrian Frühwirth
a20f90cbb7 JANITORIAL: Fix formatting 2018-04-22 00:56:21 +02:00
Colin Snover
c7c5f28bdb SCI32: Clean up scriptWidth/scriptHeight/screenWidth/screenHeight
This removes the unnecessary Buffer subclass and stops most places
where the output buffer was being interrogated about dimensions
instead of GfxFrameout.
2017-10-06 22:56:26 -05:00
Colin Snover
7a41b6f023 SCI: Add support for keyup events
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-27 20:27:34 -05:00
Colin Snover
9a8070da3c SCI: Do some clean-up of event handling system
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-09-27 20:27:33 -05:00
Colin Snover
0beb259278 SCI32: Improve performance when flushing events during video playback
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-23 10:35:13 -05:00
Colin Snover
b4c0be8b42 SCI: Fix control character keyboard events
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.
2017-07-16 01:33:57 -05:00
Colin Snover
6303468555 SCI32: Fix mouse position clamping 2016-10-14 19:52:21 -05:00
Colin Snover
c118e2fe12 SCI32: Reset active hot rect index when changing hot rects 2016-10-10 19:35:28 -05:00
Colin Snover
1c5a5d09f9 SCI32: Fix Return to Launcher in F5 menu
Closes #837.
2016-10-05 15:30:31 -05:00
Colin Snover
44dd029cb1 SCI32: Implement kSetHotRectangles
Used only by chapter 7 of Phant1.
2016-09-29 19:39:16 -05:00
Colin Snover
560af83300 SCI: Move SciEngine::sleep to correct source file 2016-09-29 19:39:16 -05:00
Colin Snover
d0517f515e SCI32: Update screen on frameout, instead of in the event loop 2016-09-29 19:39:16 -05:00
Colin Snover
80d9182554 SCI32: Implement SCI32 cursor support 2016-08-19 13:57:40 -05:00
Colin Snover
77991b7eac SCI32: Add const to getCurrentBuffer 2016-07-02 22:28:41 -05:00
Colin Snover
1337cd3dec SCI32: Implement kEditText 2016-03-06 21:34:43 -06:00
Filippos Karapetis
cdbd7c8add SCI: Use uint32 instead of unsigned int 2016-03-01 01:12:58 +02:00
Johannes Schickel
60d4367f3c SCI: Formatting fix. 2016-02-13 00:36:06 +01:00
Johannes Schickel
98edaa799e SCI: Make variable name in line with our guidelines.
(cherry picked from commit 7d7c36b5933d1e777e1246c8fe84a3c2379f082d)
2016-02-13 00:06:27 +01:00
Johannes Schickel
82b5ed65cc SCI: Small variable renaming to match our naming guidelines. 2016-02-09 19:52:09 +01:00
Johannes Schickel
b911976a66 SCI: Take advantage of operator-> of Common::List::iterator. 2016-02-09 16:42:45 +01:00
Martin Kiewitz
e91bdf0262 SCI: Remove hardcoded value in getScummVMEvent() 2016-02-03 20:45:08 +01:00
Martin Kiewitz
7635f3c73e SCI: Make event handling helper tables static 2016-02-02 15:03:54 +01:00
Martin Kiewitz
b052ff2762 SCI: Fix comment about debugger keys
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-02 12:51:25 +01:00
Martin Kiewitz
42cb01f57c SCI: Keyboard event handling cleanup
Renamed "ourModifiers" to "scummVMKeyFlags"
Now also using the flags directly from the ScummVM event in case
it actually was a Keyboard event.
2016-02-02 12:47:47 +01:00
Martin Kiewitz
bc0dd6f821 SCI: Fix regression of previous keycode commit
7aeadba863ed1893fa6095008d35b32ce5117749
Thanks LordHoto for spotting it
2016-02-02 11:43:58 +01:00
Martin Kiewitz
7aeadba863 SCI: Removed ".data" from SciEvent
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-02 11:33:40 +01:00
Martin Kiewitz
82a27a33da SCI: fix typo in comment 2016-02-02 10:46:16 +01:00
Martin Kiewitz
59d2c4b27e SCI: Do not pass/use .data for mouse button type
Also added comment about .data field. Should be renamed.
2016-02-02 02:10:43 +01:00
Martin Kiewitz
c0bdbe1ca8 SCI: Fix control/Fx keys not working anymore
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-02 01:56:08 +01:00
Martin Kiewitz
0b17a67a30 SCI: Revert revert the keyboard handling changes
It seems the issues on AmigaOS aren't actually caused by the new
code. Reverting the revert.
2016-02-01 15:04:03 +01:00
Martin Kiewitz
a3774072a3 SCI: Revert ascii detection for key event handling
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-02-01 02:09:12 +01:00
Martin Kiewitz
171b79c2c5 SCI: add code to make numpad cursor keys work again
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-29 22:57:30 +01:00
Martin Kiewitz
fa66b823b8 SCI: change ascii detection for key event handling
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.
2016-01-28 20:19:34 +01:00
Filippos Karapetis
92bf8a5420 SCI: Fix bug #6703: "SCI: QFG1 VGA - Can't CTRL+S to access statistics"
This actually affected all Control+key combinations. A regression from
0f90b8eaad0335715d5f6aea6ede32ebbb746e25
2014-10-18 22:06:48 +03:00
Johannes Schickel
8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Johannes Schickel
45f95cbc8b SCI: Minor formatting fixes. 2013-01-14 21:07:20 +01:00
Lars Skovlund
8e733f03b7 SCI: Event handling: Include modifier flags in null events.
Fixes bug #3580473
2013-01-14 20:11:34 +01:00