Commit Graph

83107 Commits

Author SHA1 Message Date
Colin Snover
66826a8b9b ENGINES: Continue to check file presence after a hash/size mismatch
If an early file in the game's signature list has a hash/size
mismatch, it is still necessary to continue to check the rest of
the candidate files for existence, since the non-existence of
candidate files is supposed to disqualify a game description as
matching a game to an unknown variant.

By quitting the file check early, the detector had been allowing
descriptions to randomly match if there happened to be an early
file in the detection list with the right name but wrong hash/size,
even if some of the other signature files did not exist at all.
2017-11-10 09:57:41 -06:00
Colin Snover
dda0f77bcf COMMON: Add basic fixed-width word wrap to Common::String 2017-11-10 09:57:41 -06:00
Colin Snover
216376477a CGE: Remove garbage character from comments 2017-11-10 09:57:03 -06:00
Colin Snover
972c453986 BBVS: Remove all bit shifts of potentially negative integers
Previous patches that removed shifts of constant negative values
to eliminate UB were valid, but did not correct all places where
this engine was potentially bit shifting negative values. There is
no reason to not just use multiplication and division and let the
compiler make the right choice for optimisation for an
architecture, so that is what this patch does.
2017-11-10 09:57:03 -06:00
Colin Snover
51329c0dc6 ALL: Fix misuse of comma operator 2017-11-10 09:57:03 -06:00
Colin Snover
2de83e0937 COMMON: Use C++11 static_assert when available
This improves the output of static assertions in all compilers,
and prevents problems in MSVC 2015 where the mechanism for
triggering a compilation error in C++98 mode may cause errors when
that compiler builds in release mode.

Fixes Trac#10154.
2017-11-10 09:56:43 -06:00
Paul Gilbert
600fe749c5 XEEN: Fix animation of wall torches 2017-11-10 06:09:30 -05:00
Paul Gilbert
d8aab6362a
Merge pull request #1049 from csnover/lure-unaligned
LURE: Stop taking address of unaligned pointer
2017-11-09 18:29:07 -05:00
Paul Gilbert
cb90f861b8 XEEN: Cleanup of PowType enum names 2017-11-09 11:05:28 -05:00
Paul Gilbert
381567c1a3 XEEN: Properly animate arrow shooting 2017-11-09 10:48:39 -05:00
Paul Gilbert
fed68d19d2 XEEN: Create a PowType enum for ranged arrow/spell types 2017-11-09 07:57:05 -05:00
Paul Gilbert
cd0f896253 XEEN: Changed multiAttack to rangedAttack 2017-11-08 19:55:41 -05:00
Bastien Bouclet
1757f7dc5d AUDIO: Switch to BitStreamMemoryStream in the QDM2 decoder 2017-11-08 20:57:35 +01:00
Bastien Bouclet
bf3c98815f AUDIO: Add some padding to the QDM2 decoder input buffer
Fixes out of bounds reads in the Myst ME intro videos.

OOB reads may happen because:
- The bitstream implementation reads 4 bytes at a time, and the buffer
  size is not guaranteed to be a multiple of 4.
- The huffman parsing code reads a fixed amount of bits when it
  sometimes needs not all of them.

Also fixed bits vs bytes mismatch for the size parameter of the calls to
the bitstream constructor, and removed a few unnecessary heap
allocations.

Fixes #10220.
2017-11-08 20:57:24 +01:00
Colin Snover
b0eb5caa51 LURE: Stop taking address of unaligned pointer
While usage of these pointers was technically safe because they
were read through an alignment-aware API, taking the address of an
unaligned pointer was generating warnings in Clang, and is not
strictly necessary here. This change solves the warning and also
protects this code from any future change that might cause it to
start reading unsafely.
2017-11-07 22:57:33 -06:00
Colin Snover
8e8ec3900c SDL: Get correct default graphics mode ID when queried
Fixes Trac#10312.
2017-11-07 21:34:42 -06:00
Paul Gilbert
8a42959eed XEEN: Fix FX calls in multiAttack 2017-11-07 20:04:00 -05:00
Lothar Serra Mari
262570a576 I18N: Update translation (German)
Currently translated at 100.0% (959 of 959 strings)
2017-11-07 21:13:23 +01:00
D G Turner
872c5ee7c5 LINUX: Fix Header for major/minor macros, thus removing warnings.
Warnings are as follows:
"In the GNU C Library, "minor" is defined by <sys/sysmacros.h>.
For historical compatibility, it is currently defined by
<sys/types.h> as well, but we plan toremove this soon.
To use "minor", include <sys/sysmacros.h> directly. If you did
not intend to use a system-defined macro "minor", you should
undefine it after including <sys/types.h>"
2017-11-07 20:18:22 +00:00
Thierry Crozat
18b8a8cd78 I18N: Regenerate translations data file 2017-11-06 05:05:04 +01:00
Paul Gilbert
87bff2dfcd TITANIC: Remove testing flag from German version 2017-11-04 11:38:19 -04:00
rootfather
e742be431f ŃEWS: Update German NEWS file 2017-11-04 09:20:08 +01:00
Bastien Bouclet
3f42f212d4 NEWS: Add important Myst bug fixes 2017-11-02 19:49:43 +01:00
Bastien Bouclet
f4a0566e37 MOHAWK: RIVEN: Remove the testing flag 2017-11-02 19:49:43 +01:00
Bastien Bouclet
2f733c812a BASE: Minor command line detection cleanup 2017-11-02 19:49:43 +01:00
Bastien Bouclet
9b9600a50f VIDEO: Express VideoDecoder::endOfVideo using easier to understand logic 2017-11-02 19:49:43 +01:00
Thierry Crozat
174276455f I18N: Update translations templates 2017-10-31 11:04:09 +01:00
Ben Castricum
a8faf239a1 SCUMM: Prevent false detection of Steam games 2017-10-31 11:03:53 +01:00
Paul Gilbert
91d79769cc XEEN: Enable starting game from startup menu 2017-10-29 17:06:58 -04:00
rootfather
8258bca063 DOC: Remove reference to SF for the Bug Tracker; improve wording 2017-10-29 19:37:22 +01:00
rootfather
4e026e7275 DOC: Remove reference to Sourceforge for the Bug Tracker 2017-10-29 19:37:22 +01:00
Colin Snover
37459bc6c1 SCI: Fix UB in SegManager memcpy/strcpy operations
Passing overlapping buffers to C standard library memcpy, strcpy,
and strncpy is undefined behavior. In SSCI these operations would
perform a forward copy, and most stdlib implementations do the
same, but at least newer Linux glibc on x86 copies bytes in
reverse, so just using the standard library on this platform
results in broken output.

Because SSCI used a blind forward copy instead of memmove for
overlapping copy operations, this patch implements an explicit
forward copy to ensure that overlapping copies continue to operate
the same as in SSCI.

This fixes the Island of Dr. Brain v1.1 flamingo puzzle
(script 185, flamingos::init, localCall 4c3) on platforms that do
not perform forward copy in memcpy/strcpy/strncpy.

Thanks to @moralrecordings for research on this bug and an initial
patch using memmove.

Closes gh-1034.
2017-10-29 13:18:37 -05:00
Willem Jan Palenstijn
4233156505 TESTBED: Only build cloud tests if libcurl is available too
This matches the module.mk checks for backends/cloud
2017-10-29 00:05:51 +02:00
Willem Jan Palenstijn
a416c98980 CONFIGURE: Handle freetype-config SYSROOT duplication in prefix
Since version 2.3.12, freetype-config adds SYSROOT to all paths.
If we pass a --prefix that already includes SYSROOT, this will return
a duplicate SYSROOT. This patch detects that and adjusts prefix
accordingly.
2017-10-29 00:05:51 +02:00
Willem Jan Palenstijn
0bcaf623aa CONFIGURE: Add missing --with-libcurl-prefix option 2017-10-29 00:05:51 +02:00
Willem Jan Palenstijn
bef5629519 CONFIGURE: Improve configure help formatting consistency 2017-10-29 00:05:51 +02:00
Thierry Crozat
56a1dd9b2f
Merge pull request #1046 from digitall/saga_ite_french
SAGA: Add Code to Support French Fan Translation.
2017-10-28 12:23:59 -07:00
D G Turner
d59690424c SAGA: Replace Remaining French Accented Characters with Escape Codes. 2017-10-28 11:28:42 +01:00
D G Turner
0416249765 SAGA: Add Define for French Language for clarity. 2017-10-28 11:24:58 +01:00
Paul Gilbert
ba7e50edec TITANIC: Hopefully fix AmigaOS compilation 2017-10-27 17:37:44 -04:00
D G Turner
913aae6155 SAGA: Correct Tenses in French Fan Translation of ITE.
These changes were suggested by bgK.
2017-10-27 10:51:47 +01:00
D G Turner
d50c13a7c7 SAGA: Add Code to Support French Fan Translation.
This code was supplied by Darknior (hugues.fabien@gmail.com).
2017-10-26 18:16:11 +01:00
Bastien Bouclet
bd82345f0b Merge pull request #1035 from bgK/require-64bits-integers
BUILD: Require 64bits integers
2017-10-25 19:17:11 +02:00
Bastien Bouclet
2ded98b482 MOHAWK: MYST: Add detection for a Russian version 2017-10-25 19:14:46 +02:00
Colin Snover
3a95213905 SDL: Automatically grab mouse upon entering fullscreen
Folks are confused about the new behaviour where the mouse is not
restricted to the game area in fullscreen, which is understandable.

This changes mouseIsGrabbed to use SDL directly in order to avoid
making changes to the user preference in the _inputGrabState.
Otherwise we'd either clobber the user's previous windowed mouse
grab preference, or require maintaining a second variable just to
track the original state, when we can have SDL do that for us.
2017-10-23 22:36:04 -05:00
Thierry Crozat
f638f1453c I18N: Regenerate translations data file 2017-10-23 05:05:03 +02:00
Willem Jan Palenstijn
9030b09ecc SCI: Allow lofsa string printing in disasm for all SCI versions 2017-10-21 19:13:38 +02:00
Willem Jan Palenstijn
fab43f0f71 SCI: Fix offsets in disasm for multi-param opcodes
This code was assuming that retval points to the start of the next
instruction, which is only true if the current parameter is the last
one. This fixes op_call printing.
2017-10-21 18:55:40 +02:00
Tarek Soliman
2fea095fc7 SDL: Fix SDL1 cursor position when using a touchscreen
I noticed that in Maemo the cursor was offset after the SDL refactoring
in de2bbe3b97

In Maemo when entering fullscreen, ScummVM receives a SDL_VIDEORESIZE
event with the native touchscreen resolution rather than the current
window size. This causes a call to notifyResize.

Before that refactoring, notifyResize did nothing (in SDL1).
Now it calls handleResize but doesn't actually set a new video mode.
This messes up the coordinate mapping, causing an overcorrection for
the cursor position.
2017-10-19 17:51:01 -05:00
Thierry Crozat
0e44feadb0 I18N: Update translations templates 2017-10-18 01:42:49 +02:00