From 001d37b257b126dd6ef1dced70f94ff3d2806d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Dziwi=C5=84ski?= Date: Sat, 16 Feb 2013 22:37:43 +0100 Subject: CInstanceManager refactoring * removed classes managed by CInstanceManager except for CObject, CPyro, CBrain and CPhysics because of dependencies * refactored instance searching to use existing singleton instances of CApplication, CEngine and CRobotMain and calling their getter functions --- src/sound/oalsound/alsound.cpp | 10 +--------- src/sound/oalsound/alsound.h | 1 - src/sound/oalsound/buffer.cpp | 1 - src/sound/oalsound/channel.cpp | 3 +-- 4 files changed, 2 insertions(+), 13 deletions(-) (limited to 'src/sound/oalsound') diff --git a/src/sound/oalsound/alsound.cpp b/src/sound/oalsound/alsound.cpp index 2e44eef..83cbeb6 100644 --- a/src/sound/oalsound/alsound.cpp +++ b/src/sound/oalsound/alsound.cpp @@ -15,8 +15,6 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// alsound.cpp - #include "alsound.h" @@ -29,18 +27,12 @@ ALSound::ALSound() mAudioVolume = 1.0f; mMusicVolume = 1.0f; mMute = false; - mCurrentMusic = nullptr; - auto pointer = CInstanceManager::GetInstancePointer(); - if (pointer != nullptr) - CInstanceManager::GetInstancePointer()->AddInstance(CLASS_SOUND, this); + mCurrentMusic = nullptr; } ALSound::~ALSound() { - auto pointer = CInstanceManager::GetInstancePointer(); - if (pointer != nullptr) - CInstanceManager::GetInstancePointer()->DeleteInstance(CLASS_SOUND, this); CleanUp(); } diff --git a/src/sound/oalsound/alsound.h b/src/sound/oalsound/alsound.h index 530aa5e..bdf06b1 100644 --- a/src/sound/oalsound/alsound.h +++ b/src/sound/oalsound/alsound.h @@ -24,7 +24,6 @@ #include -#include "common/iman.h" #include "common/logger.h" #include "sound/sound.h" diff --git a/src/sound/oalsound/buffer.cpp b/src/sound/oalsound/buffer.cpp index d76b24a..edc3d74 100644 --- a/src/sound/oalsound/buffer.cpp +++ b/src/sound/oalsound/buffer.cpp @@ -14,7 +14,6 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// buffer.cpp #include "buffer.h" diff --git a/src/sound/oalsound/channel.cpp b/src/sound/oalsound/channel.cpp index 2b9af9b..3c8bc50 100644 --- a/src/sound/oalsound/channel.cpp +++ b/src/sound/oalsound/channel.cpp @@ -14,7 +14,6 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// channel.cpp #include "channel.h" @@ -349,4 +348,4 @@ void Channel::PopEnvelope() void Channel::SetLoop(bool loop) { mLoop = loop; -} \ No newline at end of file +} -- cgit v1.2.3-1-g7c22