aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-02-16 21:10:30 +0100
committerEugene Sandulenko2016-02-16 21:41:41 +0100
commit57449d32d423f8bd3ea57b306c2a4dcdae4843f1 (patch)
tree97f7796fd59880226c5790418e25c8f420ba54c6 /engines
parenta1e5c5a8cc7ec04fd08a0b6af60c6399a33d326a (diff)
downloadscummvm-rg350-57449d32d423f8bd3ea57b306c2a4dcdae4843f1.tar.gz
scummvm-rg350-57449d32d423f8bd3ea57b306c2a4dcdae4843f1.tar.bz2
scummvm-rg350-57449d32d423f8bd3ea57b306c2a4dcdae4843f1.zip
WAGE: Moved Sound class definition to sound.h
Diffstat (limited to 'engines')
-rw-r--r--engines/wage/entities.h9
-rw-r--r--engines/wage/sound.h64
-rw-r--r--engines/wage/world.cpp8
-rw-r--r--engines/wage/world.h9
4 files changed, 75 insertions, 15 deletions
diff --git a/engines/wage/entities.h b/engines/wage/entities.h
index 0f5016e8b1..3010c8a955 100644
--- a/engines/wage/entities.h
+++ b/engines/wage/entities.h
@@ -331,15 +331,6 @@ public:
const char *getFontName();
};
-class Sound {
-public:
- Sound(Common::String name, Common::SeekableReadStream *data) : _name(name), _data(data) {}
- ~Sound() { }
-
- Common::String _name;
- Common::SeekableReadStream *_data;
-};
-
} // End of namespace Wage
#endif
diff --git a/engines/wage/sound.h b/engines/wage/sound.h
new file mode 100644
index 0000000000..76d9202aeb
--- /dev/null
+++ b/engines/wage/sound.h
@@ -0,0 +1,64 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * MIT License:
+ *
+ * Copyright (c) 2009 Alexei Svitkine, Eugene Sandulenko
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef WAGE_SOUND_H
+#define WAGE_SOUND_H
+
+namespace Wage {
+
+class Sound {
+public:
+ Sound(Common::String name, Common::SeekableReadStream *data) : _name(name), _data(data) {}
+ ~Sound() { }
+
+ Common::String _name;
+ Common::SeekableReadStream *_data;
+};
+
+} // End of namespace Wage
+
+#endif
diff --git a/engines/wage/world.cpp b/engines/wage/world.cpp
index a387d95c4a..cb6e806ab0 100644
--- a/engines/wage/world.cpp
+++ b/engines/wage/world.cpp
@@ -50,6 +50,7 @@
#include "wage/wage.h"
#include "wage/entities.h"
#include "wage/script.h"
+#include "wage/sound.h"
#include "wage/world.h"
namespace Wage {
@@ -296,6 +297,13 @@ bool World::loadWorld(Common::MacResManager *resMan) {
return true;
}
+void World::addSound(Sound *sound) {
+ Common::String s = sound->_name;
+ s.toLowercase();
+ _sounds[s] = sound;
+ _orderedSounds.push_back(sound);
+}
+
Common::StringArray *World::readMenu(Common::SeekableReadStream *res) {
res->skip(10);
int enableFlags = res->readUint32BE();
diff --git a/engines/wage/world.h b/engines/wage/world.h
index 1416fc39e6..e9041139df 100644
--- a/engines/wage/world.h
+++ b/engines/wage/world.h
@@ -52,6 +52,8 @@ namespace Wage {
#define STORAGESCENE "STORAGE@"
+class Sound;
+
class World {
public:
World(WageEngine *engine);
@@ -125,12 +127,7 @@ public:
_orderedChrs.push_back(chr);
}
- void addSound(Sound *sound) {
- Common::String s = sound->_name;
- s.toLowercase();
- _sounds[s] = sound;
- _orderedSounds.push_back(sound);
- }
+ void addSound(Sound *sound);
private:
Common::StringArray *readMenu(Common::SeekableReadStream *res);