| 921 | } |
| 922 | |
| 923 | void DrawShoreTile(Slope tileh) |
| 924 | { |
| 925 | /* Converts the enum Slope into an offset based on SPR_SHORE_BASE. |
| 926 | * This allows to calculate the proper sprite to display for this Slope */ |
| 927 | static const uint8_t tileh_to_shoresprite[32] = { |
| 928 | 0, 1, 2, 3, 4, 16, 6, 7, 8, 9, 17, 11, 12, 13, 14, 0, |
| 929 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 10, 15, 0, |
| 930 | }; |
| 931 | |
| 932 | assert(!IsHalftileSlope(tileh)); // Halftile slopes need to get handled earlier. |
| 933 | assert(tileh != SLOPE_FLAT); // Shore is never flat |
| 934 | |
| 935 | assert((tileh != SLOPE_EW) && (tileh != SLOPE_NS)); // No suitable sprites for current flooding behaviour |
| 936 | |
| 937 | DrawGroundSprite(SPR_SHORE_BASE + tileh_to_shoresprite[tileh], PAL_NONE); |
| 938 | } |
| 939 | |
| 940 | void DrawWaterClassGround(const TileInfo *ti) |
| 941 | { |
no test coverage detected