| 460 | } |
| 461 | |
| 462 | static void LoadItemsModels( |
| 463 | const Vfs& vfs, |
| 464 | GameResources& game_resources ) |
| 465 | { |
| 466 | game_resources.items_models.resize( game_resources.items_description.size() ); |
| 467 | |
| 468 | Vfs::FileContent file_content; |
| 469 | Vfs::FileContent animation_file_content; |
| 470 | |
| 471 | for( unsigned int i= 0u; i < game_resources.items_models.size(); i++ ) |
| 472 | { |
| 473 | const GameResources::ItemDescription& item_description= game_resources.items_description[i]; |
| 474 | |
| 475 | char model_file_path[ GameResources::c_max_file_path_size ]= "MODELS/"; |
| 476 | char animation_file_path[ GameResources::c_max_file_path_size ]= "ANI/"; |
| 477 | |
| 478 | std::strcat( model_file_path, item_description.model_file_name ); |
| 479 | std::strcat( animation_file_path, item_description.animation_file_name ); |
| 480 | |
| 481 | vfs.ReadFile( model_file_path, file_content ); |
| 482 | |
| 483 | if( item_description.animation_file_name[0u] != '\0' ) |
| 484 | vfs.ReadFile( animation_file_path, animation_file_content ); |
| 485 | else |
| 486 | animation_file_content.clear(); |
| 487 | |
| 488 | LoadModel_o3( file_content, animation_file_content, game_resources.items_models[i] ); |
| 489 | } |
| 490 | } |
| 491 | |
| 492 | static void LoadMonstersModels( |
| 493 | const Vfs& vfs, |
no test coverage detected