Пример #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 the fill pattern.
*/
Format::FillPattern Format::fillPattern() const
{
    return static_cast<FillPattern>(intProperty(FormatPrivate::P_Fill_Pattern, PatternNone));
}
Пример #3
0
/*!
    Returns the diagonal border type.
*/
Format::DiagonalBorderType Format::diagonalBorderType() const
{
    return static_cast<DiagonalBorderType>(intProperty(FormatPrivate::P_Border_DiagonalType));
}
Пример #4
0
/*!
    Return the diagonla border style.
*/
Format::BorderStyle Format::diagonalBorderStyle() const
{
    return static_cast<BorderStyle>(intProperty(FormatPrivate::P_Border_DiagonalStyle));
}
Пример #5
0
/*!
    Returns the bottom border style.
*/
Format::BorderStyle Format::bottomBorderStyle() const
{
    return static_cast<BorderStyle>(intProperty(FormatPrivate::P_Border_BottomStyle));
}
Пример #6
0
/*!
    Returns the top border style.
*/
Format::BorderStyle Format::topBorderStyle() const
{
    return static_cast<BorderStyle>(intProperty(FormatPrivate::P_Border_TopStyle));
}
Пример #7
0
/*!
    Returns the right border style.
*/
Format::BorderStyle Format::rightBorderStyle() const
{
    return static_cast<BorderStyle>(intProperty(FormatPrivate::P_Border_RightStyle));
}
Пример #8
0
/*!
 * Return the text indentation level.
 */
int Format::indent() const
{
    return intProperty(FormatPrivate::P_Alignment_Indent);
}
Пример #9
0
/*!
 * Return the text rotation.
 */
int Format::rotation() const
{
    return intProperty(FormatPrivate::P_Alignment_Rotation);
}
Пример #10
0
/*!
 * Return the vertical alignment.
 */
Format::VerticalAlignment Format::verticalAlignment() const
{
    return static_cast<Format::VerticalAlignment>(intProperty(FormatPrivate::P_Alignment_AlignV, AlignBottom));
}
Пример #11
0
/*!
 * Return the horizontal alignment.
 */
Format::HorizontalAlignment Format::horizontalAlignment() const
{
    return static_cast<Format::HorizontalAlignment>(intProperty(FormatPrivate::P_Alignment_AlignH, AlignHGeneral));
}
Пример #12
0
/*!
 * Return the underline style of the font.
 */
Format::FontUnderline Format::fontUnderline() const
{
    return static_cast<Format::FontUnderline>(intProperty(FormatPrivate::P_Font_Underline));
}
Пример #13
0
/*!
 * Return the script style of the font.
 */
Format::FontScript Format::fontScript() const
{
    return static_cast<Format::FontScript>(intProperty(FormatPrivate::P_Font_Script));
}
Пример #14
0
/*!
 * Return the size of the font in points.
 */
int Format::fontSize() const
{
    return intProperty(FormatPrivate::P_Font_Size);
}
Пример #15
0
/*!
 * Returns the number format identifier.
 */
int Format::numberFormatIndex() const
{
    return intProperty(FormatPrivate::P_NumFmt_Id, 0);
}
Пример #16
0
/* MapSide::changeLight
 * Change the light level of a side, if supported
 *******************************************************************/
void MapSide::changeLight(int amount)
{
	if (parent_map->currentFormat() == MAP_UDMF && S_CMPNOCASE(parent_map->udmfNamespace(), "zdoom"))
		setIntProperty("light", intProperty("light") + amount);
}