81110 Commits

Author SHA1 Message Date
Kirben
b46a1b688d WINDOWS: Hopefully fix mingw compilation. 2017-04-24 10:57:02 +10:00
Thierry Crozat
a1dab31c08 WIN32: Fix compilation of getScreenshotPath (missing parenthesis) 2017-04-24 01:28:50 +01:00
Thierry Crozat
23987cc724 WIN32: Comment out code that gets the user My Pictures directory
This broke compilation on buildbot as ShlObj.h cannot be found.
A developer that has access to Windows should take a look to
properly fix this.
2017-04-24 01:21:36 +01:00
Thierry Crozat
25bb9106b6 I18N: Update translations templates 2017-04-24 02:10:36 +02:00
Thierry Crozat
a9ae691513 SDL: Improve debug and warning messages when saving screenshots
In particular this adds a warning when failing to save a screenshot
in OpenGL mode (there was already one in SurfaceSDL mode).
2017-04-24 01:07:16 +01:00
Thierry Crozat
e96c057c3d SDL: Allow specifying the screenshot directory in the config file
There is no GUI option to set the screenshot directory, but this
allows power users to set it if they don't want to use the default.
2017-04-24 01:07:05 +01:00
Thierry Crozat
11dd33bb73 MACOSX: Create screenshot on Desktop
This is consistent with the OS shortcut (Crtl+Shift+3) to take a
screenshot.
2017-04-24 01:06:50 +01:00
Thierry Crozat
438f23f272 SDL: Use dynamic cast instead of C cast to get screenshot path 2017-04-24 01:06:40 +01:00
Pala
3849a3e90e WINDOWS: Change location where screenshot are saved
This fixes bug #9701: WINDOWS: Flow of taking screenshots
on Windows is broken
2017-04-24 01:06:29 +01:00
yinsimei
28ab63136a CMD: Detect and add game(s) with commandline
This implements feature request #7885
2017-04-23 21:52:19 +01:00
Thierry Crozat
8da224b8a2 I18N: Update translations templates 2017-04-23 20:10:35 +02:00
Colin Snover
28a06656af SCI: Improve error messages in Script::validateExportFunc 2017-04-23 13:07:25 -05:00
Colin Snover
d53f3f6095 SCI32: Exclude SCI3 code from compilation when SCI32 is disabled 2017-04-23 13:07:25 -05:00
Colin Snover
6f95b1a440 SCI32: Fix missing mustSetViewVisible data in cloned objects
This information comes directly from script data and is not
modified at runtime, so it does not need to be persisted in save
games, but does need to be set when reconstructing clones.
2017-04-23 13:07:25 -05:00
Colin Snover
a2d7851e4d SCI32: Improve disassembly output of SCI3 property opcodes
Since SCI3 scripts use selectors instead of offsets as operands
to property-related opcodes, the disassembler can look up and
display property names everywhere (unlike SCI2.1 and earlier,
which need to know the object being operated on to look up the
correct selector for a given offset).
2017-04-23 13:07:25 -05:00
Colin Snover
3d4fb4ccb4 SCI32: Fix mustSetViewVisible for SCI3
In SCI2/2.1, variable indexes are used along with a range encoded
in the interpreter executable to determine whether an object
variable is a view-related variable. Operands to aTop, sTop, ipToa,
dpToa, ipTos, and dpTos are byte offsets into an object, which
are divided by two to get the varindex to check against the
interpreter range.

In SCI3, objects in game scripts contain groups of 32 selectors,
and each group has a flag that says whether or not the selectors
in that group are view-related. Operands to aTop, sTop, ipToa,
dpToa, ipTos, and dpTos are selectors.
2017-04-23 13:07:25 -05:00
Colin Snover
1962b1bb6d SCI32: Replace magic numbers in SCI3 selector init 2017-04-23 13:07:25 -05:00
Colin Snover
8bdfb78895 SCI32: Add debugger command to list digital audio samples 2017-04-23 13:07:25 -05:00
Colin Snover
eb9965274d SCI32: Fix race conditions in Audio32 2017-04-23 13:07:25 -05:00
Colin Snover
36cb241b8e SCI32: Remove unused code branch 2017-04-23 13:07:25 -05:00
Colin Snover
f3db412d6f SCI32: Serialize Robots in SCI3
This is necessary for at least Lighthouse, which maintains the
state of Robots across save games.
2017-04-23 13:07:25 -05:00
Colin Snover
a799cb3462 SCI: Fix SCI3 exports
Export functions may be relocated above 64k in SCI3, but exports
that do not have an entry in the relocation table must be handled
the same as SCI1.1-2.1.
2017-04-23 13:07:25 -05:00
Colin Snover
fc02b34215 SCI: Deduplicate Object::locateVarSelector code
The variable count returned by Object::getVarCount is populated
by variable 1 in SCI1.1, so specially reading the variable
explicitly for that engine version is not necessary.
2017-04-23 13:07:25 -05:00
Colin Snover
eadf5d818f SCI: Fix support for 32-bit SCI3 script offsets 2017-04-23 13:07:25 -05:00
Colin Snover
2906ca9947 SCI: Replace mostly-unused flags property with a single boolean
There does not appear to be any reason to use a bit field instead
of a simple boolean for this one flag, since there are no other
flags that need to be set on Object like this.
2017-04-23 13:07:25 -05:00
Colin Snover
cb50682b15 SCI: Improve documentation of Object class 2017-04-23 13:07:25 -05:00
Colin Snover
0394fd44e8 SCI: Fix whitespace errors 2017-04-23 13:07:25 -05:00
Colin Snover
61fba94139 SCI: Remove dead code in Script_Offset disassembler
Script_Offset is only ever used for lofsa/lofss opcodes.
2017-04-23 13:07:25 -05:00
Colin Snover
0676e640db SCI: Fix bad offsets in disassembly for SCI3 lofsa/lofss 2017-04-23 13:07:25 -05:00
Colin Snover
6b95528b49 SCI32: Fix bad relocations of SCI3 objects 2017-04-23 13:07:25 -05:00
Colin Snover
90c6c0580e SCI: Convert Object to use Common::Array for SCI3
In SCI3, index-to-selector tables no longer exist in compiled
object data (instead, the SCI3 VM uses selectors directly and
object data contains a bit map of valid selectors). In ScummVM,
the table is generated by Object::initSelectorsSci3 for
compatibility with the design of the ScummVM SCI VM. For
consistency, _baseVars is converted to use a standard container,
which works for all SCI versions.

The table for SCI3 property offsets is also changed to use a
standard container instead of manually managing the memory with
malloc/free.
2017-04-23 13:07:25 -05:00
Colin Snover
8299460917 SCI32: Hook up mustSetViewVisible for SCI3 2017-04-23 13:07:25 -05:00
Colin Snover
5c5e485ff0 SCI32: Improve debugging output of object metadata in SCI3 2017-04-23 13:07:25 -05:00
Colin Snover
d0a143fa87 SCI32: Fix locals offset in SCI3
Locals offset needs to be set even when the script has no exports.
2017-04-23 13:07:25 -05:00
Colin Snover
d24f5537be SCI32: Implement SCI3 Script::syncStringHeap 2017-04-23 13:07:25 -05:00
Colin Snover
b3ecc54a7a SCI: Always search for .CSC script patches
Skipping a search for .CSC scripts when any .SCR files exist does
not work with at least Phant2, because it comes with an INSTALL.SCR
file. Searching unconditionally for .CSC files should not cause any
issues since the game scripts will either be in .SCR format or in
.CSC format, not both in the same game.
2017-04-23 13:07:25 -05:00
Colin Snover
f58019b680 SCI32: Remove spinloops from Phant2 2017-04-23 13:07:25 -05:00
Colin Snover
14e4ea6c85 SCI32: Add workarounds for LSL7 2017-04-23 13:07:25 -05:00
Colin Snover
e06d4a71fb SCI32: Fix missing main menu in LSL7 2017-04-23 13:07:25 -05:00
Colin Snover
5948813169 SCI32: Fix crash when writing word to VIRTUALFILE_HANDLE_SCI32SAVE
This happens in Phant2 when trying to delete a save game from the
in-game save dialogue.
2017-04-23 13:07:25 -05:00
Colin Snover
a867fb70dd SCI32: Fix audio playback with monitored channel in SCI3
SCI3 changes the way that monitored channel works. In SCI2/2.1,
when a channel is monitored, it is the only audible channel. In
SCI3, monitored channels mix normally.

This is very noticeable in LSL7, where music disappears totally
during speech if the monitored channel is the only channel played
back.
2017-04-23 13:07:25 -05:00
Colin Snover
b5ecbff39b SCI32: Fix crash in Phant2 when clicking Help in the control panel 2017-04-23 13:07:25 -05:00
Colin Snover
2573fe8c96 SCI32: Fix slow fade of Phant2 interface bars 2017-04-23 13:07:25 -05:00
Colin Snover
7997451384 SCI32: Remove TODO from relocateOffsetSci3
The field at +8 is for the MemID associated with a relocation.
2017-04-23 13:07:25 -05:00
Colin Snover
866419fa71 SCI: Implement fallback detection for SCI3 2017-04-23 13:07:25 -05:00
Colin Snover
42406cb11a SCI32: Undummy AvoidPath for SCI3
Used by LSL7.
2017-04-23 13:07:25 -05:00
Colin Snover
ca507e2b0b SCI: Fix missing music in LSL7 2017-04-23 13:07:25 -05:00
Colin Snover
c9342beca9 SCI: Remove unused commented code 2017-04-23 13:07:25 -05:00
Colin Snover
8aed6759e4 SCI32: Remove incomplete SCI3 detection warning
Map format is the same as SCI2/2.1 and volume format is detected
correctly as SCI3.
2017-04-23 13:07:25 -05:00
Colin Snover
88f020c7d4 SCI32: Fix out-of-bounds reads of truncated uncompressed cels
This happens e.g. on the About page in LSL7 because of an
interpreter problem where bitmap handles are destroyed and then
reused without a kFrameOut call to remove old screen items from
the visible plane list before a kIsOnMe call that causes the
engine to try to read from reused bitmap handles with different
contents and dimensions.

This replaces bad memory reads on the About page in LSL7 with an
assertion failure, until the problem with the About page can be
properly addressed.
2017-04-23 13:07:25 -05:00