Commit Graph
326 Commits
Author SHA1 Message Date
Filippos Karapetis c9c9a21a08 Renamed error -> errorNum to avoid name clashes with error()
svn-id: r49974
2010-06-17 23:52:17 +00:00
Filippos Karapetis 9c1ec81d76 Strict mode: Turned several severe errors (almost all detection related) into errors, instead of warnings
svn-id: r49972
2010-06-17 23:45:38 +00:00
Max Horn e7275161f4 SCI: Avoid using g_sci in resman (as it might not yet be inited)
svn-id: r49897
2010-06-16 00:24:16 +00:00
Max Horn b8d9cf2773 SCI: Pass resman to scanSource() methods
svn-id: r49863
2010-06-15 16:50:10 +00:00
Max Horn e4153ffa38 SCI: Add Resource::getNumber method
svn-id: r49848
2010-06-15 12:35:17 +00:00
Max Horn 651e2760a3 Fix spelling, cleanup
svn-id: r49843
2010-06-15 12:33:20 +00:00
Max Horn 7a5ce0eddd SCI: Make Resource::_id protected
svn-id: r49842
2010-06-15 12:31:37 +00:00
Max Horn 2b24a1a2ad SCI: OOpify class ResourceId
svn-id: r49841
2010-06-15 12:31:16 +00:00
Max Horn 68eeef8f1a SCI: Add ResourceManager::getVolVersion()
svn-id: r49840
2010-06-15 12:21:29 +00:00
Max Horn 79c9be5d96 Reduce header dependencies
svn-id: r49836
2010-06-15 12:20:03 +00:00
Max Horn 583a966d8c SCI: Move decompress & readResourceInfo to Resource; more cleanup
svn-id: r49835
2010-06-15 12:19:39 +00:00
Max Horn 4392cdaee1 SCI: cleanup
svn-id: r49834
2010-06-15 12:19:14 +00:00
Max Horn 335e17af01 SCI: Move several methods from ResourceManager to Resource
svn-id: r49833
2010-06-15 12:18:57 +00:00
Max Horn 63d9cfb3bf SCI: Add ResourceManager::updateResource(); change some code to use addResource()
svn-id: r49832
2010-06-15 12:18:31 +00:00
Max Horn b9a3a9c12d SCI: Move _associatedMap to VolumeResourceSource and make it const
svn-id: r49831
2010-06-15 12:18:07 +00:00
Max Horn 6667a71027 SCI: Move _audioCompression(Type|OffsetMapping) to AudioVolumeResourceSource
svn-id: r49830
2010-06-15 12:17:47 +00:00
Max Horn 1a0201f7e9 SCI: cleanup
svn-id: r49829
2010-06-15 12:17:25 +00:00
Max Horn 6248daccfc SCI: Get rid of ugly resMan params to ResourceSource methods
We might want to add a ResourceSource::_resMan member, but for
now I am not adding one on purpose; many more things might still
move between ResourceSource and ResourceManager, so we should
wait till the refactoring is complete.

svn-id: r49828
2010-06-15 12:17:05 +00:00
Max Horn 88663c9186 SCI: Merge ResourceManager::checkIfAudioVolumeIsCompressed into AudioVolumeResourceSource constructor
svn-id: r49827
2010-06-15 12:16:42 +00:00
Max Horn 348953c067 SCI: Make ResourceSource::_resourceFile const
svn-id: r49826
2010-06-15 12:16:17 +00:00
Max Horn 824dd44ddf SCI: Revise how ResourceManager is instantiated.
This should allow for better error handling. Also, it
means that g_sci->getResMan() returns a valid value much sooner,
allowing me to simplify some code.

Also added a note about potentially replacing Common::FSList usage
by Common::Archive (and FSNode by Archive/ArchiveMember ?). This
might be a way to unify the addAppropriateSources variants again.

svn-id: r49825
2010-06-15 12:15:52 +00:00
Max Horn 4020500640 SCI: Rename ResourceSource members to follow _camelCase convention
svn-id: r49823
2010-06-15 12:15:05 +00:00
Max Horn 07b896802b SCI: Pass volume number to ResourceSource subclass constructors; make ResourceSource::volume_number const
svn-id: r49822
2010-06-15 12:14:39 +00:00
Max Horn bb1336ca41 SCI: Add loadResource impls for WaveResourceSource and AudioVolumeResourceSource
svn-id: r49821
2010-06-15 12:14:15 +00:00
Max Horn d032e6481b SCI: Add loadResource impls to MacResourceForkResourceSource and PatchResourceSource; move _macResMan to MacResourceForkResourceSource
svn-id: r49820
2010-06-15 12:13:52 +00:00
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