[Scummvm-cvs-logs] SF.net SVN: scummvm:[47451] scummvm/trunk/engines/agos
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Jan 23 00:58:24 CET 2010
Revision: 47451
http://scummvm.svn.sourceforge.net/scummvm/?rev=47451&view=rev
Author: fingolfin
Date: 2010-01-22 23:58:24 +0000 (Fri, 22 Jan 2010)
Log Message:
-----------
AGOS: cleanup
Modified Paths:
--------------
scummvm/trunk/engines/agos/script_s1.cpp
scummvm/trunk/engines/agos/sound.cpp
scummvm/trunk/engines/agos/sound.h
scummvm/trunk/engines/agos/subroutine.cpp
Modified: scummvm/trunk/engines/agos/script_s1.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_s1.cpp 2010-01-22 23:56:59 UTC (rev 47450)
+++ scummvm/trunk/engines/agos/script_s1.cpp 2010-01-22 23:58:24 UTC (rev 47451)
@@ -558,7 +558,7 @@
void AGOSEngine_Simon1::os1_loadStrings() {
// 185: load sound files
_soundFileId = getVarOrWord();
- if (getPlatform() == Common::kPlatformAmiga && getFeatures() & GF_TALKIE) {
+ if (getPlatform() == Common::kPlatformAmiga && (getFeatures() & GF_TALKIE)) {
char buf[10];
sprintf(buf, "%d%s", _soundFileId, "Effects");
_sound->readSfxFile(buf);
Modified: scummvm/trunk/engines/agos/sound.cpp
===================================================================
--- scummvm/trunk/engines/agos/sound.cpp 2010-01-22 23:56:59 UTC (rev 47450)
+++ scummvm/trunk/engines/agos/sound.cpp 2010-01-22 23:58:24 UTC (rev 47451)
@@ -574,7 +574,8 @@
}
}
-void Sound::readSfxFile(const char *filename) {
+// This method is only used by Simon1 Amiga Talkie & Windows
+void Sound::readSfxFile(const Common::String &filename) {
if (_hasEffectsFile)
return;
@@ -584,7 +585,7 @@
file->open(filename);
if (file->isOpen() == false) {
- error("readSfxFile: Can't load sfx file %s", filename);
+ error("readSfxFile: Can't load sfx file %s", filename.c_str());
}
delete _effects;
@@ -594,6 +595,7 @@
_effects = new WavSound(_mixer, file);
}
+// This method is only used by Simon2
void Sound::loadSfxTable(File *gameFile, uint32 base) {
stopAll();
@@ -606,14 +608,15 @@
_effects = new VocSound(_mixer, gameFile, base);
}
-void Sound::readVoiceFile(const char *filename) {
+// This method is only used by Simon1 Amiga Talkie
+void Sound::readVoiceFile(const Common::String &filename) {
_mixer->stopHandle(_voiceHandle);
File *file = new File();
file->open(filename);
if (file->isOpen() == false)
- error("readVoiceFile: Can't load voice file %s", filename);
+ error("readVoiceFile: Can't load voice file %s", filename.c_str());
delete _voice;
_voice = new RawSound(_mixer, file, 0, SOUND_BIG_ENDIAN);
Modified: scummvm/trunk/engines/agos/sound.h
===================================================================
--- scummvm/trunk/engines/agos/sound.h 2010-01-22 23:56:59 UTC (rev 47450)
+++ scummvm/trunk/engines/agos/sound.h 2010-01-22 23:58:24 UTC (rev 47451)
@@ -78,12 +78,14 @@
TYPE_SFX5 = 1 << 2
};
+protected:
void loadVoiceFile(const GameSpecificSettings *gss);
void loadSfxFile(const GameSpecificSettings *gss);
- void readSfxFile(const char *filename);
+public:
+ void readSfxFile(const Common::String &filename);
void loadSfxTable(Common::File *gameFile, uint32 base);
- void readVoiceFile(const char *filename);
+ void readVoiceFile(const Common::String &filename);
void playVoice(uint sound);
void playEffects(uint sound);
Modified: scummvm/trunk/engines/agos/subroutine.cpp
===================================================================
--- scummvm/trunk/engines/agos/subroutine.cpp 2010-01-22 23:56:59 UTC (rev 47450)
+++ scummvm/trunk/engines/agos/subroutine.cpp 2010-01-22 23:58:24 UTC (rev 47451)
@@ -383,7 +383,7 @@
filename.setChar('X', 4);
filename.setChar('X', 5);
if (atoi(filename.c_str() + 6) != 1 && atoi(filename.c_str() + 6) != 30)
- _sound->readSfxFile(filename.c_str());
+ _sound->readSfxFile(filename);
}
alignTableMem();
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