MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / updateTreeSeasons

Function updateTreeSeasons

src/OpenLoco/src/Map/MapGenerator/MapGenerator.cpp:625–648  ·  view source on GitHub ↗

0x004BE0C7

Source from the content-addressed store, hash-verified

623
624 // 0x004BE0C7
625 static void updateTreeSeasons()
626 {
627 auto currentSeason = getGameState().currentSeason;
628
629 for (auto& pos : World::getDrawableTileRange())
630 {
631 auto tile = TileManager::get(pos);
632 for (auto& el : tile)
633 {
634 auto* treeEl = el.as<TreeElement>();
635 if (treeEl == nullptr)
636 {
637 continue;
638 }
639
640 if (treeEl->season() < 4 && !treeEl->isDying())
641 {
642 treeEl->setSeason(enumValue(currentSeason));
643 treeEl->setUnk7l(0x7);
644 }
645 break;
646 }
647 }
648 }
649
650 // 0x004BDA49
651 static void generateTrees()

Callers 1

generateTreesFunction · 0.85

Calls 7

getDrawableTileRangeFunction · 0.85
enumValueFunction · 0.85
seasonMethod · 0.80
isDyingMethod · 0.80
setSeasonMethod · 0.80
setUnk7lMethod · 0.80
getFunction · 0.50

Tested by

no test coverage detected