Commit Graph

66 Commits

Author SHA1 Message Date
Max Horn
ba0bd938e4 SCI: Rename _sciVersion to s_sciVersion and made it local to resource.cpp (i.e. follow CFG and achieve code/data isolation)
svn-id: r44271
2009-09-23 12:12:37 +00:00
Filippos Karapetis
13ad217cdd - Moved the SCI version in a global variable
- Changed all the SCI version checks to use getSciVersion()
- Also made getSciVersionDesc a global function (removes some ugly accessing of the SCI engine)

The fallback detector should work correctly now

svn-id: r44269
2009-09-23 10:55:35 +00:00
Filippos Karapetis
1bbab8f191 Some renaming:
getresourceManager -> getResourceManger
resourceManager -> resMan
segmentManager ->segMan

svn-id: r43908
2009-09-02 12:02:37 +00:00
Walter van Niftrik
cc6e21635e SCI: Fix detection of QFG1 remake.
svn-id: r43832
2009-08-30 19:33:34 +00:00
Walter van Niftrik
fff023794f SCI: Cleanup
svn-id: r43811
2009-08-30 01:37:27 +00:00
Filippos Karapetis
f128f49ea6 If a resource map entry can't be read, retry with the volume version instead, if it's different than the map version
svn-id: r43755
2009-08-26 09:38:51 +00:00
Filippos Karapetis
f7acc7f669 Fixed compilation when ENABLE_SCI32 is not set
svn-id: r43744
2009-08-25 23:15:18 +00:00
Matthew Hoops
b5da8a5cdc - Split SCI_VERSION_32 into SCI_VERSION_2, SCI_VERSION_2_1, and SCI_VERSION_3 (each version has a different kernel table).
- Improve map detection.
- Fix SCI32 object and script initialization (Torin's Passage and GK1 scripts now start up, and probably most SCI2/2.1 games).
- Add SCI2 and SCI2.1 kernel tables.

svn-id: r43742
2009-08-25 23:02:57 +00:00
Filippos Karapetis
ed66cad677 - Simplified the parameters of some functions
- Replaced some EngineState parameters
- The SCI version is now obtained from the resource manager or the segment manager, thereby simplifying several functions
- Plugged 2 leaks in the fallback detector
- Renamed the segment manager and resource manager to "segmentManager" and "resourceManager" in all places, for consistency

svn-id: r43722
2009-08-25 08:38:14 +00:00
Matthew Hoops
6b21f1c932 Fix detection of some later SCI32 games (RESMAP.001) and some cleanup.
svn-id: r43608
2009-08-21 19:48:48 +00:00
Matthew Hoops
c0d9543345 Fix detection of SCI32 resource maps and volumes
svn-id: r43603
2009-08-21 18:12:13 +00:00
Joost Peters
8f587ed5e4 remove \n's from warning() calls
svn-id: r43567
2009-08-20 19:49:52 +00:00
Walter van Niftrik
8bd4cee2d2 SCI: Add autodetection of Amiga views.
svn-id: r43547
2009-08-19 21:08:17 +00:00
Filippos Karapetis
db0cd620f6 Started rewriting the SCI engine to use FSNode instead of file names. This is the proper solution for removing the hack in the fallback detector, but it still needs work. Also, reduced the things needed to be initialized a bit, so that the detection is a bit faster
svn-id: r43510
2009-08-18 14:10:31 +00:00
Filippos Karapetis
65ac355efa Removed the maxMemory parameter of the resource manager and replaced it with a define
svn-id: r43503
2009-08-18 09:12:41 +00:00
Walter van Niftrik
260a2019b6 SCI: Add autodetection for DoSound. Cleanup.
svn-id: r43482
2009-08-17 15:49:22 +00:00
Walter van Niftrik
2ac6e260b6 SCI: Fix whitespace.
svn-id: r43451
2009-08-16 19:20:09 +00:00
Walter van Niftrik
00f4794c0a SCI: Stage 1 of the game detection overhaul. The end goal is to autodetect
as much as possible. All SCI_VERSION_* information was removed from
detection.cpp (much of it was incorrect anyway).

svn-id: r43449
2009-08-16 19:18:19 +00:00
Walter van Niftrik
5709e524f9 SCI: Rename sci_version_t to SciVersion
svn-id: r43407
2009-08-15 12:09:47 +00:00
Walter van Niftrik
f99932b72a SCI: Added enum for map and volume versions. Removed res_version setting from
detection.cpp (should be detectable). Cleanup.

svn-id: r43390
2009-08-15 00:28:59 +00:00
Max Horn
50cd2750cc SCI: Avoid using perror (it's not portable)
svn-id: r42866
2009-07-28 22:28:40 +00:00
Filippos Karapetis
f0892cdcbe Some work on QFG1VGA (looks like a mix of SCI1 and SCI1.1)
svn-id: r42393
2009-07-11 19:00:56 +00:00
Filippos Karapetis
848b9cda03 If we fail to auto-detect either the volume or the map version, set the one to be equal to the other
svn-id: r42386
2009-07-11 16:07:14 +00:00
Filippos Karapetis
28dd343e08 Applied slightly modified patch 2819002 - "SCI: resource-view-patch on SQ5/German fix"
svn-id: r42374
2009-07-11 06:43:01 +00:00
Johannes Schickel
e8e9b88227 Oops specify the correct revsision number in the fixme.
svn-id: r42306
2009-07-09 16:24:59 +00:00
Johannes Schickel
5d0d67e574 Add fixme about SCI32 specific code.
svn-id: r42305
2009-07-09 16:23:22 +00:00
Johannes Schickel
1ac515c629 By comparing the commit log of r42300, it seems that "off" was renamed to "lastDirectoryOffset". I changed the SCI32 specific code to use that now. I can't assure this is anyhow correct, so anyone with knowledge of this code please check it.
svn-id: r42303
2009-07-09 16:16:08 +00:00
Johannes Schickel
0aa83f14c7 Fix wrong format arugment.
svn-id: r42301
2009-07-09 15:59:20 +00:00
Filippos Karapetis
717de7800c Applied patch #2818845 - "SCI: resource.map detection for SCI1/1.1 fixed", with some slight formatting changes
svn-id: r42300
2009-07-09 15:54:18 +00:00
Filippos Karapetis
ab8c3d56b8 Removed the weird checks for a maximum resource number (the sci_max_resource_nr array), as it doesn't serve any real purpose and leads to strange errors: if a resource is found which is bigger than the maximum number, it will be remapped to an incorrect number from this check. This makes KQ5CD work properly again (resources would be remapped to incorrect resource numbers from this code as a result of not updating this array with the latest SCI version merges).
svn-id: r42219
2009-07-07 13:39:24 +00:00
Filippos Karapetis
74670cc834 Removed the superfluous sci_version_types array (it's essentially the same as the versionNames array)
svn-id: r42216
2009-07-07 12:29:55 +00:00
Filippos Karapetis
a9aaf56b3e Cleanup: added an enum for the auto-detected features, removed the selectors which are only used for auto-detection from the convenience selector map and placed feature auto-detection in a separate function. Also, now the automatically detected graphics resources are shown in the console.
svn-id: r42212
2009-07-07 11:14:18 +00:00
Filippos Karapetis
c716e43a2b - Added auto-detection for EGA graphics. As a result of this, GF_SCI1_EGA has been removed and versions SCI_VERSION_01_EGA and SCI_VERSION_01_VGA have been merged into SCI_VERSION_01
- Simplified the checks for EGA and VGA graphics
- Fixed a bug in script_adjust_opcode_formats()
- Simplified the code in GfxResManager::getView() a bit

svn-id: r42206
2009-07-07 07:44:25 +00:00
Filippos Karapetis
219b0de0d2 Renamed SCI_VERSION_01 -> SCI_VERSION_01_EGA
svn-id: r42181
2009-07-06 16:22:14 +00:00
Filippos Karapetis
522b161bec Replaced sciprintf() calls with printf, DebugPrintf, warning and error calls
svn-id: r42167
2009-07-06 10:39:22 +00:00
Filippos Karapetis
b0c908e349 Merged SCI1 versions in one more file
svn-id: r42098
2009-07-04 16:36:56 +00:00
Filippos Karapetis
b093511239 - Merged the "early" and "late" SCI1 versions - these are functionally equivalent, and the code that does the version check is unreliable (e.g. it sets SQ1 VGA to SCI1 "late" and EcoQuest 1 to SCI1 "early")
- Cleanup of the vocabulary setting functions
- Cleanup of the cursor manipulation code

svn-id: r42097
2009-07-04 16:30:20 +00:00
Max Horn
c4f6295330 Fixed some more warnings observed on buildbot
svn-id: r42010
2009-07-01 20:51:34 +00:00
Walter van Niftrik
1fb78d577f SCI: Moved audio code from AudioResource to the sfx core.
svn-id: r41486
2009-06-12 23:46:23 +00:00
Walter van Niftrik
5e68fbfe87 SCI: Moved SCI1 audio map handling into the resource manager.
svn-id: r41408
2009-06-09 19:18:48 +00:00
Walter van Niftrik
f2fe13b064 SCI: Cleanup
svn-id: r41368
2009-06-08 12:20:36 +00:00
Walter van Niftrik
a6ed05740f SCI: Moved resource36 handling into resource manager.
svn-id: r41349
2009-06-07 19:15:55 +00:00
Walter van Niftrik
e3d3195a43 SCI: Resmgr cleanup and preparations for moving resource36 handling into resmgr.
svn-id: r41318
2009-06-07 02:18:38 +00:00
Walter van Niftrik
bc6d19aa1a SCI: Fix audio regression in KQ5CD, introduced in r41205.
svn-id: r41222
2009-06-06 12:30:13 +00:00
Walter van Niftrik
61a7b7c625 SCI: Moved the handling of 65535.map into the resource manager.
svn-id: r41205
2009-06-06 00:07:18 +00:00
Walter van Niftrik
3c58a6ca8f SCI: Audio: Fixed bug in sample length computation.
svn-id: r41186
2009-06-05 01:12:52 +00:00
Walter van Niftrik
8e987c80d1 SCI: Fixed some endian bugs related to speech handling. READ_UINT* are not LE,
but use native endianness. Thanks to clone2727 for pointing this out.

svn-id: r41181
2009-06-04 23:55:08 +00:00
Max Horn
fa02e0df7b SCI: Made some members of class Resource protected; some cleanup
svn-id: r41180
2009-06-04 22:16:31 +00:00
Walter van Niftrik
3da455420a SCI: Audio: Fixed bug in reading of SOL header.
svn-id: r41171
2009-06-04 16:18:35 +00:00
Walter van Niftrik
a440d77408 SCI: Added support for early SCI1.1 audio maps.
svn-id: r41170
2009-06-04 15:56:11 +00:00