aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
AgeCommit message (Collapse)Author
2017-11-19SCI: Fix UB shifting negative integersColin Snover
2017-10-15SCI32: Tell OSystem to show/hide cursors as appropriateColin Snover
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-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: Remove resolved TODO in helpers.hColin Snover
2017-10-06SCI32: Clean up CelObjColin Snover
* Rewrap comments to 80 columns * Clarify comments where possible * Use smart pointers where appropriate * Change view/pic flags detection to always use word-size (byte-size check for flag 0x80 was a compiler optimisation)
2017-10-06SCI32: Clean up GfxControls32Colin Snover
* Rewrap comments to 80 columns * Clarify comments where possible * Fix whitespace errors
2017-10-06SCI32: Rewrap comments to 80 columns in lists32.hColin Snover
2017-10-06SCI32: Clean up GfxPaint32Colin Snover
* Rewrap comments to 80 columns
2017-10-06SCI32: Clean up PlaneColin Snover
* Rewrap comments to 80 columns * Clarify comments where possible
2017-10-06SCI32: Clean up GfxRemap32Colin Snover
* Rewrap comments to 80 columns * Clarify comments where possible
2017-10-06SCI32: Clean up GfxText32Colin Snover
* Rewrap comments to 80 columns * Clarify comments where possible
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-10-06SCI32: Clean up Video32Colin Snover
* Rewrap comments to 80 columns * Clarify comments where appropriate
2017-10-06SCI32: Clean up GfxCursor32Colin Snover
* Rewrap doxygen comments to 80 columns * Renamings for clarity * Deduplicate copy/paint code
2017-10-06SCI32: Clean up GfxTransitions32Colin Snover
* Use containers where appropriate * Re-wrap doxygen comments to 80 columns * Clarify comments for parts of the engine that are understood now but were not understood at the time of the initial implementation
2017-10-06SCI32: Clean up ScreenItemColin Snover
* Rewrap comments to 80 columns * Clarify comments where possible * Use smart pointers where appropriate
2017-10-06SCI32: Clean up GfxPalette32Colin Snover
* Replace raw pointers with smart pointers * Use references instead of const pointers where appropriate * Tweak initialisation * Tweak palette copies to the stack
2017-10-02SCI32: Always sort kernel-generated screen items above script-generated ↵Colin Snover
screen items in last-ditch sort Fixes Trac#10257. Fixes Trac#10261.
2017-09-30SCI32: Stop trying to clean up uninitialized VMDsColin Snover
Fixes Trac#10252.
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-27SCI: Remove old SCI32 view scaling code from SCI16 graphics codeColin Snover
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-27SCI32: Fix backwards palette checkColin Snover
2017-09-24SCI32: Disable all SCI32 Mac codeColin Snover
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-24SCI32: Fix bad cursor outlines in RAMAColin Snover
2017-09-24SCI: Remove Mac SCI32 code from SCI16 codeColin Snover
2017-09-24SCI32: Support palette-inverting SCI3 variant of kPalVaryColin Snover
This is used by RAMA in room 6201, after eating the alien fruit.
2017-09-24SCI32: Fix bad palettes in Lighthouse when HQ video is enabledColin Snover
In a couple of places, Lighthouse updates the renderer with screen items for the next room before the room transition video plays. This is normally fine when using the compositing video renderer because the videos are drawn into new planes which occlude the screen items, so the screen items are culled from the draw list and do not submit their palettes. However, when in HQ video mode, we currently force the overlay renderer, which was not blocking screen items before forcing a frameOut, so the screen items' palettes got submitted prematurely in this case and caused bad rendering after the video finished playback. Now, if we are forcing into the overlay code path, we still create a blank plane behind the overlay before the forced frameOut in order to correctly occlude screen items and keep them from participating in rendering before they normally would. Fixes Trac#10233, Trac#10235.
2017-09-19SCI32: Fix GfxFrameout::addPlane from causing possible leaksColin Snover
2017-09-19SCI32: Don't warp the mouse twice when its position has been restrictedColin Snover
2017-09-19SCI32: Flush all events before warping mouseColin Snover
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-16SCI: LB2-Dual mode: Change "DUAL" button to "BOTH"Martin Kiewitz
Now it says "BOTH", just what the button in SQ4 says as well.
2017-09-16SCI: KQ6-Dual mode: Change "DUAL" button to "BOTH"Martin Kiewitz
Now those say "BOTH", just what the button in SQ4 says as well.
2017-09-15SCI32: Fix clipping of inventory items in Phant2Colin Snover
This fixes overlapping of the left arrow in all cases, but the scroll delta and initial offset of inventory items will only be fixed in new games because the affected objects are global objects whose bad properties get persisted into save games. Fixes Trac#10037.
2017-09-12SCI32: Improve chance of rendering non-8bpp AVIsColin Snover
OpenGL backends don't always support the pixel format that is returned by the Indeo 3 decoder when playing the GK2A.AVI from the GK2 demo. If this happens, use the backend's preferred pixel format and convert in software. If a backend doesn't support any 16-bit or 32-bit format, the playback code will error out. This is probably fine, since there are not really any of those any more. Fixes Trac#9994.
2017-09-10SCI: Remove dead codeColin Snover
2017-09-08SCI32: Remove unnecessary calls to hide the virtual hardware cursorColin Snover
2017-09-04COMMON: Add helper macro for printing rectsColin Snover
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.