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

Function GetTurnCount2Elements

src/openrct2/ride/Ride.cpp:4271–4290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4269}
4270
4271int32_t GetTurnCount2Elements(const Ride& ride, uint8_t type)
4272{
4273 const uint16_t* turn_count;
4274 switch (type)
4275 {
4276 case 0:
4277 turn_count = &ride.turnCountDefault;
4278 break;
4279 case 1:
4280 turn_count = &ride.turnCountBanked;
4281 break;
4282 case 2:
4283 turn_count = &ride.turnCountSloped;
4284 break;
4285 default:
4286 return 0;
4287 }
4288
4289 return ((*turn_count) & kTurnMask2Elements) >> 5;
4290}
4291
4292int32_t GetTurnCount3Elements(const Ride& ride, uint8_t type)
4293{

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