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

Function initialiseSnowLine

src/OpenLoco/src/Scenario/Scenario.cpp:104–125  ·  view source on GitHub ↗

0x00496A18

Source from the content-addressed store, hash-verified

102
103 // 0x00496A18
104 void initialiseSnowLine()
105 {
106 auto today = calcDate(getCurrentDay());
107 int32_t currentDayOfYear = today.dayOfYear;
108
109 auto* climateObj = ObjectManager::get<ClimateObject>();
110 if (climateObj == nullptr)
111 {
112 return;
113 }
114
115 updateSeason(currentDayOfYear, climateObj);
116
117 if (getCurrentSeason() == Season::winter)
118 {
119 setCurrentSnowLine(climateObj->winterSnowLine);
120 }
121 else
122 {
123 setCurrentSnowLine(climateObj->summerSnowLine);
124 }
125 }
126
127 // 0x00496A84
128 void updateSnowLine(int32_t currentDayOfYear)

Callers 5

goToNextStepFunction · 0.85
importSaveToGameStateFunction · 0.85
generateFunction · 0.85
resetFunction · 0.85
startFunction · 0.85

Calls 5

calcDateFunction · 0.85
getCurrentDayFunction · 0.85
updateSeasonFunction · 0.85
getCurrentSeasonFunction · 0.85
setCurrentSnowLineFunction · 0.85

Tested by

no test coverage detected