aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/savegame.cpp
AgeCommit message (Collapse)Author
2010-01-01SCI/new music code:Filippos Karapetis
- 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
2009-12-31SCI/new music code: The loop selector for each music score is no longer ↵Filippos Karapetis
cached, but read directly from the sound object svn-id: r46792
2009-12-28SCI: Start objectifying MusicEntryMax Horn
svn-id: r46687
2009-12-28SCI/new sound code:Filippos Karapetis
- 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-27SCI/new music code:Filippos Karapetis
- 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-27SCI/new music code:Filippos Karapetis
- Implemented sound muting - Now saving/loading the master music volume svn-id: r46643
2009-12-27Renamed gameName -> gameId, to keep the same vocabulary everywhereFilippos Karapetis
svn-id: r46635
2009-12-27Really fixed compilationFilippos Karapetis
svn-id: r46630
2009-12-27Hopefully fixed compilationFilippos Karapetis
svn-id: r46628
2009-12-27SCI/new music code: Filippos Karapetis
- 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-26Hopefully fixed the freezes/deadlocks in the new music code (e.g. in LSL5 ↵Filippos Karapetis
and Castle of Dr. Brain) svn-id: r46579
2009-12-26- Made the music playlist privateFilippos Karapetis
- Removed some leaks - Fixed the destruction of the music playlist - Made mutexes more sane - Removed some dead code - Cleanup svn-id: r46578
2009-12-26Some more work on the new music codeFilippos Karapetis
svn-id: r46569
2009-12-26SCI/new music code: Fixed a bug where music was stopped when saving. Some ↵Filippos Karapetis
cleanup svn-id: r46568
2009-12-25SCI/newmusic: added filter support for kq4early and adlibMartin Kiewitz
svn-id: r46563
2009-12-25Fixed variable capitalizationFilippos Karapetis
svn-id: r46552
2009-12-25Properly initialize the audio stream part of each music slot when loadingFilippos Karapetis
svn-id: r46550
2009-12-25SCI/new music code: Some initial code for saving/loading the sound stateFilippos Karapetis
svn-id: r46549
2009-12-20Moved all of the sound iterator code in its own directory, and added a ↵Filippos Karapetis
slight hack to the SoundCommandParser constructor svn-id: r46430
2009-12-20Wrapped some more sound code around appropriate definesFilippos Karapetis
svn-id: r46429
2009-12-09SCI: Save/LoadGame Common::Rect saving now portableMartin Kiewitz
svn-id: r46304
2009-12-08SCI: new USE_OLDGFX for switching to oldgui, fixes loading of savedgames ↵Martin Kiewitz
under oldgui, oldgui doesn't like calling of setPortPic during loading svn-id: r46294
2009-12-08SCI: SciGui::getPortPic now uses byrefMartin Kiewitz
svn-id: r46293
2009-12-08SCI: Saving picPort now (fixes loading saved games in castle of dr. brain)Martin Kiewitz
svn-id: r46292
2009-12-04SCI: Recreate SciEvent on loading savesMartin Kiewitz
svn-id: r46253
2009-11-29Properly update the sound state in the sound command parser when loading a gameFilippos Karapetis
svn-id: r46196
2009-11-12Started objectifying kDoSound()Filippos Karapetis
svn-id: r45862
2009-11-12Some more tweaks for skipping the menu data in savegames, when ↵Filippos Karapetis
INCLUDE_OLDGFX isn't defined (it still problematic and goes out of sync) svn-id: r45858
2009-11-12The menu bar code is no longer used in the new graphics code, and the menu ↵Filippos Karapetis
state is no longer stored in saved games svn-id: r45854
2009-11-09SCI: Remove remarks about in-place loading, at least for now.Max Horn
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-04Removed unused variables and placed some more old code inside INCLUDE_OLDGFX ↵Filippos Karapetis
defines svn-id: r45668
2009-11-04- Changed the segment manager to be a static part of the engine, and stopped ↵Filippos Karapetis
deleting and recreating it when restoring games - Merged game_exit(), script_free_vm_memory() and script_free_engine() - Cleanup svn-id: r45666
2009-11-04Removed the reference to SciGuiCursor from EngineStateFilippos Karapetis
svn-id: r45660
2009-11-04priority_first and priority_last are not used by the new drawing code, thus ↵Filippos Karapetis
the new code didn't handle priority changes by kGraph() svn-id: r45658
2009-11-04Moved most of the code for playing sound effects and speech into a separate ↵Filippos Karapetis
class svn-id: r45653
2009-10-30- Removed status_bar_foreground and status_bar_background variables from the ↵Filippos Karapetis
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-30Remove unused includes when INCLUDE_OLDGFX is not set. Implemented the full ↵Filippos Karapetis
screen updates that the current menu code is doing using new graphics functions (still unfinished). Some cleanup. svn-id: r45536
2009-10-28Enclose all of the old graphics code within the INCLUDE_OLDGFX safeguard ↵Filippos Karapetis
(defined in sci.h) svn-id: r45459
2009-10-23Reset the graphics input after reconstructing game scripts. This fixes ↵Filippos Karapetis
savegame loading in KQ4 svn-id: r45350
2009-10-22CleanupFilippos Karapetis
svn-id: r45337
2009-10-18SCI: Rename game_obj to _gameObjMax Horn
svn-id: r45235
2009-10-18Removed unused references to operations.hFilippos Karapetis
svn-id: r45217
2009-10-17SCI: Fix delete/free mismatchesWillem Jan Palenstijn
svn-id: r45196
2009-10-13SCI: Don't save HunkTable segmentsMax Horn
svn-id: r45048
2009-10-13SCI: Skip loading HunkTable segments. This fixes a silly bug that can lead ↵Max Horn
to arbitrary numbers of HunkTable segments to be created by repeatedly saving and loading. svn-id: r45042
2009-10-11The _variables array is sized from syncArray, so there's no need to store ↵Filippos Karapetis
its size in the savegame svn-id: r44940
2009-10-11Implemented some advanced savegame functionality - loading and deleting ↵Filippos Karapetis
savegames from the GMM is now possible, and new saved games will also have thumbnails. Saving from the GMM creates corrupted saved games, so it has been disabled for now svn-id: r44930
2009-10-11More work on the Object classFilippos Karapetis
svn-id: r44921
2009-10-10Started rewriting the Object struct into a classFilippos Karapetis
svn-id: r44878
2009-10-10Fixed loading again - a regression from commit #44803Filippos Karapetis
svn-id: r44868