aboutsummaryrefslogtreecommitdiff
path: root/engines
AgeCommit message (Collapse)Author
2017-04-23SCI: Improve error messages in Script::validateExportFuncColin Snover
2017-04-23SCI32: Exclude SCI3 code from compilation when SCI32 is disabledColin Snover
2017-04-23SCI32: Fix missing mustSetViewVisible data in cloned objectsColin Snover
This information comes directly from script data and is not modified at runtime, so it does not need to be persisted in save games, but does need to be set when reconstructing clones.
2017-04-23SCI32: Improve disassembly output of SCI3 property opcodesColin Snover
Since SCI3 scripts use selectors instead of offsets as operands to property-related opcodes, the disassembler can look up and display property names everywhere (unlike SCI2.1 and earlier, which need to know the object being operated on to look up the correct selector for a given offset).
2017-04-23SCI32: Fix mustSetViewVisible for SCI3Colin Snover
In SCI2/2.1, variable indexes are used along with a range encoded in the interpreter executable to determine whether an object variable is a view-related variable. Operands to aTop, sTop, ipToa, dpToa, ipTos, and dpTos are byte offsets into an object, which are divided by two to get the varindex to check against the interpreter range. In SCI3, objects in game scripts contain groups of 32 selectors, and each group has a flag that says whether or not the selectors in that group are view-related. Operands to aTop, sTop, ipToa, dpToa, ipTos, and dpTos are selectors.
2017-04-23SCI32: Replace magic numbers in SCI3 selector initColin Snover
2017-04-23SCI32: Add debugger command to list digital audio samplesColin Snover
2017-04-23SCI32: Fix race conditions in Audio32Colin Snover
2017-04-23SCI32: Remove unused code branchColin Snover
2017-04-23SCI32: Serialize Robots in SCI3Colin Snover
This is necessary for at least Lighthouse, which maintains the state of Robots across save games.
2017-04-23SCI: Fix SCI3 exportsColin Snover
Export functions may be relocated above 64k in SCI3, but exports that do not have an entry in the relocation table must be handled the same as SCI1.1-2.1.
2017-04-23SCI: Deduplicate Object::locateVarSelector codeColin Snover
The variable count returned by Object::getVarCount is populated by variable 1 in SCI1.1, so specially reading the variable explicitly for that engine version is not necessary.
2017-04-23SCI: Fix support for 32-bit SCI3 script offsetsColin Snover
2017-04-23SCI: Replace mostly-unused flags property with a single booleanColin Snover
There does not appear to be any reason to use a bit field instead of a simple boolean for this one flag, since there are no other flags that need to be set on Object like this.
2017-04-23SCI: Improve documentation of Object classColin Snover
2017-04-23SCI: Fix whitespace errorsColin Snover
2017-04-23SCI: Remove dead code in Script_Offset disassemblerColin Snover
Script_Offset is only ever used for lofsa/lofss opcodes.
2017-04-23SCI: Fix bad offsets in disassembly for SCI3 lofsa/lofssColin Snover
2017-04-23SCI32: Fix bad relocations of SCI3 objectsColin Snover
2017-04-23SCI: Convert Object to use Common::Array for SCI3Colin Snover
In SCI3, index-to-selector tables no longer exist in compiled object data (instead, the SCI3 VM uses selectors directly and object data contains a bit map of valid selectors). In ScummVM, the table is generated by Object::initSelectorsSci3 for compatibility with the design of the ScummVM SCI VM. For consistency, _baseVars is converted to use a standard container, which works for all SCI versions. The table for SCI3 property offsets is also changed to use a standard container instead of manually managing the memory with malloc/free.
2017-04-23SCI32: Hook up mustSetViewVisible for SCI3Colin Snover
2017-04-23SCI32: Improve debugging output of object metadata in SCI3Colin Snover
2017-04-23SCI32: Fix locals offset in SCI3Colin Snover
Locals offset needs to be set even when the script has no exports.
2017-04-23SCI32: Implement SCI3 Script::syncStringHeapColin Snover
2017-04-23SCI: Always search for .CSC script patchesColin Snover
Skipping a search for .CSC scripts when any .SCR files exist does not work with at least Phant2, because it comes with an INSTALL.SCR file. Searching unconditionally for .CSC files should not cause any issues since the game scripts will either be in .SCR format or in .CSC format, not both in the same game.
2017-04-23SCI32: Remove spinloops from Phant2Colin Snover
2017-04-23SCI32: Add workarounds for LSL7Colin Snover
2017-04-23SCI32: Fix missing main menu in LSL7Colin Snover
2017-04-23SCI32: Fix crash when writing word to VIRTUALFILE_HANDLE_SCI32SAVEColin Snover
This happens in Phant2 when trying to delete a save game from the in-game save dialogue.
2017-04-23SCI32: Fix audio playback with monitored channel in SCI3Colin Snover
SCI3 changes the way that monitored channel works. In SCI2/2.1, when a channel is monitored, it is the only audible channel. In SCI3, monitored channels mix normally. This is very noticeable in LSL7, where music disappears totally during speech if the monitored channel is the only channel played back.
2017-04-23SCI32: Fix crash in Phant2 when clicking Help in the control panelColin Snover
2017-04-23SCI32: Fix slow fade of Phant2 interface barsColin Snover
2017-04-23SCI32: Remove TODO from relocateOffsetSci3Colin Snover
The field at +8 is for the MemID associated with a relocation.
2017-04-23SCI: Implement fallback detection for SCI3Colin Snover
2017-04-23SCI32: Undummy AvoidPath for SCI3Colin Snover
Used by LSL7.
2017-04-23SCI: Fix missing music in LSL7Colin Snover
2017-04-23SCI: Remove unused commented codeColin Snover
2017-04-23SCI32: Remove incomplete SCI3 detection warningColin Snover
Map format is the same as SCI2/2.1 and volume format is detected correctly as SCI3.
2017-04-23SCI32: Fix out-of-bounds reads of truncated uncompressed celsColin Snover
This happens e.g. on the About page in LSL7 because of an interpreter problem where bitmap handles are destroyed and then reused without a kFrameOut call to remove old screen items from the visible plane list before a kIsOnMe call that causes the engine to try to read from reused bitmap handles with different contents and dimensions. This replaces bad memory reads on the About page in LSL7 with an assertion failure, until the problem with the About page can be properly addressed.
2017-04-23SCI32: Activate SCI3 draw/erase list calculation algorithmColin Snover
This code branch, existing since at least SQ6 but apparently never used by any SCI2/2.1 game, is in fact the algorithm used by SCI3. This fixes (at least) doubled rendering of transparent surfaces like the background of the inventory window and conversation choices panel in LSL7.
2017-04-23SCI32: Fix bad draw rectangle size in Duck video playerColin Snover
This was causing uninitialised garbage data from the scale buffer to be drawn to the screen.
2017-04-23SCI32: Remove unused SegManager from DuckPlayerColin Snover
2017-04-23SCI32: Add Lighthouse workaroundColin Snover
2017-04-23SCI32: Add kPlayVMD subop 27 (SetPlane)Colin Snover
Used by RAMA, when playing a video at the Hub Camp computer at the beginning of the game (room 1004).
2017-04-23SCI32: Add workarounds for RAMAColin Snover
2017-04-23SCI32: Add workarounds for LighthouseColin Snover
2017-04-23SCI32: Put Lighthouse restart game in restart save slotColin Snover
2017-04-23SCI32: Fix call to kFileIOIsValidDirectory in RAMAColin Snover
2017-04-23SCI32: Fix missing break statementColin Snover
2017-04-23SCI32: Reset ScreenItem cel type when updating from a VM objectColin Snover
In Phant2, when going to email on Curtis's office computer, a screen item that contained a bitmap on the last frame was updated to contain a view on the next frame. This crashed the engine when it tried to reuse the old disposed bitmap instead of the new view because the cel type was never changed from kCelTypeMem to kCelTypeView.