Commit Graph

4189 Commits

Author SHA1 Message Date
Eugene Sandulenko
7f426af872
COMMON: Fix warning 2023-01-10 22:44:06 +01:00
Vladimir Serbinenko
94944b8c8b COMMON: Downgrade AppleDouble and actual resource forks in macresman
They are created silently by various versions of OSX and may contain
garbage describing plain macbinary rather than historically dumped data from
disk.
2023-01-10 14:45:36 +01:00
Eugene Sandulenko
5d08b1a0f3
COMMON: Add flag to match whole path for Archive::listMatchingMembers() 2023-01-08 01:15:52 +01:00
Eugene Sandulenko
f262e71eb4
JANITORIAL: Remove redundant namespace specs 2023-01-08 01:15:52 +01:00
Eugene Sandulenko
82e21f3c3c
COMMON: Probe files for existnce, so there is less noise 2023-01-08 01:15:52 +01:00
Eugene Sandulenko
e41559cfa5
GUI: Moved icons pack set generation to common/ 2023-01-08 01:15:51 +01:00
Vladimir Serbinenko
187304f730 COMMON: Reject all-zero macbinary header 2023-01-07 19:44:37 +03:00
Martin Gerhardy
f2c9137979 COMMON: removed foreach.h
now that we are using c++11 we don't need this wrapper anymore
2023-01-07 02:40:44 +02:00
Eugene Sandulenko
63f39ca792
COMMON: Rename base-str.* to str-base.* for consistency and file grouping 2023-01-05 14:21:23 +01:00
Eugene Sandulenko
0fb25d7734
COMMON: Allow specify random seed via scummvm.ini 2023-01-02 16:12:44 +01:00
Eugene Sandulenko
41da1de090
COMMON: Sync RNG seed initialising between common and event recorder 2023-01-02 16:12:44 +01:00
neuromancer
3cd8f444b5 COMMON: added Commodore 64 rendering mode 2023-01-02 08:09:37 -03:00
Vladimir Serbinenko
0adf22278b COMMON: Uplift SafeMutexedSeekableSubReadStream to common 2022-12-31 20:47:10 +01:00
Matthew Duggan
c53b42311d COMMON: Fix path split+join combinations, add tests for same
This resolves multiple scenarios where a path ends up with a trailing
separator.
2022-12-31 17:57:07 +09:00
neuromancer
90d97edd63 COMMON: added a render mode for Amstrad CPC 2022-12-29 10:52:57 -03:00
Vladimir Serbinenko
af2643be44 COMMON: Add a check in StuffIt parser to check for crash condition 2022-12-28 13:02:22 +01:00
Vladimir Serbinenko
324b22682e COMMON: Respect StuffIt archive size
This allows handling of archives with trailer like one used in
Private eye installer
2022-12-28 13:02:22 +01:00
neuromancer
6829865c8f COMMON: renamed Amstrad CPC platform data to be more precise 2022-12-26 11:48:17 -03:00
neuromancer
5ee734b844 COMMON: added Amstrad CPC as a platform 2022-12-26 09:12:26 -03:00
elasota
e280186a8c ALL: VS warning cleanup 2022-12-25 16:31:57 +01:00
Donovan Watteau
49585ad152 COMMON: BUILD: Use 'long' for int32 in MSVC 32-bit builds
The NDS and AmigaOS ports have frequent buildbot issues, because they
need to use 'long' for int32, for their own reasons. The buildbot is
run *after* things are merged into the main branch, so we'd like to
catch the frequent int/int32 build issues as an earlier development
stage (such as by the automated Github Actions).

MSVC 32-bit builds look like a good candidate for this, since its
'long' is also a 32-bit value on Win32, this platform is tested by
Github Actions right from the PR stage, and there are more developers
doing frequent local build tests there.

Not applying this change to Mingw builds yet, since GCC is less
permissive  about this trick (i.e. -Wformat becomes quite noisy), and
the Mingw builds are used for releases, so let's be safe for now.
2022-12-25 16:13:29 +01:00
elasota
e193f71ac0 COMMON: Fix --disable-lua not working. 2022-12-25 15:55:58 +01:00
neuromancer
d4129d5aa2 COMMON: corrected kRenderZX to avoid duplicates in RenderMode 2022-12-24 13:18:53 -03:00
neuromancer
6841227241 COMMON: added zx spectrum render mode 2022-12-24 13:18:53 -03:00
grisenti
3c0dfdf49f
COMMON: fix move assignment operator in ScopedPtr 2022-12-23 14:03:30 +01:00
Vladimir Serbinenko
395aa10644 COMMON: Add missing escaping in Common::Path. 2022-12-20 10:04:55 +01:00
Cameron Cawley
4002c7bdde
COMMON: Add a version of Common::Array::resize with a fill value 2022-12-19 14:33:07 +02:00
Cameron Cawley
a55361b65d COMMON: Add Common::Array::swap() 2022-12-18 23:36:09 +02:00
Vladimir Serbinenko
2ca39a0745 COMMON: Support resource fork coming from OSX zip or FAT 2022-12-16 22:59:34 +01:00
Vladimir Serbinenko
0979c692de COMMON: Add new method joinComponents 2022-12-16 22:59:34 +01:00
Eugene Sandulenko
8bf6aec613 COMMON: LUA: Replace sprintf -> snprintf 2022-12-16 10:54:49 +01:00
Vladimir Serbinenko
a690a034cf COMMON: Remove reliance that \x1f is never part of filename
So far we never encountered such a case but mac disks are notorious for
having non-printable characters in names
2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
673e5e025b COMMON: Remove rawString member for Common::Path 2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
7ded5c2de0 COMMON: Move DIR_SEPARATOR into path.cpp 2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
4a2e69f990 COMMON: conflate : and / in mac names.
When using mounted images on OSX or with fusehfs : and / are swapped.
When using dumper-companion it encodes / in punycode and preserves it.
2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
78b6e60057 COMMON: Change common/fs to use Common::Path as key 2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
ab517cc577 COMMON: Add case-insensitive comparator and hash for Common::Path 2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
43d7259ff9 COMMON: Add matchPattern method for Common::Path 2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
ce55430f1c COMMON: Don't access DIR_SEPARATOR in macresman
DIR_SEPARATOR is an implementation detail of Common::Path, it should not
be accessed outside of it. Use public functions that do the same instead
2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
d02a25230d COMMON: Add appendComponent to Common::Path for convenience 2022-12-14 05:08:46 +01:00
Vladimir Serbinenko
af7d9cb850 COMMON: Move punycode_*codepath to path.cpp
This allows to reduce access to DIR_SEPARATOR from outside of Common::Path
2022-12-14 05:08:46 +01:00
Cameron Cawley
fd123d6679 COMMON: Split compression and formats into separate modules 2022-12-11 22:33:23 +01:00
Cameron Cawley
28d7b361ea COMMON: Move more file format code into common/formats 2022-12-11 22:33:23 +01:00
Cameron Cawley
0581301b24 COMMON: Move huffman.h back out of the compression directory 2022-12-11 22:33:23 +01:00
Vladimir Serbinenko
606a7a3e79 COMMON: Make MemcachingCaseInsensitiveArchive configurably to use weak pointers
This allows to keep memory footprint low on systems that are low on memory
2022-12-11 21:33:59 +01:00
Vladimir Serbinenko
382913b51d COMMON: Remove hasDataFork and getDataFork 2022-12-11 21:32:30 +01:00
Vladimir Serbinenko
4b7baa4159 COMMON: Switch quicktime to openFileOrDataFork 2022-12-11 21:32:30 +01:00
Vladimir Serbinenko
602eeec387 COMMON: Fix handling of / that caused The 7 colors to fail
Implicit conversion of string to path caused splitting by / instead of
intended by DIR_SEPARATOR
2022-12-09 01:31:11 +01:00
BLooperZ
3e12c9ddc2 COMPOSER: Load book config from MacBinary 2022-12-08 19:09:38 +01:00
Vladimir Serbinenko
d9888b9ac6 COMMON: Support stuffit-13 algorithm 2022-12-08 00:02:39 +01:00
Vladimir Serbinenko
571a807257 COMMON: Switch stuffit to MemcachingCaseInsensitiveArchive 2022-12-08 00:02:39 +01:00
elasota
f1bc2b187c COMMON: Optimize some array ops by hoisting storage pointer to a local so the compiler doesn't have to reload it every iteration. 2022-12-06 23:43:27 +01:00
Vladimir Serbinenko
279f4ac5b8 COMMON: Add ITE Amiga powerpack support 2022-12-05 08:15:33 +02:00
Vladimir Serbinenko
2db745b62b COMMON: Add in-memory decompressor for powerpack 2022-12-05 08:15:33 +02:00
Vladimir Serbinenko
ef7a3059e1 COMMON: Uplift powerpacker as it's used by Amiga ITE as well 2022-12-05 08:15:33 +02:00
elasota
cc11b531e3 JANITORIAL: Clean up all non-engine Visual Studio warnings. 2022-12-04 00:08:48 +01:00
Simon Delamarre
37965283bf
COMMON: add support for "name table" resource in NE executables
A "resource ID -> name" mapping found in some NE executables, stored as a resource.

Not described by any documentation I could find, but the corresponding #define can be encountered in some old header files.

Mentioned by this blog post https://www.toptensoftware.com/blog/win3mu-5/ (section "The Mysterious Resource Type #15").
2022-12-02 11:44:31 +01:00
Eugene Sandulenko
8f8d522913
COMMON: Move achievements.* to engines/ 2022-12-02 00:12:22 +01:00
Eugene Sandulenko
fb7095f5a4
COMMON: Move all compression-related files to a separate directory 2022-12-01 11:53:02 +01:00
Vladimir Serbinenko
2b9244c2de COMMON: Switch unzip to MemcachingCaseInsensitiveArchive 2022-12-01 01:52:46 +01:00
Vladimir Serbinenko
bb792d2c3a COMMON: Switch unarj to MemcachingCaseInsensitiveArchive 2022-12-01 01:52:46 +01:00
Vladimir Serbinenko
acc709730f COMMON: Switch clickteam to MemcachingCaseInsensitiveArchive. 2022-12-01 01:52:46 +01:00
Vladimir Serbinenko
b2def0293c COMMON: Add MemcachingCaseInsensitiveArchive for caching archive contents
This allows to share code for caching decompressed contents.
2022-12-01 01:52:46 +01:00
Vladimir Serbinenko
81040b5d20 COMMON: Make memstream support SharedPtr-backed array
This allows to safely implement archive contents caches.

The change to lilliput is needed to allow to keep move-constructot
semantics of ScriptStream which would otherwise disappear because
DisposablePtr is non-copyable
2022-12-01 01:52:46 +01:00
Vladimir Serbinenko
1d15e2a66e COMMON: Fix DisposablePtr move constructor in presence of a deleter 2022-12-01 01:52:46 +01:00
elasota
c52eaf92fc COMMON: Move Installer VISE loader from mTropolis engine to Common. 2022-11-30 23:17:47 +02:00
Vladimir Serbinenko
5220c16e40 COMMON: Fix delete[]/new[] mismatch in clickteam 2022-11-30 12:36:23 +01:00
Eugene Sandulenko
b114b95643
JANITORIAL: Fix code formatting 2022-11-30 00:35:59 +01:00
Vladimir Serbinenko
aae70a0b11 COMMON: Fix new[]-free mismatch in unzip.cpp 2022-11-30 00:17:51 +01:00
Vladimir Serbinenko
b8f3bc2732 COMMON: In getDataFork use SafeSeekableSubReadStream
It can be opened several times so re-seeking makes sense
2022-11-29 18:35:20 +01:00
Vladimir Serbinenko
3ed46d3484 COMMON: In openFileOrDataFork ensure to seek to the beginning 2022-11-29 18:35:12 +01:00
Vladimir Serbinenko
b66d3ec688 COMMON: Implement ConcatReadStream 2022-11-29 04:30:36 +01:00
Vladimir Serbinenko
c5373134d2 COMMON: Uplift rnc decoder from toon to common
Toon has a RNC implementation with 2 differences from the one taken from SKY:

1. Protection against overread. Add it to common version and adjust callers
   in sky.
2. Lack of key parameter for obfuscation. We ignore it anyway and don't
   support obfuscation, so delete it in common version as well
2022-11-29 04:30:36 +01:00
Vladimir Serbinenko
074888e6b8 COMMON: Move RNC decoder from sky to common
RNC is a common packing algorithm used also in Toonstruck and installer of
Dreamweb floppy.
2022-11-29 04:30:36 +01:00
Donovan Watteau
8140fdfbcc COMMON: Fix MSVC C4309 enum sign warning 2022-11-29 01:37:55 +01:00
Vladimir Serbinenko
357249fb5a COMMON: Split slow and fast CRC implementation
They have almost nothing in common. And we probably want to kill slow
implementation anyway now that we have tests
2022-11-29 01:05:31 +01:00
Vladimir Serbinenko
05f1a0df51 COMMON: Remove the need for most reflecting when initing reflected table
Instead reflect the polynomial and change the shifts. Also removes the
need for explicit init.

This makes our crc more similar to its standard implementation
2022-11-29 01:05:31 +01:00
Vladimir Serbinenko
f06348708c COMMON: Optimize crcFast and related functions.
Currently we reflect every byte when working on reflected CRC's. Instead
follow the standard approach of reversing the table and couple of shifts
which is faster
2022-11-29 01:05:31 +01:00
Vladimir Serbinenko
8f6beba38f COMMON: Make most CRC functions const as they don't modify the object. 2022-11-29 01:05:31 +01:00
Vladimir Serbinenko
ec9bb100e1 COMMON: Switch unzip from zlib to gzio
Tested by loading scummremastered.zip
2022-11-29 01:05:31 +01:00
Vladimir Serbinenko
c60281b3d0 COMMON: Fix crc calculation with reflected messages 2022-11-29 01:05:31 +01:00
Vladimir Serbinenko
b63160a06e COMMON: Remove unused functions in unzip 2022-11-29 01:05:31 +01:00
elasota
78d26927a8 COMMON: Add functions to get Mac Finder metadata such as type/creator codes. 2022-11-29 00:25:50 +01:00
Cameron Cawley
c4526bf158 COMMON: Mark SeekableSubReadStreamEndian as deprecated 2022-11-29 00:06:49 +01:00
Cameron Cawley
309088dfb2 COMMON: Add WARN_DEPRECATED 2022-11-29 00:06:49 +01:00
Cameron Cawley
b67de44eb8 COMMON: Add SeekableReadStreamEndianWrapper 2022-11-29 00:06:49 +01:00
Vladimir Serbinenko
93efb9b8c5 COMMON: Allow DisposablePtr to be backed by SharedPtr
Currently DisposablePtr allows to transparently switch between raw
pointer and ScopedPtr semantics. Add a possibility to have SharedPtr
semantics as well.
2022-11-28 18:41:30 +01:00
Vladimir Serbinenko
68452ef2e7 COMMON: Kill disownPtr and getDispose from DisposablePtr
They unnecessarily expose internal details

Their only user has been eliminated in the previous commit
2022-11-28 18:41:30 +01:00
Vladimir Serbinenko
02f1759f73 COMMON: Add functions to dynamically cast DisposablePtr 2022-11-28 18:41:30 +01:00
Vladimir Serbinenko
8d722dc3c1 COMMON: Add DisposablePtr constructor with move semantics
This allows easy move from one DisposablePtr to another
2022-11-28 18:41:30 +01:00
Vladimir Serbinenko
ba10a93d99 COMMON: Support multivolume arj archives 2022-11-28 00:25:05 +01:00
Sergio
d136a5f54c COMMON: fix String::rfind for default value of pos (max value of size_t) 2022-11-26 23:13:42 +02:00
Eugene Sandulenko
9fda7aa12a
COMMON: Fix warning 2022-11-24 00:19:27 +01:00
Eugene Sandulenko
0a4580a34c
COMMON: Add missing override keyword 2022-11-24 00:18:37 +01:00
Donovan Watteau
8caa8db4ba COMMON: Drop register from common/gzio.cpp
Deprecated in C++11, incompatible with C++17.
2022-11-23 14:13:48 +01:00
Vladimir Serbinenko
c92ec629db COMMON: Convenience function for retrieving data fork 2022-11-20 17:21:44 +01:00
Vladimir Serbinenko
98f178c58f DETECTOR: Allow detecting with MacBinary with no resource fork 2022-11-20 17:21:44 +01:00
Cameron Cawley
e04000d4b0 COMMON: Move FFT, DCT, MDCT, RDFT, SineTable, CosineTable and getSineWindow into Math 2022-11-20 14:32:05 +01:00
Cameron Cawley
3441c7230d COMMON: Fix handling escaped percents in Common::U32String::format 2022-11-20 14:23:30 +01:00
Cameron Cawley
29024cded7 COMMON: Fix handling negative numbers in Common::U32String::format 2022-11-20 14:23:30 +01:00