aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
AgeCommit message (Collapse)Author
2016-08-13SCI: Fix pseudo mouse in various SCI1 games like e.g. Larry5Martin Kiewitz
Pseudo mouse was functionality in SCI1+ games, that allowed the user to control the mouse via keyboard cursor keys. This new class only worked, when a tiny difference inside the keyboard driver happened on kMapKeyToDir calls. We previously tried to enable this behavior depending on cursor type, but this didn't work correctly (Larry 5 for example was not detected as such, but had PseudoMouse support).
2016-08-12SCI32: Fix crash when multiple nodes are deleted during kListEachElementDoColin Snover
This happens in e.g. Phant1, when walking from dining, to reception, to up the stairs.
2016-08-12SCI32: Implement kShowMovieColin Snover
2016-08-11SCI32: Temporarily revert kShowMovie due to buildbot failuresColin Snover
Revert "SCI32: Fix KQ7 1.51 video background" This reverts commit c8affb54cca259f37522216bad739be085bf9caa. Revert "SCI32: Fix crash when kShowMovie is called but the video cannot be found" This reverts commit 93b06f4a9e08de281ee7eb9c780ceac147c3fb23. Revert "SCI32: Fix KQ7 1.51 basic video playback" This reverts commit cdab24aa07c18ad4a25a1659f7fca15cca5e358e. Revert "SCI32: Additional Video32 documentation" This reverts commit 4ff0924e57a9bc9101ee0799a967fe3373dd2574. Revert "SCI32: Implement kShowMovie" This reverts commit 13297c19298c5ad73c9e996c5c31ca91de124911.
2016-08-11SCI32: Implement kShowMovieColin Snover
2016-08-11Merge pull request #798 from wjp/torin_savingFilippos Karapetis
SCI32: Support Torin's autosave system
2016-08-11SCI32: Don't use autosave.cat in TorinWillem Jan Palenstijn
2016-08-09SCI: Fix sq4 workaround room 391, fixes bug #7179Martin Kiewitz
doCatalog::mode does not exist, the method is actually doCatalog::changeState This issue has been in there since the workaround was added through commit 20b1d80d598e6f741e28c9a85d186e463d111816
2016-08-06SCI32: Actually save and load remapsColin Snover
2016-08-01SCI: Fix warningsEugene Sandulenko
2016-08-01SCI32: Implement bitmap save routineColin Snover
2016-08-01SCI32: Fix invalid memory access after BitmapTable is extendedColin Snover
When new bitmaps are added and the underlying Common::Array needs to move to expand, this invalidates all pointers to bitmaps, which makes it basically impossible to use the bitmap segment since you never know if a reference is going to be invalidated due to an array move. To solve this, BitmapTable is changed to hold pointers to SciBitmaps that are allocated separately on the heap instead, so when those bitmaps are looked up, the resulting pointers are valid for the lifetime of the bitmap, instead of the lifetime of the Common::Array used internally by BitmapTable.
2016-08-01SCI32: Add bitmap segment and remove GC option from hunk segmentColin Snover
2016-08-01SCI32: Add 6-argument signature of kAddPicAtColin Snover
This is used by Torin in room 50900.
2016-08-01SCI32: Implement plane transitions (kSetShowStyle and kSetScroll)Colin Snover
This commit implements all of the known plane transitions from SCI2 through SCI2.1mid games. Because kSetShowStyle is always called indirectly via the Styler game script, it is difficult to find all the places where transitions are used. As such, transitions that appeared to never be used have been added as stubs which will trigger a game crash with a message to report what was being done, so any missed transition types can be identified quickly and then implemented.
2016-08-01SCI32: Enable optional explicit memory management of hunk entriesColin Snover
Bitmaps in ScrollWindow and Robot code are managed by the kernel and not by game scripts, although they must be able to be referenced through a reg_t. To prevent incorrect GC of bitmaps that are in use but not referenced by any game script, explicit memory management of hunk entries can be enabled.
2016-07-29SCI32: Support Torin's autosave systemWillem Jan Palenstijn
Torin has two sets of saves: autosave.### and torinsg.###, both with their own slots and .cat file. The autosave system uses autosave.000 and autosave.001. It also checks the presence of autosave.cat to determine if it should show the chapter selection menu on startup.
2016-07-27SCI32: Fix kShowMovie calls crashing SCI32Colin Snover
This will all be overhauled in the future but for now it is best not to crash when playing AVI/SEQ files.
2016-07-25Merge pull request #789 from OmerMor/hoyle5Martin Kiewitz
Add detection to the Hoyle 5 family of games
2016-07-25SCI: Add detection to the Hoyle 5 family of gamesOmer Mor
Added games are: Hoyle Classic Games Hoyle Bridge Hoyle Children's Collection Hoyle Solitaire (CD and Hard Drive versions) Additionaly, kGetConfig was modified to support two settings used by these games: "laptop" and "jumpto".
2016-07-24SCI32: Fix KQ7 uninitialized readColin Snover
2016-07-12SCI32: Disable kernel call 0x23 on LSL6hiresColin Snover
LSL6hires calls 0x23 (Graph/Robot) from game scripts, but it is a null function in the game's interpreter.
2016-07-11SCI: Update script patch commentsMartin Kiewitz
2016-07-11SCI32: Add detection for Hoyle 5 demoColin Snover
2016-07-11SCI32: Improve kq7 subtitle script patchMartin Kiewitz
Subtitle box should now always use color 255, which should be white all the time. Normally it uses color 7, which is white most of the time, but for example pink/purple at the start of chapter 5.
2016-07-11SCI32: Split GfxPalette and GfxPalette32 + HunkPaletteColin Snover
2016-07-11SCI32: Split kPalCycle into subop functionsColin Snover
2016-07-11SCI32: Fix an issue with the KQ7 subtitles script patchMartin Kiewitz
Volume was lowered, but not raised afterwards for certain cases Original script patch was commited in b676530528349842ad178d02a2cbe49a0facd68e
2016-07-10SCI32: Add script patch to fix/improve KQ7 subtitlesMartin Kiewitz
Needs lots of testing of course Applies to 1.51 and 2.00
2016-07-10SCI32: Clean up Video32/VMDPlayerColin Snover
2016-07-10SCI32: Implement kPlayVMDColin Snover
2016-07-06Merge pull request #775 from wjp/sci32_readwriteWillem Jan Palenstijn
SCI32: Improve FileIO read-write support
2016-07-06SCI32: Add SaveFileRewriteStream for read/write access to filesWillem Jan Palenstijn
At least Phantasmagoria and PQ:SWAT require this. This adds a ReadStream/WriteStream to support this. It replaces the previous VirtualIndexFile which required reimplementation of most read/write functions.
2016-07-06SCI: Fix typo in script patch comment (longbow arithmetic bug)Martin Kiewitz
Wasn't bug #6571, but bug #6751 Thanks to omer_mor for spotting it
2016-07-04SCI: Adding script patch for longbow arithmetic berry bush bugMartin Kiewitz
Fixes bug #6571
2016-07-02SCI: Remove presumably long-outdated FIXMEWillem Jan Palenstijn
2016-07-02SCI: Remove unexpected side effect from ExecStack constructorWillem Jan Palenstijn
The ExecStack constructor set argp[0] to argc before. This is now moved to the caller, to make this action more explicit.
2016-07-02SCI: Remove unclear &rest handlingWillem Jan Palenstijn
Modifying a value above the stack pointer doesn't seem to make much sense. This was added in FreeSCI back in 2002 in a pair of commits that did not make clear what the purpose of this was. My guess is that it attempted to adjust argc, but failed. This wouldn't have been noticed since argc was always set correctly by make_exec_stack_entry (which is now the ExecStack constructor).
2016-07-02SCI: Improve kernel subfunction loggingWillem Jan Palenstijn
ExecStack now stores the kernel call number as well as the subfunction. This allows kStub and backtraces to log the actual subfunction called. The kernel call number in ExecStack used to be stored in the debugSelector field. It now has its own field, to avoid confusion.
2016-07-02SCI: Remove unneeded copyWillem Jan Palenstijn
2016-07-01SCI: Fix script patcher, so that it works on BE systemsMartin Kiewitz
2016-07-01Merge pull request #766 from OmerMor/qfg3_boundsFilippos Karapetis
SCI: Script patch for QfG3 giant tree bounds
2016-07-01Merge pull request #770 from OmerMor/kgettimeFilippos Karapetis
SCI: Fixed KGetTime with SYSDATE subop in SCI0-LATE.
2016-06-27SCI: Add script patch for another Colonel's Bequest game bugMartin Kiewitz
Command input stays disabled, when oiling the arm of the armor. We fix this. This script bug also happens, when using the original interpreter. Fixes bug #7154
2016-06-27SCI: Fixed KGetTime with SYSDATE subop in SCI0-LATE.Omer Mor
SSCI implementation of the SYSDATE subop of the GetTime kernel function was changed between SCI0-LATE and SCI01: The base year used was changed from 1920 to 1980. This subop is used in "Codename: Iceman" (Say "ask for date" to a passing girl on the beach). The Atari ST version of "Codename: Iceman" use the 1980 base year. The Amiga version of "Codename: Iceman" appears to return the time instead of date, with 0 for the YEAR part.
2016-06-26SCI32: Add more workarounds for SCI2.1early gamesColin Snover
These games all share the same bad system script that always sends NULL as a second argument to kDoSound(play).
2016-06-26SCI32: Fix broken Remap implementationColin Snover
Remap would crash SCI2.1early games with 19 remap slots, and did not actually work in most cases in SCI2.1mid+ games. The SCI16 implementation was moved to its own separate file but was otherwise touched as little as possible, so may still have similar problems to the SCI32 code. 1. Split SCI16 and SCI32 code into separate files 2. Use -32 prefixes for SCI32 code and no prefix for SCI16 code, where possible, to match other existing code 3. Avoid accidental corruption of values from the VM that may be valid when signed or larger than 8 bits 4. Added documentation 5. Add missing remap CelObj calls 6. Inline where possible in performance-critical code paths 7. Fix bad `matchColor` function, and move it from GfxPalette to GfxRemap32 since it is only used by GfxRemap32 8. Fix bad capitalisation in getCycleMap 9. Remove unnecessary initialisation of SingleRemaps 10. Update architecture to more closely mirror how SSCI worked 11. Clarify the purpose of each type of remap type (and associated variable names) 12. Split large `apply` function into smaller units 13. Fix buffer overrun when loading a SCI2.1early game with remap 14. Remove use of `#define` constants 15. Warn instead of crashing with an error on invalid input (to match SSCI more closely) 16. Change the collision avoidance mechanism between the RemapType enum and remap kernel functions 17. Add save/load function
2016-06-25SCI: Fix auto-saving in the fan-made Cascade QuestMartin Kiewitz
Script patch to change the fixed slot 999 to fixed slot 99 in the game scripts and additional code for kSaveGame, that checks for Cascade Quest + slot 99 and will then use ScummVM slot 0, which is our auto-save slot. Fixes bug #7007 Also added the game name to the other fan-made script patch.
2016-06-25SCI: Script patch for critical Colonel's Bequest game bugMartin Kiewitz
This patch is about an issue, when interacting with the armor in room 37 (main house, downstairs). This bug also happened, when using the original interpreter and effectively froze the game depending on the coordinate of Laura Bow, when the command was entered. Fixes bug #7119 Versions affected: English PC/Atari ST/Amiga Floppy
2016-06-25SCI: Fix SQ1VGA script patch, fixes bug #7145Martin Kiewitz
Script patch used "lsg" for one instruction, which should have been "lag" instead. Caused issues with the spider droid. Added more details about this script patch in comments. Also specified the method for a qfg3 script patch in comments.