1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 04:23:20 +01:00

Implement quarter turn 1

This commit is contained in:
Ted John
2016-10-03 23:50:48 +01:00
parent 475a142bf7
commit c6a1ecab91

View File

@@ -109,6 +109,10 @@ enum {
SPR_WOODEN_WILD_MOUSE_60_DEG_TO_FLAT_CHAIN_SE_NW = 28614,
SPR_WOODEN_WILD_MOUSE_60_DEG_TO_FLAT_CHAIN_FRONT_NW_SE = 28615,
SPR_WOODEN_WILD_MOUSE_60_DEG_TO_FLAT_CHAIN_FRONT_NE_SW = 28616,
SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_1_SW_NE = 28617,
SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_1_NW_SE = 28618,
SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_1_NE_SW = 28619,
SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_1_SE_NW = 28620,
};
static void wooden_wild_mouse_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
@@ -395,6 +399,42 @@ static void wooden_wild_mouse_track_25_deg_down_to_flat(uint8 rideIndex, uint8 t
wooden_wild_mouse_track_flat_to_25_deg_up(rideIndex, trackSequence, (direction + 2) & 3, height, mapElement);
}
static void wooden_wild_mouse_track_left_quarter_turn_1(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4] = {
SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_1_SW_NE,
SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_1_NW_SE,
SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_1_NE_SW,
SPR_WOODEN_WILD_MOUSE_QUARTER_TURN_1_SE_NW,
};
static uint8 supportType[] = { 5, 2, 3, 4 };
uint32 imageId = imageIds[direction] | gTrackColours[SCHEME_TRACK];
switch (direction) {
case 0:
sub_98197C(imageId, 6, 0, 26, 24, 1, height, 6, 2, height, get_current_rotation());
break;
case 1:
sub_98196C(imageId, 0, 0, 26, 26, 1, height, get_current_rotation());
break;
case 2:
sub_98197C(imageId, 0, 6, 24, 26, 1, height, 2, 6, height, get_current_rotation());
break;
case 3:
sub_98196C(imageId, 6, 6, 24, 24, 1, height, get_current_rotation());
break;
}
wooden_a_supports_paint_setup(supportType[direction], 0, height, gTrackColours[SCHEME_SUPPORTS], NULL);
track_paint_util_left_quarter_turn_1_tile_tunnel(height, direction, trackSequence);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 32, 0x20);
}
static void wooden_wild_mouse_track_right_quarter_turn_1(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
wooden_wild_mouse_track_left_quarter_turn_1(rideIndex, trackSequence, (direction - 1) & 3, height, mapElement);
}
static void wooden_wild_mouse_track_flat_to_60_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[2][4][2] = {
@@ -522,9 +562,11 @@ TRACK_PAINT_FUNCTION get_track_paint_function_wooden_wild_mouse(int trackType, i
return wooden_wild_mouse_track_25_deg_down_to_flat;
case TRACK_ELEM_LEFT_QUARTER_TURN_3_TILES:
case TRACK_ELEM_RIGHT_QUARTER_TURN_3_TILES:
case TRACK_ELEM_LEFT_QUARTER_TURN_1_TILE:
case TRACK_ELEM_RIGHT_QUARTER_TURN_1_TILE:
return NULL;
case TRACK_ELEM_LEFT_QUARTER_TURN_1_TILE:
return wooden_wild_mouse_track_left_quarter_turn_1;
case TRACK_ELEM_RIGHT_QUARTER_TURN_1_TILE:
return wooden_wild_mouse_track_right_quarter_turn_1;
case TRACK_ELEM_FLAT_TO_60_DEG_UP:
return wooden_wild_mouse_track_flat_to_60_deg_up;
case TRACK_ELEM_60_DEG_UP_TO_FLAT: