Commit Graph
60 Commits
Author SHA1 Message Date
Cameron Cawley 5b1b14ad80 COMMON: Mark more symbols as const 2023-12-26 20:23:59 +01:00
Le Philousophe e0fd69bda0 COMMON: Make INIFile use Path 2023-12-24 13:19:25 +01:00
Le Philousophe 93a8f7f4d6 COMMON: Move Archive API to Path 2023-12-24 13:19:25 +01:00
sluicebox 9b59bea53b COMMON: Add INIFile::requireKeyValueDelimiter() 2023-12-14 16:45:32 +01:00
Eugene Sandulenko f8a627c6c9 Revert "COMMON: Add a mode to the INI parser to ignore garbage in some files"
This reverts commit a2c3ea5701.
2023-12-14 16:43:56 +01:00
Eugene Sandulenko 61c734fcb4 Revert "COMMON: Fix strictParser interpretation to follow the intent"
This reverts commit 75e96d7070.
2023-12-14 16:43:41 +01:00
elasota 363330462b COMMON: Fix negation of unsigned integer warning 2023-12-11 23:07:20 +02:00
Eugene Sandulenko 75e96d7070 COMMON: Fix strictParser interpretation to follow the intent 2023-12-11 15:05:45 +01:00
never a2c3ea5701 COMMON: Add a mode to the INI parser to ignore garbage in some files 2023-12-11 14:28:40 +01:00
Misty De Meo 6b8d8c3f4e COMMON: cue - fix implicit indices
If index 0 isn't specified, we need to be able to distinguish between
"this index has a value of 0" and "this index is missing". We now set
missing indices to -1 to help distinguish, and guard against using
a non-existent index in cases where it's not there.

Also fixes an off-by-one error in getTrackAtFrame exposed by this fix.
2023-12-03 20:58:36 +01:00
Misty De Meo e8e5263bb1 COMMON: avoid inserting null tracks 2023-11-30 01:41:10 +01:00
Misty De Meo 1492866d59 COMMON: reorient cue around tracks 2023-11-30 01:41:10 +01:00
Matthew Duggan e3f4117535 COMMON: Avoid Quicktime parsing crash on early EOF
In parseStream, atom.size is initailized to uint32 max.  If the loop in
readDefault then never executes because the stream has hit EOF, that size is
passed as-is to seek.  This can cause a crash eg in SeekableSubReadStream
because of an int overflow.

Change readDefault to return an error in a few places if we have hit eof before
a valid atom has been read.  It's ok not to do the seek in this case.
2023-11-18 21:03:02 +01:00
Matthew Jimenez 5f75054fde COMMON: Skip possible UTF-8 BOM when reading INI files 2023-11-18 20:20:56 +01:00
Eugene Sandulenko 6683a75954 COMMON: FORMATS: Pass image extensions to the user callbacks in Markdown 2023-10-31 01:58:55 +01:00
Eugene Sandulenko 5a30cb60aa COMMON: FORMATS: Extend Markdown images with {} attributes 2023-10-31 01:57:57 +01:00
Kaloyan Chehlarski fc0988fdfc COMMON: Allow IFF containers to have custom header IDs
The IFF format used in the Nancy Drew engine uses a
non-standard id that reads DATA instead of FORM, though
the rest of the format is identical. This commit allows such
nonstandard ids to be used without needing to massage the
data first.
2023-10-26 19:46:32 +03:00
D G Turner 781fabac28 COMMON: Fix Signed vs. Unsigned GCC Compiler Warning in Cue Sheet Parser
This should now be fixed irrespective of whether size_t is signed or not.
2023-10-15 20:37:16 +01:00
Eugene Sandulenko dea1412b3b COMMON: Fix warnings 2023-10-12 23:54:48 +02:00
Eugene Sandulenko 587d770786 COMMON: Shortened constant names in CueSheet class 2023-10-12 23:54:48 +02:00
Eugene Sandulenko 3e32fd3776 COMMON: Added another constructor for CueSheet 2023-10-12 23:54:48 +02:00
Eugene Sandulenko 12cf6c9988 COMMON: Improve debug output in CueSheet 2023-10-12 23:54:48 +02:00
Eugene Sandulenko 462870c64d COMMON: Lookup track sector sizes for CueSheet 2023-10-12 23:54:48 +02:00
Eugene Sandulenko c5a71570f0 COMMON: Added parsing of catalog and Cue track flags 2023-10-12 23:54:48 +02:00
Eugene Sandulenko 824d28ff5e COMMON: Parse pregap for tracks in cue sheet 2023-10-12 23:54:48 +02:00
Eugene Sandulenko 4bd9e71f59 COMMON: Parse track performer in cue sheets 2023-10-12 23:54:48 +02:00
Eugene Sandulenko 41d7ca4c19 COMMON: Skip comments in CueSheets 2023-10-12 23:54:48 +02:00
Eugene Sandulenko fef7a4b72d COMMON: Added track parsing to the CueSheet 2023-10-12 23:54:48 +02:00
Eugene Sandulenko 7c2514fe1d COMMON: Added parsing of cue sheet metadata to the CueSheet 2023-10-12 23:54:48 +02:00
Eugene Sandulenko 9f3b4b6128 COMMON: Parsing FILE token in CueSheets 2023-10-12 23:54:48 +02:00
Eugene Sandulenko 5284c8d7a0 COMMON: Addeed initial stub for CueSheet class 2023-10-12 23:54:48 +02:00
Eugene Sandulenko c20290afeb COMMON: Rename class variables in SDMarkdown 2023-09-17 00:56:28 +02:00
Eugene Sandulenko e237634777 COMMON: Turn sd_markdown into a class 2023-09-17 00:56:28 +02:00
Eugene Sandulenko ce8a0456db COMMON: Reduce Common:: namespace pollution by Markdown 2023-09-17 00:56:28 +02:00
Eugene Sandulenko fe0fbe5cff COMMON: Make Markdown return Common::String 2023-09-17 00:56:28 +02:00
Eugene Sandulenko eac4a62389 COMMON: Remove unused functions in Markdown 2023-09-17 00:56:28 +02:00
Eugene Sandulenko f12386adea COMMON: FORMATS: Catch list start in Markdown 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 85b2b3ce1d COMMON: Fix function prototype 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 3c6284949c COMMON: Added initial code for Markdown parsing
Taken from https://github.com/vmg/sundown
2023-09-17 00:56:28 +02:00
elasota 9892bedc61 COMMON: Add createReadStreamForAltStream to open Mac resource fork and metadata streams 2023-08-30 00:31:00 +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
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
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
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
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
Harishankar Kumar 7d8dcebeb7 COMMON: Fix memory leak when invalid PE executable is loaded
In function `PEResources::loadFromEXE`, there were memory leaks
because of not properly handling with streams, and thus when the
loaded movie was bad/non-exe file, the memory was not freed.

This was undetected in normal exe loading because there the streams
were being assigned and closed properly.
2023-06-14 13:57:50 +02:00
elasota e219e4e04e COMMON: Strip whitespace before checking if an INI line is a comment.
Fixes some versions of Reah failing to parse subtitle data.
2023-05-11 00:22:14 +03:00