# `CauldronGPU.Sectors.Walls`
[🔗](https://github.com/jaman/cauldron/blob/v0.3.3/cauldron_gpu/lib/cauldron_gpu/sectors/walls.ex#L2)

The walls of a sector map as `CauldronGPU.Sectors.Surfaces` surfaces, one quad per
section of each side, keyed `{:picture, id}` and facing into the side's sector.

A one-sided line shows its `middle` from floor to ceiling. A two-sided line shows its
`upper` between the two ceilings, its `lower` between the two floors, and its `middle`
once, not repeated, within the opening. Pictures follow Doom's pegging:

  * middle of a one-sided line: top at the ceiling; `:lower_unpegged`, bottom at
    the floor
  * upper: bottom at the lower ceiling; `:upper_unpegged`, top at the higher ceiling
  * lower: top at the higher floor; `:lower_unpegged`, placed as if hung from the
    side's own ceiling
  * middle of a two-sided line: top at the lower ceiling; `:lower_unpegged`, bottom
    at the higher floor

`x_offset` and `y_offset` move the picture along and down the wall. Where both
sectors' ceilings are in `sky`, the upper is left out. Lines running along the map's
y axis are drawn 16 light levels brighter and along its x axis 16 darker.

    CauldronGPU.Sectors.Walls.surfaces(map, pictures, MapSet.new([sky_flat]))

# `surfaces`

```elixir
@spec surfaces(
  Cauldron2D.Sectors.Map.t(),
  Cauldron2D.Sectors.Pictures.t(),
  MapSet.t()
) :: [
  CauldronGPU.Sectors.Surfaces.surface()
]
```

Every wall section of `map`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
