| 859 | bool Rendering_main_view = true; |
| 860 | #endif |
| 861 | void InitTerrainRenderSpeedups() { |
| 862 | // Figure out a table of values for rotated uv points |
| 863 | for (int y = 0; y <= MAX_LOD_SIZE; y++) { |
| 864 | for (int x = 0; x <= MAX_LOD_SIZE; x++) { |
| 865 | TerrainUSpeedup[0][(y * LOD_ROW_SIZE) + x] = (float)x / (float)MAX_LOD_SIZE; |
| 866 | TerrainVSpeedup[0][(y * LOD_ROW_SIZE) + x] = (float)y / (float)MAX_LOD_SIZE; |
| 867 | TerrainUSpeedup[1][(y * LOD_ROW_SIZE) + x] = 1.0 - ((float)y / (float)MAX_LOD_SIZE); |
| 868 | TerrainVSpeedup[1][(y * LOD_ROW_SIZE) + x] = (float)x / (float)MAX_LOD_SIZE; |
| 869 | TerrainUSpeedup[2][(y * LOD_ROW_SIZE) + x] = 1.0 - ((float)x / (float)MAX_LOD_SIZE); |
| 870 | TerrainVSpeedup[2][(y * LOD_ROW_SIZE) + x] = 1.0 - ((float)y / (float)MAX_LOD_SIZE); |
| 871 | TerrainUSpeedup[3][(y * LOD_ROW_SIZE) + x] = ((float)y / (float)MAX_LOD_SIZE); |
| 872 | TerrainVSpeedup[3][(y * LOD_ROW_SIZE) + x] = 1.0 - ((float)x / (float)MAX_LOD_SIZE); |
| 873 | } |
| 874 | } |
| 875 | } |
| 876 | // codes a point for visibility in the window passed to RenderTerrain() |
| 877 | uint8_t CodeTerrainPoint(g3Point *p) { |
| 878 | uint8_t cc = 0; |