本文整理汇总了C++中Mission::createMinimap方法的典型用法代码示例。如果您正苦于以下问题:C++ Mission::createMinimap方法的具体用法?C++ Mission::createMinimap怎么用?C++ Mission::createMinimap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mission
的用法示例。
在下文中一共展示了Mission::createMinimap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleShow
void BriefMenu::handleShow() {
menu_manager_->saveBackground();
// grab mission info
int cur_miss = g_Session.getSelectedBlock().mis_id;
Mission *pMission = g_App.missions().loadMission(cur_miss);
assert(pMission != NULL);
g_Session.setMission(pMission);
// NOTE: map is required to be loaded here, because minimap is z=0
pMission->loadMap();
pMission->createMinimap();
bool found = false;
int maxx = pMission->mmax_x_;
int maxy = pMission->mmax_y_;
for (int x = 0; x < maxx && (!found); x++) {
for (int y = 0; y < maxy && (!found); y++) {
if (pMission->getMinimapOverlay(x, y) == 1) {
minimap_scroll_x_ = x;
minimap_scroll_y_ = y;
found = true;
}
}
}
minimap_blink_ticks_ = 0;
minimap_blink_ = 0;
start_line_ = 0;
updateClock();
if (g_Session.getSelectedBlock().infoLevel < pMission->getMaxInfoLvl()) {
getStatic(txtInfoId_)->setTextFormated("%d",
pMission->infoCost(g_Session.getSelectedBlock().infoLevel));
} else
getStatic(txtInfoId_)->setText("");
if (g_Session.getSelectedBlock().enhanceLevel < pMission->getMaxEnhanceLvl()) {
getStatic(txtEnhId_)->setTextFormated("%d",
pMission->enhanceCost(g_Session.getSelectedBlock().enhanceLevel));
} else
getStatic(txtEnhId_)->setText("");
g_System.showCursor();
}