MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / LoadCar

Method LoadCar

src/Loaders/nfs3_loader.cpp:11–23  ·  view source on GitHub ↗

CAR

Source from the content-addressed store, hash-verified

9
10// CAR
11std::shared_ptr<Car> NFS3::LoadCar(const std::string &car_base_path) {
12 boost::filesystem::path p(car_base_path);
13 std::string car_name = p.filename().string();
14
15 std::stringstream viv_path, car_out_path, fce_path;
16 viv_path << car_base_path << "/car.viv";
17 car_out_path << CAR_PATH << ToString(NFS_3) << "/" << car_name << "/";
18 fce_path << CAR_PATH << ToString(NFS_3) << "/" << car_name << "/car.fce";
19
20 ASSERT(Utils::ExtractVIV(viv_path.str(), car_out_path.str()), "Unable to extract " << viv_path.str() << " to " << car_out_path.str());
21
22 return std::make_shared<Car>(LoadFCE(fce_path.str()), NFS_3, car_name);
23}
24
25void NFS3::ConvertFCE(const std::string &fce_path, const std::string &obj_out_path) {
26 std::shared_ptr<Car> car(new Car(LoadFCE(fce_path), NFS_3, "Converted"));

Callers

nothing calls this directly

Calls 1

ExtractVIVFunction · 0.85

Tested by

no test coverage detected