aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
AgeCommit message (Collapse)Author
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-20SCI: Fix detection of end of audio map & entry size in SCI32Colin Snover
Torin RU map 38140 has an unusual terminator entry; instead of a normal terminating entry of 11 FFs, its terminating entry is 03 FF FF FF FF C4 36 01 FF FF FF. So, two changes are made: 1. The end-of-map check is now the same as in SSCI1.1+ and only checks that the final byte of the Audio36 tuple is 0xFF, instead of the entire tuple; 2. The unneeded entry size heuristic has been turned off for all SCI32 games. A quick check of the English versions of LB2CD, EQ1CD, SQ4CD, and KQ6CD, as well as all English SCI32 games, indicates that this approach seems to be working correctly. Fixes Trac#10188.
2017-09-19SCI32: Support RAMA's single sound effects volumeColin Snover
The original installer copied RESOURCE.SFX to the hard drive so there was only one RESOURCE.SFX on CD 1. Instead of requiring users to create duplicates, just use the single RESOURCE.SFX if it exists.
2017-09-19SCI32: Fix inconsistent patch instruction commentsColin Snover
I missed these lines when going through things earlier.
2017-09-19SCI32: Put superclass address in r_acc for SCI3 super callsColin Snover
This fixes a problem in Lighthouse 2.0a where the mini-sub would fail to start playing the animation of the shipwreck when clicking on the throttle. In SSCI, in SCI3 only, r_acc was (inadvertently?) set to the superclass object ID whenever a super call was made. This happened because OP_super would call to get the superclass object ID, the calling conventions of the compiler put this return value into EAX, and then the PMachine message processing code put whatever was in EAX into r_acc before each message was processed. In the game code, there are a sequence of steps that look like this: * First, throttle::doVerb is called when throttle is clicked on; * Which calls getRobot::doit to tell the shipwreck robot to start playing; * Which calls wreckBot::init to reset the Robot for the animation; * Which calls Hiliter::hotVerbs(0) to remove cursor hotspots; * Which calls Hiliter::dispose to clean up since it is not used; * Which causes Hiliter::verbList to get set to 0. * Later, verbList is loaded into r_acc, and it is still 0; * Then, Hiliter::dispose makes a super call to Obj::dispose; * Then, Obj::dispose does nothing except call kDisposeClone, which does not mutate r_acc, so r_acc is still 0 from verbList; * Then we return back through 5 calls to throttle::doVerb; * Then throttle::doVerb checks that r_acc is non-zero, and if so, adds wreckBot to theDoits global, allowing the animation to occur. In ScummVM, without setting r_acc in the super call, the non-zero check failed and the wreckBot didn't get put into theDoits, so the entire sequence fell apart. In SSCI, the non-zero check happened to succeed because the Obj::dispose super call put the Obj class into the accumulator. So now we do that too, and now Lighthouse 2.0a works here. Earlier versions of SSCI used EAX for other things in between the OP_super call and the message processing, so would set r_acc from different data, so this change does not apply to those versions.
2017-09-19SCI: Allow multi-step tracing with step-over in debuggerColin Snover
2017-09-19SCI32: Fix GfxFrameout::addPlane from causing possible leaksColin Snover
2017-09-19SCI32: Remove never-read default valuesColin Snover
2017-09-19SCI32: Add audio dump debugger commandColin Snover
2017-09-19SCI32: Don't warp the mouse twice when its position has been restrictedColin Snover
2017-09-19SCI32: Flush all events before warping mouseColin Snover
This improves the behaviour at the end of PQ4 when navigating the warehouse with the flashlight by getting rid of mouse events that may have been queued before the mouse warp to the other side of the screen is performed. Without this, frequently, those extra events would then be processed and cause the mouse to jump back to the opposite side of the screen, triggering another navigation in the opposite direction. This patch really only helps when mouse capture is enabled in ScummVM as well, but it does allow the sequence to be played pretty much normally in that situation. Additional (pending) patches to ScummVM itself are needed to move the mouse to the correct place when mouse capture is off and the system mouse moves outside of the game window. Refs Trac#9689.
2017-09-19SCI32: Add Lighthouse Glider demo to detection tableColin Snover
2017-09-19SCI32: Promote Lighthouse demos to ADGF_TESTINGColin Snover
2017-09-19SCI32: Hide warning about CD-ROM speed setting in kGetSierraProfileIntColin Snover
In the DOS interpreters, this function is a no-op. Lighthouse calls it regardless of platform, so dummy it out for non-Windows platforms. This is not known to address any particular issue, and is really just to eliminate the warning about an unknown configuration setting when starting Lighthouse in a manner that is compatible with the original interpreter.
2017-09-19SCI: Stop EngineState::wait mutating r_accColin Snover
This wait function is used by kernel calls other than kWait, and those other functions do not mutate r_acc in SSCI.
2017-09-17SCI32: Heap patch for Phantasmagoria 2 to fix DocuStore placementsMartin Kiewitz
This fixes placement of "File", "Note", "From" and "Subject" content. See bug #10034
2017-09-17SCI32: GK1CD: script for vine swing issue bug #9820Martin Kiewitz
Gabriel's "I can't believe I'm doing this..." line was cut off. This script patch stops that from happening.
2017-09-17SCI32: Clean-up pass on GK1,GK2,KQ7,PQ4,QfG4,Torin script patchesMartin Kiewitz
comments only
2017-09-16SCI: Remove unused selector from script patcher selectors listColin Snover
2017-09-16SCI32: Clean-up pass on Torin script patchesColin Snover
* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR
2017-09-16SCI32: Clean-up pass on GK1 script patchesColin Snover
* Make alignment of operation comments consistent * Make patch descriptions consistent
2017-09-16SCI32: Clean-up pass on Shivers script patchesColin Snover
* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR * Wrap comments at 80 columns * Rewrite comments for clarity and brevity * Make identifier suffixes, patch descriptions, and patch table ordering consistent
2017-09-16SCI32: Clean-up pass on Rama script patchesColin Snover
* Make alignment of operation comments consistent
2017-09-16SCI32: Clean-up pass on QFG4 script patchesColin Snover
* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR * Make identifier suffixes and patch descriptions consistent
2017-09-16SCI32: Clean-up pass on PQ4 script patchesColin Snover
* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR * Convert word-size numeric literals to SIG_UINT16/PATCH_UINT16 * Wrap comments at 80 columns * Rewrite comments for clarity and brevity * Make alignment of operation comments consistent * Make identifier suffixes, patch descriptions, and patch table ordering consistent
2017-09-16SCI32: Clean-up pass on PQ:SWAT script patchesColin Snover
* Make patch descriptions consistent
2017-09-16SCI32: Clean-up pass on Phant2 script patchesColin Snover
* Minor clarity fixes to comments * Make patch descriptions and patch table ordering consistent
2017-09-16SCI32: Clean-up pass on Phant1 script patchesColin Snover
* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR * Make identifier suffixes, patch descriptions, and patch table ordering consistent
2017-09-16SCI32: Clean-up pass on MGDX script patchesColin Snover
* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR * Fix a patch to use jmp instead of waste bytes * Make identifier suffixes and patch descriptions consistent
2017-09-16SCI32: Clean-up pass on LSL7 script patchesColin Snover
* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR * Convert word-size numeric literals to SIG_UINT16/PATCH_UINT16 * Wrap comments at 80 columns * Rewrite comments for clarity and brevity * Make alignment of operation comments consistent * Make identifier suffixes and patch descriptions consistent
2017-09-16SCI32: Clean-up pass on LSL6hires script patchesColin Snover
* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR * Make identifier suffixes and patch descriptions consistent
2017-09-16SCI32: Clean-up pass on Lighthouse script patchesColin Snover
* Make patch descriptions consistent
2017-09-16SCI32: Clean-up pass on KQ7 script patchesColin Snover
* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR * Convert word-size numeric literals to SIG_UINT16/PATCH_UINT16 * Wrap comments at 80 columns * Rewrite comments for clarity and brevity * Make alignment of operation comments consistent * Make identifier suffixes and patch descriptions consistent
2017-09-16SCI32: Clean-up pass on GK2 script patchesColin Snover
* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR * Make alignment of operation comments consistent * Make patch descriptions consistent
2017-09-16SCI32: Clean-up pass on GK1 script patchesColin Snover
* Convert selector literals to SIG_SELECTOR/PATCH_SELECTOR * Convert word-size numeric literals to SIG_UINT16/PATCH_UINT16 * Wrap comments at 80 columns * Rewrite comments for clarity and brevity * Make alignment of operation comments consistent * Make identifier suffixes, patch descriptions, and patch table ordering consistent * Remove no-longer-needed script patch for day 10 room 808, which has been fixed using a different, generic mechanism since commit e8c429832f7b6393f853fd6d9ce8ba2e62f6a93c
2017-09-16SCI32: Add script patch for PQ4CD for dual mode (text+speech)Martin Kiewitz
This makes the game menu able to handle a 3rd state, so that the game shows text but also play speech at the same time. We need to inject our own view for the new button to really show up. I'm not that experienced with the SCI32 graphics code, which is why I prefer snover to do this part. Right now it will show the button with text selected 2 times in a row. The first "text" button is the dual mode / "both" state. Anyway, thanks to snover for notifying me of this game needing dual mode patched in and also for some help.
2017-09-16SCI: LB2-Dual mode: Change "DUAL" button to "BOTH"Martin Kiewitz
Now it says "BOTH", just what the button in SQ4 says as well.
2017-09-15SCI32: Fix bad play call in Shivers room 23090David Fioramonti
This fixes a bad play call by replacing it with a fade call. The newRoom function In script rm23v090 (room 23090) was calling a play function with 5 arguments, but the play function only takes 4 arguments. Since it looks like a fade call it has been replaced with that. Fixes Trac#10200. snover helped.
2017-09-16SCI: KQ6-Dual mode: Change "DUAL" button to "BOTH"Martin Kiewitz
Now those say "BOTH", just what the button in SQ4 says as well.
2017-09-15SCI32: Blacklist pirated GOG.com + German GK2Colin Snover
Fixes Trac#9744.
2017-09-15SCI32: Fix clipping of inventory items in Phant2Colin Snover
This fixes overlapping of the left arrow in all cases, but the scroll delta and initial offset of inventory items will only be fixed in new games because the affected objects are global objects whose bad properties get persisted into save games. Fixes Trac#10037.
2017-09-14SCI32: Fix Phant2 "auto-save"Colin Snover
The game has a feature where it will automatically create a save game when you quit the game through the in-game control panel (or when you die, for some reason). Unfortunately, due to bad programming, this automatic save would just overwrite whatever was in save slot 1 (slot 0 in the original interpreter). Find this attempt to auto-save the game and redirect it to the auto-save slot. This might not be totally correct, but it is at least better than destroying a save game. Fixes Trac#10201.
2017-09-14SCI32: Fix PQ:SWAT platformColin Snover
2017-09-14SCI32: Drop platform from game ID for games that are Windows-onlyColin Snover
2017-09-14SCI32: Remove ADGF_CD from games that have no non-CD versionColin Snover
@sev- had asked why these flags were added a while ago (I had been instructed this was the right thing to do when I asked in the past) and ever since then it has been bugging me more and more that they are there, since they serve zero purpose except to make the game ID longer. In the past, it may have been the case that the SCI16 & SCI32 code mixing meant that SCI32 games needed the CD flag for things like managing subtitles, but at this point the only use of the CD flag within the SCI32 engine is for the few games that actually have different CD and non-CD versions. So these flags are gone now.