MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / GetTurnCount1Element

Function GetTurnCount1Element

src/openrct2/ride/Ride.cpp:4250–4269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4248}
4249
4250int32_t GetTurnCount1Element(const Ride& ride, uint8_t type)
4251{
4252 const uint16_t* turn_count;
4253 switch (type)
4254 {
4255 case 0:
4256 turn_count = &ride.turnCountDefault;
4257 break;
4258 case 1:
4259 turn_count = &ride.turnCountBanked;
4260 break;
4261 case 2:
4262 turn_count = &ride.turnCountSloped;
4263 break;
4264 default:
4265 return 0;
4266 }
4267
4268 return (*turn_count) & kTurnMask1Element;
4269}
4270
4271int32_t GetTurnCount2Elements(const Ride& ride, uint8_t type)
4272{

Callers 3

get_flat_turns_ratingFunction · 0.85
get_banked_turns_ratingFunction · 0.85
get_sloped_turns_ratingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected