Exemplo n.º 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;
}
Exemplo n.º 2
0
/*!
 * Return whether the cell is shrink to fit.
 */
bool Format::shrinkToFit() const
{
    return boolProperty(FormatPrivate::P_Alignment_ShinkToFit);
}
Exemplo n.º 3
0
/*!
 * Return whether the cell text is wrapped.
 */
bool Format::textWrap() const
{
    return boolProperty(FormatPrivate::P_Alignment_Wrap);
}
Exemplo n.º 4
0
/*!
 * Return whether the font is outline.
 */
bool Format::fontOutline() const
{
    return boolProperty(FormatPrivate::P_Font_Outline);
}
Exemplo n.º 5
0
/*!
 * Return whether the font is bold.
 */
bool Format::fontBold() const
{
    return boolProperty(FormatPrivate::P_Font_Bold);
}
Exemplo n.º 6
0
/*!
 * Return whether the font is strikeout.
 */
bool Format::fontStrikeOut() const
{
    return boolProperty(FormatPrivate::P_Font_StrikeOut);
}
Exemplo n.º 7
0
/*!
 * Return whether the font is italic.
 */
bool Format::fontItalic() const
{
    return boolProperty(FormatPrivate::P_Font_Italic);
}
Exemplo n.º 8
0
/*!
    Returns whether the locked protection property is set to true.
*/
bool Format::locked() const
{
    return boolProperty(FormatPrivate::P_Protection_Locked);
}
Exemplo n.º 9
0
/*!
    Returns whether the hidden protection property is set to true.
*/
bool Format::hidden() const
{
    return boolProperty(FormatPrivate::P_Protection_Hidden);
}