Public Member Functions | |
MoviePlayer (Kernel *pKernel) | |
bool | loadMovie (const Common::String &filename, uint z) |
bool | unloadMovie () |
bool | play () |
bool | pause () |
void | update () |
bool | isMovieLoaded () |
bool | isPaused () |
float | getScaleFactor () |
void | setScaleFactor (float scaleFactor) |
double | getTime () |
Additional Inherited Members | |
Protected Member Functions inherited from Sword25::Service | |
Service (Kernel *pKernel) | |
Kernel * | GetKernel () const |
bool Sword25::MoviePlayer::loadMovie | ( | const Common::String & | filename, |
uint | z | ||
) |
Loads a movie file
This method loads a movie file and prepares it for playback. There can be oly one movie file loaded at a time. If you already have loaded a movie file, it will be unloaded and, if necessary, stopped playing.
Filename | The filename of the movie file to be loaded |
Z | Z indicates the position of the film on the main graphics layer |
bool Sword25::MoviePlayer::unloadMovie | ( | ) |
Unloads the currently loaded movie file.
bool Sword25::MoviePlayer::play | ( | ) |
Plays the loaded movie.
The film will be keeping the aspect ratio of the screen. If the film was previously paused with Pause(), then the film will resume playing.
bool Sword25::MoviePlayer::pause | ( | ) |
Pauses movie playback.
A paused movie can later be resumed by calling the Play() method again.
void Sword25::MoviePlayer::update | ( | ) |
This function must be called once per frame.
bool Sword25::MoviePlayer::isMovieLoaded | ( | ) |
Returns whether a film is loaded for playback.
bool Sword25::MoviePlayer::isPaused | ( | ) |
Returns whether the movie playback is paused.
float Sword25::MoviePlayer::getScaleFactor | ( | ) |
Returns the scaling factor for the loaded film.
When a movie is loaded, the scaling factor is automatically selected so that the film takes the maximum screen space, without the film being distorted.
void Sword25::MoviePlayer::setScaleFactor | ( | float | scaleFactor | ) |
Sets the factor by which the loaded film is to be scaled.
ScaleFactor | The desired scale factor. |
double Sword25::MoviePlayer::getTime | ( | ) |
Returns the current playing position in seconds.