aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
AgeCommit message (Collapse)Author
2017-06-10SCI: Clean up breakpoint code (indentation, consistency)Willem Jan Palenstijn
2017-06-10SCI: Move bpk/logkernel to main breakpoint infrastructureWillem Jan Palenstijn
This changes the syntax for bpk and logkernel: Enable breakpoint on kernel call: bpk FrameOut Enable logging for kernel call: bpk FrameOut log For backward compatibility this has an alias: logkernel FrameOut Removing a kernel call breakpoint is done with bp_del/bc now.
2017-06-10SCI: Allow multiple breakpoints with same trigger but different actionWillem Jan Palenstijn
2017-06-10SCI: Add inspect, none breakpoint actionsWillem Jan Palenstijn
2017-06-10SCI: Move printObject from console to scriptdebugWillem Jan Palenstijn
2017-06-10SCI: Add break/log/backtrace actions for triggered breakpointsWillem Jan Palenstijn
The action can be set using the new console command bp_action/bpact.
2017-06-10SCI: Add underscores to Breakpoint member variablesWillem Jan Palenstijn
2017-06-10SCI: Move backtrace output to scriptdebug.cppWillem Jan Palenstijn
2017-06-10SCI: Handle selector read/write breakpoints from opcodesWillem Jan Palenstijn
2017-06-10SCI: Move scriptdebug declarations to separate headerWillem Jan Palenstijn
2017-06-10SCI: Fix wildcard selector breakpointsWillem Jan Palenstijn
0f9c33e02f1cb2c740c1eb0dcaad96dd22ec29e7 in 2011 broke selector breakpoints of the type "ObjName::", which previously caught all selector sends of the named object. Thanks to TMM and snover for noticing.
2017-06-10SCI32: Fix uninitialized temp read in TorinColin Snover
Fixes Trac#9810.
2017-06-10SCI32: Fix uninitialized temp read in LSL6hiresColin Snover
Fixes Trac#9811.
2017-06-09SCI: Remove some unused #includesColin Snover
2017-06-09SCI32: Fix audio sync recursionColin Snover
Calling to SciEngine::syncSoundSettings from GuestAdditions recurses back into GuestAdditions, which is obviously not desirable. Even when it didn't manage to cause infinite recursion (as in SQ6 demo), it would make the UI behave in broken ways (e.g. the +/- buttons on the music slider in SQ6 would not work because the UI would just get updated immediately back to the closest rounded value).
2017-06-09SCI32: Implement kLock & kDoAudio(1) for SCI32Colin Snover
1. Unlocking all resources of a type using a resource ID of -1 is gone in SCI32; 2. Audio locks need to be serialized starting in GK2 for the game's modified kDoAudio(1) call; 3. Audio locks in SCI3 must work more like SSCI, since at least Lighthouse's `BackMusic::fade` method will attempt to unlock audio that was never locked by a script. In SSCI (and now in ScummVM too) this is a no-op; previously in ScummVM, it would remove Audio32's own lock on the audio resource, resulting in a use-after-free; 4. kDoAudio(1) starting in GK2 returns the number of active *not-in-memory* channels being played, not the total number of active channels. Fixes Trac#9675.
2017-06-09SCI: Do not lock Audio36/Sync36 in kLock for SCI1.1Colin Snover
This is not known to fix any problem, but was a noted difference in the implementation between ScummVM and SSCI.
2017-06-09SCI: Lock Audio resource types when digital SFX is enabledColin Snover
This seems to have been added in SCI1.1 and continued through SCI32; older games with digital SFX (like KQ5CD) did not convert the resource type in kLock. This is not known to fix any problem, but was a noted difference in the implementation between ScummVM and SSCI.
2017-06-09SCI: Remove unnecessary conditionColin Snover
Argument count validation for kernel calls is performed through the kernel table signature, so checking here is not necessary.
2017-06-09SCI: Fix typo in commentColin Snover
2017-06-09SCI: Remove unhelpful commentColin Snover
2017-06-09SCI: Add serialization for ResourceIdColin Snover
2017-06-09SCI: Implement Serializable for ObjectColin Snover
2017-05-31SCI32: Return CD speed in kPlatformColin Snover
This fixes missing playback of some videos in Rama, like the background video that plays when selecting an email at the computer at the start of the game.
2017-05-30SCI: SQ4CD: Limit workaround for Russian SQ4 to room 150+900Martin Kiewitz
As proposed by bluegr
2017-05-29SCI: SQ4CD: Remove room restriction of existing workarounds for endMartin Kiewitz
Fixes bug #9812
2017-05-29SCI32: GK1: Add second beignet timer issue script patchMartin Kiewitz
Should solve bug #9805
2017-05-27SCI32: Remove dead codeColin Snover
2017-05-27SCI32: Remove invalid interaction cursor spinloop in KQ7Colin Snover
2017-05-27SCI32: Update some old comments related to virtual filesFilippos Karapetis
2017-05-26SCI32: Fix kArrayFillHein-Pieter van Braam
The ScummVM implementation of class SciArray::fill() has a bug where it will overwrite the array[index] with the value count times, rather than fill the array starting from index count times. This patch fixes that behavior. This was noticed because the LSL7 dice game was broken, it was impossible to lose. After this patch the dice game works as expected. Closes gh-953.
2017-05-25SCI32: Fix SCI3 object names > 0xFFFFColin Snover
2017-05-24SCI32: Fix typo in script patch nameMartin Kiewitz
2017-05-24SCI32: Add script patch for lsl7 cheese maker priority bugMartin Kiewitz
This issue also happens when using the original interpreter.
2017-05-24SCI32: Add script patch for cheese maker issueMartin Kiewitz
Room 540, was game breaking, but effectively a script bug, that just happened to work in SSCI.
2017-05-23SCI32: Fix selector search for SCI2/2.1 games with missing vocab.997Colin Snover
Fixes Trac#9796.
2017-05-21SCI32: Fix return value of kWebConnectColin Snover
On macOS, the return code from OSystem::openUrl was the opposite of what it was supposed to be; it is now fixed, so this caller needs to be fixed too.
2017-05-20SCI: Stop leaking locals segments during script reuseColin Snover
When a game deletes a script and then loads the same script again before it has been fully deallocated, SegManager::instantiateScript tries to reuse the same script & locals segments, but it was failing to reuse the old locals segment because Script::freeScript would unconditionally clear the old locals SegmentId, which meant the old locals segment would just leak. This patch does not fix old save games which may contain orphaned locals segments, but should prevent the problem from occurring going forward. (It is possible to clean up these old save games, but this is not a big leak so it doesn't seem worth the extra effort to do so.)
2017-05-20SCI: Fix warning about missing base object when loading save gamesColin Snover
This situation occurs rarely, but normally, when unreachable but not yet GC'd objects use a superclass which has already been GC'd. Thanks to @wjp for looking at this with me and clarifying what was going on.
2017-05-20SCI: Find and store the original static names of objectsColin Snover
See code comment in Object::init for more details. Fixes Trac#9780.
2017-05-20SCI: Refactor relocation codeColin Snover
This groundwork enables an object to look up its static name separately from the normal process that is used to populate Object::_variables when an object is first constructed. (The static name property needs to be able to be retrieved from objects inside of earlier save games whose name properties may have already been modified at runtime, so the code cannot simply pluck the value out of Object::_variables when they are first initialised and then persisted into the save game, as nice and easy as that would have been.) This commit also helps to clarify the situation with relocation tables in SCI1 games that start with a zero entry. Refs Trac#9780.
2017-05-20SCI32: Remove bad assertion in relocateSci3Colin Snover
While extremely rare (only Rama script 64948 seems to have this profile), it *is* possible for an object to have zero properties (and thus, zero property offsets).
2017-05-20SCI: Nitpicky cleanup of some magic numbers and what-not-why commentsColin Snover
2017-05-20SCI: Remove duplicate relocateBlock functionColin Snover
2017-05-20SCI: Always use SegManager::getObjectName to get object namesColin Snover
This ensures that all object name reading code works the same and is in one place in the codebase.
2017-05-20SCI: Stop making copies of ObjMap and remove related dead codeColin Snover
ObjMap owns Objects, so every time this map gets copied instead of referenced, it creates a copy of every single object in the associated script. This is expensive, and it breaks things like the `Object::syncBaseObject` call in savegame.cpp, which hasn't actually been doing anything since 58190c36b4cc84b3200239211d91b0291301db56 because it has been operating on copies.
2017-05-20SCI: Add more support for >16-bit SCI3 offsetsColin Snover
Basically just grepped for getOffset calls being assigned to uint16s and expanded those to uint32 when they looked trivial. While some of these changes seem superfluous, at least for the US/English SCI3 games where potentially impacted game scripts are not large enough to have a problem with 16-bit offsets (e.g. when feature detecting the sound type), at least some of these changes are necessary for correct operation of the find_callk debugger command in SCI3 games. There should not be a reason why any of these variables need to be kept as uint16, in any case.
2017-05-20SCI32: Fix kPlatform operation for SCI2 through SCI2.1earlyColin Snover
Fixes Trac#9795.
2017-05-16SCI: Let getClassAddress fail gracefully with SCRIPT_GET_DONT_LOADWillem Jan Palenstijn
This fixes a crash in the debugger when disassembling the class opcode with a class from a script that hasn't yet been loaded.
2017-05-15SCI: Add script patch for "Tickets, only" during game over sceneMartin Kiewitz
Audio played was "Tickets, only", subtitle shows "Tickets, please". Also remove forcing myDialog for KQ6Print::say (which was added, while fixing this script patch). see a46f3c162581740a3cad27e1168164ca91beb9c9 Forcing myDialog causes issues during game over screen (bug #9771). Bug is solved by this, but script patch isn't perfect right now.