Max Horn
d4f16962d0
SCI: Move code from ResourceManager::loadResource to ResourceSource::loadResource
...
svn-id: r49819
2010-06-15 12:13:29 +00:00
Max Horn
d0f59edd96
SCI: Rename ResourceSource::resourceFile to _resourceFile
...
svn-id: r49818
2010-06-15 12:13:07 +00:00
Max Horn
d15e09fdc2
SCI: Merge MacResourceForkResourceSource::scanSource and ResourceManager::readMacResourceFork
...
svn-id: r49817
2010-06-15 12:12:44 +00:00
Max Horn
055ee6ab5b
SCI: Add virtual method ResourceSource::scanSource
...
svn-id: r49816
2010-06-15 12:12:21 +00:00
Max Horn
89cf6f7cb1
SCI: Change ResourceManager::getVolume() to use new classes
...
* Add new ResourceSource::findVolume() virtual method
* Rename ResourceManager::getVolume() to findVolume(),
and change it to use the new ResourceSource method
* Add some TODO comments pointing to further OOPification
possibilities
svn-id: r49815
2010-06-15 12:11:56 +00:00
Max Horn
8c06425ee3
SCI: Remove 'map' param from addSource, and let AudioVolumeResourceSource subclass VolumeResourceSource
...
svn-id: r49814
2010-06-15 12:11:30 +00:00
Max Horn
17a5112162
SCI: Convert code to use ResourceSource subclasses
...
svn-id: r49813
2010-06-15 12:11:04 +00:00
Max Horn
24a295f4a3
SCI: Add ResourceSource subclasses, one for each type
...
svn-id: r49812
2010-06-15 12:10:41 +00:00
Max Horn
793c04f43b
SCI: Changed some 'const char *' to Common::String
...
svn-id: r49811
2010-06-15 12:10:18 +00:00
Max Horn
dea38106f8
SCI: Change ResourceSource to a class, further OOPify it.
...
In particular, renamed location_name to _name and made it const and
protected. Thus it cannot be changed after creation, and only read
access is now possible, via a getter method.
svn-id: r49810
2010-06-15 12:09:51 +00:00
Max Horn
98e1f1a193
SCI: Only use MacResManager if needed; start to OOPify ResourceSource
...
svn-id: r49809
2010-06-15 12:09:30 +00:00
Max Horn
69bfbdfa04
SCI: Move ResourceSource to new header resource_intern.h
...
svn-id: r49807
2010-06-15 12:08:40 +00:00
Filippos Karapetis
eff1d4bb1c
Added a default constructor for the ResourceSource struct
...
svn-id: r49622
2010-06-13 07:17:44 +00:00
Filippos Karapetis
6fa4d1ba80
Initialize compression-related variables when loading external patch files. Fixes Cassima's speech in the intro of KQ6 (the engine thought that the external patch files of her speech were compressed)
...
svn-id: r49606
2010-06-12 11:43:30 +00:00
Matthew Hoops
6ad04a4a96
Add support for AIFF sound in SCI32 Mac games and add support for AIFF/WAVE audio36 patches; minor cleanup.
...
svn-id: r49576
2010-06-10 15:06:25 +00:00
Martin Kiewitz
6474eaa1b2
SCI: check for SOL header in audio36 patches
...
svn-id: r49520
2010-06-08 21:15:53 +00:00
Filippos Karapetis
73010518b2
Fixed compilation when the SCI32 code is disabled
...
svn-id: r49514
2010-06-08 19:36:33 +00:00
Martin Kiewitz
12ca735ceb
SCI: use base36 sync/audio patches for sci1.1 as well and also check if patch filenames make sense, otherwise skip them - also remove hack for excluding bootdisk.* and aud*.drv
...
svn-id: r49509
2010-06-08 15:08:45 +00:00
Filippos Karapetis
707ccdbac7
Add a version check for base36 encoded patches - they were introduced in SCI2
...
svn-id: r49501
2010-06-08 13:15:05 +00:00
Martin Kiewitz
ea2e2053f2
SCI: slight cleanup on processPatch, etc.
...
svn-id: r49495
2010-06-07 21:55:57 +00:00
Martin Kiewitz
ae599e63c2
SCI: fix regression from #49484 , we were ignoring 65535 patches and this broke kq6 - the check was previously for -1 and this case wasn't able to happen at all, maybe it was left-over code from freesci somehow
...
svn-id: r49494
2010-06-07 21:33:55 +00:00
Filippos Karapetis
419b4b7348
Added support for SCI2+ base36 encoded patches (audio36 and sync36)
...
svn-id: r49491
2010-06-07 17:44:17 +00:00
Johannes Schickel
8ef5d55edb
Fix gcc warning about an comparison which is always false due to data type range.
...
svn-id: r49484
2010-06-07 13:47:14 +00:00
Matthew Hoops
d5b5a8dbae
Allow for the other audio36 patch naming schemes (Mac and some Torin ones).
...
svn-id: r49482
2010-06-07 11:44:52 +00:00
Filippos Karapetis
43ec405ffe
Some initial code for audio36 and sync36 patch support
...
svn-id: r49477
2010-06-07 09:10:22 +00:00
Filippos Karapetis
43c353d930
Now opening all files via getVolumeFile()
...
svn-id: r49451
2010-06-06 13:04:24 +00:00
Filippos Karapetis
e9f35fbf4c
Rewrote the remaining parts of the ResourceManager class to work with file streams, thus removing the SCI_detection hack in the fallback detector
...
svn-id: r49438
2010-06-05 14:09:52 +00:00
Filippos Karapetis
af3fec8c26
- Fixed findGameObject() to properly handle SCI0-SCI1 games where the first block of script 0 isn't the exports block
...
- Changed many places where Common::File is used directly to use Common::SeekableReadStream instead (in order to ultimately remove the SCI_detection hack in the fallback detector)
svn-id: r49391
2010-06-02 13:17:36 +00:00
Matthew Hoops
4493080220
If we can't find the game object or game ID in fallback detection, break out instead of assuming the script is there. Fixes a segfault when detecting an LSCI game.
...
svn-id: r49389
2010-06-02 02:55:55 +00:00
Max Horn
24673b9ee9
Fix warning
...
svn-id: r49386
2010-06-02 00:20:52 +00:00
Filippos Karapetis
a6efbf8880
Fixed the detection of SCI2.1 games in the fallback detector
...
svn-id: r49382
2010-06-01 22:06:52 +00:00
Filippos Karapetis
95001e3676
Add support for SCI2.1 resource patches to the fallback detector
...
svn-id: r49380
2010-06-01 20:37:55 +00:00
Filippos Karapetis
016862ac3a
Moved setScriptSize() inside Script::init(), and removed a FIXME - the SCI1.1 word-align is done inside Script::init()
...
svn-id: r49330
2010-05-30 18:45:07 +00:00
Filippos Karapetis
0276ec835e
Fixed findGameObject() for SCI11 games
...
svn-id: r49326
2010-05-30 15:17:29 +00:00
Filippos Karapetis
3d09af0377
Removed the hack inside findGameObject(), and replaced it with code from the segment manager, till we find out why the segment is sometimes off by 1 (note that findGameObject() works fine for finding the game ID itself)
...
svn-id: r49310
2010-05-29 15:27:27 +00:00
Filippos Karapetis
708b37898c
Fixed regression in SCI2-SCI21 games from commit 49308
...
svn-id: r49309
2010-05-29 15:01:33 +00:00
Filippos Karapetis
6f056c6c98
Added a method to the resource manager, to limit the places where script exports are accessed, since for SCI11 and newer exports can be functions and objects (first step in removing scriptRelocateExportsSci11(), which is a gross hack and it fails in QFG1VGA)
...
svn-id: r49308
2010-05-29 14:03:08 +00:00
Filippos Karapetis
5f5dcbad47
Added an explanation for audio36 and sync36 external patches
...
svn-id: r49262
2010-05-27 12:00:20 +00:00
Filippos Karapetis
e5eaf3ee55
Split all of the audio-related functions of the resource manager in a separate file
...
svn-id: r49260
2010-05-27 08:09:32 +00:00
Filippos Karapetis
739f551852
Slight formatting, and added a note that audio36 and sync36 resource patches were introduced in SCI2, and didn't exist in SCI0-SCI1.1
...
svn-id: r49259
2010-05-27 07:50:23 +00:00
Matthew Hoops
99fc5cbfca
Add the Mac sync resource type and allow for more than 9 Mac SCI1.1+ data files.
...
svn-id: r49255
2010-05-27 03:15:24 +00:00
Max Horn
7b8837cda7
SCI: Simplify appending string 'seeker' to sierraId
...
svn-id: r49244
2010-05-26 15:41:50 +00:00
Filippos Karapetis
3187149cca
Avoid adding a null char in the sierraId Common::String
...
svn-id: r49234
2010-05-26 11:02:50 +00:00
Filippos Karapetis
60dd310688
Cleanup
...
svn-id: r49227
2010-05-26 06:53:08 +00:00
Matthew Hoops
d49fb8f42d
Add support for showing the icon bar in SCI1.1 Mac.
...
svn-id: r49196
2010-05-24 17:21:11 +00:00
Filippos Karapetis
c874ff15a8
Cleaned up the game ID code:
...
- The game ID is now obtained from ScummVM ID directly, not by converting Sierra's internal ID
- Moved the code which reads the internal Sierra ID inside the resource manager
- Moved the code which converts the internal Sierra ID to ScummVM's IDs together with the rest of the detection code
svn-id: r49152
2010-05-23 10:28:03 +00:00
Matthew Hoops
3dda73d9a2
Add initial support for KQ6 Mac. Wrapper functions for read/writing to pointers are now used (found in util.*) for code that has different endianness in SCI1.1+ Mac games. Add support for Mac 'snd ' and 'CURS' resources. QFG1 Mac is not yet playable due to script compression.
...
svn-id: r49070
2010-05-18 04:17:58 +00:00
Johannes Schickel
983c41bea2
Remove useless const on a value return type.
...
svn-id: r49022
2010-05-13 13:32:12 +00:00
Matthew Hoops
7344ac20d7
Add support for loading SCI games from Mac resource forks. The games themselves do not work yet as some (not all) of the data is in BE order instead of LE. They currently error out because it thinks the relocation block is outside of the script.
...
svn-id: r48998
2010-05-10 18:29:13 +00:00
Martin Kiewitz
b4d35b3279
SCI: calculate sampleLen for WAVEs as well
...
svn-id: r48906
2010-05-03 13:30:09 +00:00