ScummVM API documentation
Asylum::Scene Class Reference
Inheritance diagram for Asylum::Scene:
Asylum::EventHandler

Public Member Functions

 Scene (AsylumEngine *engine)
 
void load (ResourcePackId packId)
 
void enter (ResourcePackId packId)
 
void enterLoad ()
 
bool handleEvent (const AsylumEvent &ev)
 
ResourcePackId getPackId ()
 
ActorgetActor (ActorIndex index=kActorInvalid)
 
void changePlayer (ActorIndex index)
 
void changePlayerUpdate (ActorIndex index)
 
bool updateSceneCoordinates (int32 targetX, int32 targetY, int32 val, bool checkSceneCoords=false, int32 *param=NULL)
 
bool updateScreen ()
 
void updateAmbientSounds ()
 
void drawRain ()
 
int32 findActionArea (ActionAreaType type, const Common::Point &pt, bool highlight=false)
 
bool rectIntersect (int32 x, int32 y, int32 x1, int32 y1, int32 x2, int32 y2, int32 x3, int32 y3) const
 
Polygonspolygons ()
 
WorldStatsworldstats ()
 
uint32 getFrameCounter ()
 
const byte * getSavedPalette ()
 
const Graphics::SurfacegetSavedScreen ()
 

Member Function Documentation

◆ load()

void Asylum::Scene::load ( ResourcePackId  packId)

Load the scene data

Parameters
packIdPackage id for the scene.

◆ enter()

void Asylum::Scene::enter ( ResourcePackId  packId)

Enter a scene

Parameters
packIdPackage id for the scene.

◆ enterLoad()

void Asylum::Scene::enterLoad ( )

Enter the scene after a loaded game

◆ handleEvent()

bool Asylum::Scene::handleEvent ( const AsylumEvent ev)
virtual

Handle events

Parameters
evThe event
Returns
true if it succeeds, false if it fails.

Implements Asylum::EventHandler.

◆ getPackId()

ResourcePackId Asylum::Scene::getPackId ( )
inline

Gets the current scene pack identifier.

Returns
The pack identifier.

◆ getActor()

Actor* Asylum::Scene::getActor ( ActorIndex  index = kActorInvalid)

Get a reference to an actor object from the WorldStats actor list. Default parameter just gets the instance associated with _playerActorIdx

◆ changePlayer()

void Asylum::Scene::changePlayer ( ActorIndex  index)

Change player actor

Parameters
indexnew index for the player actor

◆ changePlayerUpdate()

void Asylum::Scene::changePlayerUpdate ( ActorIndex  index)

Update player position when changing current player

Parameters
indexZero-based index of the actor

◆ updateSceneCoordinates()

bool Asylum::Scene::updateSceneCoordinates ( int32  targetX,
int32  targetY,
int32  val,
bool  checkSceneCoords = false,
int32 *  param = NULL 
)

Updates the scene coordinates.

Parameters
targetXTarget x coordinate.
targetYTarget y coordinate.
valThe value.
checkSceneCoordstrue to check scene coordinates.
[in,out]paramIf non-null, the parameter.
Returns
true if it succeeds, false if it fails.

◆ updateScreen()

bool Asylum::Scene::updateScreen ( )

Updates the screen

Returns
true if it succeeds, false if it fails.

◆ updateAmbientSounds()

void Asylum::Scene::updateAmbientSounds ( )

Updates the ambient sounds.

◆ drawRain()

void Asylum::Scene::drawRain ( )

Rain drawing function for chapter 5.

◆ findActionArea()

int32 Asylum::Scene::findActionArea ( ActionAreaType  type,
const Common::Point pt,
bool  highlight = false 
)

Determine if the supplied point intersects an action area's active region.

Parameters
typeThe type.
ptThe point.
highlight(optional) whether to highlight the polygons as they are checked.
Returns
The found action area.

◆ rectIntersect()

bool Asylum::Scene::rectIntersect ( int32  x,
int32  y,
int32  x1,
int32  y1,
int32  x2,
int32  y2,
int32  x3,
int32  y3 
) const

Check if rectangles intersect.

Parameters
xThe x coordinate.
yThe y coordinate.
x1The first x value.
y1The first y value.
x2The second x value.
y2The second y value.
x3The third int32.
y3The third int32.
Returns
true if it succeeds, false if it fails.

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