Commit graph

344 commits

Author SHA1 Message Date
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
Filippos Karapetis
c9873dae43 SCI: Fixed bug #3366295 - "SCI: User-translated files are ignored"
Thanks to tinekefrineke and tdhs for pinpointing the actual problem in the
resource manager
2011-08-26 01:56:50 +03:00
Littleboy
b694a78f62 ANALYSIS: Add static casts to is* functions
This fixes a potential problem with passing char values that would be sign-extended and yield unexpected results.
See http://msdn.microsoft.com/en-us/library/ms245348.aspx
2011-06-23 08:52:52 -04:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
md5
d28344bb55 SCI: Removed unused variables
Thanks to LordHoto and the trusty -Wunused-but-set-variable option :)
2011-04-27 13:13:35 +03:00
Max Horn
0ce2ca4e00 COMMON: Replace MKID_BE by MKTAG
MKID_BE relied on unspecified behavior of the C++ compiler,
and as such was always a bit unsafe. The new MKTAG macro
is slightly less elegant, but does no longer depend on the
behavior of the compiler.
Inspired by FFmpeg, which has an almost identical macro.
2011-04-12 16:53:15 +02:00
md5
9e1245c420 SCI: Fixed version and scene transitions for SCI1 Mac games 2011-03-13 23:50:40 +02:00
md5
4ddc66d68e SCI: Initial handling of the views in Longbow Amiga. Still not right 2011-03-07 13:23:52 +02:00
md5
dbd3f440d2 SCI: Added some support code for Longbow Amiga 2011-03-05 18:47:13 +02:00
md5
ef939772b3 SCI: Added support for 16/32 color view and picture patches
16 color patches (*.p16 and *.v16) are used in 16 color EGA SCI1 games
32 color patches (*.p32 and *.v32) are used in 32 color Amiga SCI1 games
Removed a workaround for SCI1 EGA (bug #3044500), as that bug has been
fixed already in the view patch. Thanks to waltervn for observing this.
2011-03-04 17:16:54 +02:00
md5
6b41673fab SCI: Amiga SCI1 middle games are actually SCI1 late
This fixes a lot of glitches, caused by the differences between the two
versions
2011-03-04 14:27:25 +02:00
md5
72f65b3946 SCI: Renamed SCI_VERSION_1_EGA to SCI_VERSION_1_EGA_ONLY
This renaming allows us to better distinguish that this version is for games
that only had an EGA version, and avoid confusion with newer SCI1 game releases
with EGA graphics (e.g. KQ5 EGA). The only game with this SCI version is QFG2,
a SCI1 EGA game with a parser. Also, added some games for each SCI version.
2011-02-27 16:48:53 +02:00
Matthew Hoops
fe250d2755 SCI: Don't error out when a Mac resource has size 0 2011-02-20 12:44:59 -05:00
md5
7cf482e721 SCI: Reverted r914fe95, and silenced a false positive warning 2011-02-19 20:30:57 +02:00
md5
914fe95903 SCI: Added a FIXME for the KQ5 FM-TOWNS resource handling code 2011-02-19 20:22:44 +02:00