-
Notifications
You must be signed in to change notification settings - Fork 7
File Formats: Room
xmeadow edited this page Mar 13, 2026
·
1 revision
Notes by Aaron Bishop (Dunlar)
SRF (Supercool Room Format) files are room templates built by the room editor. Map data generates the final geometry (wall profiles, door positions, objects to spawn). Uses SDF-endian numbers. 32 generic room textures per room.
- Floor: Floor, Floor Trim
- Wall: Wall, Wall Cap
- Pillar: Pillar, Pillar Cap, Wall Trim, Wall Trim Cap
- Pier: Pier Floor, Pier Trim, Pier Post, Rail
- Outdoor: Grass, Dirt, Grass→Dirt Trim, Grass Trim, Sand, Cliff, Cliff Cap, Graveyard Fence
- Water: #31 = animated water texture
| Offset | Size | Field |
|---|---|---|
| 0 | 32 bytes | Room name (string, 0 for none) |
| 32 | 1 byte | Room flags (cave/outdoor/trap types) |
| 33 | 1 byte | Water type (Water, Lava, Sand; backdrop info) |
| 34 | 1 byte | Water level (scaled to -50.0–50.0; -50.0 = off) |
| 35 | 1 byte | Room metal box item (ITEM_NONE = random) |
| 36 | 1 byte | Random monster type A |
| 37 | 1 byte | Random monster type B |
| 38 | 1 byte | Random monster type C |
| 39 | 1 byte | Random monster type D |
| 40 | 4 bytes | Offset to vertex data |
| 44 | 4 bytes | Offset to tex vertex data |
| 48 | 4 bytes | Offset to triangle data (floor & interior walls) |
| 52 | 4 bytes | Offset to exterior wall data |
| 56 | 4 bytes | Offset to texture data |
| 60 | 4 bytes | Offset to heightmap data |
| 64 | 4 bytes | Offset to waypoint data |
| 68 | 4 bytes | Offset to bridge data |
| 72 | 4 bytes | Offset to minimap data |
| 76 | 4 bytes | Offset to object-group data |
| 80 | 4 bytes | Offset to volumetric edge-line data (pretty shadows) |
| 84 | 4 bytes | Offset to unused data |
| 88 | 4 bytes | Offset to unused data |
| 92 | 4 bytes | Offset to unused data |
- 2 bytes: number of vertices
- Per vertex: X, Y, Z (signed short each)
- 2 bytes: number of tex vertices
- Per tex vertex: X, Y (signed short each)
- For each of 32 textures:
- 2 bytes: number of interior triangles
- Per triangle × 3 vertices: vertex index + tex vertex index (unsigned short each)
- 2 bytes: number of vertices
- Per vertex: base vertex (unsigned short) + door flags (unsigned char: Doorable, Entrance, Not Really A Wall)
- 32 × texture flags (unsigned char)
- 32 × texture name (8 byte string, no extension or terminator)
- 1 byte: number of waypoints
- 1 byte: padding
- Per waypoint: X, Y (signed short)
- Waypoint routing table: per waypoint × per waypoint = next waypoint to visit (unsigned char)
- 2 bytes: number of waypoint lines
- Per line: waypoint 0, waypoint 1 (unsigned char each)
- 1 byte: number of bridges
- 1 byte: bridge flags (random, log/rope, wood-plank/rope, reinforced-plank/chain, wide/narrow)
- Per bridge: start X, Y + end X, Y (signed short each)
- 2 bytes: number of triangles
- Per triangle: vertex 0, 1, 2 (unsigned short each)
- 2 bytes: number of groups
- Per group:
- 2 bytes: number of objects
- Per object:
- 13 bytes: object name (
CRANDOM.RUN,CPORTAL.RUN,P???????for particle,????.DDDfor DDD plop) - 1 byte: spawn chance (high 4 bits 0–15) + subtype (low 4 bits)
- 1 byte: team
- 1 byte: facing
- X, Y, Z location (signed short each)
- 13 bytes: object name (
Loaded into memory; only one active at a time. 1024×1024 heightmap (unsigned shorts, 16 samples per sq ft). Uses system endian numbers. Also has 8-byte (64-bit) update flags block (opened doors, cut bridges, etc.).
- Per vertex: X, Y, Z (float) + X, Y, Z normals (float) + lighting multiplier + lighting value (unsigned char each)
- Per tex vertex: X, Y (float) + X, Y, Z normals (float) + lighting multiplier + lighting value
- Per texture: triangle strips (number of strips → number of vertices per strip → vertex + tex vertex)
- 1024 × 1024 × signed short: highest floor Z (quarter feet)
- Per bridge: number of planks, 8-bit chopped-rope flags
- Per pair of ropes (always 4 pairs): attachment + ceiling XYZ + length (floats)
- Per plank: 28-byte float matrix (12-value with XYZ)
- 2 bytes: number of edge lines
- Per edge line: vertex A, vertex B, check vertex C, check vertex D (unsigned short each)