Merge pull request #3672 from marijnvdwerf/paint-setup/river-rapids

Paint River Rapids
This commit is contained in:
Ted John 2016-05-19 23:33:39 +01:00
commit 39e874d5e1
3 changed files with 793 additions and 2 deletions

View File

@ -5491,7 +5491,7 @@ const uint32 RideTypeTrackPaintFunctionsOld[91] = {
0, // RIDE_TYPE_SPIRAL_SLIDE
0x0074A668, // RIDE_TYPE_GO_KARTS
0x0074DDEC, // RIDE_TYPE_LOG_FLUME
0x0075745C, // RIDE_TYPE_RIVER_RAPIDS
0, // RIDE_TYPE_RIVER_RAPIDS
0, // RIDE_TYPE_DODGEMS
0x008A83E0, // RIDE_TYPE_PIRATE_SHIP
0x00760070, // RIDE_TYPE_SWINGING_INVERTER_SHIP
@ -5586,7 +5586,7 @@ const TRACK_PAINT_FUNCTION_GETTER RideTypeTrackPaintFunctions[91] = {
get_track_paint_function_spiral_slide, // RIDE_TYPE_SPIRAL_SLIDE
0, // RIDE_TYPE_GO_KARTS
0, // RIDE_TYPE_LOG_FLUME
0, // RIDE_TYPE_RIVER_RAPIDS
get_track_paint_function_river_rapids, // RIDE_TYPE_RIVER_RAPIDS
get_track_paint_function_dodgems, // RIDE_TYPE_DODGEMS
0, // RIDE_TYPE_PIRATE_SHIP
0, // RIDE_TYPE_SWINGING_INVERTER_SHIP

View File

@ -53,6 +53,9 @@ enum {
SPR_FENCE_ROPE_SW = 22140,
SPR_FENCE_ROPE_NW = 22141,
SPR_STATION_FENCE_SW_NE = 22370,
SPR_STATION_FENCE_NW_SE = 22371,
SPR_STATION_PIER_EDGE_SE = 22404,
SPR_STATION_PIER_EDGE_SW = 22405,
SPR_STATION_PIER_EDGE_NW = 22406,
@ -61,6 +64,25 @@ enum {
SPR_STATION_PIER_EDGE_NE_FENCED = 22409,
SPR_STATION_PIER_FENCE_SE = 22410,
SPR_STATION_PIER_FENCE_SW = 22411,
SPR_STATION_NARROW_EDGE_SE = 22412,
SPR_STATION_NARROW_EDGE_SW = 22413,
SPR_STATION_NARROW_EDGE_FENCED_NW = 22414,
SPR_STATION_NARROW_EDGE_FENCED_NE = 22415,
SPR_STATION_NARROW_EDGE_NW = 22416,
SPR_STATION_NARROW_EDGE_NE = 22417,
SPR_ON_RIDE_PHOTO_CAMERA_N = 25615,
SPR_ON_RIDE_PHOTO_CAMERA_E = 25616,
SPR_ON_RIDE_PHOTO_CAMERA_S = 25617,
SPR_ON_RIDE_PHOTO_CAMERA_W = 25618,
SPR_ON_RIDE_PHOTO_CAMERA_FLASH_N = 25619,
SPR_ON_RIDE_PHOTO_CAMERA_FLASH_E = 25620,
SPR_ON_RIDE_PHOTO_CAMERA_FLASH_S = 25621,
SPR_ON_RIDE_PHOTO_CAMERA_FLASH_W = 25622,
SPR_ON_RIDE_PHOTO_SIGN_SW_NE = 25623,
SPR_ON_RIDE_PHOTO_SIGN_NW_SE = 25624,
SPR_ON_RIDE_PHOTO_SIGN_NE_SW = 25625,
SPR_ON_RIDE_PHOTO_SIGN_SE_NW = 25626,
};
extern const uint32 floorSpritesCork[];
@ -81,6 +103,7 @@ TRACK_PAINT_FUNCTION get_track_paint_function_observation_tower(int trackType, i
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);
TRACK_PAINT_FUNCTION get_track_paint_function_river_rapids(int trackType, int direction);
TRACK_PAINT_FUNCTION get_track_paint_function_dodgems(int trackType, int direction);
TRACK_PAINT_FUNCTION get_track_paint_function_ferris_wheel(int trackType, int direction);
TRACK_PAINT_FUNCTION get_track_paint_function_3d_cinema(int trackType, int direction);

View File

@ -21,6 +21,10 @@
#include "../../paint/paint.h"
#include "../vehicle_paint.h"
#include "../../game.h"
#include "../track_paint.h"
#include "../track.h"
#include "../../paint/supports.h"
#include "../../world/map.h"
// 0x0099279E:
static const vehicle_boundbox _riverRapidsBoundbox[] = {
@ -35,6 +39,150 @@ static const vehicle_boundbox _riverRapidsBoundbox[] = {
{ -13, -13, 1, 26, 26, 13 }
};
enum
{
SPR_RIVER_RAPIDS_FLAT_SW_NE = 21132,
SPR_RIVER_RAPIDS_FLAT_NW_SE = 21133,
SPR_RIVER_RAPIDS_FLAT_NE_SW = 21134,
SPR_RIVER_RAPIDS_FLAT_SE_NW = 21135,
SPR_RIVER_RAPIDS_FLAT_FRONT_SW_NE = 21136,
SPR_RIVER_RAPIDS_FLAT_FRONT_NW_SE = 21137,
SPR_RIVER_RAPIDS_FLAT_FRONT_NE_SW = 21138,
SPR_RIVER_RAPIDS_FLAT_FRONT_SE_NW = 21139,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_SW_NE = 21140,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_NW_SE = 21141,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_NE_SW = 21142,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_SE_NW = 21143,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_FRONT_SW_NE = 21144,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_FRONT_NW_SE = 21145,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_FRONT_NE_SW = 21146,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_FRONT_SE_NW = 21147,
SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_SW_NE = 21148,
SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_NW_SE = 21149,
SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_NE_SW = 21150,
SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_SE_NW = 21151,
SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_FRONT_SW_NE = 21152,
SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_FRONT_NW_SE = 21153,
SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_FRONT_NE_SW = 21154,
SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_FRONT_SE_NW = 21155,
SPR_RIVER_RAPIDS_25_DEG_UP_SW_NE = 21156,
SPR_RIVER_RAPIDS_25_DEG_UP_NW_SE = 21157,
SPR_RIVER_RAPIDS_25_DEG_UP_NE_SW = 21158,
SPR_RIVER_RAPIDS_25_DEG_UP_SE_NW = 21159,
SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_SW_NE = 21160,
SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_NW_SE = 21161,
SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_NE_SW = 21162,
SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_SE_NW = 21163,
SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_SW_NE = 21164,
SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_NW_SE = 21165,
SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_NE_SW = 21166,
SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_SE_NW = 21167,
SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_FRONT_SW_NE = 21168,
SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_FRONT_NW_SE = 21169,
SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_FRONT_NE_SW = 21170,
SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_FRONT_SE_NW = 21171,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_SW_NE = 21172,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_NW_SE = 21173,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_NE_SW = 21174,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_SE_NW = 21175,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_FRONT_SW_NE = 21176,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_FRONT_NW_SE = 21177,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_FRONT_NE_SW = 21178,
SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_FRONT_SE_NW = 21179,
SPR_RIVER_RAPIDS_25_DEG_DOWN_SW_NE = 21180,
SPR_RIVER_RAPIDS_25_DEG_DOWN_NW_SE = 21181,
SPR_RIVER_RAPIDS_25_DEG_DOWN_NE_SW = 21182,
SPR_RIVER_RAPIDS_25_DEG_DOWN_SE_NW = 21183,
SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_SW_NE = 21184,
SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_NW_SE = 21185,
SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_NE_SW = 21186,
SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_SE_NW = 21187,
SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_SW_SE = 21188,
SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_SE_NE = 21189,
SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_NE_NW = 21190,
SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_NW_SW = 21191,
SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_SE_SW = 21192,
SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_SW_NW = 21193,
SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_NW_NE = 21194,
SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_NE_SE = 21195,
SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SW_SE = 21196,
SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SE_NE = 21197,
SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_LEFT_NW_NE = 21198,
SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_NW_SW = 21199,
SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_SE_SW = 21200,
SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_SW_NW = 21201,
SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_RIGHT_NW_NE = 21202,
SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_NE_SE = 21203,
SPR_RIVER_RAPIDS_WATERFALL_SW_NE = 21204,
SPR_RIVER_RAPIDS_WATERFALL_NW_SE = 21205,
SPR_RIVER_RAPIDS_WATERFALL_NE_SW = 21206,
SPR_RIVER_RAPIDS_WATERFALL_SE_NW = 21207,
SPR_RIVER_RAPIDS_WATERFALL_FRONT_SW_NE = 21208,
SPR_RIVER_RAPIDS_WATERFALL_FRONT_NW_SE = 21209,
SPR_RIVER_RAPIDS_WATERFALL_FRONT_NE_SW = 21210,
SPR_RIVER_RAPIDS_WATERFALL_FRONT_SE_NW = 21211,
SPR_RIVER_RAPIDS_WATERFALL_BASE_NW_FRAME_0 = 21212,
SPR_RIVER_RAPIDS_WATERFALL_BASE_NE_FRAME_0 = 21220,
SPR_RIVER_RAPIDS_WATERFALL_SIDE_SE_FRAME_0 = 21228,
SPR_RIVER_RAPIDS_WATERFALL_SIDE_SW_FRAME_0 = 21236,
SPR_RIVER_RAPIDS_WATERFALL_TOP_NW_FRAME_0 = 21244,
SPR_RIVER_RAPIDS_WATERFALL_TOP_NE_FRAME_0 = 21252,
SPR_RIVER_RAPIDS_RAPIDS_SW_NE_FRAME_0 = 21260,
SPR_RIVER_RAPIDS_RAPIDS_FRONT_SW_NE = 21268,
SPR_RIVER_RAPIDS_RAPIDS_NW_SE_FRAME_0 = 21269,
SPR_RIVER_RAPIDS_RAPIDS_FRONT_NW_SE = 21277,
SPR_RIVER_RAPIDS_RAPIDS_WHIRLPOOL_FRAME_0 = 21278,
};
static const uint32 river_rapids_track_pieces_25_deg_up[][2] = {
{SPR_RIVER_RAPIDS_25_DEG_UP_SW_NE, SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_SW_NE},
{SPR_RIVER_RAPIDS_25_DEG_UP_NW_SE, SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_NW_SE},
{SPR_RIVER_RAPIDS_25_DEG_UP_NE_SW, SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_NE_SW},
{SPR_RIVER_RAPIDS_25_DEG_UP_SE_NW, SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_SE_NW},
};
static const uint32 river_rapids_track_pieces_flat_to_25_deg_up[][2] = {
{SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_SW_NE, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_FRONT_SW_NE},
{SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_NW_SE, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_FRONT_NW_SE},
{SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_NE_SW, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_FRONT_NE_SW},
{SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_SE_NW, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_UP_FRONT_SE_NW},
};
static const uint32 river_rapids_track_pieces_25_deg_up_to_flat[][2] = {
{SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_SW_NE, SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_FRONT_SW_NE},
{SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_NW_SE, SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_FRONT_NW_SE},
{SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_NE_SW, SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_FRONT_NE_SW},
{SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_SE_NW, SPR_RIVER_RAPIDS_25_DEG_UP_TO_FLAT_FRONT_SE_NW},
};
static const uint32 river_rapids_track_pieces_25_deg_down[][2] = {
{SPR_RIVER_RAPIDS_25_DEG_DOWN_SW_NE, SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_SW_NE},
{SPR_RIVER_RAPIDS_25_DEG_DOWN_NW_SE, SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_NW_SE},
{SPR_RIVER_RAPIDS_25_DEG_DOWN_NE_SW, SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_NE_SW},
{SPR_RIVER_RAPIDS_25_DEG_DOWN_SE_NW, SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_SE_NW},
};
static const uint32 river_rapids_track_pieces_flat_to_25_deg_down[][2] = {
{SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_SW_NE, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_FRONT_SW_NE},
{SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_NW_SE, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_FRONT_NW_SE},
{SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_NE_SW, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_FRONT_NE_SW},
{SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_SE_NW, SPR_RIVER_RAPIDS_FLAT_TO_25_DEG_DOWN_FRONT_SE_NW},
};
static const uint32 river_rapids_track_pieces_25_deg_down_to_flat[][2] = {
{SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_SW_NE, SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_FRONT_SW_NE},
{SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_NW_SE, SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_FRONT_NW_SE},
{SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_NE_SW, SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_FRONT_NE_SW},
{SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_SE_NW, SPR_RIVER_RAPIDS_25_DEG_DOWN_TO_FLAT_FRONT_SE_NW},
};
/**
*
* rct2: 0x006D5889
@ -100,3 +248,623 @@ void vehicle_visual_river_rapids(int x, int imageDirection, int y, int z, rct_ve
vehicle_visual_splash_effect(z, vehicle, vehicleEntry);
}
/** rct2: 0x00757650 */
static void paint_river_rapids_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
uint32 imageId;
if (direction & 1) {
imageId = (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_NW_SE : SPR_RIVER_RAPIDS_FLAT_SE_NW) | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 24, 32, 11, height, 4, 0, height, get_current_rotation());
imageId = (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_FRONT_NW_SE : SPR_RIVER_RAPIDS_FLAT_FRONT_SE_NW) | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 32, 3, height, 27, 0, height + 17, get_current_rotation());
} else {
imageId = (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_SW_NE : SPR_RIVER_RAPIDS_FLAT_NE_SW) | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 24, 11, height, 0, 4, height, get_current_rotation());
imageId = (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_FRONT_SW_NE : SPR_RIVER_RAPIDS_FLAT_FRONT_NE_SW) | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 1, 3, height, 0, 27, height + 17, get_current_rotation());
}
wooden_a_supports_paint_setup((direction & 1), 0, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
if (direction & 1) {
paint_util_push_tunnel_right(height, TUNNEL_6);
} else {
paint_util_push_tunnel_left(height, TUNNEL_6);
}
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 32, 0x20);
}
/** rct2: 0x007576C0 */
static void paint_river_rapids_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
paint_river_rapids_track_flat(rideIndex, trackSequence, direction, height, mapElement);
rct_xy16 position = {RCT2_GLOBAL(0x009DE56A, sint16), RCT2_GLOBAL(0x009DE56E, sint16)};
rct_ride * ride = get_ride(rideIndex);
const rct_ride_entrance_definition * entranceStyle = &RideEntranceDefinitions[ride->entrance_style];
uint32 imageId;
bool hasFence;
if (direction & 1) {
hasFence = track_paint_util_has_fence(EDGE_NE, position, mapElement, ride, get_current_rotation());
imageId = (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NE : SPR_STATION_NARROW_EDGE_NE) | RCT2_GLOBAL(0x00F4419C, uint32);
sub_98196C(imageId, 0, 0, 8, 32, 1, height + 12, get_current_rotation());
track_paint_util_draw_station_covers(EDGE_NE, hasFence, entranceStyle, direction, height);
imageId = SPR_STATION_NARROW_EDGE_SW | RCT2_GLOBAL(0x00F4419C, uint32);
sub_98196C(imageId, 24, 0, 8, 32, 1, height + 12, get_current_rotation());
hasFence = track_paint_util_has_fence(EDGE_SW, position, mapElement, ride, get_current_rotation());
if (hasFence) {
imageId = SPR_STATION_FENCE_NW_SE | RCT2_GLOBAL(0x00F4419C, uint32);
sub_98196C(imageId, 31, 0, 1, 32, 7, height + 14, get_current_rotation());
}
track_paint_util_draw_station_covers(EDGE_SW, hasFence, entranceStyle, direction, height);
} else {
hasFence = track_paint_util_has_fence(EDGE_NW, position, mapElement, ride, get_current_rotation());
imageId = (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NW : SPR_STATION_NARROW_EDGE_NW) | RCT2_GLOBAL(0x00F4419C, uint32);
sub_98196C(imageId, 0, 0, 32, 8, 1, height + 12, get_current_rotation());
track_paint_util_draw_station_covers(EDGE_NW, hasFence, entranceStyle, direction, height);
imageId = SPR_STATION_NARROW_EDGE_SE | RCT2_GLOBAL(0x00F4419C, uint32);
sub_98196C(imageId, 0, 24, 32, 8, 1, height + 12, get_current_rotation());
hasFence = track_paint_util_has_fence(EDGE_SE, position, mapElement, ride, get_current_rotation());
if (hasFence) {
imageId = SPR_STATION_FENCE_SW_NE | RCT2_GLOBAL(0x00F4419C, uint32);
sub_98196C(imageId, 0, 31, 32, 1, 7, height + 14, get_current_rotation());
}
track_paint_util_draw_station_covers(EDGE_SE, hasFence, entranceStyle, direction, height);
}
paint_util_set_general_support_height(height + 32, 0x20);
}
static void paint_river_rapids_track_25_deg(uint8 direction, int height, const uint32 sprites[4][2])
{
uint32 imageId;
paint_struct * ps;
switch (direction) {
case 0:
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 24, 4, height, 0, 4, height, get_current_rotation());
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 1, 34, height, 0, 27, height + 16, get_current_rotation());
wooden_a_supports_paint_setup(0, 9, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
paint_util_push_tunnel_left(height - 8, TUNNEL_7);
break;
case 1:
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
ps = sub_98197C(imageId, 0, 0, 24, 32, 4, height, 4, 0, height, get_current_rotation());
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 32, 34, height, 27, 0, height + 16, get_current_rotation());
wooden_a_supports_paint_setup(1, 10, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
paint_util_push_tunnel_right(height + 8, TUNNEL_8);
break;
case 2:
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
ps = sub_98197C(imageId, 0, 0, 32, 24, 4, height, 0, 4, height, get_current_rotation());
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 1, 34, height, 0, 27, height + 16, get_current_rotation());
wooden_a_supports_paint_setup(0, 11, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
paint_util_push_tunnel_left(height + 8, TUNNEL_8);
break;
case 3:
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 24, 32, 4, height, 4, 0, height, get_current_rotation());
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 32, 34, height, 27, 0, height + 16, get_current_rotation());
wooden_a_supports_paint_setup(1, 12, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
paint_util_push_tunnel_right(height - 8, TUNNEL_7);
break;
}
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 56, 0x20);
}
static void paint_river_rapids_track_25_deg_to_flat_a(uint8 direction, int height, const uint32 sprites[4][2])
{
uint32 imageId;
paint_struct * ps;
switch (direction) {
case 0:
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 24, 4, height, 0, 4, height, get_current_rotation());
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 1, 18, height, 0, 27, height + 16, get_current_rotation());
wooden_a_supports_paint_setup(0, 5, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
paint_util_push_tunnel_left(height - 8, TUNNEL_6);
break;
case 1:
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
ps = sub_98197C(imageId, 0, 0, 24, 32, 4, height, 4, 0, height, get_current_rotation());
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 32, 18, height, 27, 0, height + 16, get_current_rotation());
wooden_a_supports_paint_setup(1, 6, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
paint_util_push_tunnel_right(height + 8, TUNNEL_14);
break;
case 2:
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
ps = sub_98197C(imageId, 0, 0, 32, 24, 4, height, 0, 4, height, get_current_rotation());
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 1, 18, height, 0, 27, height + 16, get_current_rotation());
wooden_a_supports_paint_setup(0, 7, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
paint_util_push_tunnel_left(height + 8, TUNNEL_14);
break;
case 3:
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 24, 32, 4, height, 4, 0, height, get_current_rotation());
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 32, 18, height, 27, 0, height + 16, get_current_rotation());
wooden_a_supports_paint_setup(1, 8, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
paint_util_push_tunnel_right(height - 8, TUNNEL_6);
break;
}
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 40, 0x20);
}
static void paint_river_rapids_track_25_deg_to_flat_b(uint8 direction, int height, const uint32 sprites[4][2])
{
uint32 imageId;
paint_struct * ps;
switch (direction) {
case 0:
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 24, 11, height, 0, 4, height, get_current_rotation());
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 1, 26, height, 0, 27, height + 16, get_current_rotation());
wooden_a_supports_paint_setup(0, 1, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
paint_util_push_tunnel_left(height, TUNNEL_6);
break;
case 1:
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
ps = sub_98197C(imageId, 0, 0, 24, 32, 11, height, 4, 0, height, get_current_rotation());
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 32, 26, height, 27, 0, height + 16, get_current_rotation());
wooden_a_supports_paint_setup(1, 2, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
paint_util_push_tunnel_right(height, TUNNEL_8);
break;
case 2:
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
ps = sub_98197C(imageId, 0, 0, 32, 24, 11, height, 0, 4, height, get_current_rotation());
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 1, 26, height, 0, 27, height + 16, get_current_rotation());
wooden_a_supports_paint_setup(0, 3, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
paint_util_push_tunnel_left(height, TUNNEL_8);
break;
case 3:
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 24, 32, 11, height, 4, 0, height, get_current_rotation());
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 32, 26, height, 27, 0, height + 16, get_current_rotation());
wooden_a_supports_paint_setup(1, 4, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
paint_util_push_tunnel_right(height, TUNNEL_6);
break;
}
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 48, 0x20);
}
/** rct2: 0x00757660 */
static void paint_river_rapids_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
paint_river_rapids_track_25_deg(direction, height, river_rapids_track_pieces_25_deg_up);
}
/** rct2: 0x00757670 */
static void paint_river_rapids_track_flat_to_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
paint_river_rapids_track_25_deg_to_flat_b(direction, height, river_rapids_track_pieces_flat_to_25_deg_up);
}
/** rct2: 0x00757680 */
static void paint_river_rapids_track_25_deg_up_to_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
paint_river_rapids_track_25_deg_to_flat_a(direction, height, river_rapids_track_pieces_25_deg_up_to_flat);
}
/** rct2: 0x00757690 */
static void paint_river_rapids_track_25_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
paint_river_rapids_track_25_deg((direction + 2) % 4, height, river_rapids_track_pieces_25_deg_down);
}
/** rct2: 0x007576A0 */
static void paint_river_rapids_track_flat_to_25_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
paint_river_rapids_track_25_deg_to_flat_a((direction + 2) % 4, height, river_rapids_track_pieces_flat_to_25_deg_down);
}
/** rct2: 0x007576B0 */
static void paint_river_rapids_track_25_deg_down_to_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
paint_river_rapids_track_25_deg_to_flat_b((direction + 2) % 4, height, river_rapids_track_pieces_25_deg_down_to_flat);
}
/** rct2: 0x007576F0 */
static void paint_river_rapids_track_left_quarter_turn_1_tile(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
uint32 imageId;
switch (direction) {
case 0:
imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_SW_NW | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 28, 26, 11, height, 4, 2, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_SW_NW | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 2, 1, 7, height, 28, 27, height + 13, get_current_rotation());
paint_util_push_tunnel_left(height, TUNNEL_6);
break;
case 1:
imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_NW_NE | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 28, 28, 11, height, 0, 0, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_LEFT_NW_NE | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 30, 7, height, 27, 1, height + 13, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_RIGHT_NW_NE | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 30, 1, 7, height, 1, 27, height + 13, get_current_rotation());
break;
case 2:
imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_NE_SE | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 26, 28, 11, height, 2, 4, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_NE_SE | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 2, 7, height, 27, 28, height + 13, get_current_rotation());
paint_util_push_tunnel_right(height, TUNNEL_6);
break;
case 3:
imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_SE_SW | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 28, 28, 11, height, 4, 4, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_SE_SW | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 1, 7, height, 28, 28, height + 13, get_current_rotation());
paint_util_push_tunnel_left(height, TUNNEL_6);
paint_util_push_tunnel_right(height, TUNNEL_6);
break;
}
wooden_a_supports_paint_setup((direction & 1), 0, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 32, 0x20);
}
/** rct2: 0x00757700 */
static void paint_river_rapids_track_right_quarter_turn_1_tile(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
uint32 imageId;
switch (direction) {
case 0:
imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_SW_SE | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 28, 28, 11, height, 4, 4, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SW_SE | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 1, 7, height, 28, 28, height + 13, get_current_rotation());
paint_util_push_tunnel_left(height, TUNNEL_6);
paint_util_push_tunnel_right(height, TUNNEL_6);
break;
case 1:
imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_SE_NE | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 28, 26, 11, height, 4, 2, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SE_NE | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 2, 1, 7, height, 28, 27, height + 13, get_current_rotation());
paint_util_push_tunnel_left(height, TUNNEL_6);
break;
case 2:
imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_NE_NW | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 28, 28, 11, height, 0, 0, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_LEFT_NW_NE | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 30, 7, height, 27, 1, height + 13, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_RIGHT_NW_NE | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 30, 1, 7, height, 1, 27, height + 13, get_current_rotation());
break;
case 3:
imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_NW_SW | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 26, 28, 11, height, 2, 4, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_NW_SW | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 28, 7, height, 27, 2, height + 13, get_current_rotation());
paint_util_push_tunnel_right(height, TUNNEL_6);
break;
}
wooden_a_supports_paint_setup(1 - (direction & 1), 0, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 32, 0x20);
}
/** rct2: 0x00757710 */
static void paint_river_rapids_track_waterfall(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
uint32 imageId;
uint16 frameNum = (gScenarioTicks / 2) & 7;
if (direction & 1) {
imageId = (direction == 1 ? SPR_RIVER_RAPIDS_WATERFALL_NW_SE : SPR_RIVER_RAPIDS_WATERFALL_SE_NW) | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 24, 32, 11, height, 4, 0, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_WATERFALL_BASE_NE_FRAME_0 + frameNum | RCT2_GLOBAL(0x00F44198, uint32);
sub_98199C(imageId, 0, 0, 24, 32, 11, height, 4, 0, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_WATERFALL_TOP_NE_FRAME_0 + frameNum | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 32, 27, height, 4, 0, height + 17, get_current_rotation());
imageId = (direction == 1 ? SPR_RIVER_RAPIDS_WATERFALL_FRONT_NW_SE : SPR_RIVER_RAPIDS_WATERFALL_FRONT_SE_NW) | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 32, 27, height, 27, 0, height + 17, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_WATERFALL_SIDE_SW_FRAME_0 + frameNum | RCT2_GLOBAL(0x00F44198, uint32);
sub_98199C(imageId, 0, 0, 1, 32, 27, height, 27, 0, height + 17, get_current_rotation());
} else {
imageId = (direction == 0 ? SPR_RIVER_RAPIDS_WATERFALL_SW_NE : SPR_RIVER_RAPIDS_WATERFALL_NE_SW) | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 24, 11, height, 0, 4, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_WATERFALL_BASE_NW_FRAME_0 + frameNum | RCT2_GLOBAL(0x00F44198, uint32);
sub_98199C(imageId, 0, 0, 32, 24, 11, height, 0, 4, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_WATERFALL_TOP_NW_FRAME_0 + frameNum | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 1, 27, height, 0, 4, height + 17, get_current_rotation());
imageId = (direction == 0 ? SPR_RIVER_RAPIDS_WATERFALL_FRONT_SW_NE : SPR_RIVER_RAPIDS_WATERFALL_FRONT_NE_SW) | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 1, 27, height, 0, 27, height + 17, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_WATERFALL_SIDE_SE_FRAME_0 + frameNum | RCT2_GLOBAL(0x00F44198, uint32);
sub_98199C(imageId, 0, 0, 32, 1, 27, height, 0, 27, height + 17, get_current_rotation());
}
wooden_a_supports_paint_setup((direction & 1), 0, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
if (direction & 1) {
paint_util_push_tunnel_right(height, TUNNEL_6);
} else {
paint_util_push_tunnel_left(height, TUNNEL_6);
}
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 32, 0x20);
}
/** rct2: 0x00757720 */
static void paint_river_rapids_track_rapids(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
uint32 imageId;
uint16 frameNum = (gScenarioTicks / 2) & 7;
if (direction & 1) {
imageId = SPR_RIVER_RAPIDS_RAPIDS_NW_SE_FRAME_0 + frameNum | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 24, 32, 11, height, 4, 0, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_RAPIDS_FRONT_NW_SE | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 32, 11, height, 27, 0, height + 17, get_current_rotation());
} else {
imageId = SPR_RIVER_RAPIDS_RAPIDS_SW_NE_FRAME_0 + frameNum | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 24, 11, height, 0, 4, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_RAPIDS_FRONT_SW_NE | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 1, 11, height, 0, 27, height + 17, get_current_rotation());
}
wooden_a_supports_paint_setup((direction & 1), 0, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
if (direction & 1) {
paint_util_push_tunnel_right(height, TUNNEL_6);
} else {
paint_util_push_tunnel_left(height, TUNNEL_6);
}
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 32, 0x20);
}
/** rct2: 0x00757740 */
static void paint_river_rapids_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
paint_river_rapids_track_flat(rideIndex, trackSequence, direction, height, mapElement);
uint32 imageId;
const bool takingPhoto = (bool) (mapElement->properties.track.sequence & 0xF0);
switch (direction) {
case 0:
imageId = SPR_ON_RIDE_PHOTO_SIGN_SW_NE | RCT2_GLOBAL(0x00F441A0, uint32);
sub_98196C(imageId, 26, 0, 1, 1, 19, height + 13, get_current_rotation());
imageId = SPR_ON_RIDE_PHOTO_SIGN_SW_NE | RCT2_GLOBAL(0x00F441A0, uint32);
sub_98196C(imageId, 26, 31, 1, 1, 19, height + 13, get_current_rotation());
imageId = (takingPhoto ? SPR_ON_RIDE_PHOTO_CAMERA_FLASH_S : SPR_ON_RIDE_PHOTO_CAMERA_S) | RCT2_GLOBAL(0x00F441A0, uint32);
sub_98196C(imageId, 6, 0, 1, 1, 19, height + 13, get_current_rotation());
break;
case 1:
imageId = SPR_ON_RIDE_PHOTO_SIGN_NW_SE | RCT2_GLOBAL(0x00F441A0, uint32);
sub_98196C(imageId, 0, 6, 1, 1, 19, height + 13, get_current_rotation());
imageId = SPR_ON_RIDE_PHOTO_SIGN_NW_SE | RCT2_GLOBAL(0x00F441A0, uint32);
sub_98196C(imageId, 31, 6, 1, 1, 19, height + 13, get_current_rotation());
imageId = (takingPhoto ? SPR_ON_RIDE_PHOTO_CAMERA_FLASH_W : SPR_ON_RIDE_PHOTO_CAMERA_W) | RCT2_GLOBAL(0x00F441A0, uint32);
sub_98196C(imageId, 0, 26, 1, 1, 19, height + 13, get_current_rotation());
break;
case 2:
imageId = SPR_ON_RIDE_PHOTO_SIGN_NE_SW | RCT2_GLOBAL(0x00F441A0, uint32);
sub_98196C(imageId, 6, 0, 1, 1, 19, height + 13, get_current_rotation());
imageId = SPR_ON_RIDE_PHOTO_SIGN_NE_SW | RCT2_GLOBAL(0x00F441A0, uint32);
sub_98196C(imageId, 6, 31, 1, 1, 19, height + 13, get_current_rotation());
imageId = (takingPhoto ? SPR_ON_RIDE_PHOTO_CAMERA_FLASH_N : SPR_ON_RIDE_PHOTO_CAMERA_N) | RCT2_GLOBAL(0x00F441A0, uint32);
sub_98196C(imageId, 26, 31, 1, 1, 19, height + 13, get_current_rotation());
break;
case 3:
imageId = SPR_ON_RIDE_PHOTO_SIGN_SE_NW | RCT2_GLOBAL(0x00F441A0, uint32);
sub_98196C(imageId, 0, 26, 1, 1, 19, height + 13, get_current_rotation());
imageId = SPR_ON_RIDE_PHOTO_SIGN_SE_NW | RCT2_GLOBAL(0x00F441A0, uint32);
sub_98196C(imageId, 31, 26, 1, 1, 19, height + 13, get_current_rotation());
imageId = (takingPhoto ? SPR_ON_RIDE_PHOTO_CAMERA_FLASH_E : SPR_ON_RIDE_PHOTO_CAMERA_E) | RCT2_GLOBAL(0x00F441A0, uint32);
sub_98196C(imageId, 31, 6, 1, 1, 19, height + 13, get_current_rotation());
break;
}
paint_util_set_general_support_height(height + 48, 0x20);
}
/** rct2: 0x */
static void paint_river_rapids_track_whirlpool(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
uint32 imageId;
uint8 frameNum = (gScenarioTicks / 4) % 16;
if (direction & 1) {
imageId = (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_NW_SE : SPR_RIVER_RAPIDS_FLAT_SE_NW) | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 24, 32, 11, height, 4, 0, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_RAPIDS_WHIRLPOOL_FRAME_0 + frameNum | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 24, 32, 11, height, 4, 0, height, get_current_rotation());
imageId = (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_FRONT_NW_SE : SPR_RIVER_RAPIDS_FLAT_FRONT_SE_NW) | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 1, 32, 3, height, 27, 0, height + 17, get_current_rotation());
} else {
imageId = (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_SW_NE : SPR_RIVER_RAPIDS_FLAT_NE_SW) | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 24, 11, height, 0, 4, height, get_current_rotation());
imageId = SPR_RIVER_RAPIDS_RAPIDS_WHIRLPOOL_FRAME_0 + frameNum | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 24, 11, height, 0, 4, height, get_current_rotation());
imageId = (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_FRONT_SW_NE : SPR_RIVER_RAPIDS_FLAT_FRONT_NE_SW) | RCT2_GLOBAL(0x00F44198, uint32);
sub_98197C(imageId, 0, 0, 32, 1, 3, height, 0, 27, height + 17, get_current_rotation());
}
wooden_a_supports_paint_setup((direction & 1), 0, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
if (direction & 1) {
paint_util_push_tunnel_right(height, TUNNEL_6);
} else {
paint_util_push_tunnel_left(height, TUNNEL_6);
}
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 32, 0x20);
}
/**
* rct2: 0x0075745C
**/
TRACK_PAINT_FUNCTION get_track_paint_function_river_rapids(int trackType, int direction)
{
switch (trackType) {
case TRACK_ELEM_FLAT:
return paint_river_rapids_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return paint_river_rapids_station;
case TRACK_ELEM_25_DEG_UP:
return paint_river_rapids_track_25_deg_up;
case TRACK_ELEM_FLAT_TO_25_DEG_UP:
return paint_river_rapids_track_flat_to_25_deg_up;
case TRACK_ELEM_25_DEG_UP_TO_FLAT:
return paint_river_rapids_track_25_deg_up_to_flat;
case TRACK_ELEM_25_DEG_DOWN:
return paint_river_rapids_track_25_deg_down;
case TRACK_ELEM_FLAT_TO_25_DEG_DOWN:
return paint_river_rapids_track_flat_to_25_deg_down;
case TRACK_ELEM_25_DEG_DOWN_TO_FLAT:
return paint_river_rapids_track_25_deg_down_to_flat;
case TRACK_ELEM_LEFT_QUARTER_TURN_1_TILE:
return paint_river_rapids_track_left_quarter_turn_1_tile;
case TRACK_ELEM_RIGHT_QUARTER_TURN_1_TILE:
return paint_river_rapids_track_right_quarter_turn_1_tile;
case TRACK_ELEM_WATERFALL:
return paint_river_rapids_track_waterfall;
case TRACK_ELEM_RAPIDS:
return paint_river_rapids_track_rapids;
case TRACK_ELEM_ON_RIDE_PHOTO:
return paint_river_rapids_track_on_ride_photo;
case TRACK_ELEM_WHIRLPOOL:
return paint_river_rapids_track_whirlpool;
}
return NULL;
}