PINK: added ActionTalk class

This commit is contained in:
whitertandrek 2018-03-23 06:27:55 +02:00 committed by Eugene Sandulenko
parent 74437eee91
commit 636e226d73
5 changed files with 84 additions and 3 deletions

View File

@ -22,6 +22,7 @@ MODULE_OBJS = \
objects/actions/action_play.o \
objects/actions/action_sound.o \
objects/actions/action_still.o \
objects/actions/action_talk.o \
objects/actions/walk_action.o \
objects/actors/actor.o \
objects/actors/lead_actor.o \

View File

@ -46,7 +46,7 @@ void ActionLoop::deserialize(Archive &archive) {
void ActionLoop::toConsole() {
debug("\tActionLoop: _name = %s, _fileName = %s, z = %u, _startFrame = %u,"
" _endFrame = %u, _intro = %u, style = %u",
" _endFrame = %u, _intro = %u, _style = %u",
_name.c_str(), _fileName.c_str(), _z, _startFrame, _stopFrame, _intro, _style);
}

View File

@ -30,10 +30,9 @@ namespace Pink {
class ActionLoop : public ActionPlay {
public:
virtual void deserialize(Archive &archive);
virtual void toConsole();
private:
protected:
enum Style {
kPingPong = 2,
kRandom = 3,

View File

@ -0,0 +1,40 @@
/* 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_talk.h"
#include <pink/archive.h>
#include <common/debug.h>
namespace Pink {
void ActionTalk::deserialize(Archive &archive) {
ActionLoop::deserialize(archive);
archive >> _vox;
}
void ActionTalk::toConsole() {
debug("\tActionTalk: _name = %s, _fileName = %s, z = %u, _startFrame = %u,"
" _endFrame = %u, _intro = %u, _style = %u, _vox = %s",
_name.c_str(), _fileName.c_str(), _z, _startFrame, _stopFrame, _intro, _style, _vox.c_str());
}
} // End of namespace Pink

View File

@ -0,0 +1,41 @@
/* 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_TALK_H
#define PINK_ACTION_TALK_H
#include <engines/pink/objects/actions/action_loop.h>
namespace Pink {
class ActionTalk : public ActionLoop {
public:
virtual void deserialize(Archive &archive);
virtual void toConsole();
private:
Common::String _vox;
};
} // End of namespace Pink
#endif