aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/scene.h22
-rw-r--r--engines/sherlock/tattoo/tattoo.cpp5
-rw-r--r--engines/sherlock/tattoo/tattoo_scene.cpp29
-rw-r--r--engines/sherlock/tattoo/tattoo_scene.h16
-rw-r--r--engines/sherlock/user_interface.h5
5 files changed, 57 insertions, 20 deletions
diff --git a/engines/sherlock/scene.h b/engines/sherlock/scene.h
index 6b59faae6d..0831de2c1f 100644
--- a/engines/sherlock/scene.h
+++ b/engines/sherlock/scene.h
@@ -144,17 +144,6 @@ private:
bool _loadingSavedGame;
/**
- * Loads the data associated for a given scene. The .BGD file's format is:
- * BGHEADER: Holds an index for the rest of the file
- * STRUCTS: The objects for the scene
- * IMAGES: The graphic information for the structures
- *
- * The _misc field of the structures contains the number of the graphic image
- * that it should point to after loading; _misc is then set to 0.
- */
- bool loadScene(const Common::String &filename);
-
- /**
* Loads sounds for the scene
*/
void loadSceneSounds();
@@ -187,6 +176,17 @@ protected:
SherlockEngine *_vm;
/**
+ * Loads the data associated for a given scene. The room resource file's format is:
+ * BGHEADER: Holds an index for the rest of the file
+ * STRUCTS: The objects for the scene
+ * IMAGES: The graphic information for the structures
+ *
+ * The _misc field of the structures contains the number of the graphic image
+ * that it should point to after loading; _misc is then set to 0.
+ */
+ virtual bool loadScene(const Common::String &filename);
+
+ /**
* Checks all the background shapes. If a background shape is animating,
* it will flag it as needing to be drawn. If a non-animating shape is
* colliding with another shape, it will also flag it as needing drawing
diff --git a/engines/sherlock/tattoo/tattoo.cpp b/engines/sherlock/tattoo/tattoo.cpp
index abafc7bf6e..273f37051e 100644
--- a/engines/sherlock/tattoo/tattoo.cpp
+++ b/engines/sherlock/tattoo/tattoo.cpp
@@ -20,8 +20,9 @@
*
*/
-#include "sherlock/tattoo/tattoo.h"
#include "engines/util.h"
+#include "sherlock/tattoo/tattoo.h"
+#include "sherlock/tattoo/tattoo_scene.h"
namespace Sherlock {
@@ -48,7 +49,7 @@ void TattooEngine::initialize() {
_res->addToCache("walk.lib");
// Starting scene
- _scene->_goToScene = 91;
+ _scene->_goToScene = STARTING_INTRO_SCENE;
// Load an initial palette
loadInitialPalette();
diff --git a/engines/sherlock/tattoo/tattoo_scene.cpp b/engines/sherlock/tattoo/tattoo_scene.cpp
index 9569b4c3b4..737d986f81 100644
--- a/engines/sherlock/tattoo/tattoo_scene.cpp
+++ b/engines/sherlock/tattoo/tattoo_scene.cpp
@@ -30,12 +30,6 @@ namespace Sherlock {
namespace Tattoo {
-TattooScene::TattooScene(SherlockEngine *vm) : Scene(vm) {
- _arrowZone = -1;
- _mask = _mask1 = nullptr;
- _maskCounter = 0;
-}
-
struct ShapeEntry {
Object *_shape;
Person *_person;
@@ -53,6 +47,29 @@ static bool sortImagesY(const ShapeEntry &s1, const ShapeEntry &s2) {
return s1._yp <= s2._yp;
}
+/*----------------------------------------------------------------*/
+
+TattooScene::TattooScene(SherlockEngine *vm) : Scene(vm) {
+ _arrowZone = -1;
+ _mask = _mask1 = nullptr;
+ _maskCounter = 0;
+ _labTableScene = false;
+}
+
+bool TattooScene::loadScene(const Common::String &filename) {
+ TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui;
+
+ bool result = Scene::loadScene(filename);
+
+ if (_currentScene != STARTING_INTRO_SCENE) {
+ // Set the menu/ui mode and whether we're in a lab table close-up scene
+ _labTableScene = _currentScene > 91 && _currentScene < 100;
+ ui._menuMode = _labTableScene ? LAB_MODE : STD_MODE;
+ }
+
+ return result;
+}
+
void TattooScene::drawAllShapes() {
People &people = *_vm->_people;
Screen &screen = *_vm->_screen;
diff --git a/engines/sherlock/tattoo/tattoo_scene.h b/engines/sherlock/tattoo/tattoo_scene.h
index 35f5957c34..963f7e928f 100644
--- a/engines/sherlock/tattoo/tattoo_scene.h
+++ b/engines/sherlock/tattoo/tattoo_scene.h
@@ -30,11 +30,16 @@ namespace Sherlock {
namespace Tattoo {
+enum {
+ STARTING_INTRO_SCENE = 91
+};
+
class TattooScene : public Scene {
private:
int _arrowZone;
int _maskCounter;
Common::Point _maskOffset;
+ bool _labTableScene;
private:
void doBgAnimCheckCursor();
@@ -54,6 +59,17 @@ private:
int getScaleVal(const Common::Point &pt);
protected:
/**
+ * Loads the data associated for a given scene. The room resource file's format is:
+ * BGHEADER: Holds an index for the rest of the file
+ * STRUCTS: The objects for the scene
+ * IMAGES: The graphic information for the structures
+ *
+ * The _misc field of the structures contains the number of the graphic image
+ * that it should point to after loading; _misc is then set to 0.
+ */
+ virtual bool loadScene(const Common::String &filename);
+
+ /**
* Checks all the background shapes. If a background shape is animating,
* it will flag it as needing to be drawn. If a non-animating shape is
* colliding with another shape, it will also flag it as needing drawing
diff --git a/engines/sherlock/user_interface.h b/engines/sherlock/user_interface.h
index c7a398741e..7ae014dad1 100644
--- a/engines/sherlock/user_interface.h
+++ b/engines/sherlock/user_interface.h
@@ -47,7 +47,10 @@ enum MenuMode {
GIVE_MODE = 9,
JOURNAL_MODE = 10,
FILES_MODE = 11,
- SETUP_MODE = 12
+ SETUP_MODE = 12,
+
+ // Rose Tattoo specific
+ LAB_MODE = 20
};
class UserInterface {