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

Method LoadLightmap

PanzerChasm/map_loader.cpp:252–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252void MapLoader::LoadLightmap( const Vfs::FileContent& map_file, MapData& map_data )
253{
254 const unsigned int c_lightmap_data_offset= 0x01u;
255
256 const unsigned char* const in_data= map_file.data() + c_lightmap_data_offset;
257
258 // TODO - tune formula
259 for( unsigned int y= 0u; y < MapData::c_lightmap_size; y++ )
260 for( unsigned int x= 0u; x < MapData::c_lightmap_size - 1u; x++ )
261 {
262 map_data.lightmap[ x + 1u + y * MapData::c_lightmap_size ]=
263 ConvertMapLight( in_data[ x + y * MapData::c_lightmap_size ] );
264 }
265}
266
267const unsigned char* MapLoader::GetWallsLightmapData( const Vfs::FileContent& map_file )
268{

Callers

nothing calls this directly

Calls 1

ConvertMapLightFunction · 0.85

Tested by

no test coverage detected