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


C++ DrawList::add方法代码示例

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


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

示例1: drawMagnifyingGlass

void MinigameBbAnt::drawMagnifyingGlass(DrawList &drawList) {	
	scale2x(_objects[0].x - 28, _objects[0].y - 27);
	drawList.clear();
	drawList.add(_objects[0].anim->frameIndices[0], _objects[0].x, _objects[0].y, _objects[0].priority);
	drawList.add(_objects[0].anim->frameIndices[1], _objects[0].x, _objects[0].y, _objects[0].priority);
	drawList.add(_objects[0].anim->frameIndices[2], _objects[0].x, _objects[0].y, _objects[0].priority);
}
开发者ID:33d,项目名称:scummvm,代码行数:7,代码来源:bbant.cpp

示例2:

void MinigameBbAnt::buildDrawList2(DrawList &drawList) {
	buildDrawList1(drawList);
	drawList.add(getAnimation(168)->frameIndices[0], 40, 100, 2000);
	drawNumber(drawList, _counter1, 190, 112);
	drawNumber(drawList, _countdown5, 258, 112);
	drawList.add(getAnimation(169)->frameIndices[0], 120, 120, 2000);
	drawNumber(drawList, _counter4, 192, 132);
}
开发者ID:33d,项目名称:scummvm,代码行数:8,代码来源:bbant.cpp

示例3: loadScene

void BbvsEngine::loadScene(int sceneNum) {
	debug(0, "BbvsEngine::loadScene() sceneNum: %d", sceneNum);

	Common::String sprFilename = Common::String::format("vnm/vspr%04d.vnm", sceneNum);
	Common::String gamFilename = Common::String::format("vnm/game%04d.vnm", sceneNum);

	_screen->clear();

	_spriteModule->load(sprFilename.c_str());
	_gameModule->load(gamFilename.c_str());

	Palette palette = _spriteModule->getPalette();
	_screen->setPalette(palette);

	// Preload sounds
	for (uint i = 0; i < _gameModule->getPreloadSoundsCount(); ++i) {
		Common::String filename = Common::String::format("snd/snd%05d.aif", _gameModule->getPreloadSound(i));
		_sound->loadSound(filename);
	}

	if (sceneNum >= kMainMenu) {
		DrawList drawList;
		drawList.add(_gameModule->getBgSpriteIndex(0), 0, 0, 0);
		_screen->drawDrawList(drawList, _spriteModule);
		drawScreen();
	}

}
开发者ID:AReim1982,项目名称:scummvm,代码行数:28,代码来源:scene.cpp

示例4: drawNumber

int Minigame::drawNumber(DrawList &drawList, int number, int x, int y) {
	int digits = 1, rightX = x;
	
	for (int mag = 10; number / mag != 0; mag *= 10)
		++digits;
		
	rightX = x + digits * 10;
	x = rightX;
	
	while (digits--) {
		const int n = number % 10;
		x -= 10;
		drawList.add(_numbersAnim->frameIndices[n], x, y, 2000);
		number /= 10;
	}

	return rightX;
}
开发者ID:33d,项目名称:scummvm,代码行数:18,代码来源:minigame.cpp


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