ScummVM API documentation
Sherlock::Scene Class Referenceabstract
Inheritance diagram for Sherlock::Scene:
Sherlock::Scalpel::ScalpelScene Sherlock::Tattoo::TattooScene

Public Member Functions

void selectScene ()
 
void checkSceneFlags (bool mode)
 
ExitcheckForExit (const Common::Rect &r)
 
int toggleObject (const Common::String &name)
 
int checkForZones (const Common::Point &pt, int zoneType)
 
int whichZone (const Common::Point &pt)
 
virtual void freeScene ()
 
virtual int closestZone (const Common::Point &pt)=0
 
virtual int findBgShape (const Common::Point &pt)=0
 
virtual void synchronize (Serializer &s)
 
virtual void doBgAnim ()=0
 
virtual void updateBackground ()
 
virtual int startCAnim (int cAnimNum, int playRate=1)=0
 

Static Public Member Functions

static Sceneinit (SherlockEngine *vm)
 

Public Attributes

int _currentScene
 
int _goToScene
 
bool ** _sceneStats
 
bool _walkedInScene
 
int _version
 
bool _compressed
 
int _invGraphicItems
 
Common::String _comments
 
Common::Array< char > _descText
 
Common::Array< Common::Rect_zones
 
ObjectArray _bgShapes
 
Common::Array< CAnim_cAnim
 
Common::Array< byte > _sequenceBuffer
 
Common::Array< SceneImage_images
 
int _walkDirectory [40][40]
 
Common::Array< WalkArray_walkPoints
 
Common::Array< Exit_exits
 
SceneEntry _entrance
 
Common::Array< SceneSound_sounds
 
Common::Array< Object * > _canimShapes
 
Common::Array< ScaleZone_scaleZones
 
Common::StringArray _objSoundList
 
bool _restoreFlag
 
int _animating
 
bool _doBgAnimDone
 
int _tempFadeStyle
 
int _cAnimFramePause
 

Protected Member Functions

virtual bool loadScene (const Common::Path &filename)
 
virtual void checkBgShapes ()
 
virtual void drawAllShapes ()=0
 
virtual void paletteLoaded ()
 
 Scene (SherlockEngine *vm)
 

Protected Attributes

SherlockEngine_vm
 
Common::Path _roomFilename
 

Member Function Documentation

◆ loadScene()

virtual bool Sherlock::Scene::loadScene ( const Common::Path filename)
protectedvirtual

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.

Reimplemented in Sherlock::Tattoo::TattooScene, and Sherlock::Scalpel::ScalpelScene.

◆ checkBgShapes()

virtual void Sherlock::Scene::checkBgShapes ( )
protectedvirtual

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

Reimplemented in Sherlock::Tattoo::TattooScene, and Sherlock::Scalpel::ScalpelScene.

◆ drawAllShapes()

virtual void Sherlock::Scene::drawAllShapes ( )
protectedpure virtual

Draw all the shapes, people and NPCs in the correct order

Implemented in Sherlock::Tattoo::TattooScene, and Sherlock::Scalpel::ScalpelScene.

◆ paletteLoaded()

virtual void Sherlock::Scene::paletteLoaded ( )
inlineprotectedvirtual

Called by loadScene when the palette is loaded for Rose Tattoo

Reimplemented in Sherlock::Tattoo::TattooScene.

◆ selectScene()

void Sherlock::Scene::selectScene ( )

Handles loading the scene specified by _goToScene

◆ checkSceneFlags()

void Sherlock::Scene::checkSceneFlags ( bool  mode)

Check the scene's objects against the game flags. If false is passed, it means the scene has just been loaded. A value of true means that the scene is in use (ie. not just loaded)

◆ checkForExit()

Exit* Sherlock::Scene::checkForExit ( const Common::Rect r)

Check whether the passed area intersects with one of the scene's exits

◆ toggleObject()

int Sherlock::Scene::toggleObject ( const Common::String name)

Scans through the object list to find one with a matching name, and will call toggleHidden with all matches found. Returns the numer of matches found

◆ checkForZones()

int Sherlock::Scene::checkForZones ( const Common::Point pt,
int  zoneType 
)

Checks to see if the given position in the scene belongs to a given zone type. If it is, the zone is activated and used just like a TAKL zone or aFLAG_SET zone.

◆ whichZone()

int Sherlock::Scene::whichZone ( const Common::Point pt)

Check which zone the given position is located in.

◆ freeScene()

virtual void Sherlock::Scene::freeScene ( )
virtual

Fres all the graphics and other dynamically allocated data for the scene

Reimplemented in Sherlock::Tattoo::TattooScene.

◆ closestZone()

virtual int Sherlock::Scene::closestZone ( const Common::Point pt)
pure virtual

Returns the index of the closest zone to a given point.

Implemented in Sherlock::Tattoo::TattooScene, and Sherlock::Scalpel::ScalpelScene.

◆ findBgShape()

virtual int Sherlock::Scene::findBgShape ( const Common::Point pt)
pure virtual

Attempts to find a background shape within the passed bounds. If found, it will return the shape number, or -1 on failure.

Implemented in Sherlock::Tattoo::TattooScene, and Sherlock::Scalpel::ScalpelScene.

◆ synchronize()

virtual void Sherlock::Scene::synchronize ( Serializer s)
virtual

Synchronize the data for a savegame

Reimplemented in Sherlock::Tattoo::TattooScene.

◆ doBgAnim()

virtual void Sherlock::Scene::doBgAnim ( )
pure virtual

Draw all objects and characters.

Implemented in Sherlock::Tattoo::TattooScene, and Sherlock::Scalpel::ScalpelScene.

◆ updateBackground()

virtual void Sherlock::Scene::updateBackground ( )
virtual

Update the screen back buffer with all of the scene objects which need to be drawn

Reimplemented in Sherlock::Tattoo::TattooScene.

◆ startCAnim()

virtual int Sherlock::Scene::startCAnim ( int  cAnimNum,
int  playRate = 1 
)
pure virtual

Attempt to start a canimation sequence. It will load the requisite graphics, and then copy the canim object into the _canimShapes array to start the animation.

Parameters
cAnimNumThe canim object within the current scene
playRatePlay rate. 0 is invalid; 1=normal speed, 2=1/2 speed, etc. A negative playRate can also be specified to play the animation in reverse

Implemented in Sherlock::Tattoo::TattooScene, and Sherlock::Scalpel::ScalpelScene.


The documentation for this class was generated from the following file: