diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/pink/module.mk | 1 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_loop.cpp | 44 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_loop.h | 48 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_play.h | 2 |
4 files changed, 94 insertions, 1 deletions
diff --git a/engines/pink/module.mk b/engines/pink/module.mk index 8621fe7d91..472164d79c 100644 --- a/engines/pink/module.mk +++ b/engines/pink/module.mk @@ -18,6 +18,7 @@ MODULE_OBJS = \ objects/actions/action.o \ objects/actions/action_cel.o \ objects/actions/action_hide.o \ + objects/actions/action_loop.o \ objects/actions/action_play.o \ objects/actions/action_sound.o \ objects/actions/action_still.o \ diff --git a/engines/pink/objects/actions/action_loop.cpp b/engines/pink/objects/actions/action_loop.cpp new file mode 100644 index 0000000000..dd80b48f4e --- /dev/null +++ b/engines/pink/objects/actions/action_loop.cpp @@ -0,0 +1,44 @@ +/* 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_loop.h" +#include <common/debug.h> +#include <pink/archive.h> + +namespace Pink { + +void ActionLoop::deserialize(Archive &archive) { + ActionPlay::deserialize(archive); + uint32 style; + archive >> _intro >> style; + assert(style <= 2); + _style = static_cast<Style>(style); +} + +void ActionLoop::toConsole() { + debug("\tActionLoop: _name = %s, _fileName = %s, z = %u, _startFrame = %u," + " _endFrame = %u, _intro = %u, style = %u", + _name.c_str(), _fileName.c_str(), _z, _startFrame, _stopFrame, _intro, _style); +} + +} // End of namespace Pink
\ No newline at end of file diff --git a/engines/pink/objects/actions/action_loop.h b/engines/pink/objects/actions/action_loop.h new file mode 100644 index 0000000000..659a21d63c --- /dev/null +++ b/engines/pink/objects/actions/action_loop.h @@ -0,0 +1,48 @@ +/* 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_LOOP_H +#define PINK_ACTION_LOOP_H + +#include "action_play.h" + +namespace Pink { + +class ActionLoop : public ActionPlay { +public: + virtual void deserialize(Archive &archive); + + virtual void toConsole(); + +private: + enum Style { + kPingPong = 0, + kRandom = 1, + kForward = 2 + }; + uint _intro; + Style _style; +}; + +} // End of namespace Pink + +#endif diff --git a/engines/pink/objects/actions/action_play.h b/engines/pink/objects/actions/action_play.h index 8ae91498a5..f5c6357fc5 100644 --- a/engines/pink/objects/actions/action_play.h +++ b/engines/pink/objects/actions/action_play.h @@ -36,7 +36,7 @@ public: virtual void start(bool unk); virtual void end(); -private: +protected: uint32 _stopFrame; }; |