0x0045FE4C NOTE: Original call getSurfaceLocFromUi within this function instead OpenLoco has split it in two. Also note that result of original was a Pos2 start i.e. (& 0xFFE0) both components
| 254 | // instead OpenLoco has split it in two. Also note that result of original |
| 255 | // was a Pos2 start i.e. (& 0xFFE0) both components |
| 256 | MapSelectionType getSideFromPos(const Pos2& loc) |
| 257 | { |
| 258 | const auto xNibble = loc.x & 0x1F; |
| 259 | const auto yNibble = loc.y & 0x1F; |
| 260 | if (xNibble < yNibble) |
| 261 | { |
| 262 | return (xNibble + yNibble < 32) ? MapSelectionType::corner0 : MapSelectionType::corner1; |
| 263 | } |
| 264 | else |
| 265 | { |
| 266 | return (xNibble + yNibble < 32) ? MapSelectionType::corner3 : MapSelectionType::corner2; |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | MapSelectionFlags getMapSelectionFlags() |
| 271 | { |
no outgoing calls
no test coverage detected