Commit Graph
410 Commits
Author SHA1 Message Date
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
Filippos Karapetis 809e8c9123 SCI/new music code: Some initial code for saving/loading the sound state
svn-id: r46549
2009-12-25 13:18:48 +00:00
Filippos Karapetis 980b8bb899 Moved all of the sound iterator code in its own directory, and added a slight hack to the SoundCommandParser constructor
svn-id: r46430
2009-12-20 13:38:13 +00:00
Filippos Karapetis c388e89181 Wrapped some more sound code around appropriate defines
svn-id: r46429
2009-12-20 13:28:23 +00:00
Martin Kiewitz 7e1bf3fb4b SCI: Save/LoadGame Common::Rect saving now portable
svn-id: r46304
2009-12-09 07:28:04 +00:00
Martin Kiewitz 84b910f755 SCI: new USE_OLDGFX for switching to oldgui, fixes loading of savedgames under oldgui, oldgui doesn't like calling of setPortPic during loading
svn-id: r46294
2009-12-08 21:22:22 +00:00
Martin Kiewitz 601fd79733 SCI: SciGui::getPortPic now uses byref
svn-id: r46293
2009-12-08 21:04:40 +00:00
Martin Kiewitz a2d7505e81 SCI: Saving picPort now (fixes loading saved games in castle of dr. brain)
svn-id: r46292
2009-12-08 20:54:18 +00:00
Martin Kiewitz 4fb779dbaf SCI: Recreate SciEvent on loading saves
svn-id: r46253
2009-12-04 17:42:32 +00:00
Filippos Karapetis dc22fc1c9e Properly update the sound state in the sound command parser when loading a game
svn-id: r46196
2009-11-29 14:44:12 +00:00
Filippos Karapetis fbfafb576e Started objectifying kDoSound()
svn-id: r45862
2009-11-12 15:24:11 +00:00
Filippos Karapetis c45c335e0d Some more tweaks for skipping the menu data in savegames, when INCLUDE_OLDGFX isn't defined (it still problematic and goes out of sync)
svn-id: r45858
2009-11-12 11:47:28 +00:00
Filippos Karapetis 226f0bd23d The menu bar code is no longer used in the new graphics code, and the menu state is no longer stored in saved games
svn-id: r45854
2009-11-12 09:24:46 +00:00
Max Horn 53d0bcd594 SCI: Remove remarks about in-place loading, at least for now.
Not loading in-place has the advantage that it allows to cleanly
cancel loading a savesate, e.g. if we detect a defect during
loading. This is much harder (if not impossible) to achieve if
loading in-place. So I'd prefer if we took advantage of this.
Right now, though, we don't.

svn-id: r45786
2009-11-09 22:20:59 +00:00
Filippos Karapetis 5daca46946 Removed unused variables and placed some more old code inside INCLUDE_OLDGFX defines
svn-id: r45668
2009-11-04 15:32:25 +00:00
Filippos Karapetis c8fbac1517 - Changed the segment manager to be a static part of the engine, and stopped deleting and recreating it when restoring games
- Merged game_exit(), script_free_vm_memory() and script_free_engine()
- Cleanup

svn-id: r45666
2009-11-04 14:22:17 +00:00
Filippos Karapetis 12e3375f3b Removed the reference to SciGuiCursor from EngineState
svn-id: r45660
2009-11-04 12:19:05 +00:00
Filippos Karapetis f755311114 priority_first and priority_last are not used by the new drawing code, thus the new code didn't handle priority changes by kGraph()
svn-id: r45658
2009-11-04 11:52:11 +00:00
Filippos Karapetis 597524b255 Moved most of the code for playing sound effects and speech into a separate class
svn-id: r45653
2009-11-04 09:36:18 +00:00
Filippos Karapetis 57266a7cba - Removed status_bar_foreground and status_bar_background variables from the engine state
- Implemented clearMenuBar() in the new graphics code
- Removed the "status_bar" command, which was used to set custom colors for the status bar

svn-id: r45538
2009-10-30 14:39:26 +00:00
Filippos Karapetis ff284c9f5b Remove unused includes when INCLUDE_OLDGFX is not set. Implemented the full screen updates that the current menu code is doing using new graphics functions (still unfinished). Some cleanup.
svn-id: r45536
2009-10-30 12:33:05 +00:00
Filippos Karapetis 04ab6bc9fc Enclose all of the old graphics code within the INCLUDE_OLDGFX safeguard (defined in sci.h)
svn-id: r45459
2009-10-28 13:20:30 +00:00
Filippos Karapetis f0c4290287 Reset the graphics input after reconstructing game scripts. This fixes savegame loading in KQ4
svn-id: r45350
2009-10-23 20:10:51 +00:00
Filippos Karapetis 42068f5853 Cleanup
svn-id: r45337
2009-10-22 15:12:54 +00:00
Max Horn 9e64255bd1 SCI: Rename game_obj to _gameObj
svn-id: r45235
2009-10-18 19:43:27 +00:00
Filippos Karapetis f5b7f85593 Removed unused references to operations.h
svn-id: r45217
2009-10-18 10:50:07 +00:00
Willem Jan Palenstijn a74fd21847 SCI: Fix delete/free mismatches
svn-id: r45196
2009-10-17 17:59:09 +00:00
Max Horn 2ae08e8478 SCI: Don't save HunkTable segments
svn-id: r45048
2009-10-13 20:50:59 +00:00