Commit graph

78 commits

Author SHA1 Message Date
Vladimir Serbinenko
9874d200c8 COMMON: Fix logic error in macresman 2023-05-20 14:32:53 +02:00
Vladimir Serbinenko
088b14a83a COMMON: Add function to open data fork from macbinary stream 2023-05-10 22:44:04 +02:00
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
Vladimir Serbinenko
187304f730 COMMON: Reject all-zero macbinary header 2023-01-07 19:44:37 +03:00
Vladimir Serbinenko
2ca39a0745 COMMON: Support resource fork coming from OSX zip or FAT 2022-12-16 22:59:34 +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
382913b51d COMMON: Remove hasDataFork and getDataFork 2022-12-11 21:32:30 +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
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
elasota
78d26927a8 COMMON: Add functions to get Mac Finder metadata such as type/creator codes. 2022-11-29 00:25:50 +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
elasota
b3c70aa1ba COMMON: Add Macintosh Finder Info types and add parsing of it to StuffItArchive. 2022-11-20 14:20:30 +01:00
Scott Percival
095ae06405 COMMON: Refactor MacResManager::load* methods to accept a pointer
Previously the methods would pass by reference, then convert to a
pointer on success and take ownership. This isn't ideal, as a
reference suggests no transferral of ownership, and doesn't suggest
it needs to be a heap resource allocated by new.
2022-09-25 10:35:03 +02:00
Orgad Shaneh
2e441b12e6 COMMON: Fix compiler warning on Win64
Amends 7d4d135b99.
2022-08-12 17:06:21 +03:00
Eugene Sandulenko
7d4d135b99
COMMON: Add sanity checks to MacResManager::readMap() 2022-08-08 02:06:08 +02:00
Eugene Sandulenko
74c253bef8
COMMON: Some programs store AppleDouble files in *.rsrc. Check for that 2022-08-08 02:05:06 +02:00
Misty De Meo
b3df6c6f03 COMMON: macresman: handle macbinary with resource forks 2022-03-20 20:48:17 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko
63870b65fa
AD: Properly seek to the tail of file for md5 computation 2021-10-19 21:09:15 +03:00
Eugene Sandulenko
841254e6f1
AD: Fix seeking for tail md5 2021-10-19 13:05:22 +03:00
Eugene Sandulenko
91b91c0cba
COMMON: Fix bug in Mac resfork data size calculation. This invalidates many detection entries 2021-10-17 20:48:02 +03:00
Eugene Sandulenko
4eea8524f7
COMMON: Add possibility to compute md5 for tail of resfork data 2021-10-17 20:48:01 +03:00
Eugene Sandulenko
b72d6d89b9
COMMON: Proper check for MacBinary presence. This fixes false positives for QT movies 2021-08-10 19:33:27 +02:00
djsrv
ba28d7fde6 ALL: Change listMatchingMembers pattern to a Path
This handles any potential differences in directory separators passed to
the function, as with the other Archive functions.
2021-08-09 17:47:30 -04:00
djsrv
763d2813a0 COMMON: Replace Path's += with append/join 2021-08-07 10:44:37 +02:00
djsrv
909595176a COMMON: Use Path type in MacResManager functions 2021-08-07 10:44:37 +02:00
Bastien Bouclet
0f2c6cd9ea ENGINES: Change mac resource fork file detection to use the file cache
Common::MacResMan is now able to open files from a specified
Common::Archive. This is a bit hacky as dynamic_cast is used to break
the Archive encapsulation to retreive the underlying FSNode. It should
however be more correct than the previous code that assumed files were
at the root of the currently running game's path.

AdvancedDetector constructs a Common::Archive from its FileMap based
filesystem cache and uses it to detect the mac resource fork files.

This cuts the time it takes to run the detection code with all the
engines enabled as dynamic plugins on the 3DS to 30 s from 280 s.
2020-09-20 16:33:45 +02:00
Eugene Sandulenko
1bb73862a1 COMMON: Lightened another MacBinary check so ISOBuster files really work 2020-08-01 22:38:09 +02:00
Eugene Sandulenko
4221c38167 COMMON: Support MacBinary3 files produced by ISOBuster 2020-08-01 20:25:39 +02:00
Eugene Sandulenko
bcd1d3c688 COMMON: Add 'vers' resource parser to MacResMan 2020-07-08 11:42:59 +02:00
Eugene Sandulenko
be388e644a COMMON: Give direct access to Data fork in MacResMan 2020-07-07 22:31:13 +02:00
Eugene Sandulenko
7200acb791 COMMON: Clarify comment in MacResMan 2020-05-29 15:55:07 +02:00
Eugene Sandulenko
169e8f3dd5 COMMON: Remove redundant code 2020-04-27 18:34:23 +02:00
jepael
83d481f882 COMMON: Fix compiler warning 2020-02-07 21:58:31 +01:00
Eugene Sandulenko
008f4c6f8d COMMON: Added dumper method to MacResMan 2020-02-06 21:42:01 +01:00
Eugene Sandulenko
5375a2a048 COMMON: Add sanity check to MacResMan 2019-12-26 17:03:44 +01:00
D G Turner
2d90392ba5 COMMON: Fix GCC-9 Warning in MacResManager Class
This is another case of a warning from using memset to clear a non-trivial
data structure.

GCC-9 detects this with the default warning of -Wclass-memaccess.
2019-12-09 16:59:10 +00:00
Bastien Bouclet
955e18c648 COMMON: Use nullptr instead of NULL or 0 where appropriate 2018-05-10 08:35:46 +02:00
Johannes Schickel
b8fb9e6a51 COMMON: Cleanup: Use StringArray instead of custom type. 2016-03-01 19:18:23 +01:00
Johannes Schickel
91b5c5a413 COMMON: Add a method to list files to MacResManager. 2016-03-01 19:16:10 +01:00
Johannes Schickel
854e22b38b COMMON: Make GPL headers consistent in themselves. 2014-02-18 02:39:33 +01:00
Matthew Hoops
1f6894ab25 COMMON: Cleanup the MacResManager a bit 2013-07-11 23:45:19 -04:00
Matthew Hoops
6b6e6c92c7 COMMON: Fix potential uninitialized memory usage 2012-12-13 00:39:48 -05:00
Matthew Hoops
5dfa4333d1 COMMON: Hopefully fix AppleDouble files with directories 2012-04-07 21:19:11 -04:00
Matthew Hoops
1e734ab48c COMMON: Add an exists function to MacResManager 2012-03-08 08:02:06 -05:00
Torbjörn Andersson
a010038492 JANITORIAL: Remove unnecessary semicolons 2011-10-29 11:23:44 +02:00
Matthew Hoops
711d0ff037 COMMON: Ensure numTypes is set to 0 on close 2011-10-07 11:32:57 -04:00