aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2015-05-01 17:27:59 -1000
committerPaul Gilbert2015-05-01 17:27:59 -1000
commitd9a42a80ffeb9eaee957bbc858f714e5cf362946 (patch)
treed6f43f3c31f33cdfed812bebcaf39f357aa9fbe8 /engines
parentb4c3d9840c99ce5d4e23eb0f646bd995f7d2c002 (diff)
downloadscummvm-rg350-d9a42a80ffeb9eaee957bbc858f714e5cf362946.tar.gz
scummvm-rg350-d9a42a80ffeb9eaee957bbc858f714e5cf362946.tar.bz2
scummvm-rg350-d9a42a80ffeb9eaee957bbc858f714e5cf362946.zip
SHERLOCK: Fix some remaining TODOs
Diffstat (limited to 'engines')
-rw-r--r--engines/sherlock/scene.cpp4
-rw-r--r--engines/sherlock/sound.cpp6
-rw-r--r--engines/sherlock/sound.h1
-rw-r--r--engines/sherlock/user_interface.cpp1
4 files changed, 8 insertions, 4 deletions
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index c714574e08..e69fb49766 100644
--- a/engines/sherlock/scene.cpp
+++ b/engines/sherlock/scene.cpp
@@ -1127,9 +1127,7 @@ void Scene::doBgAnim() {
if (sound._diskSoundPlaying && !*sound._soundIsOn) {
// Loaded sound just finished playing
- // TODO: This is horrible.. refactor into the Sound class
- delete[] sound._digiBuf;
- sound._diskSoundPlaying = false;
+ sound.freeDigiSound();
}
if (_restoreFlag) {
diff --git a/engines/sherlock/sound.cpp b/engines/sherlock/sound.cpp
index 1a6472a9e9..a452efd890 100644
--- a/engines/sherlock/sound.cpp
+++ b/engines/sherlock/sound.cpp
@@ -99,4 +99,10 @@ void Sound::waitTimerRoland(uint time) {
// TODO
}
+void Sound::freeDigiSound() {
+ delete[] _digiBuf;
+ _digiBuf = nullptr;
+ _diskSoundPlaying = false;
+}
+
} // End of namespace Sherlock
diff --git a/engines/sherlock/sound.h b/engines/sherlock/sound.h
index 28de692109..c85af2ac2a 100644
--- a/engines/sherlock/sound.h
+++ b/engines/sherlock/sound.h
@@ -67,6 +67,7 @@ public:
void stopMusic();
void stopSndFuncPtr(int v1, int v2);
void waitTimerRoland(uint time);
+ void freeDigiSound();
};
} // End of namespace Sherlock
diff --git a/engines/sherlock/user_interface.cpp b/engines/sherlock/user_interface.cpp
index f60e63a574..21a53c32ff 100644
--- a/engines/sherlock/user_interface.cpp
+++ b/engines/sherlock/user_interface.cpp
@@ -2019,7 +2019,6 @@ void UserInterface::journalControl() {
screen._backBuffer1.blitFrom(screen._backBuffer2);
scene.updateBackground();
screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT);
- // TODO
}
/**