aboutsummaryrefslogtreecommitdiff
path: root/engines/pink
diff options
context:
space:
mode:
authorwhiterandrek2018-03-23 11:53:51 +0200
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commitf29b0a8f35cc46b4c52a9da248493bcad8ce81ce (patch)
treea54fafe71846ae899012bffac251c4a561e45c08 /engines/pink
parent8671e8bee37440019d7b6e495c69bd26e43b9e5c (diff)
downloadscummvm-rg350-f29b0a8f35cc46b4c52a9da248493bcad8ce81ce.tar.gz
scummvm-rg350-f29b0a8f35cc46b4c52a9da248493bcad8ce81ce.tar.bz2
scummvm-rg350-f29b0a8f35cc46b4c52a9da248493bcad8ce81ce.zip
PINK: added ActionText
Diffstat (limited to 'engines/pink')
-rw-r--r--engines/pink/module.mk1
-rw-r--r--engines/pink/objects/actions/action_text.cpp45
-rw-r--r--engines/pink/objects/actions/action_text.h47
3 files changed, 93 insertions, 0 deletions
diff --git a/engines/pink/module.mk b/engines/pink/module.mk
index a1996dd3ed..ca8812d72c 100644
--- a/engines/pink/module.mk
+++ b/engines/pink/module.mk
@@ -24,6 +24,7 @@ MODULE_OBJS = \
objects/actions/action_sound.o \
objects/actions/action_still.o \
objects/actions/action_talk.o \
+ objects/actions/action_text.o \
objects/actions/walk_action.o \
objects/actors/actor.o \
objects/actors/lead_actor.o \
diff --git a/engines/pink/objects/actions/action_text.cpp b/engines/pink/objects/actions/action_text.cpp
new file mode 100644
index 0000000000..ef21ef37ef
--- /dev/null
+++ b/engines/pink/objects/actions/action_text.cpp
@@ -0,0 +1,45 @@
+/* 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_text.h"
+#include <pink/archive.h>
+#include <common/debug.h>
+
+namespace Pink {
+
+void ActionText::deserialize(Archive &archive) {
+ for (int i = 0; i < 4 ; ++i) {
+ archive >> _bounds[i];
+ }
+ archive >> _centered >> _scrollBar
+ >> _textColor >> _backgroundColor;
+}
+
+void ActionText::toConsole() {
+ debug("\tActionText: _name = %s, _text = %s, "
+ "_bound0 = %u, _bound1 = %u, _bound2 = %u, _bound3 = %u _centered = %u, _scrollBar = %u, _textColor = %u _backgroundColor = %u",
+ _name.c_str(), _text.c_str(), _bounds[0], _bounds[1], _bounds[2], _bounds[3], _centered, _scrollBar, _textColor, _backgroundColor);
+}
+
+
+
+} \ No newline at end of file
diff --git a/engines/pink/objects/actions/action_text.h b/engines/pink/objects/actions/action_text.h
new file mode 100644
index 0000000000..e988254cf7
--- /dev/null
+++ b/engines/pink/objects/actions/action_text.h
@@ -0,0 +1,47 @@
+/* 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_TEXT_H
+#define PINK_ACTION_TEXT_H
+
+#include "action.h"
+
+namespace Pink {
+
+class ActionText : public Action {
+public:
+ void deserialize(Archive &archive) override;
+
+ void toConsole() override;
+
+private:
+ Common::String _text;
+ uint32 _bounds[4];
+ uint32 _centered;
+ uint32 _scrollBar;
+ uint32 _textColor;
+ uint32 _backgroundColor;
+};
+
+} // End of namespace Pink
+
+#endif