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

Function IsTerrainDynamicChecked

Descent3/terrainrender.cpp:890–899  ·  view source on GitHub ↗

Returns true if light can hit this segment/heighth bit

Source from the content-addressed store, hash-verified

888}
889// Returns true if light can hit this segment/heighth bit
890int IsTerrainDynamicChecked(int seg, int bit) {
891 if (seg < 0 || seg >= (TERRAIN_WIDTH * TERRAIN_DEPTH))
892 return 1;
893 if (bit >= 8)
894 return 1;
895 uint8_t val = Terrain_dynamic_table[seg] & (1 << bit);
896 if (val)
897 return 1;
898 return 0;
899}
900// Gets the dynamic light value for this position
901float GetTerrainDynamicScalar(vector *pos, int seg) {
902 float cube_values[10];

Callers 1

GetTerrainDynamicScalarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected