Пример #1
0
/* MapSide::getLight
 * Returns the light level of the given side
 *******************************************************************/
uint8_t MapSide::getLight()
{
	int light = 0;
	bool include_sector = true;

	if (parent_map->currentFormat() == MAP_UDMF && S_CMPNOCASE(parent_map->udmfNamespace(), "zdoom"))
	{
		light += intProperty("light");
		if (boolProperty("lightabsolute"))
			include_sector = false;
	}

	if (include_sector && sector)
		light += sector->getLight(0);

	// Clamp range
	if (light > 255)
		return 255;
	if (light < 0)
		return 0;
	return light;
}
Пример #2
0
/*!
 * Return whether the cell is shrink to fit.
 */
bool Format::shrinkToFit() const
{
    return boolProperty(FormatPrivate::P_Alignment_ShinkToFit);
}
Пример #3
0
/*!
 * Return whether the cell text is wrapped.
 */
bool Format::textWrap() const
{
    return boolProperty(FormatPrivate::P_Alignment_Wrap);
}
Пример #4
0
/*!
 * Return whether the font is outline.
 */
bool Format::fontOutline() const
{
    return boolProperty(FormatPrivate::P_Font_Outline);
}
Пример #5
0
/*!
 * Return whether the font is bold.
 */
bool Format::fontBold() const
{
    return boolProperty(FormatPrivate::P_Font_Bold);
}
Пример #6
0
/*!
 * Return whether the font is strikeout.
 */
bool Format::fontStrikeOut() const
{
    return boolProperty(FormatPrivate::P_Font_StrikeOut);
}
Пример #7
0
/*!
 * Return whether the font is italic.
 */
bool Format::fontItalic() const
{
    return boolProperty(FormatPrivate::P_Font_Italic);
}
Пример #8
0
/*!
    Returns whether the locked protection property is set to true.
*/
bool Format::locked() const
{
    return boolProperty(FormatPrivate::P_Protection_Locked);
}
Пример #9
0
/*!
    Returns whether the hidden protection property is set to true.
*/
bool Format::hidden() const
{
    return boolProperty(FormatPrivate::P_Protection_Hidden);
}