| 464 | } |
| 465 | |
| 466 | void MapLoader::LoadMapName( const Vfs::FileContent& resource_file, MapData& map_data ) |
| 467 | { |
| 468 | map_data.map_name[0]= '\0'; |
| 469 | |
| 470 | const char* s= GetSubstring( reinterpret_cast<const char*>( resource_file.data() ), "#name" ); |
| 471 | s+= std::strlen( "#name" ); |
| 472 | |
| 473 | // Skip '=' and spaces before '=' |
| 474 | while( std::isspace(*s) ) s++; |
| 475 | s++; |
| 476 | |
| 477 | char* dst= map_data.map_name; |
| 478 | while( |
| 479 | *s != '\0' && |
| 480 | ! ( *s == '\n' || *s == '\r' ) && |
| 481 | dst < map_data.map_name + sizeof(map_data.map_name) - 1u ) |
| 482 | { |
| 483 | *dst= *s; dst++; s++; |
| 484 | } |
| 485 | *dst= '\0'; |
| 486 | |
| 487 | } |
| 488 | |
| 489 | void MapLoader::LoadSkyTextureName( const Vfs::FileContent& resource_file, MapData& map_data ) |
| 490 | { |
nothing calls this directly
no test coverage detected