MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / GetVolumeSizeOfRoom

Function GetVolumeSizeOfRoom

Descent3/lighting.cpp:1616–1629  ·  view source on GitHub ↗

TODO: MTS: Unused? Returns the total number of bytes needed for volume lighting in this room

Source from the content-addressed store, hash-verified

1614// TODO: MTS: Unused?
1615// Returns the total number of bytes needed for volume lighting in this room
1616int GetVolumeSizeOfRoom(room *rp, int *w, int *h, int *d) {
1617 int width = ((rp->max_xyz.x - rp->min_xyz.x) / VOLUME_SPACING) + 1;
1618 int height = ((rp->max_xyz.y - rp->min_xyz.y) / VOLUME_SPACING) + 1;
1619 int depth = ((rp->max_xyz.z - rp->min_xyz.z) / VOLUME_SPACING) + 1;
1620
1621 if (w)
1622 *w = width;
1623 if (h)
1624 *h = height;
1625 if (d)
1626 *d = depth;
1627
1628 return (width * height * depth);
1629}
1630
1631/*
1632// Returns a lightmap that can be applied for specular lighting

Callers 2

ShowLevelStatsFunction · 0.85
DoRadiosityForRoomsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected