[Scummvm-cvs-logs] SF.net SVN: scummvm:[48059] scummvm/trunk/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Feb 14 13:23:22 CET 2010
Revision: 48059
http://scummvm.svn.sourceforge.net/scummvm/?rev=48059&view=rev
Author: thebluegr
Date: 2010-02-14 12:23:22 +0000 (Sun, 14 Feb 2010)
Log Message:
-----------
Moved the reference to AudioPlayer inside SciEngine (as it doesn't have a state, per se, and is static)
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/game.cpp
scummvm/trunk/engines/sci/engine/ksound.cpp
scummvm/trunk/engines/sci/engine/savegame.cpp
scummvm/trunk/engines/sci/engine/state.cpp
scummvm/trunk/engines/sci/engine/state.h
scummvm/trunk/engines/sci/sci.cpp
scummvm/trunk/engines/sci/sci.h
Modified: scummvm/trunk/engines/sci/engine/game.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/game.cpp 2010-02-14 01:54:21 UTC (rev 48058)
+++ scummvm/trunk/engines/sci/engine/game.cpp 2010-02-14 12:23:22 UTC (rev 48059)
@@ -301,7 +301,7 @@
// Reinit because some other code depends on having a valid state
game_init_sound(s, SFX_STATE_FLAG_NOSOUND, g_sci->_features->detectDoSoundType());
#else
- s->_audio->stopAllAudio();
+ g_sci->_audio->stopAllAudio();
s->_soundCmd->clearPlayList();
#endif
}
Modified: scummvm/trunk/engines/sci/engine/ksound.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/ksound.cpp 2010-02-14 01:54:21 UTC (rev 48058)
+++ scummvm/trunk/engines/sci/engine/ksound.cpp 2010-02-14 12:23:22 UTC (rev 48059)
@@ -52,10 +52,10 @@
uint32 startFrame = (argc > 2) ? argv[2].toUint16() * 75 : 0;
uint32 totalFrames = (argc > 3) ? argv[3].toUint16() * 75 : 0;
- return make_reg(0, s->_audio->audioCdPlay(track, startFrame, totalFrames));
+ return make_reg(0, g_sci->_audio->audioCdPlay(track, startFrame, totalFrames));
}
case kSciAudioStop:
- s->_audio->audioCdStop();
+ g_sci->_audio->audioCdStop();
if (getSciVersion() == SCI_VERSION_1_1)
return make_reg(0, 1);
@@ -67,10 +67,10 @@
case kSciAudioResume:
// This seems to be hacked up to update the CD instead of resuming
// audio like kDoAudio does.
- s->_audio->audioCdUpdate();
+ g_sci->_audio->audioCdUpdate();
break;
case kSciAudioPosition:
- return make_reg(0, s->_audio->audioCdPosition());
+ return make_reg(0, g_sci->_audio->audioCdPosition());
case kSciAudioRate: // No need to set the audio rate
case kSciAudioVolume: // The speech setting isn't used by CD Audio
case kSciAudioLanguage: // No need to set the language
@@ -102,7 +102,7 @@
uint16 module;
uint32 number;
- s->_audio->stopAudio();
+ g_sci->_audio->stopAudio();
if (argc == 2) {
module = 65535;
@@ -118,21 +118,21 @@
return NULL_REG;
}
- return make_reg(0, s->_audio->startAudio(module, number)); // return sample length in ticks
+ return make_reg(0, g_sci->_audio->startAudio(module, number)); // return sample length in ticks
}
case kSciAudioStop:
- s->_audio->stopAudio();
+ g_sci->_audio->stopAudio();
break;
case kSciAudioPause:
- s->_audio->pauseAudio();
+ g_sci->_audio->pauseAudio();
break;
case kSciAudioResume:
- s->_audio->resumeAudio();
+ g_sci->_audio->resumeAudio();
break;
case kSciAudioPosition:
- return make_reg(0, s->_audio->getAudioPosition());
+ return make_reg(0, g_sci->_audio->getAudioPosition());
case kSciAudioRate:
- s->_audio->setAudioRate(argv[1].toUint16());
+ g_sci->_audio->setAudioRate(argv[1].toUint16());
break;
case kSciAudioVolume: {
int16 volume = argv[1].toUint16();
@@ -171,7 +171,7 @@
case kSciAudioSyncStart: {
ResourceId id;
- s->_audio->stopSoundSync();
+ g_sci->_audio->stopSoundSync();
// Load sound sync resource and lock it
if (argc == 3) {
@@ -184,14 +184,14 @@
return s->r_acc;
}
- s->_audio->setSoundSync(id, argv[1], segMan);
+ g_sci->_audio->setSoundSync(id, argv[1], segMan);
break;
}
case kSciAudioSyncNext:
- s->_audio->doSoundSync(argv[1], segMan);
+ g_sci->_audio->doSoundSync(argv[1], segMan);
break;
case kSciAudioSyncStop:
- s->_audio->stopSoundSync();
+ g_sci->_audio->stopSoundSync();
break;
default:
warning("DoSync: Unhandled subfunction %d", argv[0].toUint16());
Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp 2010-02-14 01:54:21 UTC (rev 48058)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp 2010-02-14 12:23:22 UTC (rev 48059)
@@ -944,7 +944,7 @@
}
// Create a new EngineState object
- retval = new EngineState(s->_voc, s->_segMan, s->_audio);
+ retval = new EngineState(s->_voc, s->_segMan);
retval->_event = new SciEvent();
// Copy some old data
Modified: scummvm/trunk/engines/sci/engine/state.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/state.cpp 2010-02-14 01:54:21 UTC (rev 48058)
+++ scummvm/trunk/engines/sci/engine/state.cpp 2010-02-14 12:23:22 UTC (rev 48059)
@@ -33,8 +33,8 @@
namespace Sci {
-EngineState::EngineState(Vocabulary *voc, SegManager *segMan, AudioPlayer *audio)
-: _voc(voc), _segMan(segMan), _audio(audio), _dirseeker() {
+EngineState::EngineState(Vocabulary *voc, SegManager *segMan)
+: _voc(voc), _segMan(segMan), _dirseeker() {
#ifdef USE_OLD_MUSIC_FUNCTIONS
sfx_init_flags = 0;
Modified: scummvm/trunk/engines/sci/engine/state.h
===================================================================
--- scummvm/trunk/engines/sci/engine/state.h 2010-02-14 01:54:21 UTC (rev 48058)
+++ scummvm/trunk/engines/sci/engine/state.h 2010-02-14 12:23:22 UTC (rev 48059)
@@ -96,7 +96,7 @@
struct EngineState : public Common::Serializable {
public:
- EngineState(Vocabulary *voc, SegManager *segMan, AudioPlayer *audio);
+ EngineState(Vocabulary *voc, SegManager *segMan);
virtual ~EngineState();
virtual void saveLoadWithSerializer(Common::Serializer &ser);
@@ -111,7 +111,6 @@
SciEvent *_event; // Event handling
- AudioPlayer *_audio;
#ifdef USE_OLD_MUSIC_FUNCTIONS
SfxState _sound; /**< sound subsystem */
int sfx_init_flags; /**< flags the sfx subsystem was initialised with */
Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp 2010-02-14 01:54:21 UTC (rev 48058)
+++ scummvm/trunk/engines/sci/sci.cpp 2010-02-14 12:23:22 UTC (rev 48059)
@@ -180,8 +180,7 @@
_features = new GameFeatures(segMan, _kernel);
- // We'll set the GUI below
- _gamestate = new EngineState(_vocabulary, segMan, _audio);
+ _gamestate = new EngineState(_vocabulary, segMan);
_gamestate->_event = new SciEvent();
if (script_init_engine(_gamestate))
Modified: scummvm/trunk/engines/sci/sci.h
===================================================================
--- scummvm/trunk/engines/sci/sci.h 2010-02-14 01:54:21 UTC (rev 48058)
+++ scummvm/trunk/engines/sci/sci.h 2010-02-14 12:23:22 UTC (rev 48059)
@@ -212,11 +212,11 @@
GfxFrameout *_gfxFrameout; // kFrameout and the like for 32-bit gfx
#endif
+ AudioPlayer *_audio;
GameFeatures *_features;
private:
const ADGameDescription *_gameDescription;
- AudioPlayer *_audio;
ResourceManager *_resMan; /**< The resource manager */
EngineState *_gamestate;
Kernel *_kernel;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list