aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
AgeCommit message (Collapse)Author
2017-09-03SCI32: Exit early from screen shake if engine is quittingColin Snover
2017-09-03SCI32: Clip videos to the screenColin Snover
This is needed for 8.VMD in Lighthouse (room 380, the credits room), which is rendered partially off the bottom of the screen. OSystem does not accept rects that are offscreen. Technically this video probably should not have been doubled vertically by game scripts, but there is not enough space to fix the rendering with a regular script patch, and it is a very unimportant video.
2017-09-03SCI32: Implement kCelLinkColin Snover
kCelLink exists in SSCI since 2.1mid, but it is only known to be used in Lighthouse, during the weapon creation puzzle near the end of the game.
2017-08-06JANITORIAL: Silence more GCC 7 warningsTorbjörn Andersson
All these fall through were marked as deliberate, so again I've only changed the comment to silence GCC.
2017-07-27VIDEO: Allow setting the mixer sound type used to play audio tracksBastien Bouclet
2017-07-23SCI32: Fix explicit mouse position changesColin Snover
This was broken by 9f33f2b3df22a26314dbb74173f49bc930c7a1f9.
2017-07-23SCI32: Add missing method documentationColin Snover
2017-07-23SCI32: Stop throttling of kFrameOut during interactive VMD playbackColin Snover
Refs Trac#9974, Trac#9975.
2017-07-23SCI32: Make stop flag condition more explicitColin Snover
2017-07-23SCI32: Check for stop events before rendering the next frameColin Snover
This should make things slightly more responsive and avoids unnecessary rendering of frames that are just going to disappear in a moment.
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: Avoid extra cursor paints when the cursor has not movedColin Snover
2017-07-23SCI32: Don't warp the mouse when it doesn't need to be warpedColin Snover
2017-07-18SCI32: Fix kIsOnMe crashes in LSL7 About screenColin Snover
2017-07-17SCI32: Remove ENABLE_SCI3_GAMES ifdef, now that they are supportedColin Snover
2017-07-16SCI: Clarify Tab character & modifier workarounds in GfxMenuColin Snover
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.
2017-07-13SCI32: Ignore chest view palette in PhantasmagoriaColin Snover
This fixes the 3-frame glitch that was also present in the original game when moving in the chapel from room 6500 to 6400 in chapter 7. Fixes Trac#9788.
2017-07-13SCI32: Move priority comparison of ScreenItems into its own functionColin Snover
Rendering bugs in ScummVM are often caused by buggy game scripts relying on the last ditch sort, which is not the same in ScummVM as in SSCI (since the SSCI last ditch sort relies on a different memory architecture and is super buggy). However, these bugs do not show up very frequently these days, so it is easy to forget all the places that need to be checked when debugging a rendering problem that appears to be caused by sorting failure. This commit breaks out the last ditch comparison formerly in Plane::calcLists to hopefully make it more visible to future programmers. Refs Trac#9957.
2017-07-13SCI32: Stop optimising palette mergesColin Snover
While this optimisation helped to reduce unnecessary palette updates in KQ7, it broke Phant1, which relies on changes to index 255 in the source palette causing palette invalidation. Refs Trac#9788.
2017-07-09SCI32: Fix kObjectIntersectWillem Jan Palenstijn
It was using SCI16 calls to get the NowSeenRects. This fixes #9855.
2017-07-07SCI32: Implement kShowStyle HShutterOut transitionColin Snover
This transition style was used when exiting the asteroids minigame in PQ4, though it appears likely that this was an error in the original game script since it does not actually do anything in the context that it is used (neither here nor in the original interpreter). Still, this code is already written, and it fixes the crash, so in it goes. Fixes Trac#9856.
2017-07-06SCI32: Fix bad palette entries when built without USE_RGB_COLORColin Snover
This is only a problem for the Windows games that need some palette entries to be ignored.
2017-07-06SCI32: Refactor DuckPlayer to use common video playback codeColin Snover
This lets DuckPlayer support configurable black-lined video and configurable high-quality scaling.
2017-07-06SCI32: Refactor Video32 code to reduce code & feature duplicationColin Snover
2017-07-06SCI32: Improve playback quality of SEQ videosColin Snover
2017-07-06SCI32: Improve kPlayVMD renderingColin Snover
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-06SCI32: Improve kShowMovieWin (AVI) renderingColin Snover
1. Added a new game option for linear interpolation when scaling video in ScummVM builds with USE_RGB_COLOR; 2. 8bpp videos that put black in a palette index other than 0 (KQ7) should now always render correctly without the earlier game-specific workarounds which did not work very well; 3. Data from game scripts regarding video size and position are now ignored, since games always just try to show videos in the middle of the screen, but frequently get this a little bit wrong, causing either bad aspect ratios or off-center videos; 4. Builds without USE_RGB_COLOR support will not crash when attempting to play >8bpp AVIs, like those from KQ7 2.00b. Fixes Trac#9843, Trac#9762.
2017-07-06SCI32: Remove useless callColin Snover
The show list is already cleared by showBits so it does not need to be cleared a second time.
2017-07-06SCI32: Work around bogus palette entries in select Windows gamesColin Snover
2017-07-06SCI32: Remove magic numbers in HunkPaletteColin Snover
2017-07-06SCI32: Remove unused method declarationColin Snover
2017-07-06SCI32: Update mouse position for rendering in all frameOutsColin Snover
2017-07-06SCI32: Allow skipping SEQ animationsColin Snover
In SSCI, SEQ animations cannot be skipped.
2017-07-06SCI32: Centralise OSystem screen updatesColin Snover
2017-07-06SCI32: Stop setting unused palette timestamp propertyColin Snover
2017-07-06SCI32: Speed up & deduplicate palette submission codeColin Snover
2017-06-17SCI32: Avoid out-of-bounds read of pixel data in kIsOnMeColin Snover
Fixes Trac#9761, Trac#9844, Trac#9850, Trac#9851.
2017-06-08COMMON: Make SpanOwner copy assignment make a copy of the owned SpanColin Snover
To move data from one SpanOwner to another, use `moveFrom`. Thanks @waltervn for pointing out the problem.
2017-05-27SCI32: Minor cleanup to plane debug informationColin Snover
2017-05-27SCI: Remove a leftover SCI32 hackFilippos Karapetis
2017-05-26SCI32: Fix warningWillem Jan Palenstijn
2017-05-15SCI: Ignore priority and transparency for KQ6 hi-res viewsWillem Jan Palenstijn
This fixes bug 9786. Thanks to m_kiewitz for verifying with disasm.
2017-05-06SCI32: Update cursor even when position appears unchangedColin Snover
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-06SCI32: Add some missing onFrame hooks for the debuggerColin Snover
2017-05-06SCI32: Disable VMD kPlayFlagBlackPalette flagColin Snover
Videos in GK2 use this flag (e.g. the chapter 6 intro). Now that GfxPalette32::updateHardware no longer calls OSystem::updateScreen (only GfxFrameout::frameOut does this now), every time a palette swap occurs during playback, there is a frame of blackness that should not exist. This is because the order of operation is: 1. Send black palette 2. Call frameOut (which updates the screen) 3. Send new, correct palette 4. No frameOut (so the screen is not updated with the correct palette) OSystem::updateScreen cannot be called multiple times for the same frame due to vsync, but also, there does not appear to be any reason to send a black palette, since it seems to be intended to avoid temporarily rendering video frames with the wrong palette on a hardware device that cannot guarantee simultaneous application of a new palette and new pixel data. ScummVM does not have such a problem, so this feature appears to be unnecessary for us. For the moment, this 'feature' remains hidden behind an ifdef, instead of being removed entirely, to avoid potential confusion when comparing VMD code from SSCI.
2017-05-06SCI32: Fix terrible rendering performance when vsync is enabledColin Snover
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-06SCI32: Fix missing/incorrect game features detectionColin Snover
2017-05-06SCI32: Centralize handling of pixel format switchesColin Snover
2017-05-04SCI32: Disable game script video benchmarkingColin Snover
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.