Commit Graph
287 Commits
Author SHA1 Message Date
Max Horn 77592b5690 Fix warning
svn-id: r48222
2010-03-10 11:26:27 +00:00
Max Horn da95a98203 SCI: Stop storing EngineState in SciGui32
svn-id: r48117
2010-02-23 22:41:20 +00:00
Filippos Karapetis 07e405588d Moved the reference to AudioPlayer inside SciEngine (as it doesn't have a state, per se, and is static)
svn-id: r48059
2010-02-14 12:23:22 +00:00
Max Horn 06021f79ac SCI: Fix compiling with USE_OLD_MUSIC_FUNCTIONS enabled
svn-id: r48051
2010-02-13 17:46:05 +00:00
Max Horn e45f0f309a SCI: Remove EngineState::_kernel, use SciEngine::_kernel instead
svn-id: r48050
2010-02-13 17:45:40 +00:00
Max Horn 9575cc08a2 SCI: Move GameFeatures from EngineState to SciEngine
svn-id: r48049
2010-02-13 17:44:58 +00:00
Max Horn a82939c9be SCI: Get rid of EngineState::resMan
svn-id: r48048
2010-02-13 17:44:19 +00:00
Max Horn 721a57a661 SCI: Move Gui/Gfx related permanent objects from EngineState to SciEngine
svn-id: r48047
2010-02-13 17:43:31 +00:00
Filippos Karapetis 3c8ab42eea With the new detection for setCursor, the game object and game ID are no longer required, which makes some ugly code obsolete. Yay! :)
svn-id: r47951
2010-02-07 09:33:53 +00:00
Martin Kiewitz 67870c7dc8 SCI: adding more debug output to kPalVary, fixing loading savedgames (_gfxPaint wasnt copied over)
svn-id: r47943
2010-02-06 21:38:58 +00:00
Martin Kiewitz 248bc560f3 SCI: moved onControl etc. into GfxCompare, now getting called directly. also fixed loading saved games due Gfx* changes
svn-id: r47912
2010-02-05 20:44:03 +00:00
Filippos Karapetis 2fb37063a4 Placed all the game feature detection code in a separate class
svn-id: r47850
2010-02-03 11:02:43 +00:00
Max Horn bec3a0d539 cleanup
svn-id: r47835
2010-02-03 01:33:48 +00:00
Max Horn bb5e34a014 SCI: Get rid of EngineState::stack_segment
svn-id: r47833
2010-02-03 01:32:59 +00:00
Max Horn 4b19acf255 SCI: Use Common::List and Common::String to simplify breakpoint handling (untested)
svn-id: r47824
2010-02-02 22:52:41 +00:00
Martin Kiewitz 845c245ff3 SCI: class menu renamed to GfxMenu - now getting called directly, also fix for loading savedgames
svn-id: r47792
2010-02-01 09:53:42 +00:00
Walter van Niftrik a92bb6193b SCI: Implement kMemorySegment().
svn-id: r47776
2010-01-31 19:47:54 +00:00
Martin Kiewitz 7929255cd9 SCI: cleaned up graphics classes, removed gfx&windowmgr, added gfxports, gfxcompare, gfxpaint16, gfxcache. kernel uses gfxports directly w/o going through SciGui
svn-id: r47745
2010-01-31 12:35:15 +00:00
Filippos Karapetis 7f4aa161bc Removed duplicate code. Some cleanup
svn-id: r47735
2010-01-31 01:26:06 +00:00
Filippos Karapetis 4a4b69dbeb Fixed loading of saved games
svn-id: r47729
2010-01-30 23:40:29 +00:00
Matthew Hoops da46fc9b35 Add support for saving/loading Arrays/Strings in SCI32. It's possible to save a game in GK1 now via the console, but not load (yet).
svn-id: r47696
2010-01-30 02:03:59 +00:00
Max Horn b124a0c1cd SCI: Reduce header interdependencies a bit
svn-id: r47666
2010-01-29 11:05:06 +00:00
Filippos Karapetis 2974ead245 Corrected assert inside load_script. Fixes loading in SQ4CD
svn-id: r47617
2010-01-27 23:43:23 +00:00
Filippos Karapetis 722233fd0d - Moved all of the parser-related variables inside the Vocabulary class
- Moved the kSetSynonyms() function inside kscripts (as it's for script synonyms, not parser word synonyms)
- The parser vocabulary is now only initialized for SCI0 and SCI01 games, which had a parser

svn-id: r47483
2010-01-23 19:10:56 +00:00
Johannes Schickel edbc368398 Cleanup. (And along with it add some additional asserts).
svn-id: r47482
2010-01-23 18:24:11 +00:00
Filippos Karapetis 47c97f4a60 - The reverb value is now obtained from the music driver
- Implemented kSetReverb (0x50) and kResetOnPause (0x4C)

svn-id: r47433
2010-01-22 12:26:12 +00:00
Martin Kiewitz cd654b9616 SCI: call gui-init right after loading a saved game, fixes weird gui issue that occurs only when loading a save through ctrl-f5 menu "too early" in the game (where you couldnt load through original interpreter)
svn-id: r47151
2010-01-08 11:17:29 +00:00
Filippos Karapetis 84cd8d2dc7 Renamed /gui to /graphics and /sfx to /sound, to better illustrate their purpose
svn-id: r47007
2010-01-05 01:22:16 +00:00
Filippos Karapetis f66d5a7f53 SCI: Removed the old graphics code
svn-id: r47005
2010-01-05 00:54:53 +00:00
Martin Kiewitz 379ae6df30 SCI/newmusic: now clips volume against MUSIC_VOLUME_MAX (127) instead of the mixer max volume (which would be wrong of course), adjusts volume when setting sample channel volume
svn-id: r46850
2010-01-01 21:04:20 +00:00
Martin Kiewitz 967853c03f SCI: volume for sci0 now set to 127, now using constant instead of value
svn-id: r46849
2010-01-01 20:49:56 +00:00
Filippos Karapetis 54d9bf4c57 Fixed broken savegames when saving with the new music code
svn-id: r46837
2010-01-01 16:42:35 +00:00
Martin Kiewitz 385c462352 SCI: fixing saved game compatibility
svn-id: r46827
2010-01-01 14:22:07 +00:00
Filippos Karapetis afc4bc1295 SCI/new music code:
- Resolved a deadlock with the mixer, and added appropriate mutexes (a result of the fact that SCI mixes MIDI and digital audio in the same list)
- Fixed sound playing when loading games, by properly resetting the MIDI driver
- Reverted savegame version to 14 - the changes in versions 15 and 16 don't have any effect on the currently enabled old music code, and the new music code is disabled by default, and is still prone to changes
- Now saving/loading signal, loop and hold for each sound, as well as reverb
- Added stub code for setting reverb and channel hold
- The signal, loop and hold values of each song are cached, like in SSCI and like what happens in Greg's SCI implementation. This allows a clear separation of the engine code from the rest of the engine. Reverted commits 46792 and 46797
- Removed duplicate song list accessing code
- Song cues are now updated in kAnimate for SCI0, like the old music code does, to compensate for the fact that SCI0 didn't poll for music changes via cmdUpdateCues, like what SCI01 and newer do
- Cleanup

svn-id: r46812
2010-01-01 06:41:52 +00:00
Filippos Karapetis 54245f712d SCI/new music code: The loop selector for each music score is no longer cached, but read directly from the sound object
svn-id: r46792
2009-12-31 08:30:30 +00:00
Max Horn 81a1d45821 SCI: Start objectifying MusicEntry
svn-id: r46687
2009-12-28 21:03:13 +00:00
Filippos Karapetis 5cb5fe22ea SCI/new sound code:
- Made the SciMusic class private, and added wrapper functions for invoking specific methods of SciMusic from outside the SoundCommandParser class
- Many SCI games keep creating and destroying sound effects constantly (i.e. many times per second). Therefore, another scheme has been devised, which replaces the mutex that was in place. Whenever a sound command is run which operates on a specific object in the play list, we disallow onTimer() from kicking in. This isn't ideal, but it does stop random deadlocks because of locked mutexes without any noticeable side effects

svn-id: r46681
2009-12-28 20:10:15 +00:00
Filippos Karapetis 5adb6277eb SCI/new music code:
- Switched to Common::StackLock for mutexes
- Renamed Music::stopAll() -> Music::clearPlayList()
- Implemented a better Music::stopAll method, which stops all sounds with proper signals, instead of destroying them
- Renamed the SCI0 command cmdGetPlayNext -> cmdStopAllSounds and implemented it

svn-id: r46665
2009-12-27 23:46:11 +00:00
Filippos Karapetis 9f37be314d SCI/new music code:
- Implemented sound muting
- Now saving/loading the master music volume

svn-id: r46643
2009-12-27 14:11:26 +00:00
Filippos Karapetis fabe51c129 Renamed gameName -> gameId, to keep the same vocabulary everywhere
svn-id: r46635
2009-12-27 12:54:03 +00:00
Filippos Karapetis 6af32b5b3a Really fixed compilation
svn-id: r46630
2009-12-27 12:21:12 +00:00
Filippos Karapetis 19cb4ad6e0 Hopefully fixed compilation
svn-id: r46628
2009-12-27 12:12:14 +00:00
Filippos Karapetis 0a771e14c1 SCI/new music code:
- Removed a lot of accessors to the music list, and protected the 2 which are used now with mutexes
- Rewrote the music list save/load code to be methods of the SciMusic class

svn-id: r46623
2009-12-27 11:43:34 +00:00
Filippos Karapetis d39ac80f4a Hopefully fixed the freezes/deadlocks in the new music code (e.g. in LSL5 and Castle of Dr. Brain)
svn-id: r46579
2009-12-26 13:20:07 +00:00
Filippos Karapetis c6a8d0e973 - Made the music playlist private
- Removed some leaks
- Fixed the destruction of the music playlist
- Made mutexes more sane
- Removed some dead code
- Cleanup

svn-id: r46578
2009-12-26 11:54:57 +00:00
Filippos Karapetis 12b6d4ab03 Some more work on the new music code
svn-id: r46569
2009-12-26 00:50:09 +00:00
Filippos Karapetis a88e4df7a0 SCI/new music code: Fixed a bug where music was stopped when saving. Some cleanup
svn-id: r46568
2009-12-26 00:22:21 +00:00
Martin Kiewitz 2f5f625b98 SCI/newmusic: added filter support for kq4early and adlib
svn-id: r46563
2009-12-25 18:59:15 +00:00
Filippos Karapetis f5567d4605 Fixed variable capitalization
svn-id: r46552
2009-12-25 13:37:55 +00:00
Filippos Karapetis a5bb030b6e Properly initialize the audio stream part of each music slot when loading
svn-id: r46550
2009-12-25 13:26:09 +00:00