diff options
author | whitertandrek | 2018-03-23 06:50:49 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | 8671e8bee37440019d7b6e495c69bd26e43b9e5c (patch) | |
tree | f81b451ace2ac425a286d62c4805bab46bde5dcb | |
parent | 636e226d738b736cc94cc309d2f3bd896ecc7462 (diff) | |
download | scummvm-rg350-8671e8bee37440019d7b6e495c69bd26e43b9e5c.tar.gz scummvm-rg350-8671e8bee37440019d7b6e495c69bd26e43b9e5c.tar.bz2 scummvm-rg350-8671e8bee37440019d7b6e495c69bd26e43b9e5c.zip |
PINK: added ActionPlayWithSfx and ActionSfx
-rw-r--r-- | engines/pink/module.mk | 1 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_play_with_sfx.cpp | 50 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_play_with_sfx.h | 55 |
3 files changed, 106 insertions, 0 deletions
diff --git a/engines/pink/module.mk b/engines/pink/module.mk index 3880787d96..a1996dd3ed 100644 --- a/engines/pink/module.mk +++ b/engines/pink/module.mk @@ -20,6 +20,7 @@ MODULE_OBJS = \ objects/actions/action_hide.o \ objects/actions/action_loop.o \ objects/actions/action_play.o \ + objects/actions/action_play_with_sfx.o \ objects/actions/action_sound.o \ objects/actions/action_still.o \ objects/actions/action_talk.o \ diff --git a/engines/pink/objects/actions/action_play_with_sfx.cpp b/engines/pink/objects/actions/action_play_with_sfx.cpp new file mode 100644 index 0000000000..9e4767d41d --- /dev/null +++ b/engines/pink/objects/actions/action_play_with_sfx.cpp @@ -0,0 +1,50 @@ +/* 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. + * + */ + +#include "action_play_with_sfx.h" +#include <pink/archive.h> +#include <common/debug.h> + +namespace Pink { + +void Pink::ActionPlayWithSfx::deserialize(Pink::Archive &archive) { + ActionPlay::deserialize(archive); + archive >> _isLoop >> _sfxArray; +} + +void Pink::ActionPlayWithSfx::toConsole() { + debug("\tActionPlayWithSfx: _name = %s, _fileName = %s, z = %u, _startFrame = %u," + " _endFrame = %u, _isLoop = %u", _name.c_str(), _fileName.c_str(), _z, _startFrame, _stopFrame); + for (int i = 0; i < _sfxArray.size(); ++i) { + _sfxArray[i]->toConsole(); + } +} + +void Pink::ActionSfx::deserialize(Pink::Archive &archive) { + archive >> _sfx >> _volume >> _frame; +} + +void Pink::ActionSfx::toConsole() { + debug("\t\tActionSfx: _name = %s, _volume = %u, _frame = %u"); +} + +} // End of namespace Pink
\ No newline at end of file diff --git a/engines/pink/objects/actions/action_play_with_sfx.h b/engines/pink/objects/actions/action_play_with_sfx.h new file mode 100644 index 0000000000..0a9307b2af --- /dev/null +++ b/engines/pink/objects/actions/action_play_with_sfx.h @@ -0,0 +1,55 @@ +/* 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. + * + */ + +#ifndef PINK_ACTION_PLAY_WITH_SFX_H +#define PINK_ACTION_PLAY_WITH_SFX_H + +#include <common/array.h> +#include "action_play.h" + +namespace Pink { + +class ActionSfx; + +class ActionPlayWithSfx : ActionPlay { + virtual void deserialize(Archive &archive); + virtual void toConsole(); + +private: + uint32 _isLoop; + Common::Array<ActionSfx*> _sfxArray; +}; + +class ActionSfx : Object { +public: + virtual void deserialize(Archive &archive); + virtual void toConsole(); + +private: + Common::String _sfx; + uint32 _volume; + uint32 _frame; +}; + +} + +#endif |