1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

Implement flat

This commit is contained in:
Ted John
2016-10-04 18:29:03 +01:00
parent 80f2389de0
commit 67d04a26ee

View File

@@ -26,7 +26,35 @@
#include "../track_data.h"
#include "../track_paint.h"
enum {
SPR_WILD_MOUSE_FLAT_SW_NE = 16900,
SPR_WILD_MOUSE_FLAT_NW_SE = 16901,
};
static void wild_mouse_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4] = {
SPR_WILD_MOUSE_FLAT_SW_NE,
SPR_WILD_MOUSE_FLAT_NW_SE,
SPR_WILD_MOUSE_FLAT_SW_NE,
SPR_WILD_MOUSE_FLAT_NW_SE,
};
uint32 imageId = imageIds[direction] | gTrackColours[SCHEME_TRACK];
sub_98197C_rotated(direction, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
if (track_paint_util_should_paint_supports(gPaintMapPosition)) {
metal_a_supports_paint_setup(0, 4, -1, height, gTrackColours[SCHEME_SUPPORTS]);
}
paint_util_push_tunnel_rotated(direction, height, TUNNEL_0);
paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0);
paint_util_set_general_support_height(height + 32, 0x20);
}
TRACK_PAINT_FUNCTION get_track_paint_function_wild_mouse(int trackType, int direction)
{
switch (trackType) {
case TRACK_ELEM_FLAT:
return wild_mouse_track_flat;
}
return NULL;
}