| 395 | } |
| 396 | |
| 397 | bool NFS3::LoadHRZ(std::string hrz_path, const std::shared_ptr<TRACK> &track) { |
| 398 | ifstream hrz(hrz_path, ios::in | ios::binary); |
| 399 | if(!hrz.is_open()) return false; |
| 400 | LOG(INFO) << "Loading HRZ File located at " << hrz_path; |
| 401 | |
| 402 | std::string str, skyTopColour, skyBottomColour; |
| 403 | |
| 404 | while (std::getline(hrz, str)) |
| 405 | { |
| 406 | if(str.find("/* r,g,b value at top of Gourad shaded SKY area */") != std::string::npos){ |
| 407 | std::getline(hrz, skyTopColour); |
| 408 | } |
| 409 | if(str.find("/* r,g,b values for base of Gourad shaded SKY area */") != std::string::npos){ |
| 410 | std::getline(hrz, skyBottomColour); |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | track->sky_top_colour = parseRGBString(skyTopColour); |
| 415 | track->sky_bottom_colour = parseRGBString(skyBottomColour); |
| 416 | |
| 417 | hrz.close(); |
| 418 | |
| 419 | return true; |
| 420 | } |
| 421 | |
| 422 | std::vector<TrackBlock> NFS3::ParseTRKModels(const std::shared_ptr<TRACK> &track) { |
| 423 | LOG(INFO) << "Parsing TRK file into ONFS GL structures"; |
nothing calls this directly
no test coverage detected