| 58 | } |
| 59 | |
| 60 | bool Biome::parseLine(const std::string& line, std::ifstream& inFile) |
| 61 | { |
| 62 | if (areStringsSame(line, "Noise")) |
| 63 | { |
| 64 | loadNoise(inFile); |
| 65 | } |
| 66 | else if (areStringsSame(line, "Surface")) |
| 67 | { |
| 68 | loadIntoBlockList(inFile, m_surfaceBlocks); |
| 69 | } |
| 70 | else if (areStringsSame(line, "Flora")) |
| 71 | { |
| 72 | loadIntoBlockList(inFile, m_floraBlocks); |
| 73 | } |
| 74 | else if (areStringsSame(line, "Tree")) |
| 75 | { |
| 76 | loadTree(inFile); |
| 77 | } |
| 78 | else if (areStringsSame(line, "Flora Freq")) |
| 79 | { |
| 80 | inFile >> m_floraFreq; |
| 81 | } |
| 82 | else if (areStringsSame(line, "Tree Freq")) |
| 83 | { |
| 84 | inFile >> m_treeFreq; |
| 85 | } |
| 86 | else |
| 87 | { |
| 88 | return false; |
| 89 | } |
| 90 | return true; |
| 91 | } |
| 92 | |
| 93 | void Biome::loadNoise(std::ifstream& inFile) |
| 94 | { |
nothing calls this directly
no test coverage detected