diff options
author | Travis Howell | 2009-07-11 11:48:01 +0000 |
---|---|---|
committer | Travis Howell | 2009-07-11 11:48:01 +0000 |
commit | e3398c0cc73999524e92774fb889a0d22eea552b (patch) | |
tree | ff1534d1e5e72f1965b747b21b594ef30d5e16ab /engines/sci/sfx | |
parent | 0577bee93893a55be1b2a067ec18f3c8ad462358 (diff) | |
parent | 2ceea652e62b301adea4628cebe4116191aa4998 (diff) | |
download | scummvm-rg350-e3398c0cc73999524e92774fb889a0d22eea552b.tar.gz scummvm-rg350-e3398c0cc73999524e92774fb889a0d22eea552b.tar.bz2 scummvm-rg350-e3398c0cc73999524e92774fb889a0d22eea552b.zip |
Merged revisions 42360-42361,42364-42366,42368-42378,42380 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk
........
r42360 | Kirben | 2009-07-11 10:38:50 +1000 (Sat, 11 Jul 2009) | 1 line
Fix recent regression in AGOSEngine_Simon1::drawImage().
........
r42361 | wjpalenstijn | 2009-07-11 10:47:32 +1000 (Sat, 11 Jul 2009) | 3 lines
Fix SAGA outline generation algorithm for characters
that are copies of earlier characters. (5 characters in IHNM.)
This fixes #1904624.
........
r42364 | Kirben | 2009-07-11 11:40:53 +1000 (Sat, 11 Jul 2009) | 1 line
Fix bug #2819628 - DETECTOR: Atlantis CD sets wrong gui options.
........
r42365 | lordhoto | 2009-07-11 11:54:27 +1000 (Sat, 11 Jul 2009) | 1 line
Fix graphics not updating, when loading a save in Kyra1. This fixes problems when loading saves in rooms like Brynn's temple, which play animations directly on scene enter.
........
r42366 | lordhoto | 2009-07-11 11:54:42 +1000 (Sat, 11 Jul 2009) | 1 line
Removed the now uneeded "Screen::_disableScreen" flag.
........
r42368 | dreammaster | 2009-07-11 15:10:13 +1000 (Sat, 11 Jul 2009) | 1 line
Bugfix to show the mouse cursor when restarting the game after returning to launcher
........
r42369 | dreammaster | 2009-07-11 15:12:17 +1000 (Sat, 11 Jul 2009) | 1 line
Active background screens are now properly freed when the game exits
........
r42370 | dreammaster | 2009-07-11 15:14:42 +1000 (Sat, 11 Jul 2009) | 1 line
Added initialisation of paging screens when the game starts
........
r42371 | thebluegr | 2009-07-11 16:19:29 +1000 (Sat, 11 Jul 2009) | 1 line
Fixed regression in the script parser from commit 42260
........
r42372 | thebluegr | 2009-07-11 16:33:19 +1000 (Sat, 11 Jul 2009) | 1 line
Applied a slightly modified patch from clone2727 which adds static selector names to some demos which are missing them (KQ4, LSL1, LSL3, Iceman and Christmas1992)
........
r42373 | thebluegr | 2009-07-11 16:34:25 +1000 (Sat, 11 Jul 2009) | 1 line
Removed an invalid detection entry
........
r42374 | thebluegr | 2009-07-11 16:43:01 +1000 (Sat, 11 Jul 2009) | 1 line
Applied slightly modified patch 2819002 - "SCI: resource-view-patch on SQ5/German fix"
........
r42375 | thebluegr | 2009-07-11 16:53:39 +1000 (Sat, 11 Jul 2009) | 1 line
Applied patch 2818733 - "SCI: Timer iterator for audio resources played via doSound"
........
r42376 | Kirben | 2009-07-11 17:03:28 +1000 (Sat, 11 Jul 2009) | 1 line
Only error out, if checkStaticSelectorNames() fails.
........
r42377 | dreammaster | 2009-07-11 18:16:55 +1000 (Sat, 11 Jul 2009) | 1 line
Bugfix to properly save the currently playing midi music when saving a scene
........
r42378 | wjpalenstijn | 2009-07-11 19:45:25 +1000 (Sat, 11 Jul 2009) | 1 line
Fix oversight in r42361 and also handle consecutive copied characters in SAGA.
........
r42380 | drmccoy | 2009-07-11 20:24:06 +1000 (Sat, 11 Jul 2009) | 1 line
Explicitely instantiate the decompressWizImage() templates, so that they won't be optimized away, as they are also used in akos.cpp
........
svn-id: r42381
Diffstat (limited to 'engines/sci/sfx')
-rw-r--r-- | engines/sci/sfx/iterator.cpp | 35 | ||||
-rw-r--r-- | engines/sci/sfx/iterator.h | 6 | ||||
-rw-r--r-- | engines/sci/sfx/iterator_internal.h | 22 |
3 files changed, 63 insertions, 0 deletions
diff --git a/engines/sci/sfx/iterator.cpp b/engines/sci/sfx/iterator.cpp index ebba4bceac..6c5706a8c1 100644 --- a/engines/sci/sfx/iterator.cpp +++ b/engines/sci/sfx/iterator.cpp @@ -1164,6 +1164,41 @@ int CleanupSongIterator::nextCommand(byte *buf, int *result) { return SI_FINISHED; } +/**********************/ +/*-- Timer iterator --*/ +/**********************/ +TimerSongIterator::TimerSongIterator(int delta) + : _delta(delta) { +} + +int TimerSongIterator::nextCommand(byte *buf, int *result) { + if (_delta) { + return _delta; + } + return SI_FINISHED; +} + +SongIterator *TimerSongIterator::handleMessage(Message msg) { + return NULL; +} + +int TimerSongIterator::getTimepos() { + return 0; +} + +Audio::AudioStream *TimerSongIterator::getAudioStream() { + return NULL; +} + +SongIterator *TimerSongIterator::clone(int delta) { + TimerSongIterator *newit = new TimerSongIterator(*this); + return newit; +} + +SongIterator *new_timer_iterator(int delta) { + return new TimerSongIterator(delta); +} + /**********************************/ /*-- Fast-forward song iterator --*/ /**********************************/ diff --git a/engines/sci/sfx/iterator.h b/engines/sci/sfx/iterator.h index 547c479bbf..4e6df367c9 100644 --- a/engines/sci/sfx/iterator.h +++ b/engines/sci/sfx/iterator.h @@ -281,6 +281,12 @@ int songit_next(SongIterator **it, byte *buf, int *result, int mask); */ SongIterator *songit_new(byte *data, uint size, SongIteratorType type, songit_id_t id); +/* Constructs a new song timer iterator object +** Parameters: (int) delta: The delta after which to fire SI_FINISHED +** Returns : (SongIterator *) A newly allocated but uninitialized song +** iterator +*/ +SongIterator *new_timer_iterator(int delta); /* Handles a message to the song iterator ** Parameters: (SongIterator **): A reference to the variable storing the song iterator diff --git a/engines/sci/sfx/iterator_internal.h b/engines/sci/sfx/iterator_internal.h index 7d5a17fd25..00044b8ab7 100644 --- a/engines/sci/sfx/iterator_internal.h +++ b/engines/sci/sfx/iterator_internal.h @@ -181,6 +181,28 @@ private: #define PLAYMASK_NONE 0x0 +/***************************/ +/*--------- Timer ---------*/ +/***************************/ + +/** + * A song iterator which waits a specified time and then fires + * SI_FINISHED. Used by DoSound, where audio resources are played (SCI1) + */ +class TimerSongIterator : public SongIterator { +protected: + int _delta; /**!< Remaining time */ + +public: + TimerSongIterator(int delta); + + int nextCommand(byte *buf, int *result); + Audio::AudioStream *getAudioStream(); + SongIterator *handleMessage(Message msg); + int getTimepos(); + SongIterator *clone(int delta); +}; + /**********************************/ /*--------- Fast Forward ---------*/ /**********************************/ |