From 9423c75dae4a4957384adf6b85719da7a06e93c0 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 30 May 2009 20:41:10 +0000 Subject: SCI: Added constructor&destructor to SfxState svn-id: r41047 --- engines/sci/sfx/core.cpp | 14 ++++++++++++++ engines/sci/sfx/core.h | 3 +++ 2 files changed, 17 insertions(+) (limited to 'engines/sci') diff --git a/engines/sci/sfx/core.cpp b/engines/sci/sfx/core.cpp index eadacdb5c9..6dcbad643c 100644 --- a/engines/sci/sfx/core.cpp +++ b/engines/sci/sfx/core.cpp @@ -334,6 +334,20 @@ int sfx_get_player_polyphony() { return 0; } +SfxState::SfxState() { + _it = NULL; + _flags = 0; + memset(&_songlib, 0, sizeof(_songlib)); + _song = NULL; + _suspended = 0; + _soundSync = 0; + _audioResource = 0; +} + +SfxState::~SfxState() { +} + + void SfxState::freezeTime() { /* Freezes the top song delay time */ const Audio::Timestamp ctime = Audio::Timestamp(g_system->getMillis(), SFX_TICKS_PER_SEC); diff --git a/engines/sci/sfx/core.h b/engines/sci/sfx/core.h index dc557f2f8c..0f34fc6208 100644 --- a/engines/sci/sfx/core.h +++ b/engines/sci/sfx/core.h @@ -54,6 +54,9 @@ public: // FIXME, make private AudioResource *_audioResource; /**< Used for audio resources in CD talkie games */ public: + SfxState(); + ~SfxState(); + /***********/ /* General */ /***********/ -- cgit v1.2.3