ScummVM API documentation
MutationOfJB::ObjectAnimationTask Class Reference
Inheritance diagram for MutationOfJB::ObjectAnimationTask:
MutationOfJB::Task

Public Member Functions

void start () override
 
void update () override
 
void updateObjects ()
 
bool handleHardcodedAnimation (Object *const object)
 
- Public Member Functions inherited from MutationOfJB::Task
virtual void stop ()
 
void setTaskManager (TaskManager *taskMan)
 
TaskManagergetTaskManager ()
 
State getState () const
 

Additional Inherited Members

- Public Types inherited from MutationOfJB::Task
enum  State { IDLE, RUNNING, FINISHED }
 
- Protected Member Functions inherited from MutationOfJB::Task
void setState (State state)
 

Member Function Documentation

◆ updateObjects()

void MutationOfJB::ObjectAnimationTask::updateObjects ( )

Advances every object animation in the current scene to the next frame.

Normally the animation restarts after the last object frame. However, some animations have random elements to them. If _randomFrame is set, the animation restarts when _randomFrame is reached. Additionally, there is a chance with each frame until _randomFrame that the animation may jump straight to _randomFrame and continue until the last frame, then wrap around to the first frame.

Randomness is used to introduce variety - e.g. in the starting scene a perched bird occasionally spreads its wings.

◆ handleHardcodedAnimation()

bool MutationOfJB::ObjectAnimationTask::handleHardcodedAnimation ( Object *const  object)

Nasty, hacky stuff the original game does to make some complex animations in the Carnival and Tavern Earthquake scenes possible.

Parameters
objectObject to process.
Returns
Whether to draw the object. It's important to respect this, otherwise some of the hardcoded animations would suffer from graphical glitches.

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