aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
AgeCommit message (Collapse)Author
2017-11-11SCI32: Fix integer overflow calculating audio durationColin Snover
Due to the need to calculate the audio duration with millisecond precision from the file size, it is possible to overflow a 32-bit integer in games with long background audio loops, like RAMA, during the calculation of the duration. It is also not necessary to give some framerate here, so eliminate the unnecessary explicit Timestamp construction with the second argument.
2017-10-29SCI: Fix UB in SegManager memcpy/strcpy operationsColin Snover
Passing overlapping buffers to C standard library memcpy, strcpy, and strncpy is undefined behavior. In SSCI these operations would perform a forward copy, and most stdlib implementations do the same, but at least newer Linux glibc on x86 copies bytes in reverse, so just using the standard library on this platform results in broken output. Because SSCI used a blind forward copy instead of memmove for overlapping copy operations, this patch implements an explicit forward copy to ensure that overlapping copies continue to operate the same as in SSCI. This fixes the Island of Dr. Brain v1.1 flamingo puzzle (script 185, flamingos::init, localCall 4c3) on platforms that do not perform forward copy in memcpy/strcpy/strncpy. Thanks to @moralrecordings for research on this bug and an initial patch using memmove. Closes gh-1034.
2017-10-21SCI: Allow lofsa string printing in disasm for all SCI versionsWillem Jan Palenstijn
2017-10-21SCI: Fix offsets in disasm for multi-param opcodesWillem Jan Palenstijn
This code was assuming that retval points to the start of the next instruction, which is only true if the current parameter is the last one. This fixes op_call printing.
2017-10-16SCI32: Fix cursor color when quitting for phant1David Fioramonti
When quitting the game at the main menu and hitting no or quitting the game while playing the cursor color over the buttons will be tan the first time rather than red. This fix makes it so it will be red. This was done by removing a check in HotSpot::doit() which checks the global193 value. Removing this check fixes the problem. Fixes Trac#9977. Thanks snover and wjp for your help.
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-08SCI32: Fix crash restoring save from endgame of RAMAColin Snover
Fixes Trac#10263.
2017-10-09SCI: Add QfG4 script patch to fix sliding down slope bug #9801Martin Kiewitz
It's quite difficult to patch. I hope this finally solved it.
2017-10-08SCI: Crazy Nick's Larry workaround bug #10184Martin Kiewitz
Added this already through last commit by accident Was supposed to get added by this. Workaround for reading uninitialized temp game bug.
2017-10-08SCI: Restrict some workarounds to certain tempsMartin Kiewitz
Also add a bit more documentation / Fix some documentation
2017-10-07SCI: Change index inside workaround tables to an index rangeMartin Kiewitz
So that one can specify an entire range of temp variables by using just one single entry.
2017-10-07SCI: Use explicit indexes in castlebrain/islandbrain word search workaroundsColin Snover
2017-10-07SCI: Add workaround for uninitialized reads in Island of Dr BrainColin Snover
Leaning on the enter key during a word search puzzle will trigger this bug, just like in Castle of Dr Brain.
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-07SCI: Improve Larry 1 Spanish script patchMartin Kiewitz
So that it also works even when the patch files are missing.
2017-10-07SCI: Add script patch for Larry 1 Spanish bug #10240Martin Kiewitz
Fixes buying an apple from man wearing a barrel, who walks around in front of the casino.
2017-10-07Revert "SCI: Add workaround for uninitialized reads in Island of Dr Brain"Martin Kiewitz
This reverts commit ae8e4fa8e95f3ae347dfc681330bccc0b09d1f01. This change is wrong in any case. It should be specific to temp 14+15 at the very least. I also did not get an answer on what is actually happening internally. That's not how we should add workarounds. My review was also still pending.
2017-10-07SCI: Add workaround for uninitialized reads in Island of Dr BrainColin Snover
Leaning on the enter key during a word search puzzle will trigger this bug, just like in Castle of Dr Brain.
2017-10-07SCI: Add workaround for uninit read during wordsearch in castlebrainDavid Fioramonti
During the wordsearch puzzle (room 320 click left door) the game will crash because of an uninitalized read of temp variables in word::dispatchEvent (which gets called a lot), if the player clicks the same letter or different letters aggressively or holds down the enter key. Fixes Trac#9783.
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: Rewrap comments to 80 columns in SOL decoderColin Snover
2017-10-06SCI32: Remove resolved TODO in helpers.hColin Snover
2017-10-06SCI32: Clean up script patch commentsColin Snover
2017-10-06SCI32: Clean up Robot decoderColin Snover
* Rewrap comments to 80 columns * Clarify comments where possible * Remove resolved TODOs
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: Fix music volume not being restored after speech in TorinColin Snover
This was a regression introduced by d556dcc57bf50a03d81ab7a1ef59a9e5758465bf.
2017-10-06SCI32: Clean up Audio32Colin Snover
* Rewrap comments to 80 columns * Remove resolved TODOs * Use containers and smart pointers where appropriate
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-04SCI: Set default MT-32 reverb before each soundRuud Klaver
Set the default reverb configuration present in either the MT-32 patch data or MT32.DRV of SCI0 games before playing each sound, as a previously played sound may have changed it. Also, do not perform a general reverb init, since the start of a sound will do that now. Closes gh-1023.
2017-10-04SCI: Play MIDI version of SCI0 sound resource if user prefers itRuud Klaver
If the user has "Prefer digital sound effects" disabled for a SCI0 game, do not play the digital sample version of a sound resource, if such data is present. When the resource has only digital sample data and no MIDI information, play the sample instead. Closes gh-1022.
2017-10-04SCI32: Speed up memory check counter in lighthouse in LighthouseColin Snover
2017-10-04SCI32: Give more specific game version numbersColin Snover
2017-10-04SCI: Fix disassembly of 32-bit addressesColin Snover
2017-10-03SCI32: Fix audio dumper decompressed size calculation for 16-bit audioColin Snover
2017-10-03SCI32: Restore gameplay time in RAMAColin Snover
This will cause non-linear time shifts in the system timer that the game's custom save logic may not expect, but in initial testing the game doesn't seem to care about this. Fixes Trac#10259.
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-10-01SCI32: Fix missing transparency in RAMA title screenColin Snover
2017-09-30SCI32: Add detection for SQ6 demo (from Sneak Peeks 2 CD)Martin Kiewitz
2017-09-30SCI32: Fix crash when dying in RAMAColin Snover
As it turns out, autorama.sg *is* actually used sometimes. Fixes Trac#10253.