mirror of https://github.com/OpenRCT2/OpenRCT2.git
Implement flat
This commit is contained in:
parent
0c63fc7f0b
commit
e5b2cac905
|
@ -6257,7 +6257,7 @@ const TRACK_PAINT_FUNCTION_GETTER RideTypeTrackPaintFunctions[91] = {
|
|||
0, // RIDE_TYPE_BOBSLEIGH_COASTER
|
||||
get_track_paint_function_observation_tower, // RIDE_TYPE_OBSERVATION_TOWER
|
||||
0, // RIDE_TYPE_LOOPING_ROLLER_COASTER
|
||||
get_track_paint_function_dingy_slide, // RIDE_TYPE_DINGHY_SLIDE
|
||||
get_track_paint_function_dinghy_slide, // RIDE_TYPE_DINGHY_SLIDE
|
||||
0, // RIDE_TYPE_MINE_TRAIN_COASTER
|
||||
get_track_paint_function_chairlift, // RIDE_TYPE_CHAIRLIFT
|
||||
0, // RIDE_TYPE_CORKSCREW_ROLLER_COASTER
|
||||
|
|
|
@ -256,7 +256,7 @@ TRACK_PAINT_FUNCTION get_track_paint_function_boat_ride(int trackType, int direc
|
|||
TRACK_PAINT_FUNCTION get_track_paint_function_car_ride(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_launched_freefall(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_observation_tower(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_dingy_slide(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_dinghy_slide(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_chairlift(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_maze(int trackType, int direction);
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_spiral_slide(int trackType, int direction);
|
||||
|
|
|
@ -21,9 +21,56 @@
|
|||
#include "../track.h"
|
||||
#include "../track_paint.h"
|
||||
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_dingy_slide(int trackType, int direction)
|
||||
enum {
|
||||
SPR_DINGHY_SLIDE_FLAT_SW_NE = 19720,
|
||||
SPR_DINGHY_SLIDE_FLAT_NW_SE = 19721,
|
||||
SPR_DINGHY_SLIDE_FLAT_FRONT_SW_NE = 19722,
|
||||
SPR_DINGHY_SLIDE_FLAT_FRONT_NW_SE = 19723,
|
||||
SPR_DINGHY_SLIDE_FLAT_CHAIN_SW_NE = 19724,
|
||||
SPR_DINGHY_SLIDE_FLAT_CHAIN_NW_SE = 19725,
|
||||
SPR_DINGHY_SLIDE_FLAT_CHAIN_FRONT_SW_NE = 19726,
|
||||
SPR_DINGHY_SLIDE_FLAT_CHAIN_FRONT_NW_SE = 19727,
|
||||
};
|
||||
|
||||
static void dinghy_slide_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
static const uint32 imageIds[2][4][2] = {
|
||||
{
|
||||
{ SPR_DINGHY_SLIDE_FLAT_SW_NE, SPR_DINGHY_SLIDE_FLAT_FRONT_SW_NE },
|
||||
{ SPR_DINGHY_SLIDE_FLAT_NW_SE, SPR_DINGHY_SLIDE_FLAT_FRONT_NW_SE },
|
||||
{ SPR_DINGHY_SLIDE_FLAT_SW_NE, SPR_DINGHY_SLIDE_FLAT_FRONT_SW_NE },
|
||||
{ SPR_DINGHY_SLIDE_FLAT_NW_SE, SPR_DINGHY_SLIDE_FLAT_FRONT_NW_SE },
|
||||
},
|
||||
{
|
||||
{ SPR_DINGHY_SLIDE_FLAT_CHAIN_SW_NE, SPR_DINGHY_SLIDE_FLAT_CHAIN_FRONT_SW_NE },
|
||||
{ SPR_DINGHY_SLIDE_FLAT_CHAIN_NW_SE, SPR_DINGHY_SLIDE_FLAT_CHAIN_FRONT_NW_SE },
|
||||
{ SPR_DINGHY_SLIDE_FLAT_CHAIN_SW_NE, SPR_DINGHY_SLIDE_FLAT_CHAIN_FRONT_SW_NE },
|
||||
{ SPR_DINGHY_SLIDE_FLAT_CHAIN_NW_SE, SPR_DINGHY_SLIDE_FLAT_CHAIN_FRONT_NW_SE },
|
||||
},
|
||||
};
|
||||
|
||||
bool isChained = track_element_is_lift_hill(mapElement);
|
||||
uint32 imageId = imageIds[isChained][direction][0] | gTrackColours[SCHEME_TRACK];
|
||||
sub_98197C_rotated(direction, imageId, 0, 0, 32, 20, 2, height, 0, 6, height);
|
||||
|
||||
imageId = imageIds[isChained][direction][1] | gTrackColours[SCHEME_TRACK];
|
||||
sub_98197C_rotated(direction, imageId, 0, 0, 32, 1, 26, height, 0, 27, height);
|
||||
|
||||
if (track_paint_util_should_paint_supports(gPaintMapPosition)) {
|
||||
metal_a_supports_paint_setup(0, 4, 0, height, gTrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
paint_util_push_tunnel_rotated(direction, height, TUNNEL_0);
|
||||
|
||||
paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(height + 32, 0x20);
|
||||
}
|
||||
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_dinghy_slide(int trackType, int direction)
|
||||
{
|
||||
switch (trackType) {
|
||||
case TRACK_ELEM_FLAT:
|
||||
return dinghy_slide_track_flat;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue