MCPcopy Create free account
hub / github.com/Panzerschrek/Chasm-Reverse / LoadFloorsTextures

Method LoadFloorsTextures

PanzerChasm/client/map_drawer_soft.cpp:857–872  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

855}
856
857void MapDrawerSoft::LoadFloorsTextures( const MapData& map_data )
858{
859 const PaletteTransformed& palette= *rendering_context_.palette_transformed;
860
861 for( unsigned int i= 0u; i < MapData::c_floors_textures_count; i++ )
862 {
863 const unsigned char* const src= map_data.floor_textures_data[i];
864 uint32_t* const dst= floor_textures_[i].data;
865 for( unsigned int j= 0u; j < MapData::c_floor_texture_size * MapData::c_floor_texture_size; j++ )
866 dst[j]= palette[ src[j] ];
867
868 BuildMip( floor_textures_[i].data, MapData::c_floor_texture_size , MapData::c_floor_texture_size , floor_textures_[i].mip1 );
869 BuildMip( floor_textures_[i].mip1, MapData::c_floor_texture_size / 2u, MapData::c_floor_texture_size / 2u, floor_textures_[i].mip2 );
870 BuildMip( floor_textures_[i].mip2, MapData::c_floor_texture_size / 4u, MapData::c_floor_texture_size / 4u, floor_textures_[i].mip3 );
871 }
872}
873
874void MapDrawerSoft::LoadWalls( const MapData& map_data )
875{

Callers

nothing calls this directly

Calls 1

BuildMipFunction · 0.85

Tested by

no test coverage detected