[Scummvm-cvs-logs] scummvm master -> 49295c5b8bdd20b34454b4596322d3870787a6ef

dreammaster dreammaster at scummvm.org
Fri Jun 5 01:39:13 CEST 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
49295c5b8b SHERLOCK: Add RT post-processing for loadScene


Commit: 49295c5b8bdd20b34454b4596322d3870787a6ef
    https://github.com/scummvm/scummvm/commit/49295c5b8bdd20b34454b4596322d3870787a6ef
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-06-04T19:37:59-04:00

Commit Message:
SHERLOCK: Add RT post-processing for loadScene

Changed paths:
    engines/sherlock/scene.h
    engines/sherlock/tattoo/tattoo.cpp
    engines/sherlock/tattoo/tattoo_scene.cpp
    engines/sherlock/tattoo/tattoo_scene.h
    engines/sherlock/user_interface.h



diff --git a/engines/sherlock/scene.h b/engines/sherlock/scene.h
index 6b59faa..0831de2 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 abafc7b..273f370 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 9569b4c..737d986 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 35f5957..963f7e9 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 c7a3987..7ae014d 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 {






More information about the Scummvm-git-logs mailing list