4280 Commits

Author SHA1 Message Date
Ankush Dutt
2a60a4d213 DLC: Set kFeatureDLC and _dlcStore for ScummVMCloud, Playstore in backend 2023-09-14 08:22:56 +02:00
Ankush Dutt
478d3f2ab9 COMMON: Fix incomplete type warning for dlc store 2023-09-14 08:22:56 +02:00
Ankush Dutt
045a99e50c BACKENDS: Remove platform-specific defines and enforce factory design pattern for creating DLC store 2023-09-14 08:22:56 +02:00
Ankush Dutt
6e8bdee909 BACKENDS: Add initial code for DLC Manager 2023-09-14 08:22:56 +02:00
elasota
9892bedc61 COMMON: Add createReadStreamForAltStream to open Mac resource fork and metadata streams 2023-08-30 00:31:00 +02:00
elasota
4f83f8f625 COMMON: Use standard library strlen for char string lengths. 2023-08-28 22:04:26 +02:00
elasota
20c91ae391 COMMON: Move string length calculation to a separate function so it's easier to get through string constructors with just Step Over while debugging (vs. Step Out which has a 2-key default keybind in VS and can behave badly with optimizations enabled). 2023-08-28 22:04:26 +02:00
Simon Delamarre
c097a43a1f COMMON: Allow to know the archive name of matching members in SearchSet 2023-08-28 21:52:38 +02:00
Le Philousophe
2f7c2149e5 COMMON: Remove useless inflateZlib function
To write on stream it's simpler to use wrapCompressedReadStream and
writeStream function.
2023-08-28 21:49:03 +02:00
Le Philousophe
5bdd9e6f50 ALL: Unify zlib and gzio API
zlib is used when available and falls back on gzio.
This allows performance improvements as our CRC32 and gzio
implementations are slower than base zlib.
As zlib is available when libpng is present, this is sensible to
benefit from it.
2023-08-28 21:49:03 +02:00
Le Philousophe
be3eb09753 COMMON: Allow GZipReadStream to work on data in the middle of stream 2023-08-28 21:49:03 +02:00
Le Philousophe
191bde03ad COMMON: Use memcpy instead of memmove
memove was used although the buffers were not overlapping.
Using memcpy allows for better optimizations by compiler.
2023-08-28 21:49:03 +02:00
Le Philousophe
5edf74d8a6 COMMON: Cleanup flags defines
In addition, use flags from RFC and not from (really) old gzip
implementations.
2023-08-28 21:49:03 +02:00
Le Philousophe
b5e3173b10 COMMON: Fix inflateZlibHeaderless name
The function takes a stream beginning with zlib header unlike the name
suggests.
inflateInit expects to parse a zlib header.
2023-08-28 21:49:03 +02:00
Le Philousophe
ead4171bbd COMMON: Rewrite writeStream to work with any ReadStream
This let it work with stream without a known size and avoids allocating
big buffers when file is big.
2023-08-28 21:49:03 +02:00
Thierry Crozat
ef7c881416 OSYSTEM: Add kFeatureTouchscreen to identify backends with a touchscreen 2023-08-22 23:37:11 +01:00
elasota
92320d616d COMMON: When flattening QuickTime edit lists, don't flatten non-silent audio chunks into silent chunks or vice versa.
Fixes missing vidbot VO in Obsidian Japanese.
2023-08-22 13:18:15 +03:00
Wyatt Radkiewicz
787837ca41 ALL: Add Cpu prefix to SIMD extension features 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
6bdeeb506f OSYSTEM: Added SSE4.1 feature flag 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
50a28d1554 OSYSTEM: Added SIMD feature flags 2023-08-13 00:22:10 +02:00
Ankush Dutt
8150c720d3 COMMON: DumpArchive(): add check to skip directory, return error if a file cannot be opened 2023-08-09 18:15:43 +02:00
Ankush Dutt
b90efbe47c COMMON: Handle writing failed in dumpArchive when not enough storage 2023-08-09 18:15:43 +02:00
Cameron Cawley
312f077198 COMMON: Fix comments about screen shaking 2023-08-08 17:34:47 +03:00
Eugene Sandulenko
bb9e86e9c6
COMMON: Fix warnings 2023-08-07 10:48:59 +02:00
elasota
58271a834c COMMON: Remove #pragma once 2023-08-07 10:22:09 +02:00
elasota
3c1efe4f89 COMMON: Add file format info API 2023-08-07 10:22:09 +02:00
Thierry Crozat
9de5b3345c OSYSTEM: Add functions to notify the backend when a task is started or finished
A task can for example be running the local server, downloading icons
or shaders pack, or downloading games from the cloud.
2023-08-06 23:07:35 +02:00
Cameron Cawley
d8cca29783 BACKENDS: Allow filling part of the screen with OSystem::fillScreen 2023-08-06 23:03:46 +02:00
Misty De Meo
b975da2335 COMMON: fix MacResManager native resource forks
These broke in the archive refactor,
b8acbe6bee730a9024e73acc769b54285be9afde/#5108, because it removed
the ability to directly convert an `ArchiveMember` to an `FSNode`.
As a result, it was no longer possible to directly open a resource
fork as a stream.
2023-07-27 11:02:29 +02:00
Scott Percival
7304796a01
VIDEO: Remove extra hexdump in QuickTime parser 2023-07-23 20:26:05 +08:00
Scott Percival
ffa80f5aaf VIDEO: Add alias support to QuickTime parser 2023-07-23 14:07:20 +02:00
Ankush Dutt
ca7e41c4e0 COMMON: Use getPathInArchive() and Path::punycodeEncode() in dumpArchive() and fix directory issue
This commit will fix:
- The dumped games using dumpArchive() are not detected.
- The archive's contents were being dumped one directory back the destPath
2023-07-19 22:22:38 +02:00
elasota
f38b732012 COMMON: Fix override without "override" qualifier warning 2023-07-19 18:51:37 +02:00
elasota
b8acbe6bee COMMON: Archive path refactoring, add getFileName and getPathInArchive that unambiguously return the filename or the full path 2023-07-19 18:51:37 +02:00
Le Philousophe
29a02151d1 COMMON: Only apply alignment on supported platforms 2023-07-14 20:48:13 +02:00
Le Philousophe
5964c36ab4 COMMON: Don't use a pointer to T in UnalignedPtr
This lets the compiler think the pointer value could be aligned.
2023-07-14 11:10:28 +02:00
Le Philousophe
6a1abd09f1 COMMON: Make sure coroutine Process parameter is well aligned 2023-07-14 11:10:28 +02:00
Le Philousophe
f34bef6840 COMMON: Add normalization to Path class 2023-07-09 21:41:58 +02:00
Le Philousophe
7880a660cf COMMON: Allow to know in which archive file was found in SearchSet 2023-07-09 21:41:58 +02:00
Scott Percival
aa32a51c47 DIRECTOR: More fixes for partial filename matching
For Macintosh, it is possible to have filenames with a "/" in them.
Dumper Companion will punyencode this and any other non-ASCII characters
when extracting from a Macintosh filesystem. As such, when checking
components of a filename, we should attempt to match against the punydecoded
name, but always return the "real" name (i.e. the name of the file in
the local filesystem, possibly punyencoded).

In addition, it is possible for a movie A/B/C.DIR to go to a movie
"E/F.DIR", where the actual path is A/E/F.DIR. To make the partial matching
work, first we try removing each component from the start of the target
path, then retry all combinations again after removing a component from
the end of the source directory, etc.

Fixes several movie switches in The Seven Colors.
2023-07-08 22:01:00 +03:00
D G Turner
231d7ffaee COMMON: Fix Signed vs. Unsigned GCC Compiler Warnings in Punycode 2023-06-25 15:45:26 +01:00
Donovan Watteau
a46253647a COMMON: BUILD: Try detecting UBSan when not using configure
Newer versions of Clang can tell us when UBSan has been enabled, which
is useful to define SCUMM_NEED_ALIGNMENT when -fsanitize=alignment is
in use (https://reviews.llvm.org/D52386).

Can be useful to avoid some false positives about alignment when doing
a build with UBSan but without using the "configure" script which
already tries to detect this setting.

See earlier commit 8a73f5d496437f8211c67c1da4c6cc4b200c4970.
2023-06-21 12:56:58 +02:00
elasota
eda8c2698f COMMON: Fix incorrect StuffIt directory paths 2023-06-21 08:26:28 +03:00
elasota
b9175e1810 COMMON: Fix up comments 2023-06-19 21:59:24 +03:00
elasota
8cb45fe696 COMMON: Update comment to explain buggy normalization behavior more clearly 2023-06-19 21:59:24 +03:00
elasota
8ce2ffd68b COMMON: Move Gentee Installer from V-Cruise to Common 2023-06-19 21:59:24 +03:00
elasota
654f7fd8d0 COMMON: Add comments on usage 2023-06-19 08:45:32 +03:00
elasota
907252ecbd COMMON: Return correct path separator for InstallShieldV3 2023-06-19 08:45:32 +03:00
elasota
e53d2ec594 COMMON: Add "getPathSeparator" to Archive and return ":" for Mac archive formats 2023-06-19 08:45:32 +03:00
elasota
7be3c8f602 COMMON: Add "flattenTree" param to createStuffItArchive and preserve directory structure by default 2023-06-19 08:45:32 +03:00