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

Function IsRoomDynamicValid

Descent3/render.cpp:3021–3031  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3019 return 0;
3020}
3021static inline void IsRoomDynamicValid(room *rp, int x, int y, int z, float *r, float *g, float *b) {
3022 int w = rp->volume_width;
3023 int h = rp->volume_height;
3024 int d = rp->volume_depth;
3025
3026 uint8_t color = rp->volume_lights[(z * w * h) + (y * w) + x];
3027
3028 *r = (float)((color >> 5) / 7.0);
3029 *g = (float)((color >> 2) & 0x07) / 7.0;
3030 *b = (float)((float)(color & 0x03) / 3.0);
3031}
3032// Gets the dynamic light value for this position
3033void GetRoomDynamicScalar(vector *pos, room *rp, float *r, float *g, float *b) {
3034 float front_values_r[10];

Callers 1

GetRoomDynamicScalarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected