aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
AgeCommit message (Collapse)Author
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 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-04SCI32: Speed up memory check counter in lighthouse in LighthouseColin Snover
2017-10-04SCI32: Give more specific game version numbersColin 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-09-30SCI32: Fix crash when dying in RAMAColin Snover
As it turns out, autorama.sg *is* actually used sometimes. Fixes Trac#10253.
2017-09-30SCI: Fix printing of super calls on clones in debuggerColin Snover
2017-09-30SCI32: Fix support for RAMA demoColin Snover
Fixes Trac#10251.
2017-09-29SCI32: Clean up unused kBitmap code/subopsColin Snover
2017-09-29SCI32: Fix bad text rendering in RAMAColin Snover
In SCI3, Sierra removed the ability of the main renderer to automatically scale CelObjs with different source resolutions. Instead, in SCI3, all CelObjs are treated as having the same resolution as the screen (i.e. 640x480). In all SCI3 games other than RAMA, keeping the code paths for resolution-dependent scaling is not a problem because all the assets and game code are correctly designed to use the same 640x480 resolution throughout. RAMA, on the other hand, was written with the text subsystem set to a resolution of 630x450 (Phant1's screen resolution), and in SSCI, resolution-dependent scaling code was not removed from the *text* subsystem. As a result, RAMA's game scripts rely on the slightly larger scaled dimensions coming out of the text system when determining the size of screen items for rendering, and then also rely on the main renderer ignoring the 630x450 resolution baked into the bitmaps generated by the text subsystem when drawing them to the screen.
2017-09-28SCI: Add script patch for QfG2 Jackalmen Oops - bug #10218Martin Kiewitz
Was a game bug, finally fixed. This was a combined effort of wjp and myself. Thanks to wjp. We both don't own QfG2 1.000 atm, so we could not try it for that version.
2017-09-28SCI32: Disable change directory button in original save/load in RAMAColin Snover
2017-09-28SCI32: Allow save games to be deleted from original save/restore in RAMAColin Snover
2017-09-28SCI32: Block RAMA from creating PREF.DAT fileColin Snover
This file normally stores brightness, music volume, and most recently used save game directory. Since we store the music volume ourselves and don't use the save game directory, the only potentially useful information is the brightness level, and that is fine to just restore from the save games.
2017-09-28SCI: Remove resolved TODOColin Snover
2017-09-28SCI32: Add audio volume sync support for RAMAColin Snover
2017-09-27SCI: Add support for keyup eventsColin Snover
Basic keyup event support appears to have been added in the SCI1.1 IBM keyboard driver, and more robust support was provided in SCI32 which actually gets used by at least Lighthouse. This patch adds support for keyup events in SCI1.1+. Fixes Trac#10242.
2017-09-27SCI: Fix use-after-free when kernel call debugging is active during a save ↵Colin Snover
game restore
2017-09-27SCI: Do some clean-up of event handling systemColin Snover
Convert macros and vars to enums, rename keyboard events in preparation for adding key up events, clean up unnecessary nested conditionals, add TODOs for potential future work.
2017-09-27SCI: Add uninitialized read workaround for shoplifting in SQ4CDDavid Fioramonti
When in Galaxy Galleria, going into the software store and trying to shoplift the SQ4 Hintbook will crash the game after you leave and are electrocuted. Fixes Trac#10229. Closes gh-1031.
2017-09-24SCI32: Dummy kPlayVMDSetFrameRateColin Snover
This subop is used only by RAMA. The VMD objects in RAMA's game code contain a frame rate field, which is usually -1, but occasionally is not. In the cases where it is not -1, it appears to be either set for a video with sound (so the value doesn't do anything to that video), or it is just resetting back to the baked-in frame rate of the video file (so it doesn't need to exist, except to fix videos broken by earlier played videos with explicit frame rates). Since this is a global state flag that does not get reset in SSCI, the ultimate effect of kPlayVMDSetFrameRate in RAMA is that it does nothing to any of the videos where the explicit frame rate is set, but it does inadvertently cause *other* videos with no sound and no explicit frame rate to have a different frame rate depending upon what was played earlier in the game (and whether or not the engine was restarted in the meantime). This bad transferring of frame rates is most noticeable with the exit-video of the vidmail player, which is played when you back out after selecting a vidmail. Its nominal framerate is 10fps, but it will play at whatever frame rate was last set by some other video that happened to have an explicit frame rate, even if that frame rate was bogus. So, just ignore all calls to this subop, as it is fatally buggy.
2017-09-24SCI32: Remove unnecessary negative assertion check on unsigned integerColin Snover
Fixes CID 1381416.
2017-09-24SCI32: Disable all SCI32 Mac codeColin Snover
This code is currently untestable and is almost certainly at least partly based on guesswork & not actual reverse-engineering (as was the case for all other pre-2015 SCI32 code), so future developers interested in adding SCI32 Mac support should use it only as an intermediate reference rather than as known good code.
2017-09-24SCI: Remove Mac SCI32 code from SCI16 codeColin Snover
2017-09-24SCI32: Add workarounds for uninitialized reads in RAMAColin Snover
2017-09-24SCI32: Allow invalid references to be passed to kFileIOColin Snover
Near the end of the game, RAMA will start trying to store some invalid references. This does not affect the save game negatively in any way, but it was causing the kernel to assert a signature failure.
2017-09-24SCI32: Fix RAMA auto-save gameColin Snover
Despite what game script disassembly lead me to believe, the game seems to create only one auto-save, which ends up being saved as 911.sg (not autorama.sg). This save file is created just before entering the underground Avian Lair in New York, and seems to be designed as some emergency backup since entering the Avian Lair is a one-way trip.
2017-09-24SCI32: Implement per-channel audio panningColin Snover
Used by RAMA, in various places, starting with the refrigerator at base camp after the cable car at the beginning of the game.
2017-09-24SCI: Add SQ4CD script patch to add audio for universal remote controlMartin Kiewitz
for Hk So Good store catalog. Implements enhancement #10227
2017-09-24SCI: Fix generation of save gamesColin Snover
2017-09-23SCI32: Flush stub RAMA save game to diskColin Snover
If this is not done and the file is buffered, it will not show up in the list of save games, and the new save will fail.
2017-09-23SCI32: Fix bad data cube text priority calculation in RAMAColin Snover
2017-09-23SCI32: Fix relocation of locals in SCI3Colin Snover
Somehow, up until trying to view an encrypted data cube in RAMA, the missing relocation of locals did not seem to cause any trouble in any of the other SCI3 games.
2017-09-23Revert "SCI: Fix Warnings about Copy Constructor Failing to Call Base Class."Colin Snover
This reverts commit d2dd942ad79df0c4ac9d841fb5b0919d260bb79c. The Serializable class is an interface class and has only the empty default copy constructor. There is no reason to call this explicitly. Whatever is warning about this should be fixed to stop warning about it, rather than adding such unnecessary calls to the engine code.
2017-09-23SCI32: Fix handling of array copiesColin Snover
kArrayCopy would perform an unnecessary memory copy of the source array, the treatment of the count value as unsigned was clearly not correct since it was being sign-extended and checked against -1.
2017-09-23SCI32: Fix bad default text scaling in RAMAColin Snover
2017-09-23SCI32: Fix infinite reload in RAMA when loading from launcherColin Snover
2017-09-23SCI32: Add guest additions save/restore support for RAMAColin Snover
2017-09-23SCI32: Remove unnecessary use of strncmpColin Snover
One of the strings is a static string of the same size as the size passed to strncmp so there is no point in not just using strcmp.
2017-09-23SCI32: Replace magic number with kAutoSaveId in QFG4 save codeColin Snover
2017-09-23SCI32: Support RAMA's custom save games through kFileIOColin Snover
2017-09-23SCI: Split save game metadata writing to separate functionColin Snover
RAMA has its own custom save game format that game scripts write, but we still want to be able to use these save game files from the ScummVM launcher, so the metadata has to be able to be written separately from the rest of the game saving.
2017-09-23SCI: Use reference instead of pointer for required out-data in metadata save ↵Colin Snover
function
2017-09-23SCI: Clean-ups to file handling codeColin Snover
Preparations for adding support for RAMA's custom save game format.
2017-09-23SCI32: Remove unused shrink-to-fit function for string arraysColin Snover
2017-09-23SCI32: Fix size for dereferencing non-raw SCI32 arraysColin Snover
The maxSize given when generating a SegmentRef is supposed to be the maximum size of raw data that can be held inside the offset- part of a reg_t, not the entire size including the segment. This fixes a buffer overflow in "Inside the Chest", which still does not work, but at least doesn't cause heap overflows anymore with this change.
2017-09-19SCI32: Fix inconsistent patch instruction commentsColin Snover
I missed these lines when going through things earlier.