Commit Graph
137148 Commits
Author SHA1 Message Date
Colin Snover 14a521a211 SCI32: Fix kPlatform operation for SCI2 through SCI2.1early
Fixes Trac#9795.
2017-05-20 21:14:18 -05:00
Colin Snover cb657c0c0f SCI: Ignore patch resources with .DOS and .WIN extensions
Type mismatch is triggered on THEGUIDE.DOS and THEGUIDE.WIN from
at least Phant1 French 1.100.000.
2017-05-20 21:14:18 -05:00
Paul Gilbert c4134a9e92 TITANIC: Method renamings in star control camera classes 2017-05-20 20:45:56 -04:00
Paul Gilbert 7fb217b30b TITANIC: Remove unused variable 2017-05-20 17:54:56 -04:00
Lothar Serra Mari 7cef9829ac I18N: Update translation (German)
Currently translated at 99.5% (953 of 957 strings)
2017-05-20 23:27:45 +02:00
Paul Gilbert 1b10678898 TITANIC: Fix blitting of game objects with a transparency surface 2017-05-20 17:27:23 -04:00
Willem Jan Palenstijn 779b8336b1 SCI: Let getClassAddress fail gracefully with SCRIPT_GET_DONT_LOAD
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-16 22:41:47 +02:00
Martin Kiewitz cadd89e675 SCI: Add script patch for "Tickets, only" during game over scene
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 a46f3c1625
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-15 22:56:04 +02:00
Willem Jan Palenstijn 388419c53c SCI: Ignore priority and transparency for KQ6 hi-res views
This fixes bug 9786. Thanks to m_kiewitz for verifying with disasm.
2017-05-15 22:03:25 +02:00
Vincent Pelletier 2490cb986f EMI: Reuse existing variable 2017-05-15 10:31:25 +00:00
Vincent Pelletier a6eb5d4668 GRIM: Use copyBuffer in BitmapData::convertToColorFormat 2017-05-15 10:31:25 +00:00
Vincent Pelletier 198554a211 GRIM: Log front buffer pixel format on TinyGL initialisation 2017-05-15 10:31:25 +00:00
Vincent Pelletier 009d3320b3 TINYGL: Compute surface pixel count once only in BlitImage::loadData
Cartesian coordinates are not actually needed here, so simplify
computations by just using a pixel offset.
2017-05-15 10:31:25 +00:00
Thierry Crozat 5c31db0594 I18N: Regenerate translations data file 2017-05-15 05:05:08 +02:00
Colin Snover dec12f5b6d SCI: Guard against potential stack overflow in vocab word parser 2017-05-13 23:45:59 -05:00
Colin Snover 444b11b1bb SCI: Fix access violation reading Hoyle1 vocabulary
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-13 23:45:59 -05:00
Thierry Crozat 230b88bd55 I18N: Update translations templates 2017-05-14 05:53:52 +02:00
Colin Snover b1ace1a01c SCI: Suppress resource warnings when running fallback detection
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-13 22:49:40 -05:00
Colin Snover f44d8b6da6 SCI: Dispose uncached volume file streams
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-13 22:46:25 -05:00
Colin Snover 1911b19e15 SCI32: Make sure all save game validity checks are in kCheckSaveGame32
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-13 22:46:25 -05:00
Colin Snover 262ef4de61 SCI32: Fix crash at end of Torin
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-13 22:46:13 -05:00
Vincent Pelletier 241114cbd0 GRAPHICS: Make PixelBuffer::clear take pixel format into account 2017-05-13 14:00:50 +00:00
Vincent Pelletier a1bc91c906 GRAPHICS: Preserve alpha component in PixelBuffer::copyBuffer 2017-05-13 14:00:50 +00:00
Bastien Bouclet dbe561fcc8 STARK: Use the endian safe float reading macro 2017-05-13 08:15:29 +02:00
Vincent Pelletier 5a4a5706da COMMON: Fix gcc warnings in READ_LE_FLOAT on big-endian
As of gcc-6.3.0:
../common/endian.h: In function `READ_LE_FLOAT(const char*)':
../common/endian.h:621:49: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
Also, prepare an hypothetical need for reading big-endian or
aligned floats.
2017-05-12 13:57:16 +00:00
Vincent Pelletier 84f83fe6ea ALL: Rename get_float to READ_LE_FLOAT
For consistency with other functions/macros from common/endian.h .
2017-05-12 13:57:16 +00:00
Colin Snover ea6eebca09 SCI: Fix reading of Rave data from compressed KQ6 audio volumes
Refs Trac#9764.
2017-05-10 15:29:53 -05:00
Thierry Crozat 80e7eaa442 I18N: Update translations templates 2017-05-10 19:08:31 +02:00
Colin Snover 9e839775b6 SCI: Add "patch" directory to search paths
Refs Trac#9776.
2017-05-10 12:04:56 -05:00
Colin Snover 200adb99cf SCI: Add example of KQ6 game with incorrect patches directory 2017-05-10 11:53:26 -05:00
Colin Snover 67b72cc5a8 SCI: Remove unused Robot code from SCI16 audio code 2017-05-10 10:55:00 -05:00
Colin Snover dd13c3be43 SCI: Fix support for ScummVM compressed audio volumes
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-10 10:55:00 -05:00
Paul Gilbert 53b0b82e87 SHERLOCK: SS: Fix Italian fan detection entry language 2017-05-09 20:57:47 -04:00
Paolo Bossi 2a7cda649e I18N: Update translation (Italian)
Currently translated at 100.0% (957 of 957 strings)
2017-05-09 21:03:48 +02:00
Paolo Bossi 6ced8b28a7 I18N: Update translation (Italian)
Currently translated at 99.7% (955 of 957 strings)
2017-05-09 19:21:39 +02:00
Colin Snover c788642b72 SCI: Add ifdef for SCI32 types in processPatch 2017-05-09 00:26:23 -05:00
Ben Castricum b7638982c2 I18N: Update translation (Dutch)
Currently translated at 100.0% (957 of 957 strings)
2017-05-09 07:21:31 +02:00
Ben Castricum d6a3bdcc0a I18N: Update translation (Dutch)
Currently translated at 99.6% (954 of 957 strings)
2017-05-09 07:06:03 +02:00
Colin Snover eb6e179169 SCI: Fix SCI1.1 patch resources
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-08 23:59:28 -05:00
Colin Snover ae628c18d4 SCI32: Add workaround for KQ7
Fixes Trac#9763.
2017-05-08 19:45:07 -05:00
Timo Mikkolainen 57982eb5ab I18N: Update translation (Finnish)
Currently translated at 100.0% (957 of 957 strings)
2017-05-08 21:19:30 +02:00
Thierry Crozat 1563428340 I18N: Update translations templates 2017-05-08 20:23:44 +02:00
Thierry Crozat 916cdd58cd SCI: Add missing files in POTFILES 2017-05-08 19:19:14 +01:00
Colin Snover 13925065cb SCI: Fix unnecessary copy of Common::String 2017-05-08 11:26:47 -05:00
Colin Snover f8d4ffa8ed SCI: Fix Audio36 patch suffix matching against lowercase extensions
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-08 11:26:47 -05:00
Colin Snover 130c9ecbb8 SCI: Fix some issues with ChunkResourceSource
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-08 11:26:46 -05:00
Colin Snover c9cbb8e31c SCI: Translate messages passed to dialogues 2017-05-08 11:26:46 -05:00
Colin Snover 554a73e012 SCI: Improve detection and reporting of resource errors
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-08 11:26:46 -05:00
Bastien Bouclet 7c60a59c81 GRIM: Account for the alignment when seeking smush movies 2017-05-08 10:54:04 +02:00
Bastien Bouclet 1beae260c8 STARK: Fix incorrect include style 2017-05-08 07:39:33 +02:00