| 415 | } |
| 416 | |
| 417 | static int16_t getOneSideUpLandHeight(int8_t xl, int8_t yl, uint8_t slope) |
| 418 | { |
| 419 | int16_t edge = 0; |
| 420 | switch (slope) |
| 421 | { |
| 422 | case SurfaceSlope::SideUp::northeast: |
| 423 | edge = xl / 2 + 1; |
| 424 | break; |
| 425 | case SurfaceSlope::SideUp::southeast: |
| 426 | edge = (kTileSize - yl) / 2; |
| 427 | break; |
| 428 | case SurfaceSlope::SideUp::northwest: |
| 429 | edge = yl / 2 + 1; |
| 430 | break; |
| 431 | case SurfaceSlope::SideUp::southwest: |
| 432 | edge = (kTileSize - xl) / 2; |
| 433 | break; |
| 434 | } |
| 435 | return edge; |
| 436 | } |
| 437 | |
| 438 | // This also takes care of the one corner down and one opposite corner up |
| 439 | static int16_t getOneCornerDownLandHeight(int8_t xl, int8_t yl, uint8_t slope, bool isDoubleHeight) |