| 391 | } |
| 392 | |
| 393 | void MapLoader::LoadAmbientLight( const Vfs::FileContent& map_file, MapData& map_data ) |
| 394 | { |
| 395 | const unsigned int c_ambient_lightmap_offset= 0x23001u + MapData::c_map_size * MapData::c_map_size * 2u; |
| 396 | |
| 397 | const unsigned char* in_ambient_lightmap_data= map_file.data() + c_ambient_lightmap_offset; |
| 398 | for( unsigned int x= 0u; x < MapData::c_map_size; x++ ) |
| 399 | for( unsigned int y= 0u; y < MapData::c_map_size; y++ ) |
| 400 | { |
| 401 | // Convert "darkeness" into light. |
| 402 | const int l= std::max( 18 - int( in_ambient_lightmap_data[ x * MapData::c_map_size + y ] ), 0 ) * 6; |
| 403 | map_data.ambient_lightmap[ x + y * MapData::c_map_size ]= static_cast<unsigned char>(l); |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | void MapLoader::LoadAmbientSoundsMap( const Vfs::FileContent& map_file, MapData& map_data ) |
| 408 | { |
nothing calls this directly
no outgoing calls
no test coverage detected