/* 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; }
/*! Return the fill pattern. */ Format::FillPattern Format::fillPattern() const { return static_cast<FillPattern>(intProperty(FormatPrivate::P_Fill_Pattern, PatternNone)); }
/*! Returns the diagonal border type. */ Format::DiagonalBorderType Format::diagonalBorderType() const { return static_cast<DiagonalBorderType>(intProperty(FormatPrivate::P_Border_DiagonalType)); }
/*! Return the diagonla border style. */ Format::BorderStyle Format::diagonalBorderStyle() const { return static_cast<BorderStyle>(intProperty(FormatPrivate::P_Border_DiagonalStyle)); }
/*! Returns the bottom border style. */ Format::BorderStyle Format::bottomBorderStyle() const { return static_cast<BorderStyle>(intProperty(FormatPrivate::P_Border_BottomStyle)); }
/*! Returns the top border style. */ Format::BorderStyle Format::topBorderStyle() const { return static_cast<BorderStyle>(intProperty(FormatPrivate::P_Border_TopStyle)); }
/*! Returns the right border style. */ Format::BorderStyle Format::rightBorderStyle() const { return static_cast<BorderStyle>(intProperty(FormatPrivate::P_Border_RightStyle)); }
/*! * Return the text indentation level. */ int Format::indent() const { return intProperty(FormatPrivate::P_Alignment_Indent); }
/*! * Return the text rotation. */ int Format::rotation() const { return intProperty(FormatPrivate::P_Alignment_Rotation); }
/*! * Return the vertical alignment. */ Format::VerticalAlignment Format::verticalAlignment() const { return static_cast<Format::VerticalAlignment>(intProperty(FormatPrivate::P_Alignment_AlignV, AlignBottom)); }
/*! * Return the horizontal alignment. */ Format::HorizontalAlignment Format::horizontalAlignment() const { return static_cast<Format::HorizontalAlignment>(intProperty(FormatPrivate::P_Alignment_AlignH, AlignHGeneral)); }
/*! * Return the underline style of the font. */ Format::FontUnderline Format::fontUnderline() const { return static_cast<Format::FontUnderline>(intProperty(FormatPrivate::P_Font_Underline)); }
/*! * Return the script style of the font. */ Format::FontScript Format::fontScript() const { return static_cast<Format::FontScript>(intProperty(FormatPrivate::P_Font_Script)); }
/*! * Return the size of the font in points. */ int Format::fontSize() const { return intProperty(FormatPrivate::P_Font_Size); }
/*! * Returns the number format identifier. */ int Format::numberFormatIndex() const { return intProperty(FormatPrivate::P_NumFmt_Id, 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); }