Implement flat

This commit is contained in:
Ted John 2016-10-02 17:24:54 +01:00
parent cfd32f9b35
commit d770c5d7f8
1 changed files with 30 additions and 0 deletions

View File

@ -26,7 +26,37 @@
#include "../track_data.h"
#include "../track_paint.h"
enum {
SPR_AIR_POWERED_VERTICAL_RC_FLAT_SW_NE = 22226,
SPR_AIR_POWERED_VERTICAL_RC_FLAT_NW_SE = 22227,
};
static void air_powered_vertical_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4] = {
{ SPR_AIR_POWERED_VERTICAL_RC_FLAT_SW_NE },
{ SPR_AIR_POWERED_VERTICAL_RC_FLAT_NW_SE },
{ SPR_AIR_POWERED_VERTICAL_RC_FLAT_SW_NE },
{ SPR_AIR_POWERED_VERTICAL_RC_FLAT_NW_SE },
};
uint32 imageId = imageIds[direction] | gTrackColours[SCHEME_TRACK];
sub_98197C_rotated(direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height);
wooden_a_supports_paint_setup(direction & 1, 0, height, gTrackColours[SCHEME_SUPPORTS], NULL);
paint_util_push_tunnel_rotated(direction, height, TUNNEL_6);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 32, 0x20);
}
TRACK_PAINT_FUNCTION get_track_paint_function_air_powered_vertical_rc(int trackType, int direction)
{
switch (trackType) {
case TRACK_ELEM_FLAT:
return air_powered_vertical_rc_track_flat;
}
return NULL;
}