0x0045FE05 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
| 236 | // instead OpenLoco has split it in two. Also note that result of original |
| 237 | // was a Pos2 start i.e. (& 0xFFE0) both components |
| 238 | MapSelectionType getQuadrantFromPos(const Pos2& loc) |
| 239 | { |
| 240 | const auto xNibble = loc.x & 0x1F; |
| 241 | const auto yNibble = loc.y & 0x1F; |
| 242 | if (xNibble > 16) |
| 243 | { |
| 244 | return (yNibble >= 16) ? MapSelectionType::corner0 : MapSelectionType::corner1; |
| 245 | } |
| 246 | else |
| 247 | { |
| 248 | return (yNibble >= 16) ? MapSelectionType::corner3 : MapSelectionType::corner2; |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | // 0x0045FE4C |
| 253 | // NOTE: Original call getSurfaceLocFromUi within this function |
no outgoing calls
no test coverage detected