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

Function GetTurnCount3Elements

src/openrct2/ride/Ride.cpp:4292–4311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4290}
4291
4292int32_t GetTurnCount3Elements(const Ride& ride, uint8_t type)
4293{
4294 const uint16_t* turn_count;
4295 switch (type)
4296 {
4297 case 0:
4298 turn_count = &ride.turnCountDefault;
4299 break;
4300 case 1:
4301 turn_count = &ride.turnCountBanked;
4302 break;
4303 case 2:
4304 turn_count = &ride.turnCountSloped;
4305 break;
4306 default:
4307 return 0;
4308 }
4309
4310 return ((*turn_count) & kTurnMask3Elements) >> 8;
4311}
4312
4313int32_t GetTurnCount4PlusElements(const Ride& ride, uint8_t type)
4314{

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