SHERLOCK: Add RT post-processing for loadScene

This commit is contained in:
Paul Gilbert 2015-06-04 19:37:59 -04:00
parent e71553af3b
commit 49295c5b8b
5 changed files with 57 additions and 20 deletions

View File

@ -143,17 +143,6 @@ private:
Common::String _rrmName;
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
*/
@ -186,6 +175,17 @@ private:
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

View File

@ -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();

View File

@ -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;

View File

@ -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();
@ -53,6 +58,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

View File

@ -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 {