|
| Scene (AsylumEngine *engine) |
|
void | load (ResourcePackId packId) |
|
void | enter (ResourcePackId packId) |
|
void | enterLoad () |
|
bool | handleEvent (const AsylumEvent &ev) |
|
ResourcePackId | getPackId () |
|
Actor * | getActor (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 |
|
Polygons * | polygons () |
|
WorldStats * | worldstats () |
|
uint32 | getFrameCounter () |
|
const byte * | getSavedPalette () |
|
const Graphics::Surface & | getSavedScreen () |
|
◆ load()
void Asylum::Scene::load |
( |
ResourcePackId |
packId | ) |
|
Load the scene data
- Parameters
-
packId | Package id for the scene. |
◆ enter()
void Asylum::Scene::enter |
( |
ResourcePackId |
packId | ) |
|
Enter a scene
- Parameters
-
packId | Package 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
-
- 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
-
index | new index for the player actor |
◆ changePlayerUpdate()
void Asylum::Scene::changePlayerUpdate |
( |
ActorIndex |
index | ) |
|
Update player position when changing current player
- Parameters
-
index | Zero-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
-
| targetX | Target x coordinate. |
| targetY | Target y coordinate. |
| val | The value. |
| checkSceneCoords | true to check scene coordinates. |
[in,out] | param | If 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
-
type | The type. |
pt | The 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
-
x | The x coordinate. |
y | The y coordinate. |
x1 | The first x value. |
y1 | The first y value. |
x2 | The second x value. |
y2 | The second y value. |
x3 | The third int32. |
y3 | The third int32. |
- Returns
- true if it succeeds, false if it fails.
The documentation for this class was generated from the following file: