aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
AgeCommit message (Collapse)Author
2017-02-27SCI: Fix up readString writing into too small bufferWillem Jan Palenstijn
This fixes QfG4 character import, which specifies a size of 52 for a buffer of size 40.
2017-02-26SCI: Clean up kRandom + allow 0 parameters via signaturesMartin Kiewitz
Also added in depth comments about the currently known variations Returning the RNG seed is now implemented (although it seems no games actually use this functionality, it seems to be just script bugs). Also remove Torin kRandom workarounds.
2017-02-18SCI: Remove check that is never triggeredWillem Jan Palenstijn
Since blockSize is asserted to be positive, buf can never be equal to _buf.
2017-02-05SCI: Fix more unsafe C-string usageColin Snover
2017-02-05SCI: Use strnlen instead of strlen to avoid buffer overflowsColin Snover
2017-01-31SCI: Add more comments to SQ4-floppy workaroundTarek Soliman
I did a full-score playthrough of the game with a warning() on the workaround condition as m_kiewitz suggested. The following room numbers were logged: * room#1: intro logo * room#21: time rip (intro and ending) * room#531: time pod time travel * room#290: astro chicken star background * room#376: right after astro chicken game over (called only once)
2017-01-31SCI: Expand workaround for script bug #3537232Tarek Soliman
More details in PR#889
2017-01-16SCI32: Script patch priority drawing bug in MGDXColin Snover
This fixes the horse at the fountain drawing on top of the fountain instead of behind it.
2017-01-16SCI32: Add workarounds for MGDXColin Snover
2017-01-16SCI32: Add workaround for Hoyle5Colin Snover
2017-01-16SCI32: Disable compression on Hoyle5 options filesColin Snover
Compression overhead takes up more space than uncompressed files, plus the uncompressed files it creates are marginally quicker and easier to debug with external tools.
2017-01-16SCI32: Add workarounds for KQ7 2.00bColin Snover
2017-01-16SCI32: Fix loading save games in KQ7 1.51Colin Snover
2017-01-16SCI32: Fix spinloop in Hoyle5Colin Snover
Hoyle5 will spin on kGetTime between 15 and 300 ticks in multiple game scripts in order to delay execution (for example, after choosing opponents and clicking "okay"). This causes ScummVM to be unresponsive and wastes CPU time. This commit patches the spin subroutines to instead call a kernel function (kWait) that waits without a spin loop. This kernel function was removed in SCI2, and has been added back in ScummVM specifically for Hoyle5, so this patch will not work with the original interpreter.
2017-01-16SCI: Fix Possible Uninitialized Variable Usages.D G Turner
2017-01-14SCI: Fix Warnings about Copy Constructor Failing to Call Base Class.D G Turner
2017-01-12SCI32: Fix bad scroll delta in GK2 inventoryColin Snover
Fixes Trac#9648.
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-12SCI32: Add workarounds, transitions, fixes for PQ4CDColin Snover
2017-01-11SCI32: Add workarounds for PQ:SWATColin Snover
2017-01-11SCI32: Remove backslashes from PQ:SWAT extra save game filesColin Snover
The original interpreter created subdirectories for each in-game profile, but copying this behaviour would add a lot of superfluous complexity to the save game system in ScummVM, and may not be portable to all supported platforms. Instead, when the game tries to save its files to a subdirectory, the backslash in the file name is replaced with an underscore so it can be created successfully on filesystems where backslash is an illegal file name character. This has a side-effect of causing all save games to be displayed under all profiles, instead of just the ones "belonging" to a particular profile, but this seems like a reasonable trade-off given that there is no reason to play this game with more than one profile.
2017-01-11SCI32: Add a workaround for the demo version of LSL7Filippos Karapetis
2017-01-10SCI: Fix Unused Variable Compiler Warning when SCI32 is not enabled.D G Turner
The bytesWritten variable is not used if SCI32 is not enabled. Fixed by adding this and success flag to the debug console print.
2017-01-09SCI32: Fix kSetLanguageColin Snover
2017-01-09SCI32: Fix bad rendering of Sierra logo in MGDXColin Snover
2017-01-09SCI32: Disable compression for Phantasmagoria save filesColin Snover
2017-01-09SCI32: Fix Torin demo crashColin Snover
2017-01-09SCI32: Fix SQ6 demo crashColin Snover
2017-01-09SCI32: Fix crashes and bad cel positioning in GK2 demoColin Snover
2017-01-09SCI32: Generalise uninitialised read workarounds for RAMAColin Snover
2017-01-09SCI32: Ignore attempts to free null array reg_tsColin Snover
2017-01-09SCI32: Clean up SCI3-only opcodesColin Snover
SCI3 includes four new opcodes: * op_info[0x26][0] puts -info- flag in accumulator * op_infoSP[0x26][1] pushes -info- flag to stack * op_superP[0x27][0] puts -super- reference in accumulator * op_superPSP[0x27][1] pushes -super- reference to stack The implementation of these opcodes was correct already, but the opcode names given were a bit misleading (the value is not always stored to accumulator), and magic numbers were used for these opcodes in places. A review of the opcode table in Phant2 indicates that there are no other new opcodes for SCI3.
2017-01-09SCI32: Clean up comment on kSetHotRectanglesColin Snover
Since this feature is now implemented, it is not necessary to describe its intended functionality here.
2017-01-09SCI32: Split kCelInfo into subopsColin Snover
Different subops have different call signature requirements.
2017-01-09SCI32: Remove SCI3 workarounds hackColin Snover
2017-01-09SCI32: Fix kSetShowStyle signature for SCI3Colin Snover
2017-01-06SCI32: Fix overlapped memory copies in SciStringColin Snover
2017-01-06SCI32: Fix a subtle bug in SciArray::trim()Filippos Karapetis
With this bug, whenever a string was trimmed from the right, the last character was always cut off, even if it wasn't whitespace. This was apparent in the RAMA demo, which parses a text file for its scenes, and each line is trimmed
2017-01-06SCI: Unconditionally save palvary stateWillem Jan Palenstijn
Additionally, add workaround to fix up old QfG3 saves with broken _palVaryPaused state. Fixes bug #9674.
2017-01-05SCI32: Fix off-by-one error in array resizingColin Snover
This bug existed in SSCI and was pulled in carelessly during initial implementation of SciArray. Closer examination of SCI3 reveals that this only happened to work in SSCI because it would always allocate on the first resize, and would always allocate 25 extra elements per allocation.
2017-01-05SCI32: Add validity checks to kList iteration methodsColin Snover
In GK2, restoring a save game causes the segment manager to reset in the middle of a kListFirstTrue call, which invalidates all pointers and reg_ts to stored data. This means that when kListFirstTrue tries to decrement the list recursion counter at the end of iteration, it is writing to freed memory, potentially resulting in heap corruption. SCI3 added checks to prevent this from happening, but these checks seem like they should have also been applied to some SCI2.1 games as well (like GK2). Since there should be no negative side-effect to this check, it is applied universally to all SCI32 games.
2017-01-02SCI32: Load VMDs from resource bundlesColin Snover
GK2 includes some VMDs in the RESSCI.00n volume bundles for the chase scene at the end of Chapter 6.
2017-01-01SCI: Fix PQ2 crash reading second page of files in jailColin Snover
This fixes the crash in PQ2 1.002.011. There is another workaround for the same problem from ticket Trac#5223, but it uses a different method name that does not match in this version of PQ2. Fixes Trac#9670.
2016-12-21SCI: Fix kq6 CD audio+subtitle script patchMartin Kiewitz
Original patch caused a text window to be shown at the cliffs (copy protection), even when audio-only mode was active.
2016-12-19SCI32: Add support for alternate graphics selectorsColin Snover
Used by at least Phantasmagoria 2.
2016-12-19SCI32: Undefine macro for SciBitmap when it is done being usedColin Snover
2016-12-19SCI32: Generalize Phant1 kArraySetElements workaroundColin Snover
This bug exists in a system script that is called from many, many rooms, so it is simpler to just make the workaround apply to all rooms.
2016-12-19SCI32: Fix nitpicky output errors in SCI32 bitmap debuggingColin Snover
2016-12-19SCI32: Add segment table debugging info for SCI32 arraysColin Snover
2016-12-18SCI32: Fix handling of rewritable files opened with mode 1Colin Snover
In SSCI, all files opened through kFileIO are writable. Most of the time this does not matter and the engine can get away with using read-only streams, but when chase.dat is opened by Phant1 from the retry dialogue during the chase, it needs to be writable because game code puts a '98' marker in the chase data. If this write does not occur, the game gets stuck in a loop looking for the marker.