Commit Graph
90 Commits
Author SHA1 Message Date
UrQuan1 e81858c25d SCI: Fix desynchronized kMenuSelect inversion
When selecting a new menu while another menu open, the new menu
will be drawn before inverting the old item selection. In the
next loop iteration, when the inversion happens, it now inverts
the brand new white item.

(cherry picked from commit f7c44a452953415c3ba4dbdf96162f83efde8f51)
2023-01-24 13:34:06 -08:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh 940c7bfc14 SCI: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Paul Gilbert 0136043f09 COMMON: Revert Change Rect and Point to have int32 fields
This reverts commit 1c3e7fb4e9.
2021-07-06 20:35:42 -07:00
Paul Gilbert 1c3e7fb4e9 COMMON: Change Rect and Point to have int32 fields 2021-07-04 18:24:26 -07:00
sluicebox 9982c761a2 SCI: Update all old bug tracker ticket numbers 2021-02-25 01:18:52 -08:00
sluicebox 40fbf7be48 SCI: Process ScummVM Quit events during kMenuSelect
Fixes engine not being able to quit while the SCI menu bar
has keyboard focus.
2021-01-31 12:43:16 -08:00
Walter van Niftrik 22593de73f SCI: Rename font.h/cpp to scifont.h/cpp
This avoids an issue with MSVC where if (non-SCI) "graphics/font.h" is
included through another include file from the SCI engine root, it finds
"sci/graphics/font.h" first and uses that instead.
2020-08-27 14:56:17 +02:00
Zvika 9f10fbcfc1 SCI: Hebrew SQ3 - fixed rejects 2020-05-25 03:21:59 +03:00
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
D G Turner d11c61db14 SCI: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-12-01 05:06:31 +00:00
sluicebox 12fca19d59 SCI: Fix kMenuSelect selecting disabled items
Fixes CAMELOT "draw sword" command causing bugs and
lockups when it's not supposed to be available
2019-11-19 19:56:01 -08:00
sluicebox 903ca29558 SCI: Fix kAddMenu language separator parsing
Fixes bug #10926 that prevents SQ3 German Amiga from loading
2019-03-29 19:12:52 +02: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 d8eccdec32 SCI: Clarify Tab character & modifier workarounds in GfxMenu 2017-07-16 14:26:30 -05:00
Colin Snover 6379498303 SCI: Fix kMenuSelect to understand control characters
In b4c0be8b42 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.
2017-07-16 14:26:30 -05: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 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
Johannes Schickel 8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Filippos Karapetis 2d90cc4ac3 SCI: Fix a non-initialized variable in GfxMenu - CID 1003110 2013-05-01 01:51:11 +03:00
Willem Jan Palenstijn 2d1fd3b554 ALL: Fix typo (existant->existent) 2013-02-23 22:07:32 +01:00
Filippos Karapetis 2b50824133 SCI: Add setter/getter methods to reg_t's
No functionality change has been made with this commit. This avoids
setting and getting the reg_t members directly, and is the basis of any
future work on large SCI3 scripts (larger than 64KB)
2012-06-18 05:24:06 +03:00
Christoph Mallon 75efdd2d84 JANITORIAL: Replace (x ? false : true) by !(x). 2012-03-13 15:43:36 +01:00
Max Horn 88913c0139 ALL: Remove trailing whitespaces
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-06-20 00:59:48 +02:00
md5 60943efafd SCI: Fixed bug #3295931 - "SCI: JONES: Disabled commands are available using shortcuts" 2011-06-12 17:58:25 +03:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
md5 fd2c39591f SCI: Fixed the flashing icon bar in the Mac version of Castle of Dr. Brain
Thanks to waltervn for his work and help on this
2011-03-13 23:34:08 +02:00
Johannes Schickel 463e475bd6 SCI: Save mouse position in SciEvent.
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-09 01:19:12 +01:00
Willem Jan Palenstijn eece58df7f SCI: Remove unused argument to said 2011-03-08 22:50:32 +01:00
Filippos Karapetis 0309f36552 SCI: Plugged 2 memory leaks, reported by digitall
- Plugged 2 memory leaks in the SCI0 menu code (the lists of menu and submenu entries)
- Got rid of the _listCount variable

svn-id: r55254
2011-01-15 23:55:35 +00:00
Filippos Karapetis 505e1888e5 SCI: Some function renaming
Draw_Status -> DrawStatus
Draw_String -> DrawString

svn-id: r55178
2011-01-08 23:16:44 +00:00
Filippos Karapetis 32d7e687ee SCI: debugC calls no longer require a debug level of 2 to show output
svn-id: r55086
2011-01-01 12:48:12 +00:00
Max Horn ba3e826872 SCI: Remove any use of printf
svn-id: r54037
2010-11-02 09:49:47 +00:00
Martin Kiewitz cd6aa62702 SCI: adding separate status drawing code
now also draws "IV" in KQ4 correctly. This wasn't the case before because we reused the regular drawing code, which would see the 0xA ("IV") as linebreak

save for backport

svn-id: r52913
2010-09-26 18:23:53 +00:00
Matthew Hoops bc54fde8e1 SCI: Ignore setAttribute() on any non-existent menu items
This fixes two fan games: Al Pond 2 and Aquarius. The original interpreter did this as well.

svn-id: r51477
2010-07-29 19:08:07 +00:00
Matthew Hoops 07b67fe44b SCI: Fix using the parser in SCI Fan Games
Get a pointer to the said spec instead of copying to a buffer. The fan games use a said spec with size < 64. Also, make said() take a const pointer as the spec cannot change. Thanks to waltervn and wjp.

svn-id: r51432
2010-07-28 19:03:49 +00:00
Filippos Karapetis 3c8a606e71 SCI: Added bug report numbers for all the recently fixed bugs
svn-id: r51407
2010-07-28 07:51:49 +00:00
Filippos Karapetis 27ce375a95 SCI: Fixed bug #3034507, "PQ2 Demo: Non-existant menu item"
svn-id: r51294
2010-07-26 05:49:00 +00:00
Martin Kiewitz c2577da7e0 SCI: fixed jones/ega/vga port issue
getPortById() error was caused by us remembering port when going interactive, restoring it and restoring it all the time afterwards as well

svn-id: r51071
2010-07-20 19:42:48 +00:00
Martin Kiewitz 28d07c7e0a SCI: calculate widths for menu after switching to menuport, i guess this was the reason why we sometimes had issues drawing parts of the menu (random issue)
svn-id: r50784
2010-07-10 16:22:08 +00:00
Martin Kiewitz a7cd1534c6 SCI: fix regression of r50721 - pausing/resuming only on actual menu usage
svn-id: r50724
2010-07-06 14:10:09 +00:00
Max Horn 8db0f726c0 SCI: Rewrap more comments
svn-id: r50500
2010-06-29 14:55:32 +00:00
Filippos Karapetis 0a102981f0 Moved the SelectorCache struct inside selector.h, where it belongs, and fixed some header dependencies in the process
svn-id: r50183
2010-06-23 15:23:37 +00:00
Max Horn a2bcf9ac31 SCI: Rename sciEvent to SciEvent
svn-id: r49960
2010-06-17 23:11:12 +00:00
Max Horn 8e07a1e167 SCI: Moved the event code a little bit around.
* 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-17 23:10:37 +00:00
Martin Kiewitz b25aba1d1e SCI: SciGui/SciGui32 gone for good...
svn-id: r49860
2010-06-15 15:44:24 +00:00
Filippos Karapetis 5cb311ee2c Renamed the SciEvent class to EventManager, to separate it from the sciEvent structure, and removed it from the engine state
svn-id: r49534
2010-06-09 07:59:42 +00:00
Filippos Karapetis 67de5b1bd3 Mass renaming of selector-related functions, and removed some defines which were just cloaking functions with a different name
- GET_SEL32 -> readSelector
- GET_SEL32V -> readSelectorValue
- PUT_SEL32 -> writeSelector
- PUT_SEL32V -> writeSelectorValue
Also, changed some selector-related function names and variables to CamelCase

svn-id: r49317
2010-05-29 23:37:15 +00:00
Martin Kiewitz 5e4868fb00 SCI: handle TAB like Ctrl-I on menu key checking, sci0 also did it that way - makes TAB work for inventory in iceman/qfg1ega
svn-id: r49044
2010-05-15 21:28:26 +00:00
Martin Kiewitz 59a255226f SCI: SCI_SCREEN_MASK_* now GFX_SCREEN_MASK_*, using enum - added new enum GFX_SCREEN_UPSCALED_*
svn-id: r49039
2010-05-15 08:57:13 +00:00