aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/frameout.cpp
AgeCommit message (Collapse)Author
2019-09-25SCI32: Fix comment typosluicebox
2019-09-25SCI32: Add QFG4 character import message boxsluicebox
Adds the ScummVM message box explaining saved character files to the QFG4 import character screen.
2019-07-21SCI: Implement full kWait behaviorsluicebox
Fixes PQ3 bug #11020
2018-08-25SCI32: Adapt the pathfinding debug code to work woth SCI32 gamesFilippos Karapetis
2017-10-07ENGINES: Remove default1x scaler flagColin Snover
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-06SCI32: Clean up scriptWidth/scriptHeight/screenWidth/screenHeightColin Snover
This removes the unnecessary Buffer subclass and stops most places where the output buffer was being interrogated about dimensions instead of GfxFrameout.
2017-10-06SCI32: Clean up GfxFrameoutColin Snover
* Rewrap doxygen comments to 80 columns * Swap public/private sections so public APIs come first * Clarify comments where easily possible
2017-09-30SCI32: Fix support for RAMA demoColin Snover
Fixes Trac#10251.
2017-09-29SCI32: Fix bad text rendering in RAMAColin Snover
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-19SCI32: Fix GfxFrameout::addPlane from causing possible leaksColin Snover
2017-09-03SCI32: Exit early from screen shake if engine is quittingColin Snover
2017-07-23SCI32: Stop throttling of kFrameOut during interactive VMD playbackColin Snover
Refs Trac#9974, Trac#9975.
2017-07-09SCI32: Fix kObjectIntersectWillem Jan Palenstijn
It was using SCI16 calls to get the NowSeenRects. This fixes #9855.
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: Update mouse position for rendering in all frameOutsColin Snover
2017-07-06SCI32: Centralise OSystem screen updatesColin 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-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-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.
2017-04-29SCI32: Remove unnecessary GfxFrameout::_frameNowVisibleColin Snover
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-22SCI: Move ScummVM save/restore to GuestAdditions and reimplement for SCI32Colin Snover
2017-03-30SCI32: Always reinit GfxText32 statics on game startupColin Snover
Fixes bad scaling of text when switching between games with different script resolutions.
2017-01-12SCI32: "Fix" renderer for PQ4CDColin Snover
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-11SCI32: Improve mouse responsivenessColin Snover
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-09SCI32: Fix bad coordinates in PQ:SWAT demoColin Snover
2017-01-09SCI32: Fix crashes and bad cel positioning in GK2 demoColin Snover
2016-12-19SCI32: Add support for alternate graphics selectorsColin Snover
Used by at least Phantasmagoria 2.
2016-10-22SCI32: Fix slow SCI2.1mid transitionsColin Snover
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-10SCI32: Check for existence of visiblePlane before dereferencingColin Snover
CID 1351620.
2016-10-09SCI32: Clarify some identifiersColin Snover
transparentColor -> skipColor displace -> origin scaledWidth -> xResolution scaledHeight -> yResolution
2016-09-29SCI: Add prefix to global variable constantsColin Snover
2016-09-29SCI: Replace magic numbers for globals with named constantsColin Snover
2016-09-29SCI32: Improved game resolution detectionColin Snover
2016-09-29SCI32: Update screen on frameout, instead of in the event loopColin Snover
2016-08-19SCI32: Remove unused ResourceManager from GfxFrameoutColin Snover
2016-08-19SCI32: Remove CoordAdjuster32, at least for the momentColin Snover
This may come back in the future to deduplicate some gfx code, but SCI32 had two different inlined ways of doing coordinate conversions with different rounding methods, so CoordAdjuster32 didn't get used when the graphics system was rewritten. At the moment, SCI32 code uses the mulru/mulinc methods from helper.h for scaling up/down coordinates.
2016-08-19SCI32: Implement kRobotColin Snover
2016-08-19SCI32: Implement kShakeScreen for SCI32Colin Snover
2016-08-19SCI32: Fix signature of kSetNowSeenColin Snover
2016-08-19SCI32: Fix commentColin Snover
2016-08-19SCI32: Implement SCI32 cursor supportColin Snover
2016-08-19SCI32: Remove GfxScreen from GfxFrameoutColin Snover
Only cursor remains to be updated to go through GfxFrameout, and then we can let GfxScreen go back to being SCI16-only.
2016-08-11SCI32: Fix GfxFrameout::_isHiRes flag to be accurate for all gamesColin Snover
2016-08-01SCI32: Don't crash on zero-dimension show rectsColin Snover
In the original engine this would have simply resulted in no draw, but ScummVM is more strict about it. It is not 100% clear whether these are normal and should be allowed or not, so for the moment we'll emit a warning whenever a zero-dimension show rect is seen. For now they only seem to be generated by plane transitions, and these zero-dimension screen items cannot simply be omitted because the 2.1early transitions code requires a fixed number of screen items per step.
2016-08-01SCI32: Add 6-argument signature of kAddPicAtColin Snover
This is used by Torin in room 50900.
2016-08-01SCI32: Implement plane transitions (kSetShowStyle and kSetScroll)Colin Snover
This commit implements all of the known plane transitions from SCI2 through SCI2.1mid games. Because kSetShowStyle is always called indirectly via the Styler game script, it is difficult to find all the places where transitions are used. As such, transitions that appeared to never be used have been added as stubs which will trigger a game crash with a message to report what was being done, so any missed transition types can be identified quickly and then implemented.
2016-07-27SCI32: Fix backwards kFrameOut throttle timingsColin Snover
2016-07-24SCI32: Improve behaviour of screen transitionsColin Snover
1. Use the same throttling speed as normal frameouts. The old throttling speed seemed a bit too slow. 2. Exit the event loop immediately if the engine is supposed to quit, instead of forcing the user to wait until the transition has finished before quitting.
2016-07-12SCI32: Avoid flash of incorrect colour when palettes are changedColin Snover
Avoid forcing the screen to refresh after a palette change if the screen is also about to be drawn to, as the palette change + draw is intended to be an atomic operation.