当前位置: 首页>>代码示例>>C++>>正文


C++ VideoEntryPtr::moveTo方法代码示例

本文整理汇总了C++中VideoEntryPtr::moveTo方法的典型用法代码示例。如果您正苦于以下问题:C++ VideoEntryPtr::moveTo方法的具体用法?C++ VideoEntryPtr::moveTo怎么用?C++ VideoEntryPtr::moveTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在VideoEntryPtr的用法示例。


在下文中一共展示了VideoEntryPtr::moveTo方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: o_elevatorTopMovie

void Mechanical::o_elevatorTopMovie(uint16 var, const ArgumentsArray &args) {
	uint16 startTime = args[0];
	uint16 endTime = args[1];

	VideoEntryPtr window = _vm->playMovie("hcelev", kMechanicalStack);
	window->moveTo(206, 38);
	window->setBounds(Audio::Timestamp(0, startTime, 600), Audio::Timestamp(0, endTime, 600));

	_vm->waitUntilMovieEnds(window);
}
开发者ID:AReim1982,项目名称:scummvm,代码行数:10,代码来源:mechanical.cpp

示例2: o_fortressStaircaseMovie

void Mechanical::o_fortressStaircaseMovie(uint16 var, const ArgumentsArray &args) {
	VideoEntryPtr staircase = _vm->playMovie("hhstairs", kMechanicalStack);
	staircase->moveTo(174, 222);

	if (_state.staircaseState) {
		staircase->setBounds(Audio::Timestamp(0, 840, 600), Audio::Timestamp(0, 1680, 600));
	} else {
		staircase->setBounds(Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 840, 600));
	}

	_vm->waitUntilMovieEnds(staircase);
}
开发者ID:AReim1982,项目名称:scummvm,代码行数:12,代码来源:mechanical.cpp

示例3: playMovieBlockingRiven

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), Volume = %d", _mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].volume);
			VideoEntryPtr ptr = open(_mlstRecords[i].movieID);
			ptr->moveTo(_mlstRecords[i].left, _mlstRecords[i].top);
			ptr->setVolume(_mlstRecords[i].volume);
			ptr->start();
			waitUntilMovieEnds(ptr);
			return;
		}
	}
}
开发者ID:mdtrooper,项目名称:scummvm,代码行数:13,代码来源:video.cpp

示例4: playMovieBlocking

void VideoManager::playMovieBlocking(const Common::String &fileName, uint16 x, uint16 y, bool clearScreen) {
	VideoEntryPtr ptr = open(fileName);
	if (!ptr)
		return;

	ptr->moveTo(x, y);

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

	ptr->start();
	waitUntilMovieEnds(ptr);
}
开发者ID:mdtrooper,项目名称:scummvm,代码行数:16,代码来源:video.cpp

示例5: playMovieRiven

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, Volume = %d", _mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].loop != 0 ? "looping" : "non-looping", _mlstRecords[i].volume);

			VideoEntryPtr ptr = open(_mlstRecords[i].movieID);
			if (ptr) {
				ptr->moveTo(_mlstRecords[i].left, _mlstRecords[i].top);
				ptr->setLooping(_mlstRecords[i].loop != 0);
				ptr->setVolume(_mlstRecords[i].volume);
				ptr->start();
			}

			return ptr;
		}
	}

	return VideoHandle();
}
开发者ID:mdtrooper,项目名称:scummvm,代码行数:19,代码来源:video.cpp

示例6: playMovie

VideoEntryPtr MystAreaVideo::playMovie() {
	// Check if the video is already running
	VideoEntryPtr handle = _vm->_video->findVideo(_videoFile);

	// If the video is not running, play it
	if (!handle) {
		handle = _vm->_video->playMovie(_videoFile, Audio::Mixer::kSFXSoundType);
		if (!handle)
			error("Failed to open '%s'", _videoFile.c_str());

		handle->moveTo(_left, _top);
		handle->setLooping(_loop != 0);

		Common::Rational rate;
		if (_playRate != 0) {
			rate = Common::Rational(_playRate, 100);
		} else {
			rate = 1;
		}

		if (_direction == -1) {
			rate = -rate;
			handle->seek(handle->getDuration());
		}

		handle->setRate(rate);
	} else {
		// Resume the video
		handle->pause(false);
		handle->start();
	}

	if (_playBlocking) {
		_vm->waitUntilMovieEnds(handle);
		return VideoEntryPtr();
	}

	return handle;
}
开发者ID:BenCastricum,项目名称:scummvm,代码行数:39,代码来源:myst_areas.cpp


注:本文中的VideoEntryPtr::moveTo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。