Commit Graph
29 Commits
Author SHA1 Message Date
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
sluicebox 6e9d0fafb5 SCI32: Use Mac cursor palettes
Fixes cursor colors in SCI32 Mac games that use native cursor resources.
2020-02-12 09:04:57 -08:00
sluicebox 8f6979234e SCI: Remove unreachable error() from Mac cursor code
Removes a call to error() that can't be reached.
The condition it's attempting to detect is normal and not an error.
2020-02-07 13:15:44 -08:00
sluicebox 511e5441e3 SCI32: Enable Mac code (remove ENABLE_SCI32_MAC) 2019-10-11 14:18:26 -07:00
Colin Snover e26a677f62 SCI32: Tell OSystem to show/hide cursors as appropriate
This is needed so that the system cursor can be appropriately
hidden outside the game's draw area, to match the normal behaviour
of ScummVM.
2017-10-15 19:03:09 -05: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 9d05bf7920 SCI32: Clean up GfxCursor32
* Rewrap doxygen comments to 80 columns
* Renamings for clarity
* Deduplicate copy/paint code
2017-10-06 22:10:51 -05:00
Colin Snover 743082ac8c SCI32: Disable all SCI32 Mac code
This code is currently untestable and is almost certainly at least
partly based on guesswork & not actual reverse-engineering (as was
the case for all other pre-2015 SCI32 code), so future developers
interested in adding SCI32 Mac support should use it only as an
intermediate reference rather than as known good code.
2017-09-24 22:56:59 -05:00
Colin Snover 301d0403cb SCI32: Don't warp the mouse twice when its position has been restricted 2017-09-19 19:54:29 -05:00
Colin Snover 22d157cee7 SCI32: Flush all events before warping mouse
This improves the behaviour at the end of PQ4 when navigating the
warehouse with the flashlight by getting rid of mouse events that
may have been queued before the mouse warp to the other side of
the screen is performed. Without this, frequently, those extra
events would then be processed and cause the mouse to jump back to
the opposite side of the screen, triggering another navigation in
the opposite direction.

This patch really only helps when mouse capture is enabled in
ScummVM as well, but it does allow the sequence to be played
pretty much normally in that situation. Additional (pending)
patches to ScummVM itself are needed to move the mouse to the
correct place when mouse capture is off and the system mouse moves
outside of the game window.

Refs Trac#9689.
2017-09-19 19:54:29 -05:00
Colin Snover 3ce5276b9c SCI32: Remove unnecessary calls to hide the virtual hardware cursor 2017-09-08 16:02:32 -05:00
Colin Snover 580f3875c0 SCI32: Fix explicit mouse position changes
This was broken by 9f33f2b3df.
2017-07-23 11:42:55 -05:00
Colin Snover 5b166a5173 SCI32: Avoid extra cursor paints when the cursor has not moved 2017-07-23 10:35:13 -05:00
Colin Snover 9f33f2b3df SCI32: Don't warp the mouse when it doesn't need to be warped 2017-07-23 10:35:13 -05:00
Colin Snover 604ac1a375 SCI32: Update cursor even when position appears unchanged
This may be masking another bug, but at least what happens in
Phant1 is that the mouse does not get redrawn after being moved
programmatically to the fast-forward button when deviceMoved
returns early.
2017-05-06 19:00:04 -05:00
Colin Snover 8b49313af3 SCI32: Fix terrible rendering performance when vsync is enabled
More than one call to OSystem::updateScreen per frame on systems
with vsync ruins performance because the call is blocked until
the next vsync interval.

This also fixes bad rendering performance with the OpenGL backend.
2017-05-06 10:38:58 -05:00
Colin Snover bb40889a60 Revert "SCI32: Add debugging calls to GfxCursor32"
This reverts commit c02f2674ad.

Two minutes after committing this, the author of the ticket
resolved the problem, which was caused by missing VMDs.
2017-05-01 21:16:20 -05:00
Colin Snover c02f2674ad SCI32: Add debugging calls to GfxCursor32
Refs Trac#9740.
2017-05-01 20:44:25 -05:00
Colin Snover 5dd9618842 SCI32: Remove unnecessary GfxFrameout::_frameNowVisible
This flag was used in SSCI to read from VRAM instead of from the
back buffer when a mouse interrupt was received in the middle of
a back buffer update. Since ScummVM controls when mouse events
are received via polling, it is not possible to receive a mouse
event in the middle of back buffer updates, so this code is
unnecessary for the engine to work properly.

This also fixes Valgrind warnings about use of uninitialized
memory at the start of the game, caused by not filling the cursor
memory buffers because `_frameNowVisible` was false until the first
frame was rendered.
2017-04-29 14:31:01 -05:00
Colin Snover 31daa956d6 SCI: Implement bounds-checked reads of game resources 2017-03-27 19:42:31 -05:00
Colin Snover efa6b74cce SCI32: Clarify comment about empty code path in cursor code 2017-01-16 12:16:13 -06:00
Colin Snover 320d6c8255 SCI32: Fix uninitialised read of cursor background at start of game 2017-01-11 12:02:12 -06:00
Colin Snover 40444b0aeb SCI32: Clarify some identifiers
transparentColor -> skipColor
displace -> origin
scaledWidth -> xResolution
scaledHeight -> yResolution
2016-10-09 11:21:46 -05:00
Colin Snover d0517f515e SCI32: Update screen on frameout, instead of in the event loop 2016-09-29 19:39:16 -05:00
Filippos Karapetis ba8d6f6c03 SCI32: Move the SCI32 Mac cursor handling code into GfxCursor32
This was left in the SCI16 code in commit 80d9182554
2016-08-22 19:56:06 +03:00
Colin Snover b74532fc1e SCI32: Clean up Cursor32 includes 2016-08-19 13:57:40 -05:00
Colin Snover c8a2b9af22 SCI32: Fix comment 2016-08-19 13:57:40 -05:00
Colin Snover 03177721b8 SCI32: Allow pixel doubling of some cursors to improve usability 2016-08-19 13:57:40 -05:00
Colin Snover 80d9182554 SCI32: Implement SCI32 cursor support 2016-08-19 13:57:40 -05:00