aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/frameout.h
AgeCommit message (Collapse)Author
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-27SCI: Do some clean-up of event handling systemColin Snover
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-19SCI32: Fix GfxFrameout::addPlane from causing possible leaksColin Snover
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-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: Remove unused method declarationColin Snover
2017-07-06SCI32: Update mouse position for rendering in all frameOutsColin Snover
2017-07-06SCI32: Centralise OSystem screen updatesColin 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.
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
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-09-29SCI32: Improved game resolution detectionColin 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 kShakeScreen for SCI32Colin Snover
2016-08-19SCI32: Fix signature of kSetNowSeenColin 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-01SCI: Fix warningsEugene Sandulenko
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-10SCI32: Implement kPlayVMDColin Snover
2016-07-02SCI32: Expose graphics throttling codeColin Snover
Controls that manage their own event loops and call frameOut directly generally need to sleep in order to avoid 100% CPU, just like the main VM event loop.
2016-07-02SCI32: Document _remapOccurred flagColin Snover
2016-07-02SCI32: Improve accuracy of frameout throttlerColin Snover
2016-07-02SCI32: Add const to getCurrentBufferColin Snover
2016-06-30SCI32: Document & clean up extra rect argument for frameOutColin Snover
This extra rect seems to probably only ever be used by VMD playback in some SCI2.1 games.
2016-06-26SCI32: Fix benchmarking for QFG4Colin Snover
2016-06-21SCI32: Remove unused dependencies from GfxFrameoutColin Snover
2016-06-21SCI32: Implement line drawing (kAddLine/kUpdateLine/kRemoveLine)Colin Snover
This line drawing code lives in a remodelled GfxPaint32 class that is totally separate from GfxPaint16.
2016-06-14SCI32: Fix video performance benchmarking in most SCI32 gamesColin Snover
Most SCI32 games draw a "fred" object to the screen when the game first starts to benchmark video performance. When framerate throttling is enabled (which fixes many/most timing-related bugs and reduces system load caused by unnecessary graphics updates), the game's performance check will think that video card is slow, causing some "high-performance" game features to be disabled. To avoid this, we simply disable throttling during benchmarking by detecting the "fred" object.
2016-03-17SCI32: Temporarily remove dead SCI2.1early transitions codeColin Snover
This code sneaked in with the graphics engine rewrite, but is not ready yet to be used. It will return shortly, once it is enabled and working.
2016-03-16SCI32: Work around bad Styler script in KQ7 2.0bColin Snover
The SCI2.1mid version of the game includes scripts designed for SCI2.1early which means wrong parameters are sent to the kernel.
2016-03-16SCI32: Remove dead code related to priority map handlingFilippos Karapetis
The priority map is not used at all in SCI32 at the engine level by design, so all the relevant code that handles picture priority is pretty much dead
2016-03-15SCI32: More work on remappingFilippos Karapetis
Still not working
2016-03-10SCI32: Implement kMovePlaneItemsColin Snover
2016-03-10SCI32: Implement kSetNowSeenColin Snover
2016-03-08SCI32: Clean up kIsOnMe and fix rounding bugColin Snover
The implementation was not correctly rounding the scaled position with mulru, leading to occasionally incorrect hit detection at the boundaries of boxes.
2016-03-07SCI32: Add debugger command to view screen items in the visible plane listColin Snover
2016-03-06SCI32: Implement kEditTextColin Snover
2016-03-02SCI32: Minor consistency improvement to FrameOutColin Snover
2016-02-21SCI32: Implement syncing planes+screen items from VM for restoreMartin Kiewitz
Fixes restoring saved games, when ScummVM dialogs are patched in Removing clearing planes+screen items as well, because the scripts actually did that, but did not clear everything. Fixes "Invalid screen item" message when entering options menu, after restoring in SQ6.