mirror of https://github.com/OpenRCT2/OpenRCT2.git
Draw station
This commit is contained in:
parent
385b9cfcda
commit
d4850e46ca
|
@ -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,12 @@ 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,
|
||||
|
|
|
@ -280,10 +280,50 @@ static void paint_river_rapids_track_flat(uint8 rideIndex, uint8 trackSequence,
|
|||
paint_util_set_general_support_height(height + 32, 0x20);
|
||||
}
|
||||
|
||||
/** rct2: 0x */
|
||||
/** 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])
|
||||
|
|
Loading…
Reference in New Issue