Structs:Side

From ZDoom Wiki
Jump to navigation Jump to search

Sides store important information about lines including their textures for each part (bottom, middle, top), texture offsets, and any colorization they may have. Using sides is needed in order to manipulate how a line appears. Each line has either one or two sides depending on if it has a back sector. They can be gotten from a line's sidedef array or from level's global Sides array.

Fields

  • readonly Sector sector - The sector the side faces.
  • readonly Line linedef - The line the side belongs to.
  • int16 Light - The brightness level of the side. This is normally relative to the sector it's facing.
  • uint16 Flags - The flags the line side has:
    • Side.WALLF_ABSLIGHTING - The brightness of this wall uses the side's light level as an absolute one instead of one relative to the sector it's facing. This will also cause it to ignore fog.
    • Side.WALLF_NOAUTODECALS - This side of the line doesn't create impact decals.
    • Side.WALLF_NOFAKECONTRAST - This side doesn't have Doom's fake contrast applied to it, evenly lighting it regardless of orientation.
    • Side.WALLF_SMOOTHLIGHTING - Doom's fake contrast is applied linearly along this side based on wall orientation instead of only at fixed values.
    • Side.WALLF_CLIP_MIDTEX - If the line is two-sided, the texture in the middle part is set to never render below the floor or above the ceiling on this side.
    • Side.WALLF_WRAP_MIDTEX - If the line is two-sided, the texture in the middle part is set to fill the entire space vertically on this side.
    • Side.WALLF_POLYOBJ - This side belongs to a polyobject.
    • Side.WALLF_LIGHT_FOG - Use this side's brightness level even if the sector it's facing has fog. Normally fog disables this behavior.

Methods

Non-static

Sides have a top, middle and bottom parts which can be retrieved with Side.top, Side.mid and Side.bottom constants respectively.

  • TextureID GetTexture(int which)
Returns a TextureID of the texture at the top/mid/bottom of the sidedef.
  • int which — part of the sidedef (Side.top, Side.mid or Side.bottom)
  • void SetTexture(int which, TextureID tex)
Changes the texture at the top/mid/bottom of the sidedef to the provided TextureID.
  • int which — part of the sidedef (Side.top, Side.mid or Side.bottom)
  • TextureID tex — the texture to use
  • void SetTextureXOffset(int which, double offset)
Changes the X offset of the texture at the top/mid/bottom of the sidedef.
  • int which — part of the sidedef (Side.top, Side.mid or Side.bottom)
  • double offset — the new offset value
  • double GetTextureXOffset(int which)
Returns the X offset of the texture of the specified part of the sidedef (top/mid/bottom) to the offset value.
  • int which — part of the sidedef (Side.top, Side.mid or Side.bottom)
  • void AddTextureXOffset(int which, double delta)
Additively changes the X offset of the texture at the top/mid/bottom of the sidedef.
  • int which — part of the sidedef (Side.top, Side.mid or Side.bottom)
  • double delta — the delta value to add to the offset (Need more info)
  • void SetTextureYOffset(int which, double offset)
Changes the Y offset of the texture at the top/mid/bottom of the sidedef.
  • int which — part of the sidedef (Side.top, Side.mid or Side.bottom)
  • double offset — the new offset value
  • double GetTextureYOffset(int which)
Returns the Y offset of the texture of the specified part of the sidedef (top/mid/bottom) to the offset value.
  • int which — part of the sidedef (Side.top, Side.mid or Side.bottom)
  • void AddTextureYOffset(int which, double delta)
Additively changes the Y offset of the texture at the top/mid/bottom of the sidedef.
  • int which — part of the sidedef (Side.top, Side.mid or Side.bottom)
  • double delta — the delta value to add to the offset (Need more info)
  • void SetTextureXScale(int which, double scale)
Changes the X scale of the texture at the top/mid/bottom of the sidedef.
  • int which — part of the sidedef (Side.top, Side.mid or Side.bottom)
  • double scale — the new scale value
  • double GetTextureXScale(int which)
Returns the X scale of the texture at the top/mid/bottom of the sidedef.
  • int which — part of the sidedef (Side.top, Side.mid or Side.bottom)
  • void MultiplyTextureXScale(int which, double delta)
Additively changes the X scale of the texture at the top/mid/bottom of the sidedef.
  • int which — part of the sidedef (Side.top, Side.mid or Side.bottom)
  • double delta — the delta value to multiply the offset by (Need more info)
  • void SetTextureYScale(int which, double scale)
Changes the Y scale of the texture at the top/mid/bottom of the sidedef.
  • int which — part of the sidedef (Side.top, Side.mid or Side.bottom)
  • double scale — the new scale value
  • double GetTextureYScale(int which)
Returns the Y scale of the texture at the top/mid/bottom of the sidedef.
  • int which — part of the sidedef (Side.top, Side.mid or Side.bottom)
  • void MultiplyTextureYScale(int which, double delta)
Additively changes the Y scale of the texture at the top/mid/bottom of the sidedef.
  • int which — part of the sidedef (Side.top, Side.mid or Side.bottom)
  • double delta — the delta value to multiply the offset by (Need more info)
  • int GetTextureFlags(int tier)
Returns sidedef texture flags at the top/mid/bottom of the sidedef.
  • int tier — part of the sidedef (Side.top, Side.mid or Side.bottom)
Possible flags:
  • NoGradient
  • FlipGradient
  • ClampGradient
  • UseOwnSpecialColors
  • UseOwnAdditiveColor
  • void ChangeTextureFlags(int tier, int And, int Or)
Changes sidedef texture flags at the top/mid/bottom of the sidedef.
  • int tier — part of the sidedef (Side.top, Side.mid or Side.bottom)
  • void SetSpecialColor(int tier, int position, Color scolor, bool useowncolor = true)
  • Color GetAdditiveColor(int tier)
  • void SetAdditiveColor(int tier, Color color)
  • void EnableAdditiveColor(int tier, bool enable)
  • void SetColorization(int tier, Name cname)
  • Vertex V1()
  • Vertex V2()
  • int Index()
  • int GetUDMFInt(Name nm)
  • double GetUDMFFloat(Name nm)
  • string GetUDMFString(Name nm)