Expand description
the bsp-node class seems broken - it has int16's that get used a pointers.
Types
bsp-header: drawablesource
Fields
type: type
id: int16
bsphere: vector
info: file-info
all-visible-list: pointer
visible-list-length: int16
extra-vis-list-length: int16
drawable-trees: drawable-tree-array
pat: pointer
pat-length: int32
texture-remap-table: pointer
texture-remap-table-len: int32
texture-ids: pointer
texture-page-count: int32
unknown-basic: basic
name: symbol
nickname: symbol
vis-info: level-vis-info
actors: drawable-inline-array-actor
cameras: array
nodes: inline-array
level: level
current-leaf-idx: uint16
texture-flags: texture-page-flag
cam-outside-bsp: uint8
cam-using-back: uint8
cam-box-idx: uint16
ambients: symbol
subdivide-close: float
subdivide-far: float
race-meshes: array
actor-birth-order: pointer
light-hash: light-hash
nav-meshes: array
actor-groups: array
region-trees: array
region-array: region-array
collide-hash: collide-hash
wind-array-length: int32
city-level-info: city-level-info
vis-spheres: vector-array
region-tree: drawable-tree-region-prim
tfrag-masks: texture-masks-array
tfrag-closest: pointer
tfrag-mask-count: uint32
shrub-masks: texture-masks-array
shrub-closest: pointer
shrub-mask-count: uint32
alpha-masks: texture-masks-array
alpha-closest: pointer
alpha-mask-count: uint32
water-masks: texture-masks-array
water-closest: pointer
water-mask-count: uint32
bsp-scale: vector
bsp-offset: vector
unk-data: uint32
end: uint8
Methods
birth(obj: bsp-header) => nonesource
deactivate-entities(obj: bsp-header) => nonesource
bsp-node: structuresource
collide-stats: structuresource
Fields
calls: uint32
spheres: uint32
nodes: uint32
frags: uint32
tris: uint32
output: uint32
pad0: uint32
total-target: uint32
target-cache-fill: uint32
target-ray-poly: uint32
view-frustum: structuresource
Functions
inspect-bsp-tree(arg0: bsp-header, arg1: bsp-node) => nonesource
map-bsp-tree(arg0: function, arg1: bsp-header, arg2: bsp-node) => nonesource
Expand description
The "bsp" is the main level data structure: the bsp-header contains references to all static level data.
The "bsp-tree" is a bsp used to associate camera positions with lists of visibible objects.
Functions
bsp-camera-asm(arg0: bsp-header, arg1: vector) => nonesource
Determine which leaf node of the bsp we are in, and store this in the bsp-header.
build-masks(arg0: bsp-header) => nonesource
Allocate texture masks as needed for a level.
level-remap-texture(arg0: texture-id) => texture-idsource
Remap a texture id.
mem-usage-bsp-tree(arg0: bsp-header, arg1: bsp-node, arg2: memory-usage-block, arg3: int) => nonesource
Compute the memory usage of the bsp-tree part of a bsp-header
print-collide-stats() => nonesource
Display collide stats on screen.