Commit Graph
360 Commits
Author SHA1 Message Date
Colin Snover 0826501ef6 SCI32: Fix audio, wave, VMD, Duck, CLUT, TGA, ZZZ, Etc patches
Specifically, audio patches are used in at least PQ:SWAT
(40103.AUD), Lighthouse (9103.AUD), and the GK2 demo (300.AUD).
2017-03-30 19:46:27 -05:00
Colin Snover d0e9724ae1 SCI32: Support reading sound effects from normal resource bundles 2017-03-30 19:46:27 -05:00
Colin Snover a233696212 SCI: Update formatting strings to match updated Span API 2017-03-30 14:23:41 -05:00
Colin Snover 31daa956d6 SCI: Implement bounds-checked reads of game resources 2017-03-27 19:42:31 -05:00
Willem Jan Palenstijn 905feaa8c2 SCI: Fix unaligned read 2017-02-18 15:07:02 +01:00
Colin Snover 70cfdb6a1f SCI32: Ignore .OLD extension when searching Audio36 patches
KQ7 2.00b includes a SIERRINF.OLD file which should not be matched.
2017-01-09 19:34:54 -06:00
Colin Snover 472a43695a SCI: Remove unnecessary indirection in Resource::loadPatch 2016-12-03 12:21:55 -06:00
Colin Snover fe8fbf7007 SCI32: Fix reading view, pic, and palette patches
Unlike SCI16 games, the location of data within SCI32 patch files
is calculated on a per-resource-type basis by the game engine,
instead of by reading byte 1 of the patch file.
2016-11-20 16:16:17 -06:00
Colin Snover ee4b172d54 SCI: Remove old SCI32 hires detection heuristic 2016-11-02 15:43:07 -05:00
Colin Snover 8cb994b801 SCI32: Increase resource manager LRU cache size
This fixes high CPU utilisation playing Stooge Fighter 3 in SQ6.
2016-09-29 19:39:16 -05:00
Colin Snover bf7adaa58f SCI32: Fix incorrect warnings about unlocking type 140
This type in SSCI corresponds to Wave resources, but since ScummVM
does not differentiate between Wave and Audio resources, just say
it's an Audio resource type, not an Invalid resource type.
2016-09-29 19:39:16 -05:00
Filippos Karapetis b620b92ee7 SCI32: Fix fallback detector for SCI32 games again
A regression from c4250c05d0
2016-08-22 18:50:36 +03:00
Colin Snover b106ba1102 SCI: Avoid attempts to use exe/txt/dll files as patches
Fixes some false warnings when games try to read in non-patch
files with names that start with A/B/S/T.
2016-08-19 15:23:10 -05:00
Colin Snover c4250c05d0 SCI32: Enable multi-disc audio resources
Phant1, PQ:SWAT, GK2, and Phant2 all have different audio maps
and audio volumes on each CD. In order to make this work within
ScummVM, where CDs are never swapped, each RESOURCE.AUD for these
games must be renamed to RESAUD.00x and each RESOURCE.SFX renamed
to RESSFX.00x.
2016-08-19 15:23:10 -05:00
Colin Snover 0a4a2567a3 SCI32: Partially implement kCD 2016-08-19 15:23:10 -05:00
Colin Snover a6370aa688 SCI: Fix memory leaks in ResourceManager 2016-07-24 11:36:48 -05:00
Colin Snover a3055d3f49 SCI: Add an explanation about LRU removals when fetching resources
Several times I have run into this code and had to take a minute
to remind myself that the call to remove from the LRU on find is
not wrong, so it seemed to deserve a comment.
2016-06-21 08:17:28 -05:00
Colin Snover 46551fd4b5 SCI32: Rewrite digital audio engine
This provides a complete implementation of kDoAudio through
SCI2.1mid, plus partial implementation of SCI3 features.

Digital audio calls shunted through kDoSound have also been
updated to go through the SCI32 audio mixer, though these shunts
are a bit hacky because the ScummVM implementation of kDoSound
does not currently match how SSCI kDoSound is designed.

It is probably possible in the future to just replace the SCI1.1
audio code (audio.cpp) with the new SCI32 code, since the major
differences seem to be that (1) SCI1.1 only supported one digital
audio playback channel (this is configurable already), (2) it
had extra commands for CD audio playback and queued sample
playback.
2016-06-20 21:02:21 -05:00
Colin Snover ffcab2fa5d SCI: Fix memory leaks in resource patcher 2016-06-14 20:58:53 -05:00
Johannes Schickel b6a8907edf SCI: Cleanup: Use Common::StringArray instead of custom type. 2016-03-01 19:18:36 +01:00
Johannes Schickel fd5799aa19 SCI: Fix Macintosh game sources listing. 2016-03-01 19:16:10 +01:00
Johannes Schickel 1ae2e0594d SCI: Use MacResManager when checking for Mac resource forks. 2016-03-01 19:16:10 +01:00
Filippos Karapetis cdbd7c8add SCI: Use uint32 instead of unsigned int 2016-03-01 01:12:58 +02:00
Filippos Karapetis 9cb7caeb24 SCI: Fix a regression in the fallback detector. Some cleanup
Removed the superfluous initForDetection() function, which was not
updated in commit 2f17ba2b0a and
caused the fallback detector to crash because of uninitialized
variables
2016-02-20 16:56:08 +02:00
Colin Snover 2f17ba2b0a SCI: Increase LRU resource cache for SCI32 games
A single picture in SCI32 is often larger than the 256KiB limit,
meaning that the cache is useless for these games -- which is bad,
because the renderer works directly off raw resource data so it
must be decompressed and in-cache for rendering performance to be
acceptable.
2016-02-18 13:18:03 -06:00
Colin Snover bb82350630 SCI: Fix broken LRU debugging 2016-02-18 13:18:02 -06:00
Martin Kiewitz eaf6e5d4f8 SCI: Fix fallback detector crashing on BE regress.
Regression from af3fec8c26
Code resulted in a crash on BE platforms
2016-02-12 20:30:43 +01:00
Martin Kiewitz 63b66b23aa SCI32: version detection - don't remove const
don't remove const during cast
2015-12-29 02:35:07 +01:00
Martin Kiewitz 0dd760724e SCI32: split up SCI2.1 into EARLY/MIDDLE/LATE
- Detection works via signatures (couldn't find a better way)
- new kString subcalls were introduced SCI2.1 LATE
- kString now has signatures and is split via subcall table
- kString fix, so that KQ7 doesn't crash, when starting a chapter
- Sci2StringFunctionType removed, because no longer needed
2015-12-29 01:44:11 +01:00
Martin Kiewitz 28967b617f SCI: properly reversed color matching thanks wjp 2014-10-28 22:37:57 +01:00
Filippos Karapetis 4736c490e1 SCI: Separate the rest of the detection-only functions
This should fix bug #6717 - "SCI fallback detection assert failure"
2014-10-18 16:03:49 +03:00
Filippos Karapetis fe3ed8ded2 SCI: Rename the version of addAppropriateSources() used in detection 2014-10-18 16:03:49 +03:00
Johannes Schickel 8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Martin Kiewitz f7d13415ee SCI: Remove LSL1 Spanish hack (to SCI1 MIDDLE)
fixes transitions not working properly (and
possibly other stuff), hack was added because
of bug #5219, strangely none of it occurs anymore
2014-01-30 21:11:15 +01:00
Filippos Karapetis fa2ea4fc61 SCI: Add handling for the RAVE resource type, found in KQ6CD
This contains the sync data in the Windows version of KQ6CD.
Note that currently the sync36 resource is 2 bytes bigger
(it contains 2 bytes from the RAVE resource). Some test code
has also been added to dump the RAVE sync resources
2013-12-10 01:41:15 +02:00
Willem Jan Palenstijn 9694cbbaaf SCI: Fix resource type range checks 2013-04-20 16:17:49 +02:00
Willem Jan Palenstijn e89c8c1923 SCI: Remove useless delete 2013-04-17 23:43:02 +02:00
Filippos Karapetis 2b50824133 SCI: Add setter/getter methods to reg_t's
No functionality change has been made with this commit. This avoids
setting and getting the reg_t members directly, and is the basis of any
future work on large SCI3 scripts (larger than 64KB)
2012-06-18 05:24:06 +03:00
Filippos Karapetis c64a69c363 SCI: Resolve some resource related FIXMEs
These were introduced in 4f6d42d.
The odd comment dates back to FreeSCI, as far as our history goes, and
seems to be a leftover from an old refactoring during FreeSCI's history
2012-05-15 03:05:38 +03:00
Willem Jan Palenstijn 4f6d42d77b SCI: Add a few FIXMEs 2012-05-13 16:23:15 +02:00
Matthew Hoops 30e7a0f001 SCI: Fix SCI1.1+ Mac games with resource fork container names 2012-03-08 08:02:58 -05:00
Max Horn 4f8665fc83 COMMON: Move isFoo functions to namespace Common, add doxygen comments 2012-02-20 16:18:27 +01:00
Max Horn 658080deed ALL: Avoid using is* macros from ctype.h
On some systems, passing signed chars to macros like isspace() etc. lead
to a runtime error. Hence, mark these macros as forbidden by default,
and introduce otherwise equivalent alternatives for them.
2012-02-15 16:51:37 +01:00
Willem Jan Palenstijn 56fb56936e SCI: Clean up some memory management and loops 2012-01-15 18:25:00 +01:00
Filippos Karapetis 780b2eff16 SCI: Plug a leak in ResourceManager::detectSciVersion()
Many thanks to digitall for finding this one
2012-01-15 18:34:41 +02:00
Filippos Karapetis c4b2cd057a SCI: Fixed speech in PQ4 CD 2011-10-29 18:32:50 +03:00
Filippos Karapetis 935eaa175b SCI: Move the palette merging checking code inside the GfxPalette class 2011-10-19 23:52:51 +03:00
Filippos Karapetis b956b24149 SCI: Added a heuristic to distinguish Mac SCI1.1 from SCI2.1 versions
This removes the hack that checks for the existence of resource.cfg
2011-10-15 01:00:58 +03:00
Filippos Karapetis d8aaf40090 SCI: Fixed bug #3404466 - "ScummVM crashes when trying to add non-SCI resources file" 2011-09-10 13:47:02 +03:00
Johannes Schickel 5443ef943f SCI: Made some static data const. 2011-09-08 00:35:12 +02:00