aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-05-19 23:16:31 -0400
committerPaul Gilbert2015-05-19 23:16:31 -0400
commit0ca72189fd7bef87892839461e59fe94fc239ced (patch)
treef596f2f5d6e9f9a086ab3213eefab1b404b27e01
parent2e8e85310d245f273bb7c89c01d8eb5f0491c639 (diff)
downloadscummvm-rg350-0ca72189fd7bef87892839461e59fe94fc239ced.tar.gz
scummvm-rg350-0ca72189fd7bef87892839461e59fe94fc239ced.tar.bz2
scummvm-rg350-0ca72189fd7bef87892839461e59fe94fc239ced.zip
TSAGE: Beginnings of game & scene classes for Sherlock Holmes Logo display
-rw-r--r--engines/tsage/detection_tables.h16
-rw-r--r--engines/tsage/globals.cpp7
-rw-r--r--engines/tsage/module.mk1
-rw-r--r--engines/tsage/sherlock/sherlock_logo.cpp149
-rw-r--r--engines/tsage/sherlock/sherlock_logo.h73
-rw-r--r--engines/tsage/tsage.h3
6 files changed, 248 insertions, 1 deletions
diff --git a/engines/tsage/detection_tables.h b/engines/tsage/detection_tables.h
index da283a27e7..1ff0cde18c 100644
--- a/engines/tsage/detection_tables.h
+++ b/engines/tsage/detection_tables.h
@@ -185,6 +185,22 @@ static const tSageGameDescription gameDescriptions[] = {
GType_Ringworld2,
GF_CD | GF_ALT_REGIONS | GF_DEMO
},
+
+ // The Lost Files of Sherlock Holmes - The Case of the Serrated Scalpel (Logo)
+ {
+ {
+ "sherlock1",
+ "Logo",
+ AD_ENTRY1s("sf3.rlb", "c8e1a82c67c3caf57368eadde13dc15f", 0),
+ Common::EN_ANY,
+ Common::kPlatformDOS,
+ ADGF_NO_FLAGS,
+ GUIO0()
+ },
+ GType_Sherlock1,
+ GF_FLOPPY
+ },
+
{ AD_TABLE_END_MARKER, 0, 0 }
};
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index e75febfdbc..3b78af3e3e 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -27,6 +27,7 @@
#include "tsage/ringworld/ringworld_logic.h"
#include "tsage/ringworld2/ringworld2_logic.h"
#include "tsage/ringworld2/ringworld2_scenes0.h"
+#include "tsage/sherlock/sherlock_logo.h"
#include "tsage/staticres.h"
namespace TsAGE {
@@ -156,6 +157,12 @@ Globals::Globals() : _dialogCenter(160, 140), _gfxManagerInstance(_screenSurface
_game = new Ringworld2::Ringworld2Game();
_sceneHandler = new Ringworld2::SceneHandlerExt();
break;
+
+ case GType_Sherlock1:
+ _inventory = nullptr;
+ _sceneHandler = new SceneHandler();
+ _game = new Sherlock::SherlockLogo();
+ break;
}
}
diff --git a/engines/tsage/module.mk b/engines/tsage/module.mk
index d62f398c20..e23b157a95 100644
--- a/engines/tsage/module.mk
+++ b/engines/tsage/module.mk
@@ -47,6 +47,7 @@ MODULE_OBJS := \
ringworld2/ringworld2_vampire.o \
saveload.o \
scenes.o \
+ sherlock/sherlock_logo.o \
sound.o \
staticres.o \
tsage.o \
diff --git a/engines/tsage/sherlock/sherlock_logo.cpp b/engines/tsage/sherlock/sherlock_logo.cpp
new file mode 100644
index 0000000000..cca6982210
--- /dev/null
+++ b/engines/tsage/sherlock/sherlock_logo.cpp
@@ -0,0 +1,149 @@
+/* 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 "tsage/sherlock/sherlock_logo.h"
+#include "tsage/scenes.h"
+#include "tsage/tsage.h"
+
+namespace TsAGE {
+
+namespace Sherlock {
+
+void SherlockLogo::start() {
+ // Start the demo's single scene
+ g_globals->_sceneManager.changeScene(1);
+
+ g_globals->_events.setCursor(CURSOR_NONE);
+}
+
+Scene *SherlockLogo::createScene(int sceneNumber) {
+ // The demo only has a single scene, so ignore the scene number and always return it
+ return new SherlockLogoScene();
+}
+
+bool SherlockLogo::canLoadGameStateCurrently() {
+ return false;
+}
+
+bool SherlockLogo::canSaveGameStateCurrently() {
+ return false;
+}
+
+void SherlockLogo::processEvent(Event &event) {
+ if (event.eventType == EVENT_BUTTON_DOWN || (event.eventType == EVENT_KEYPRESS &&
+ event.kbd.keycode == Common::KEYCODE_ESCAPE))
+ quitGame();
+}
+
+void SherlockLogo::quitGame() {
+ g_vm->quitGame();
+}
+
+/*--------------------------------------------------------------------------*/
+
+void SherlockLogoScene::Action1::signal() {
+ SherlockLogoScene &scene = *(SherlockLogoScene *)GLOBALS._sceneManager._scene;
+
+ switch (_actionIndex++) {
+ case 0:
+ GLOBALS._scenePalette.loadPalette(1111);
+ GLOBALS._scenePalette.loadPalette(1);
+ GLOBALS._scenePalette.refresh();
+ setDelay(1);
+ break;
+
+ case 1:
+ GLOBALS._scenePalette.addFader(scene._palette1._palette, 256, 6, this);
+ break;
+
+ case 2:
+ scene._object1.postInit();
+ scene._object1.setVisage("0016.vis");
+ scene._object1._strip = 1;
+ scene._object1._frame = 1;
+ scene._object1.setPosition(Common::Point(169, 107));
+ scene._object1.changeZoom(100);
+ scene._object1._numFrames = 7;
+ scene._object1.animate(ANIM_MODE_5, this);
+ break;
+
+ case 3:
+ scene._object1._strip = 2;
+ scene._object1._strip = 1;
+ scene._object1.changeZoom(100);
+ scene._object1.animate(ANIM_MODE_4, 4, 11, 1, this);
+ break;
+
+ case 4:
+ GLOBALS._scenePalette.addFader(scene._palette2._palette, 256, 6, this);
+ break;
+
+ case 5:
+ scene._rect1 = Rect(0, 26, 312, 190);
+ scene._gfxManager2.activate();
+ scene._gfxManager2.fillRect(scene._rect1, 0);
+ scene._gfxManager2.deactivate();
+ //word_2B4AA = 3;
+
+ setDelay(10);
+ break;
+
+ case 6:
+ GLOBALS._scenePalette.loadPalette(12);
+ GLOBALS._scenePalette.refresh();
+ break;
+
+ // TODO
+
+ default:
+ break;
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
+void SherlockLogoScene::postInit(SceneObjectList *OwnerList) {
+ loadScene(10);
+ Scene::postInit(OwnerList);
+
+ _palette1.loadPalette(10);
+ _palette2.loadPalette(1111);
+ _palette2.loadPalette(1);
+ _palette3.loadPalette(1111);
+ _palette3.loadPalette(14);
+
+ _object4.postInit();
+ _object4.setVisage("0019.vis");
+ _object4._strip = 1;
+ _object4._frame = 1;
+ _object4.setPosition(Common::Point(155, 94));
+ _object4.changeZoom(100);
+ _object4.animate(ANIM_MODE_NONE, nullptr);
+ _object4.hide();
+
+ setAction(&_action1);
+}
+
+
+} // End of namespace Sherlock
+
+} // End of namespace TsAGE
diff --git a/engines/tsage/sherlock/sherlock_logo.h b/engines/tsage/sherlock/sherlock_logo.h
new file mode 100644
index 0000000000..947ea086bc
--- /dev/null
+++ b/engines/tsage/sherlock/sherlock_logo.h
@@ -0,0 +1,73 @@
+/* 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 TSAGE_SHERLOCK_LOGO_H
+#define TSAGE_SHERLOCK_LOGO_H
+
+#include "common/scummsys.h"
+#include "tsage/events.h"
+#include "tsage/core.h"
+#include "tsage/scenes.h"
+#include "tsage/globals.h"
+#include "tsage/sound.h"
+
+namespace TsAGE {
+
+namespace Sherlock {
+
+using namespace TsAGE;
+
+class Object : public SceneObject {
+public:
+ void setVisage(const Common::String &name) {}
+};
+
+class SherlockLogo: public Game {
+public:
+ virtual void start();
+ virtual Scene *createScene(int sceneNumber);
+ virtual void quitGame();
+ virtual void processEvent(Event &event);
+ virtual bool canSaveGameStateCurrently();
+ virtual bool canLoadGameStateCurrently();
+};
+
+class SherlockLogoScene: public Scene {
+ class Action1 : public Action {
+ public:
+ virtual void signal();
+ };
+public:
+ ScenePalette _palette1, _palette2, _palette3;
+ Object _object1, _object2, _object3, _object4;
+ Action1 _action1;
+ Rect _rect1;
+ GfxManager _gfxManager2;
+
+ virtual void postInit(SceneObjectList *OwnerList = NULL);
+};
+
+} // End of namespace Sherlock
+
+} // End of namespace TsAGE
+
+#endif
diff --git a/engines/tsage/tsage.h b/engines/tsage/tsage.h
index ea4f5da6ea..667a8daa59 100644
--- a/engines/tsage/tsage.h
+++ b/engines/tsage/tsage.h
@@ -42,7 +42,8 @@ namespace TsAGE {
enum {
GType_Ringworld = 0,
GType_BlueForce = 1,
- GType_Ringworld2 = 2
+ GType_Ringworld2 = 2,
+ GType_Sherlock1 = 5
};
enum {