Commit Graph
267 Commits
Author SHA1 Message Date
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko 5e7fe2dc57 JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
wonst719 a615b7a66c SCI: Fix Korean detection table entries
- Remove GK1 exception in GfxFrameout::detectHiRes()
2020-11-08 22:26:31 +02:00
wonst719 dc41e0e3cc SCI: Remove leftover code from scummvm-kor 2020-11-08 22:26:31 +02:00
wonst719 b7664c24dc SCI: Korean fan translation support 2020-11-08 22:26:31 +02:00
sluicebox 6a9ad2daf2 SCI32: Update hi-res detection for PQ4 Mac 2020-09-07 17:02:01 -07:00
sluicebox 6d8c4c783f SCI32: Fix LSL6 HIRES Mac planes when restoring
Fixes an incorrect game-id test which prevented deleting planes
2020-09-06 23:40:25 -07: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
sluicebox 1f0334ee6b SCI32: Don't delete planes on restore in all Mac games 2020-04-20 00:19:38 -07:00
sluicebox 15ce41c4da SCI32: Delete planes when restoring Mac games 2020-02-01 20:00:20 -08:00
Filippos Karapetis 82d59387ed SCI: Don't error out when updating an item with an invalid plane
This is a script bug in PQ:SWAT, when skipping the Tactics Training - bug #10833
2020-01-20 02:04:51 +02:00
sluicebox 7423320e9d SCI: Fix comment typos 2019-11-20 13:40:29 -08:00
sluicebox 336a79f078 SCI: Add horizontal shake to kShakeScreen 2019-11-19 00:20:40 +01:00
sluicebox b8390fa161 GRAPHICS: Add interface for horizontal shake 2019-11-19 00:20:40 +01:00
sluicebox 19a2195ba2 SCI32: Fix comment typo 2019-09-25 21:14:30 -07:00
sluicebox 999f813dc3 SCI32: Add QFG4 character import message box
Adds the ScummVM message box explaining saved character files
to the QFG4 import character screen.
2019-09-25 21:00:48 -07:00
sluicebox 954f5142cb SCI: Implement full kWait behavior
Fixes PQ3 bug #11020
2019-07-21 18:20:07 +03:00
Filippos Karapetis 66cbaeefe2 SCI32: Adapt the pathfinding debug code to work woth SCI32 games 2018-08-25 12:39:12 +03:00
Colin Snover 432fd522d2 ENGINES: Remove default1x scaler flag
This flag is removed for a few reasons:

* Engines universally set this flag to true for widths > 320,
  which made it redundant everywhere;
* This flag functioned primarily as a "force 1x scaler" flag,
  since its behaviour was almost completely undocumented and users
  would need to figure out that they'd need an explicit non-default
  scaler set to get a scaler to operate at widths > 320;
* (Most importantly) engines should not be in the business of
  deciding how the backend may choose to render its virtual screen.
  The choice of rendering behaviour belongs to the user, and the
  backend, in that order.

A nearby future commit restores the default1x scaler behaviour in
the SDL backend code for the moment, but in the future it is my
hope that there will be a better configuration UI to allow users
to specify how they want scaling to work for high resolutions.
2017-10-07 12:30:29 -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 f51b158f8c SCI32: Clean up GfxFrameout
* Rewrap doxygen comments to 80 columns
* Swap public/private sections so public APIs come first
* Clarify comments where easily possible
2017-10-06 22:10:51 -05:00
Colin Snover b2966f3fc8 SCI32: Fix support for RAMA demo
Fixes Trac#10251.
2017-09-30 01:08:12 -05:00
Colin Snover 3cdf26b355 SCI32: Fix bad text rendering in RAMA
In SCI3, Sierra removed the ability of the main renderer to
automatically scale CelObjs with different source resolutions.
Instead, in SCI3, all CelObjs are treated as having the same
resolution as the screen (i.e. 640x480).

In all SCI3 games other than RAMA, keeping the code paths for
resolution-dependent scaling is not a problem because all the
assets and game code are correctly designed to use the same
640x480 resolution throughout. RAMA, on the other hand, was
written with the text subsystem set to a resolution of 630x450
(Phant1's screen resolution), and in SSCI, resolution-dependent
scaling code was not removed from the *text* subsystem. As a
result, RAMA's game scripts rely on the slightly larger scaled
dimensions coming out of the text system when determining the size
of screen items for rendering, and then also rely on the main
renderer ignoring the 630x450 resolution baked into the bitmaps
generated by the text subsystem when drawing them to the screen.
2017-09-29 19:56:24 -05:00
Colin Snover d363234129 SCI32: Fix GfxFrameout::addPlane from causing possible leaks 2017-09-19 19:54:30 -05:00
Colin Snover d6139890fe SCI32: Exit early from screen shake if engine is quitting 2017-09-03 20:58:10 -05:00
Colin Snover 8d32353394 SCI32: Stop throttling of kFrameOut during interactive VMD playback
Refs Trac#9974, Trac#9975.
2017-07-23 10:35:13 -05:00
Willem Jan Palenstijn 820caf370e SCI32: Fix kObjectIntersect
It was using SCI16 calls to get the NowSeenRects.

This fixes #9855.
2017-07-09 22:56:04 +02:00
Colin Snover 7057f232d7 SCI32: Improve kPlayVMD rendering
1. Added a new game option for linear interpolation when scaling
   overlay-mode video in ScummVM builds with USE_RGB_COLOR;
2. Implemented SCI2.1-variant of the VMD player renderer (fixes
   Trac#9857), which bypasses the engine's normal rendering
   pipeline;
3. Improved accuracy of the SCI3-variant of the VMD player by
   writing HunkPalettes into the VMD's CelObjMem instead of
   submitting palettes directly to GfxPalette32.
2017-07-06 19:12:38 -05:00
Colin Snover 35346bc71b SCI32: Update mouse position for rendering in all frameOuts 2017-07-06 19:12:37 -05:00
Colin Snover 9f910535c9 SCI32: Centralise OSystem screen updates 2017-07-06 19:12:35 -05:00
Colin Snover 832cd25ef1 SCI32: Avoid out-of-bounds read of pixel data in kIsOnMe
Fixes Trac#9761, Trac#9844, Trac#9850, Trac#9851.
2017-06-17 14:35:42 -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 91df45c6c5 SCI32: Fix missing/incorrect game features detection 2017-05-06 10:38:58 -05:00
Colin Snover 8d94a04605 SCI32: Disable game script video benchmarking
The approach to video benchmarking used by SCI engine does not
translate very well to modern video devices -- it will either be
so slow that the games think the system is not capable of showing
normal visual effects, or so fast that the benchmarks overflow
their counters. So, game scripts that perform video benchmarking
are now patched to unconditionally return the highest speed value.

A pleasant but subtle side-effect of this change is that the extra
time sitting at a blank screen before the start of a game (while
benchmarks ran) is now gone.

Fixes Trac#9741.
2017-05-04 23:00:53 -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 ec12c5a342 SCI: Move ScummVM save/restore to GuestAdditions and reimplement for SCI32 2017-04-22 13:01:16 -05:00
Colin Snover 739047f887 SCI32: Always reinit GfxText32 statics on game startup
Fixes bad scaling of text when switching between games with
different script resolutions.
2017-03-30 19:46:27 -05:00
Colin Snover dd13fdfe17 SCI32: "Fix" renderer for PQ4CD
PQ4CD and several other games contain a hack in two renderer
methods to avoid rendering invalid screen items with zero or
negative-dimension target rects. This prevents PQ4CD from
crashing during the fifth phase of target practice.
2017-01-12 13:14:10 -06:00
Colin Snover 7156a82a64 SCI32: Improve mouse responsiveness
This is most noticeable at the beginning of the game during
benchmarking, where the benchmarking loop used to cause the mouse
to get stuck for the duration of the benchmark.
2017-01-11 11:01:38 -06:00
Colin Snover 126378fa26 SCI32: Fix bad coordinates in PQ:SWAT demo 2017-01-09 19:34:54 -06:00
Colin Snover b818e54027 SCI32: Fix crashes and bad cel positioning in GK2 demo 2017-01-09 19:34:54 -06:00
Colin Snover 4cff1e400f SCI32: Add support for alternate graphics selectors
Used by at least Phantasmagoria 2.
2016-12-19 14:46:59 -06:00
Colin Snover 724385eb5e SCI32: Fix slow SCI2.1mid transitions
SSCI transitions code sends a large number of small show rects
to the graphics manager, one at a time, for each division of a
transition. Each time a rect is submitted, a call to showBits
is made. This design was used when transitions for SCI32 were
first implemented in ScummVM, and it worked OK because the
hardware surface was updated by EventManager::getSciEvent,
not showBits, so the large number of calls to showBits from the
transitions code did not adversely affect engine performance.

Later in SCI32 engine development, hardware surface updates
were changed to occur in showBits so that the hardware surface
would be updated at frame-out time, instead of at input-in time.
This change meant that now the large number of calls to showBits
from transitions became very expensive, and the engine would
stall constantly refreshing the entire hardware surface.

To fix this problem, the transitions code now (1) maximises the
size of rects coming from transitions, when possible, and (2) only
calls showBits when all the rects from one frame of a transition
have been calculated and added to the show rects list.

Additionally, there were some arithmetic errors in the
implementation of pixel dissolve that have been corrected in this
changeset.

Fixes Trac#9614.
2016-10-22 13:18:38 -05:00
Colin Snover 4b6b328bbb SCI32: Check for existence of visiblePlane before dereferencing
CID 1351620.
2016-10-10 19:35:28 -05: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 6290f1e5fc SCI: Add prefix to global variable constants 2016-09-29 19:39:16 -05:00
Colin Snover b5d0fffb8b SCI: Replace magic numbers for globals with named constants 2016-09-29 19:39:16 -05:00
Colin Snover 658fb7f8e4 SCI32: Improved game resolution detection 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 da62a99a00 SCI32: Remove unused ResourceManager from GfxFrameout 2016-08-19 15:23:10 -05:00