aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/ksound.cpp4
-rw-r--r--engines/sci/engine/savegame.cpp10
2 files changed, 7 insertions, 7 deletions
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 6852d99648..f899fa9a84 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -493,7 +493,7 @@ reg_t kDoSound_SCI01(EngineState *s, int funct_nr, int argc, reg_t *argv) {
s->_sound.sfx_song_set_status(handle, SOUND_STATUS_PLAYING);
s->_sound.sfx_song_set_loops(handle, looping);
s->_sound.sfx_song_renice(handle, pri);
- song_lib_set_restore_behavior(s->_sound._songlib, handle, rb);
+ s->_sound._songlib.setSongRestoreBehavior(handle, rb);
}
break;
@@ -798,7 +798,7 @@ reg_t kDoSound_SCI1(EngineState *s, int funct_nr, int argc, reg_t *argv) {
int looping = GET_SEL32V(obj, loop);
//int vol = GET_SEL32V(obj, vol);
int pri = GET_SEL32V(obj, pri);
- Song *song = song_lib_find(s->_sound._songlib, handle);
+ Song *song = s->_sound._songlib.findSong(handle);
if (GET_SEL32V(obj, nodePtr) && (song && number != song->_resourceNum)) {
s->_sound.sfx_song_set_status(handle, SOUND_STATUS_STOPPED);
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index b276a02cff..b93a4e652a 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -404,15 +404,15 @@ void StringFrag::saveLoadWithSerializer(Common::Serializer &s) {
static void sync_songlib_t(Common::Serializer &s, SongLibrary &obj) {
int songcount = 0;
if (s.isSaving())
- songcount = song_lib_count(obj);
+ songcount = obj.countSongs();
s.syncAsUint32LE(songcount);
if (s.isLoading()) {
- song_lib_init(&obj);
+ obj.initSounds();
while (songcount--) {
Song *newsong = (Song *)calloc(1, sizeof(Song));
sync_song_t(s, *newsong);
- song_lib_add(obj, newsong);
+ obj.addSong(newsong);
}
} else {
Song *seeker = *(obj._lib);
@@ -698,7 +698,7 @@ static void reconstruct_sounds(EngineState *s) {
if (s->_sound._songlib._lib)
seeker = *(s->_sound._songlib._lib);
else {
- song_lib_init(&s->_sound._songlib);
+ s->_sound._songlib.initSounds();
seeker = NULL;
}
@@ -782,7 +782,7 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
temp = retval->_sound._songlib;
retval->_sound.sfx_init(retval->resmgr, s->sfx_init_flags);
retval->sfx_init_flags = s->sfx_init_flags;
- song_lib_free(retval->_sound._songlib);
+ retval->_sound._songlib.freeSounds();
retval->_sound._songlib = temp;
_reset_graphics_input(retval);