aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-20SCI: Ignore patch resources with .DOS and .WIN extensionsColin Snover
Type mismatch is triggered on THEGUIDE.DOS and THEGUIDE.WIN from at least Phant1 French 1.100.000.
2017-05-20TITANIC: Method renamings in star control camera classesPaul Gilbert
2017-05-20TITANIC: Remove unused variablePaul Gilbert
2017-05-20I18N: Update translation (German)Lothar Serra Mari
Currently translated at 99.5% (953 of 957 strings)
2017-05-20TITANIC: Fix blitting of game objects with a transparency surfacePaul Gilbert
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.
2017-05-15SCI: Ignore priority and transparency for KQ6 hi-res viewsWillem Jan Palenstijn
This fixes bug 9786. Thanks to m_kiewitz for verifying with disasm.
2017-05-15I18N: Regenerate translations data fileThierry Crozat
2017-05-13SCI: Guard against potential stack overflow in vocab word parserColin Snover
2017-05-13SCI: Fix access violation reading Hoyle1 vocabularyColin Snover
The vocab file for this game does not seem to be valid (other utilities like SV cannot parse it either), and this game does not seem to need the parser, so just exit early like the SCI1 branch when unexpectedly running out of bytes in the vocab file. Fixes Trac#9765.
2017-05-14I18N: Update translations templatesThierry Crozat
2017-05-13SCI: Suppress resource warnings when running fallback detectionColin Snover
For the moment, only warn about bad resources when a game is actually starting, since unknown but valid resources being detected by the fallback detector currently also trigger the warning.
2017-05-13SCI: Dispose uncached volume file streamsColin Snover
The stream returned by a call to ResourceManager::getVolumeFile either MUST (when returning an I/O stream from a Common::FSNode) or must NOT (when returning a Common::File *) be deleted by the caller, depending upon some internal implementation details of ResourceSource that should never have been exposed to callers. FSNode streams that should have been deleted were not being deleted all the time, which leaked and eventually caused ScummVM to run out of FDs. This commit improves this situation by shielding callers from these internal details by centralizing the destruction logic in one place, so FSNode read streams stop being leaked and callers no longer need to know stuff about the internals of the ResourceSource they are trying to read in order to avoid leaking or breaking the volume file cache. Fixes Trac#9782.
2017-05-13SCI32: Make sure all save game validity checks are in kCheckSaveGame32Colin Snover
Save game metadata validity checks in SCI32 should all exist within kCheckSaveGame32 since this allows most games to recover successfully from an attempt to load an invalid save game. If gamestate_restore fails, the game will usually crash because the engine is left in an inconsistent state (game scripts have cleaned up objects in preparation for a game load that is no longer happening).
2017-05-13SCI32: Fix crash at end of TorinColin Snover
This "fix" is more of a hack, in the interest of making the game completable. The root cause is a combination of two problems in the game scripts: 1. Blink::init expects to receive either 0 or 2 arguments, but it assumes that if it received *any* arguments, it must have received 2 arguments. This assumption is wrong, though, because-- 2. soTorinWhoAreYou::changeState(0) calls poPecandEyes::setCycle(Blink) without including a second argument (the blink speed). This ends up with the second parameter being some garbage, and that garbage gets sent to kRandom which then complains about receiving garbage. The correct fix for this would be to fix soTorinWhoAreYou (in script 51400) to pass a second argument to setCycle, but there are not enough obvious spare bytes for a quick and easy patch, so this workaround will have to do for now. Fixes Trac#9779.
2017-05-10SCI: Fix reading of Rave data from compressed KQ6 audio volumesColin Snover
Refs Trac#9764.
2017-05-10I18N: Update translations templatesThierry Crozat
2017-05-10SCI: Add "patch" directory to search pathsColin Snover
Refs Trac#9776.
2017-05-10SCI: Add example of KQ6 game with incorrect patches directoryColin Snover
2017-05-10SCI: Remove unused Robot code from SCI16 audio codeColin Snover
2017-05-10SCI: Fix support for ScummVM compressed audio volumesColin Snover
The runtime code for this had previously relied on hot patching volume file offsets at the moment that a resource was loaded, instead of correcting file offsets when reading audio maps. The code added for sanity checking audio volumes started to report warnings because the offsets being received were for the original uncompressed audio volume, which (naturally) is larger than the compressed audio volume. This commit also deduplicates code between addResource and updateResource, and tweaks a validation-related error message for improved clarity. Fixes Trac#9764.
2017-05-09SHERLOCK: SS: Fix Italian fan detection entry languagePaul Gilbert
2017-05-09I18N: Update translation (Italian)Paolo Bossi
Currently translated at 100.0% (957 of 957 strings)
2017-05-09I18N: Update translation (Italian)Paolo Bossi
Currently translated at 99.7% (955 of 957 strings)
2017-05-09SCI: Add ifdef for SCI32 types in processPatchColin Snover
2017-05-09I18N: Update translation (Dutch)Ben Castricum
Currently translated at 100.0% (957 of 957 strings)
2017-05-09I18N: Update translation (Dutch)Ben Castricum
Currently translated at 99.6% (954 of 957 strings)
2017-05-08SCI: Fix SCI1.1 patch resourcesColin Snover
While earlier commits had fixed handling of audio resources in audio bundles to match SSCI, audio *patches* in SCI16 were still being treated like standard resource patches. They are now special-cased in the resource manager, just like SCI32. Incidentally, while fixing the problem with audio patches, I also noticed that the patch resource fixes for SQ5/German were very similar to the special-case operations for resources in SCI32, though using an odd heuristic. After investigating, it appears that Sierra SCI1.1 works mostly like SCI32, and not like what was there from SCI View. So, the old special-case code is deleted and the special-case code for SCI32 has been expanded to cover SCI1.1. (SSCI prior to 1.1 do not appear to do this special-casing.) Fixes Trac#9773.
2017-05-08SCI32: Add workaround for KQ7Colin Snover
Fixes Trac#9763.
2017-05-08I18N: Update translation (Finnish)Timo Mikkolainen
Currently translated at 100.0% (957 of 957 strings)
2017-05-08I18N: Update translations templatesThierry Crozat
2017-05-08SCI: Add missing files in POTFILESThierry Crozat
2017-05-08SCI: Fix unnecessary copy of Common::StringColin Snover
2017-05-08SCI: Fix Audio36 patch suffix matching against lowercase extensionsColin Snover
The Lighthouse glider demo comes with a file named SDirectX.dll which was failing to match the case-sensitive suffix search for .DLL.
2017-05-08SCI: Fix some issues with ChunkResourceSourceColin Snover
1. The chunk number was hard-coded to zero and inaccessible. 2. Running ResourceManager::getVolumeFile for a chunk resource would always return nullptr instead of a stream of the chunk, which made it impossible to generically validate that resources being added were within bounds of the container file (or, in this case, container chunk).
2017-05-08SCI: Translate messages passed to dialoguesColin Snover
2017-05-08SCI: Improve detection and reporting of resource errorsColin Snover
Simple assertions in the resource manager are not sufficient to track down resource corruption issues, and some error conditions that were being checked already were either ignored or only raised as warnings that casual users would be unlikely to see. Ideally, error handling in ResourceManager would be improved to the point where errors would correctly propagate out of it (so the warning dialogue could be displayed from outside), but right now error codes are dropped all over the place, and it would take more effort to fix that without much benefit for the current situation. If/until someone has the energy to fix that, the warning dialogue is simply shown from ResourceManager::scanNewSources. Refs Trac#9764.
2017-05-08OPENGL: Don't update the cursor's texture when the cursor is invisibleBastien Bouclet
Updating the cursor's texture is not necessary if it is not going to be drawn. Fixes glDrawArrays sometimes failing due to using a framebuffer with an incomplete color attachment. In SCI32 games, the framebuffer is incomplete because the engine does not define pixel data for the cursor.
2017-05-07SHERLOCK: Add detection entry for Italian fan translationPaul Gilbert
2017-05-06SCI32: Add workaround for KQ7Colin Snover
Fixes Trac#9759.
2017-05-06SCI32: Add missing ifdef for EngineState::_eventCounterColin Snover
2017-05-06SCI32: Add Spanish Windows KQ7 to detection tableColin Snover
(The DOS version was already listed.)
2017-05-06SCI32: Detect and handle tight loops around kGetEventColin Snover
In SSCI, mouse events are received through a hardware interrupt and the cursor is drawn directly to the graphics card by the interrupt handler. This allows game scripts to omit calls to kFrameOut without stopping the mouse cursor from being redrawn in response to mouse movement. ScummVM, in contrast, needs to poll for events and submit screen updates explicitly from the main thread. Submitting screen updates may block on vsync, which means that this call should really only be made once per frame, just after the game has finished updating its back buffer. The closest signal in SCI32 for having completed drawing a frame is the kFrameOut call, so this is where the update is submitted (by calling OSystem::updateScreen). The problem with the approach in ScummVM is that, even though the mouse position is being updated (by calls to kGetEvent) and drawn to the backend's back buffer (by GfxCursor32::drawToHardware), OSystem::updateScreen is never called during game loops that omit calls to kFrameOut. This commit introduces a workaround that looks at the number of times kGetEvent is called between calls to kFrameOut. If the number of kGetEvent calls is higher than usual (where "usual" seems to be 0 or 1), we assume that the game is running one of these tight event loops, and kGetEvent starts calling OSystem::updateScreen until the next kFrameOut call. We also then start throttling the calls to kGetEvent to keep CPU usage down. This fixes at least two such known loops: 1. When interacting with the menu bar at the top of the screen in LSL6hires; 2. When restoring a game in Phant2 and sitting on the "click mouse" screen. A similar workaround may also be needed for kGetTime, though loops around kGetTime should preferably be replaced using a script patch to call kWait instead.
2017-05-06SCI32: Update cursor even when position appears unchangedColin Snover
This may be masking another bug, but at least what happens in Phant1 is that the mouse does not get redrawn after being moved programmatically to the fast-forward button when deviceMoved returns early.