aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/tattoo
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-26 21:34:37 -0400
committerPaul Gilbert2015-06-26 21:34:37 -0400
commit9eb168583fb1a6b2464cf856adc4888d6b396f35 (patch)
tree999467380f23415bf8c56ec49c954ebcc4aa2667 /engines/sherlock/tattoo
parent47a3080af2ec686957ee813a309fb7704bd31dd8 (diff)
downloadscummvm-rg350-9eb168583fb1a6b2464cf856adc4888d6b396f35.tar.gz
scummvm-rg350-9eb168583fb1a6b2464cf856adc4888d6b396f35.tar.bz2
scummvm-rg350-9eb168583fb1a6b2464cf856adc4888d6b396f35.zip
SHERLOCK: Split FixedText into separate descendents for each game
Diffstat (limited to 'engines/sherlock/tattoo')
-rw-r--r--engines/sherlock/tattoo/tattoo_fixed_text.cpp51
-rw-r--r--engines/sherlock/tattoo/tattoo_fixed_text.h60
-rw-r--r--engines/sherlock/tattoo/widget_verbs.cpp13
3 files changed, 118 insertions, 6 deletions
diff --git a/engines/sherlock/tattoo/tattoo_fixed_text.cpp b/engines/sherlock/tattoo/tattoo_fixed_text.cpp
new file mode 100644
index 0000000000..ec0c8ca127
--- /dev/null
+++ b/engines/sherlock/tattoo/tattoo_fixed_text.cpp
@@ -0,0 +1,51 @@
+/* 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 "sherlock/tattoo/tattoo_fixed_text.h"
+#include "sherlock/sherlock.h"
+
+namespace Sherlock {
+
+namespace Tattoo {
+
+static const char *const FIXED_TEXT_ENGLISH[] = {
+ "Open",
+ "Look",
+ "Talk",
+ "Journal"
+};
+
+TattooFixedText::TattooFixedText(SherlockEngine *vm) : FixedText(vm) {
+}
+
+const Common::String TattooFixedText::getText(int fixedTextId) {
+ return Common::String(FIXED_TEXT_ENGLISH[fixedTextId]);
+}
+
+const Common::String TattooFixedText::getActionMessage(FixedTextActionId actionId, int messageIndex) {
+ return Common::String();
+}
+
+
+} // End of namespace Tattoo
+
+} // End of namespace Sherlock
diff --git a/engines/sherlock/tattoo/tattoo_fixed_text.h b/engines/sherlock/tattoo/tattoo_fixed_text.h
new file mode 100644
index 0000000000..1ac75aa56a
--- /dev/null
+++ b/engines/sherlock/tattoo/tattoo_fixed_text.h
@@ -0,0 +1,60 @@
+/* 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 SHERLOCK_TATTOO_FIXED_TEXT_H
+#define SHERLOCK_TATTOO_FIXED_TEXT_H
+
+#include "sherlock/fixed_text.h"
+
+namespace Sherlock {
+
+namespace Tattoo {
+
+enum FixedTextId {
+ kFixedText_Open,
+ kFixedText_Look,
+ kFixedText_Talk,
+ kFixedText_Journal
+};
+
+class TattooFixedText: public FixedText {
+private:
+public:
+ TattooFixedText(SherlockEngine *vm);
+ virtual ~TattooFixedText() {}
+
+ /**
+ * Gets text
+ */
+ virtual const Common::String getText(int fixedTextId);
+
+ /**
+ * Get action message
+ */
+ virtual const Common::String getActionMessage(FixedTextActionId actionId, int messageIndex);
+};
+
+} // End of namespace Scalpel
+
+} // End of namespace Sherlock
+
+#endif
diff --git a/engines/sherlock/tattoo/widget_verbs.cpp b/engines/sherlock/tattoo/widget_verbs.cpp
index 9cf4794fc0..a56b151e34 100644
--- a/engines/sherlock/tattoo/widget_verbs.cpp
+++ b/engines/sherlock/tattoo/widget_verbs.cpp
@@ -21,6 +21,7 @@
*/
#include "sherlock/tattoo/widget_verbs.h"
+#include "sherlock/tattoo/tattoo_fixed_text.h"
#include "sherlock/tattoo/tattoo_scene.h"
#include "sherlock/tattoo/tattoo_user_interface.h"
#include "sherlock/tattoo/tattoo_people.h"
@@ -41,9 +42,9 @@ void WidgetVerbs::activateVerbMenu(bool objectsOn) {
TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui;
TattooPeople &people = *(TattooPeople *)_vm->_people;
bool isWatson = false;
- Common::String strLook = fixedText.getText(kFixedText_Verb_Look);
- Common::String strTalk = fixedText.getText(kFixedText_Verb_Talk);
- Common::String strJournal = fixedText.getText(kFixedText_Verb_Journal);
+ Common::String strLook = fixedText.getText(kFixedText_Look);
+ Common::String strTalk = fixedText.getText(kFixedText_Talk);
+ Common::String strJournal = fixedText.getText(kFixedText_Journal);
if (talk._talkToAbort)
return;
@@ -108,9 +109,9 @@ void WidgetVerbs::execute() {
Common::Point scenePos = mousePos + ui._currentScroll;
bool noDesc = false;
- Common::String strLook = fixedText.getText(kFixedText_Verb_Look);
- Common::String strTalk = fixedText.getText(kFixedText_Verb_Talk);
- Common::String strJournal = fixedText.getText(kFixedText_Verb_Journal);
+ Common::String strLook = fixedText.getText(kFixedText_Look);
+ Common::String strTalk = fixedText.getText(kFixedText_Talk);
+ Common::String strJournal = fixedText.getText(kFixedText_Journal);
checkTabbingKeys(_verbCommands.size());