ScummVM API documentation
Sci::RobotDecoder Class Reference

#include <robot_decoder.h>

Public Types

enum  RobotStatus { kRobotStatusUninitialized = 0, kRobotStatusPlaying = 1, kRobotStatusEnd = 2, kRobotStatusPaused = 3 }
 
enum  { kUnspecified = 50000 }
 

Public Member Functions

 RobotDecoder (SegManager *segMan)
 
GuiResourceId getResourceId () const
 
void open (const GuiResourceId robotId, const reg_t plane, const int16 priority, const int16 x, const int16 y, const int16 scale)
 
void close ()
 
void pause ()
 
void resume ()
 
void showFrame (const uint16 frameNo, const uint16 newX, const uint16 newY, const uint16 newPriority)
 
int16 getCue () const
 
int16 getFrameNo () const
 
RobotStatus getStatus () const
 
const reg_t getPlaneId () const
 
Common::Point getPosition () const
 
int16 getScale () const
 
uint16 getFrameSize (Common::Rect &outRect) const
 
void doRobot ()
 
void frameAlmostVisible ()
 
void frameNowVisible ()
 
void expandCel (byte *target, const byte *source, const int16 celWidth, const int16 celHeight) const
 
int16 getPriority () const
 
void setPriority (const int16 newPriority)
 

Detailed Description

RobotDecoder implements the logic required for Robot animations.

Member Enumeration Documentation

◆ RobotStatus

The playback status of the robot.

Member Function Documentation

◆ open()

void Sci::RobotDecoder::open ( const GuiResourceId  robotId,
const reg_t  plane,
const int16  priority,
const int16  x,
const int16  y,
const int16  scale 
)

Opens a robot file for playback. Newly opened robots are paused by default.

◆ close()

void Sci::RobotDecoder::close ( )

Closes the currently open robot file.

◆ pause()

void Sci::RobotDecoder::pause ( )

Pauses the robot. Once paused, the audio for a robot is disabled until the end of playback.

◆ resume()

void Sci::RobotDecoder::resume ( )

Resumes a paused robot.

◆ showFrame()

void Sci::RobotDecoder::showFrame ( const uint16  frameNo,
const uint16  newX,
const uint16  newY,
const uint16  newPriority 
)

Moves robot to the specified frame and pauses playback.

Note
Called DisplayFrame in SSCI.

◆ getCue()

int16 Sci::RobotDecoder::getCue ( ) const

Retrieves the value associated with the current cue point.

◆ getFrameNo()

int16 Sci::RobotDecoder::getFrameNo ( ) const

Gets the currently displayed frame.

◆ getStatus()

RobotStatus Sci::RobotDecoder::getStatus ( ) const

Gets the playback status of the player.

◆ getPlaneId()

const reg_t Sci::RobotDecoder::getPlaneId ( ) const
inline

Gets the plane used to render the robot.

◆ getPosition()

Common::Point Sci::RobotDecoder::getPosition ( ) const
inline

Gets the origin of the robot.

◆ getScale()

int16 Sci::RobotDecoder::getScale ( ) const
inline

Gets the scale of the robot.

◆ getFrameSize()

uint16 Sci::RobotDecoder::getFrameSize ( Common::Rect outRect) const

Puts the current dimensions of the robot, in game script coordinates, into the given rect, and returns the total number of frames in the robot animation.

◆ doRobot()

void Sci::RobotDecoder::doRobot ( )

Pumps the robot player for the next frame of video. This is the main rendering function.

◆ frameAlmostVisible()

void Sci::RobotDecoder::frameAlmostVisible ( )

Submits any outstanding audio blocks that should be added to the queue before the robot frame becomes visible.

◆ frameNowVisible()

void Sci::RobotDecoder::frameNowVisible ( )

Evaluates frame drift and makes modifications to the player in order to ensure that future frames will arrive on time.

◆ expandCel()

void Sci::RobotDecoder::expandCel ( byte *  target,
const byte *  source,
const int16  celWidth,
const int16  celHeight 
) const

Scales a vertically compressed cel to its original uncompressed dimensions.

◆ setPriority()

void Sci::RobotDecoder::setPriority ( const int16  newPriority)

Sets the visual priority of the robot.

See also
Plane::_priority

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