benilla-re systems structs docs

CullInteriorMapObject

function · terrain · primitive

Address
0x685a90 · 722 bytes, up to 0x685d61
Signature
void __fastcall (uint32_t arg1, uint32_t arg2)
Meaning
Prepares the portal flood for the map object holding the camera and runs the interior seed
Confidence
verified, proof one
Finding
terrain/portals#camera-inside-a-map-object
Test
terrain::corner_ray_negate_difftest, terrain::dir_len2_gate_difftest, terrain::dir_normalize_difftest, terrain::plane_offset_negate_difftest

Finding: Camera inside a map object in terrain: map object visibility

0x685a90 prepares the flood for the map object that holds the camera. It moves the camera position and the camera target into the model's space with the instance matrix +0xd4, stores the unit direction between them and the offset of the plane through the camera (the plane of the view axis), loads matrix slot 8 with the translation by minus the camera times the instance matrix +0x94, registers the group callback 0x685d70, and runs 0x6b3b20 with the model, the instance matrix and the groups the camera is in.

The derivation is in the doc.

Callers 1

Callees 9

Calls and jumps by a bare address, from tables/calls.tsv.