本文整理汇总了C++中MapSector::boolProperty方法的典型用法代码示例。如果您正苦于以下问题:C++ MapSector::boolProperty方法的具体用法?C++ MapSector::boolProperty怎么用?C++ MapSector::boolProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MapSector
的用法示例。
在下文中一共展示了MapSector::boolProperty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
info.push_back(S_FMT("Sector #%d", item_index));
// Sector height
info.push_back(S_FMT("Total Height: %d", cheight - fheight));
// ZDoom UDMF extras
/*
if (theGameConfiguration->udmfNamespace() == "zdoom") {
// Sector colour
rgba_t col = sector->getColour(0, true);
info.push_back(S_FMT("Colour: R%d, G%d, B%d", col.r, col.g, col.b));
}
*/
// --- Flat info ---
// Height
if (item_type == MapEditor::SEL_FLOOR)
info2.push_back(S_FMT("Floor Height: %d", fheight));
else
info2.push_back(S_FMT("Ceiling Height: %d", cheight));
// Light
int light = sector->intProperty("lightlevel");
if (theGameConfiguration->udmfNamespace() == "zdoom")
{
// Get extra light info
int fl = 0;
bool abs = false;
if (item_type == MapEditor::SEL_FLOOR)
{
fl = sector->intProperty("lightfloor");
abs = sector->boolProperty("lightfloorabsolute");
}
else
{
fl = sector->intProperty("lightceiling");
abs = sector->boolProperty("lightceilingabsolute");
}
// Set if absolute
if (abs)
{
light = fl;
fl = 0;
}
// Add info string
if (fl == 0)
info2.push_back(S_FMT("Light: %d", light));
else if (fl > 0)
info2.push_back(S_FMT("Light: %d (%d+%d)", light+fl, light, fl));
else
info2.push_back(S_FMT("Light: %d (%d-%d)", light+fl, light, -fl));
}
else
info2.push_back(S_FMT("Light: %d", light));
// ZDoom UDMF extras
if (theGameConfiguration->udmfNamespace() == "zdoom")
{
// Offsets
double xoff, yoff;
if (item_type == MapEditor::SEL_FLOOR)
{