Ejemplo n.º 1
0
void VideoManager::playMovieBlockingRiven(uint16 id) {
	for (uint16 i = 0; i < _mlstRecords.size(); i++)
		if (_mlstRecords[i].code == id) {
			debug(1, "Play tMOV %d (blocking) at (%d, %d)", _mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top);
			VideoHandle videoHandle = createVideoHandle(_mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, false, Sound::convertRivenVolume(_mlstRecords[i].volume));
			waitUntilMovieEnds(videoHandle);
			return;
		}
}
Ejemplo n.º 2
0
VideoHandle VideoManager::playMovieRiven(uint16 id) {
	for (uint16 i = 0; i < _mlstRecords.size(); i++)
		if (_mlstRecords[i].code == id) {
			debug(1, "Play tMOV %d (non-blocking) at (%d, %d) %s", _mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].loop != 0 ? "looping" : "non-looping");
			return createVideoHandle(_mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].loop != 0, Sound::convertRivenVolume(_mlstRecords[i].volume));
		}

	return NULL_VID_HANDLE;
}
Ejemplo n.º 3
0
void VideoManager::playMovieBlocking(const Common::String &filename, uint16 x, uint16 y, bool clearScreen, byte volume) {
	VideoHandle videoHandle = createVideoHandle(filename, x, y, false, volume);
	if (videoHandle == NULL_VID_HANDLE)
		return;

	// Clear screen if requested
	if (clearScreen) {
		_vm->_system->fillScreen(_vm->_system->getScreenFormat().RGBToColor(0, 0, 0));
		_vm->_system->updateScreen();
	}

	waitUntilMovieEnds(videoHandle);
}
Ejemplo n.º 4
0
VideoHandle VideoManager::playMovie(uint16 id, int16 x, int16 y, bool loop, byte volume) {
	VideoHandle videoHandle = createVideoHandle(id, x, y, loop, volume);
	if (videoHandle == NULL_VID_HANDLE)
		return NULL_VID_HANDLE;

	// Center x if requested
	if (x < 0)
		_videoStreams[videoHandle].x = (_vm->_system->getWidth() - _videoStreams[videoHandle]->getWidth()) / 2;

	// Center y if requested
	if (y < 0)
		_videoStreams[videoHandle].y = (_vm->_system->getHeight() - _videoStreams[videoHandle]->getHeight()) / 2;

	return videoHandle;
}
Ejemplo n.º 5
0
VideoHandle VideoManager::playMovie(const Common::String &filename, int16 x, int16 y, bool loop) {
	VideoHandle videoHandle = createVideoHandle(filename, x, y, loop);
	if (videoHandle == NULL_VID_HANDLE)
		return NULL_VID_HANDLE;

	// Center x if requested
	if (x < 0)
		_videoStreams[videoHandle].x = (_vm->_system->getWidth() - _videoStreams[videoHandle]->getWidth()) / 2;

	// Center y if requested
	if (y < 0)
		_videoStreams[videoHandle].y = (_vm->_system->getHeight() - _videoStreams[videoHandle]->getHeight()) / 2;

	return videoHandle;
}
Ejemplo n.º 6
0
void VideoManager::playMovieBlockingCentered(const Common::String &filename, bool clearScreen, byte volume) {
	VideoHandle videoHandle = createVideoHandle(filename, 0, 0, false, volume);
	if (videoHandle == NULL_VID_HANDLE)
		return;

	// Clear screen if requested
	if (clearScreen) {
		_vm->_system->fillScreen(_vm->_system->getScreenFormat().RGBToColor(0, 0, 0));
		_vm->_system->updateScreen();
	}

	_videoStreams[videoHandle].x = (_vm->_system->getWidth() - _videoStreams[videoHandle]->getWidth()) / 2;
	_videoStreams[videoHandle].y = (_vm->_system->getHeight() - _videoStreams[videoHandle]->getHeight()) / 2;

	waitUntilMovieEnds(videoHandle);
}