Skip to content

File format: bps

chino edited this page Jan 5, 2013 · 2 revisions

Portals define the region connecting level groups together and allow you to move between them and to see into them.

Note: This needs to be fixed. It appears to be currently a mix of BSP and PBS information.

BSP Portals (*.PBS):

Magic Number: uint32
BSP Portal Version Number: uint32

groups: int16
group: BSP_PORTAL_GROUP
{
  portals: int16
  portal: BSP_PORTAL*
  {
    group: 16int
    normal: VECTOR
    {
      x: float
      y: float
      z: float
    }
    offset: float
    bsp: BSP_TREE
    {
      NumNodes: int16
      Root: BSP_NODE*
      {
        Normal: VECTOR
        {
          x: float
          y: float
          z: float
        }
        Offset: float
        Front:  int16 (group id) || 0 == NULL
        Back:   int16 (group id) || 0 == NULL
        Colour: int16
      }
    }
  }
}
Clone this wiki locally