Commit Graph

280 Commits

Author SHA1 Message Date
Martin Kiewitz
096b46f1d5 SCI: new music code / wip support for sci0 music
svn-id: r46507
2009-12-23 16:51:41 +00:00
Martin Kiewitz
fd861aaac4 SCI: new music code / variable-names changed to make it more verbose
svn-id: r46502
2009-12-23 16:17:42 +00:00
Martin Kiewitz
162b697220 SCI: sound resource added data format comments
svn-id: r46495
2009-12-23 12:49:38 +00:00
Martin Kiewitz
957737d018 SCI: sound resource handling fixed (fixes lsl5 music w/ new music code)
svn-id: r46494
2009-12-23 12:39:24 +00:00
Filippos Karapetis
c1e90ce3cc Implemented cmdUpdateCues() in the new sound code and fixed a crash when loading music with a resource number of zero
svn-id: r46435
2009-12-20 16:35:37 +00:00
Filippos Karapetis
fa859f6ab1 Directly modify the sound objects, instead of modifying a local copy. Remove duplicate code (which now resides in resource.*)
svn-id: r46427
2009-12-20 13:13:07 +00:00
Filippos Karapetis
0c1b646c7f - Started wrapping the current sound code around appropriate defines
- Introduced a new resource type, SoundResource, used in the new music code

svn-id: r46421
2009-12-19 16:19:53 +00:00
Max Horn
f692015301 Got rid of ReadStream::ioFailed()
svn-id: r46379
2009-12-15 08:18:57 +00:00
Max Horn
5f178e8650 Fix some MSVC warnings (part of patch #2909981)
svn-id: r46291
2009-12-08 20:44:57 +00:00
Filippos Karapetis
7e0f8a9af9 Added proper detection and handling of transitive SCI1-SCI1.1 games, like PQ1 VGA. These used SCI1 resources and compression with a SCI1.1 kernel (thanks to waltervn's observations)
svn-id: r45420
2009-10-26 21:41:41 +00:00
Filippos Karapetis
e4c23834dd Moved sci_ffs() inside iterator.cpp, the only place where it's actually used, and removed tools.*. Also, removed all the unused includes to tools.h from several places
svn-id: r45176
2009-10-16 23:29:00 +00:00
Filippos Karapetis
8ae4206373 Introduced a new debug level, kDebugLevelResMan, and reduced some of the messages printed to the console
svn-id: r44858
2009-10-10 00:07:19 +00:00
Filippos Karapetis
633463b1dd Updated comment to indicate that QFG1VGA is one of the newer SCI1.1 games that has word-aligned resources
svn-id: r44775
2009-10-08 08:22:19 +00:00
Max Horn
8ba75fc522 Fix code formatting (esp. 'if(' -> 'if (' etc., but also indention and other things)
svn-id: r44495
2009-09-30 16:16:53 +00:00
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
Walter van Niftrik
28242d289b SCI: Support for 16-bit DPCM.
svn-id: r41164
2009-06-04 11:35:17 +00:00
Walter van Niftrik
6e079f7ea8 SCI: Added some of the missing pieces for speech support in CD games. It now partially works.
svn-id: r41146
2009-06-03 18:43:22 +00:00
Torbjörn Andersson
0999534749 The error() and warning() functions add ! and newline automatically. (I didn't
look at debug() and debugC(), since I'm really bored with this now. :-)

svn-id: r41061
2009-05-31 10:02:16 +00:00
Filippos Karapetis
74e87bf05d Some WIP code on the speech used in KQ6CD
svn-id: r40996
2009-05-29 13:52:10 +00:00
Filippos Karapetis
d111e33df4 Fixed regression of commit #40904, which caused the audio in KQ5CD to be played incorrectly
svn-id: r40923
2009-05-26 19:12:09 +00:00
Filippos Karapetis
dfdc239d1f Silenced MSVC warning
svn-id: r40916
2009-05-26 14:54:24 +00:00
Filippos Karapetis
780899fb0e Rewrote the Audio stream parser. The introduction of KQ6 should work more correctly now (apart from Cassima's speech)
svn-id: r40904
2009-05-26 10:02:25 +00:00
Filippos Karapetis
16d6499617 WIP code for the speech in the floppy version of KQ6 (still needs work)
svn-id: r40894
2009-05-25 19:57:09 +00:00
Johannes Schickel
cb5c26dd53 - Fix various valgrind warnings in the audio sync code
- Fix crash when qutting KQ 5 CD
(It was caused by resources of type "kResourceTypeSync" getting allocated an "Resource" object instead of an "ResourceSync" object, I hope this is the correct fix)

svn-id: r40888
2009-05-25 12:47:58 +00:00
Johannes Schickel
c7d9e4dc0c Fix mismatching new[]/delete pair (silences a valgrind warning).
svn-id: r40887
2009-05-25 12:41:14 +00:00
Filippos Karapetis
d59796fb54 Objectified the AudioResource code (used for speech and digitized music in CD talkie games)
svn-id: r40880
2009-05-25 10:30:19 +00:00
Filippos Karapetis
8ab0f0256e Fixed audio synchronization in the CD version of KQ5
svn-id: r40855
2009-05-24 09:40:48 +00:00
Max Horn
bba91075bf removed trailing whitespaces
svn-id: r40742
2009-05-20 17:53:31 +00:00
Walter van Niftrik
4d59f620f9 SCI: Changed K_FILEIO_FILE_EXISTS to check regular files too.
svn-id: r40724
2009-05-19 11:30:51 +00:00
Walter van Niftrik
df3357159c SCI: Added some stubs for LSL6CD (lores).
svn-id: r40719
2009-05-19 02:10:58 +00:00
Filippos Karapetis
87e8f94fde - Moved all the files out of /sci/scicore and into /sci
- Moved /scicore/sciconsole.h into /engine, and renamed /engine/scriptconsole.cpp to /engine/sciconsole.cpp

svn-id: r40608
2009-05-15 14:07:45 +00:00