本文整理汇总了C++中dfhack::Maps::ReadLocalFeatures方法的典型用法代码示例。如果您正苦于以下问题:C++ Maps::ReadLocalFeatures方法的具体用法?C++ Maps::ReadLocalFeatures怎么用?C++ Maps::ReadLocalFeatures使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dfhack::Maps
的用法示例。
在下文中一共展示了Maps::ReadLocalFeatures方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
DFHack::Gui *Gui =DF->getGui();
cout << "Pausing..." << endl;
Gui->SetPauseState(true);
DF->Resume();
waitmsec(1000);
DF->Suspend();
*/
//Verify that every z-level at this location exists.
for (int32_t Z = 0; Z<= bz ;Z++)
{
if ( ! Mapz->isValidBlock(bx,by,Z) )
{
cout << "This block does't exist! Exiting." << endl;
#ifndef LINUX_BUILD
cin.ignore();
#endif
return 1;
}
}
//Get all the map features.
vector<DFHack::t_feature> global_features;
if (!Mapz->ReadGlobalFeatures(global_features))
{
cout << "Couldn't load global features! Probably a version problem." << endl;
#ifndef LINUX_BUILD
cin.ignore();
#endif
return 1;
}
std::map <DFHack::DFCoord, std::vector<DFHack::t_feature *> > local_features;
if (!Mapz->ReadLocalFeatures(local_features))
{
cout << "Couldn't load local features! Probably a version problem." << endl;
#ifndef LINUX_BUILD
cin.ignore();
#endif
return 1;
}
//Get info on current tile, to determine how to generate the pit
mapblock40d topblock;
Mapz->ReadBlock40d( bx, by, bz , &topblock );
//Related block info
DFCoord pc(bx,by);
mapblock40d block;
const TileRow * tp;
t_designation * d;
//////////////////////////////////////
//From top to bottom, dig this thing.
//////////////////////////////////////
//Top level, cap.
//Might make this an option in the future
//For now, no wall means no cap.
if (wallthickness)
{
Mapz->ReadBlock40d( bx, by, bz , &block );
for (uint32_t x=0;x<16;++x)
{
for (uint32_t y=0;y<16;++y)
{
if ( (pattern[x][y]>1) || (roof && pattern[x][y]) )