本文整理汇总了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);
}
示例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);
}
示例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();
}
}
示例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;
}