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

Method LoadSkyTextureName

PanzerChasm/map_loader.cpp:489–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487}
488
489void MapLoader::LoadSkyTextureName( const Vfs::FileContent& resource_file, MapData& map_data )
490{
491 map_data.sky_texture_name[0]= '\0';
492
493 const char* s= GetSubstring( reinterpret_cast<const char*>( resource_file.data() ), "#sky" );
494 s+= std::strlen( "#sky" );
495
496 while( std::isspace(*s) ) s++;
497
498 // =
499 s++;
500
501 while( std::isspace(*s) )s++;
502
503 char* dst= map_data.sky_texture_name;
504 while(
505 *s != '\0' &&
506 !std::isspace( *s ) &&
507 dst < map_data.sky_texture_name + sizeof(map_data.sky_texture_name) - 1u )
508 {
509 *dst= *s; dst++; s++;
510 }
511 *dst= '\0';
512}
513
514void MapLoader::LoadModelsDescription( const Vfs::FileContent& resource_file, MapData& map_data )
515{

Callers

nothing calls this directly

Calls 1

GetSubstringFunction · 0.85

Tested by

no test coverage detected