mirror of https://github.com/OpenRCT2/OpenRCT2.git
Name and fix vehicle entry and tertiary colour flags
This commit is contained in:
parent
343e436e45
commit
bb09019d9b
|
@ -1305,7 +1305,7 @@ static bool sub_679023(rct_drawpixelinfo *dpi, sint32 imageId, sint32 x, sint32
|
|||
if (imageId & 0x20000000) {
|
||||
gUnkEDF81C = 0x20000000;
|
||||
sint32 index = (imageId >> 19) & 0x7F;
|
||||
if (imageId & 0x80000000) {
|
||||
if (imageId & IMAGE_TYPE_REMAP_2_PLUS) {
|
||||
index &= 0x1F;
|
||||
}
|
||||
sint32 g1Index = palette_to_g1_offset[index];
|
||||
|
|
|
@ -857,7 +857,7 @@ static void widget_draw_image(rct_drawpixelinfo *dpi, rct_window *w, rct_widgeti
|
|||
colour = ColourMapA[NOT_TRANSLUCENT(colour)].mid_light;
|
||||
gfx_draw_sprite_solid(dpi, image, l, t, colour);
|
||||
} else {
|
||||
if (image & 0x80000000) {
|
||||
if (image & IMAGE_TYPE_REMAP_2_PLUS) {
|
||||
// ?
|
||||
}
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ void fence_paint(uint8 direction, sint32 height, rct_map_element * map_element)
|
|||
|
||||
if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_SECONDARY_COLOUR) {
|
||||
uint8 secondaryColour = wall_element_get_secondary_colour(map_element);
|
||||
imageColourFlags |= secondaryColour << 24 | 0x80000000;
|
||||
imageColourFlags |= secondaryColour << 24 | IMAGE_TYPE_REMAP_2_PLUS;
|
||||
}
|
||||
|
||||
uint32 tertiaryColour = 0;
|
||||
|
|
|
@ -120,7 +120,7 @@ void scenery_paint(uint8 direction, sint32 height, rct_map_element* mapElement)
|
|||
if (entry->small_scenery.flags & SMALL_SCENERY_FLAG_HAS_PRIMARY_COLOUR) {
|
||||
baseImageid |= ((mapElement->properties.scenery.colour_1 & 0x1F) << 19) | 0x20000000;
|
||||
if (entry->small_scenery.flags & SMALL_SCENERY_FLAG_HAS_SECONDARY_COLOUR) {
|
||||
baseImageid |= ((mapElement->properties.scenery.colour_2 & 0x1F) << 24) | 0x80000000;
|
||||
baseImageid |= ((mapElement->properties.scenery.colour_2 & 0x1F) << 24) | IMAGE_TYPE_REMAP_2_PLUS;
|
||||
}
|
||||
}
|
||||
if (dword_F64EB0 != 0) {
|
||||
|
@ -240,7 +240,7 @@ void scenery_paint(uint8 direction, sint32 height, rct_map_element* mapElement)
|
|||
if (entry->small_scenery.flags & SMALL_SCENERY_FLAG_HAS_PRIMARY_COLOUR) {
|
||||
image_id |= ((mapElement->properties.scenery.colour_1 & 0x1F) << 19) | 0x20000000;
|
||||
if (entry->small_scenery.flags & SMALL_SCENERY_FLAG_HAS_SECONDARY_COLOUR) {
|
||||
image_id |= ((mapElement->properties.scenery.colour_2 & 0x1F) << 24) | 0x80000000;
|
||||
image_id |= ((mapElement->properties.scenery.colour_2 & 0x1F) << 24) | IMAGE_TYPE_REMAP_2_PLUS;
|
||||
}
|
||||
}
|
||||
if (dword_F64EB0 != 0) {
|
||||
|
|
|
@ -172,7 +172,7 @@ static uint32 air_powered_vertical_rc_get_support_colour()
|
|||
{
|
||||
uint32 colourFlags = gTrackColours[SCHEME_SUPPORTS];
|
||||
uint32 trackColour = gTrackColours[SCHEME_TRACK];
|
||||
if (trackColour & 0x80000000) {
|
||||
if (trackColour & IMAGE_TYPE_REMAP_2_PLUS) {
|
||||
colourFlags |= (trackColour & 0x9F000000);
|
||||
}
|
||||
return colourFlags;
|
||||
|
|
|
@ -52,7 +52,7 @@ void vehicle_visual_observation_tower(sint32 x, sint32 imageDirection, sint32 y,
|
|||
baseImage_id = (vehicle->var_C5 * 2) + vehicleEntry->base_image_id + 8;
|
||||
}
|
||||
|
||||
image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0x80000000;
|
||||
image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | IMAGE_TYPE_REMAP_2_PLUS;
|
||||
paint_struct* ps = sub_98197C(image_id, 0, 0, 2, 2, 41, z, -11, -11, z + 1, get_current_rotation());
|
||||
if (ps != NULL) {
|
||||
ps->tertiary_colour = vehicle->colours_extended;
|
||||
|
|
|
@ -44,7 +44,7 @@ static void shop_paint_setup(uint8 rideIndex, uint8 trackSequence, uint8 directi
|
|||
}
|
||||
|
||||
uint32 imageId = gTrackColours[SCHEME_TRACK];
|
||||
if (imageId & 0x80000000) {
|
||||
if (imageId & IMAGE_TYPE_REMAP_2_PLUS) {
|
||||
imageId &= 0x60FFFFFF;
|
||||
}
|
||||
imageId += firstVehicleEntry->base_image_id;
|
||||
|
|
|
@ -4881,7 +4881,7 @@ static void vehicle_update_sound(rct_vehicle *vehicle)
|
|||
break;
|
||||
|
||||
default:
|
||||
if ((vehicleEntry->flags_b & VEHICLE_ENTRY_FLAG_B_4)) {
|
||||
if ((vehicleEntry->flags_b & VEHICLE_ENTRY_FLAG_B_RIDERS_SCREAM)) {
|
||||
screamId = vehicle_update_scream_sound(vehicle);
|
||||
if (screamId == NO_SCREAM)
|
||||
screamId = 255;
|
||||
|
@ -5830,7 +5830,7 @@ static void vehicle_update_track_motion_up_stop_check(rct_vehicle *vehicle)
|
|||
sint32 verticalG, lateralG;
|
||||
|
||||
// No up stops (coaster types)
|
||||
if (vehicleEntry->flags_a & VEHICLE_ENTRY_FLAG_A_1) {
|
||||
if (vehicleEntry->flags_a & VEHICLE_ENTRY_FLAG_A_NO_UPSTOP_WHEELS) {
|
||||
sint32 trackType = vehicle->track_type >> 2;
|
||||
if (!track_element_is_covered(trackType)) {
|
||||
vehicle_get_g_forces(vehicle, &verticalG, &lateralG);
|
||||
|
@ -5849,7 +5849,7 @@ static void vehicle_update_track_motion_up_stop_check(rct_vehicle *vehicle)
|
|||
_vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_DERAILED;
|
||||
}
|
||||
}
|
||||
} else if (vehicleEntry->flags_a & VEHICLE_ENTRY_FLAG_A_2) {
|
||||
} else if (vehicleEntry->flags_a & VEHICLE_ENTRY_FLAG_A_NO_UPSTOP_BOBSLEIGH) {
|
||||
// No up stops bobsleigh type
|
||||
sint32 trackType = vehicle->track_type >> 2;
|
||||
if (!track_element_is_covered(trackType)) {
|
||||
|
@ -7353,7 +7353,7 @@ static bool vehicle_update_track_motion_forwards_get_new_track(rct_vehicle *vehi
|
|||
// TODO check if getting the vehicle entry again is necessary
|
||||
rct_ride_entry_vehicle* vehicleEntry = vehicle_get_vehicle_entry(vehicle);
|
||||
|
||||
if (vehicleEntry->flags_a & VEHICLE_ENTRY_FLAG_A_8) {
|
||||
if (vehicleEntry->flags_a & VEHICLE_ENTRY_FLAG_A_ALLOW_DOORS) {
|
||||
vehicle_update_scenery_door(vehicle);
|
||||
}
|
||||
|
||||
|
@ -7482,7 +7482,7 @@ loc_6DB41D:
|
|||
if (trackType == TRACK_ELEM_ROTATION_CONTROL_TOGGLE && rideType == RIDE_TYPE_WILD_MOUSE) {
|
||||
vehicle->update_flags ^= VEHICLE_UPDATE_FLAG_13;
|
||||
}
|
||||
if (vehicleEntry->flags_a & VEHICLE_ENTRY_FLAG_A_8) {
|
||||
if (vehicleEntry->flags_a & VEHICLE_ENTRY_FLAG_A_ALLOW_DOORS) {
|
||||
vehicle_update_handle_scenery_door(vehicle);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -222,15 +222,15 @@ typedef struct rct_vehicle_info {
|
|||
|
||||
enum {
|
||||
VEHICLE_ENTRY_FLAG_A_0 = 1 << 0,
|
||||
VEHICLE_ENTRY_FLAG_A_1 = 1 << 1,
|
||||
VEHICLE_ENTRY_FLAG_A_2 = 1 << 2,
|
||||
VEHICLE_ENTRY_FLAG_A_NO_UPSTOP_WHEELS = 1 << 1,
|
||||
VEHICLE_ENTRY_FLAG_A_NO_UPSTOP_BOBSLEIGH = 1 << 2,
|
||||
VEHICLE_ENTRY_FLAG_A_MINI_GOLF = 1 << 3,
|
||||
VEHICLE_ENTRY_FLAG_A_4 = 1 << 4,
|
||||
VEHICLE_ENTRY_FLAG_A_5 = 1 << 5,
|
||||
VEHICLE_ENTRY_FLAG_A_6 = 1 << 6,
|
||||
VEHICLE_ENTRY_FLAG_A_7 = 1 << 7,
|
||||
VEHICLE_ENTRY_FLAG_A_8 = 1 << 8,
|
||||
VEHICLE_ENTRY_FLAG_A_9 = 1 << 9,
|
||||
VEHICLE_ENTRY_FLAG_A_ALLOW_DOORS = 1 << 8,
|
||||
VEHICLE_ENTRY_FLAG_A_ENABLE_ADDITIONAL_COLOUR_2 = 1 << 9,
|
||||
VEHICLE_ENTRY_FLAG_A_10 = 1 << 10,
|
||||
VEHICLE_ENTRY_FLAG_A_11 = 1 << 11,
|
||||
VEHICLE_ENTRY_FLAG_A_12 = 1 << 12,
|
||||
|
@ -240,11 +240,11 @@ enum {
|
|||
};
|
||||
|
||||
enum {
|
||||
VEHICLE_ENTRY_FLAG_B_0 = 1 << 0,
|
||||
VEHICLE_ENTRY_FLAG_B_ENABLE_ADDITIONAL_COLOUR_1 = 1 << 0,
|
||||
VEHICLE_ENTRY_FLAG_B_SWINGING = 1 << 1,
|
||||
VEHICLE_ENTRY_FLAG_B_SPINNING = 1 << 2,
|
||||
VEHICLE_ENTRY_FLAG_B_3 = 1 << 3,
|
||||
VEHICLE_ENTRY_FLAG_B_4 = 1 << 4,
|
||||
VEHICLE_ENTRY_FLAG_B_RIDERS_SCREAM = 1 << 4,
|
||||
VEHICLE_ENTRY_FLAG_B_5 = 1 << 5,
|
||||
VEHICLE_ENTRY_FLAG_B_6 = 1 << 6,
|
||||
VEHICLE_ENTRY_FLAG_B_7 = 1 << 7,
|
||||
|
|
|
@ -902,7 +902,7 @@ static void vehicle_sprite_paint(rct_vehicle *vehicle, sint32 ebx, sint32 ecx, s
|
|||
baseImage_id += vehicle->var_C5;
|
||||
}
|
||||
uint32 rotation = get_current_rotation();
|
||||
sint32 image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0x80000000;
|
||||
sint32 image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | IMAGE_TYPE_REMAP_2_PLUS;
|
||||
paint_struct* ps = sub_98197C(image_id, 0, 0, bb.length_x, bb.length_y, bb.length_z, z, bb.offset_x, bb.offset_y, bb.offset_z + z, rotation);
|
||||
if (ps != NULL) {
|
||||
ps->tertiary_colour = vehicle->colours_extended;
|
||||
|
@ -913,7 +913,7 @@ static void vehicle_sprite_paint(rct_vehicle *vehicle, sint32 ebx, sint32 ecx, s
|
|||
for (sint32 i = 0; i < 8; i++){
|
||||
if (vehicle->num_peeps > (i * 2) && vehicleEntry->no_seating_rows > i) {
|
||||
image_id = baseImage_id | (vehicle->peep_tshirt_colours[i * 2] << 19) | (vehicle->peep_tshirt_colours[(i * 2) + 1] << 24) | 0xA0000000;
|
||||
if (i == 0 && vehicleEntry->flags_b & VEHICLE_ENTRY_FLAG_A_8) {
|
||||
if (i == 0 && vehicleEntry->flags_b & VEHICLE_ENTRY_FLAG_B_8) {
|
||||
image_id += (vehicleEntry->no_vehicle_images * vehicle->var_C5);
|
||||
}
|
||||
sub_98199C(image_id, 0, 0, bb.length_x, bb.length_y, bb.length_z, z, bb.offset_x, bb.offset_y, bb.offset_z + z, rotation);
|
||||
|
|
|
@ -52,13 +52,13 @@ void vehicle_visual_submarine(sint32 x, sint32 imageDirection, sint32 y, sint32
|
|||
|
||||
vehicle_boundbox bb = VehicleBoundboxes[vehicleEntry->draw_order][imageDirection / 2];
|
||||
|
||||
image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0x80000000;
|
||||
image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | IMAGE_TYPE_REMAP_2_PLUS;
|
||||
paint_struct* ps = sub_98197C(image_id, 0, 0, bb.length_x, bb.length_y, bb.length_z, z, bb.offset_x, bb.offset_y, bb.offset_z + z, get_current_rotation());
|
||||
if (ps != NULL) {
|
||||
ps->tertiary_colour = vehicle->colours_extended;
|
||||
}
|
||||
|
||||
image_id = (baseImage_id + 1) | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0x80000000;
|
||||
image_id = (baseImage_id + 1) | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | IMAGE_TYPE_REMAP_2_PLUS;
|
||||
ps = sub_98197C(image_id, 0, 0, bb.length_x, bb.length_y, 2, z, bb.offset_x, bb.offset_y, bb.offset_z + z - 10, get_current_rotation());
|
||||
if (ps != NULL) {
|
||||
ps->tertiary_colour = vehicle->colours_extended;
|
||||
|
|
|
@ -426,7 +426,7 @@ static void window_game_bottom_toolbar_draw_park_rating(rct_drawpixelinfo *dpi,
|
|||
|
||||
bar_width = (factor * (92 + WIDTH_MOD)) / 255;
|
||||
gfx_fill_rect_inset(dpi, x + 1, y + 1, x + (92 + WIDTH_MOD), y + 9, w->colours[1], INSET_RECT_F_30);
|
||||
if (!(colour & 0x80000000) || game_is_paused() || (gCurrentTicks & 8)) {
|
||||
if (!(colour & IMAGE_TYPE_REMAP_2_PLUS) || game_is_paused() || (gCurrentTicks & 8)) {
|
||||
if (bar_width > 2)
|
||||
gfx_fill_rect_inset(dpi, x + 2, y + 2, x + bar_width - 1, y + 8, colour & 0x7FFFFFFF, 0);
|
||||
}
|
||||
|
|
|
@ -68,6 +68,8 @@ enum WINDOW_GUEST_WIDGET_IDX {
|
|||
WIDX_RIDE_SCROLL = 10
|
||||
};
|
||||
|
||||
#define BAR_BLINK (1u << 31)
|
||||
|
||||
validate_global_widx(WC_PEEP, WIDX_ACTION_LBL);
|
||||
|
||||
rct_widget window_guest_overview_widgets[] = {
|
||||
|
@ -1329,7 +1331,7 @@ void window_guest_stats_invalidate(rct_window *w)
|
|||
*
|
||||
* rct2: 0x0066ECC1
|
||||
*
|
||||
* ebp: colour, contains flag 0x80000000 for blinking
|
||||
* ebp: colour, contains flag BAR_BLINK for blinking
|
||||
*/
|
||||
static void window_guest_stats_bars_paint(sint32 value, sint32 x, sint32 y, rct_window *w, rct_drawpixelinfo *dpi, sint32 colour){
|
||||
value *= 0x76;
|
||||
|
@ -1337,8 +1339,9 @@ static void window_guest_stats_bars_paint(sint32 value, sint32 x, sint32 y, rct_
|
|||
|
||||
gfx_fill_rect_inset(dpi, x + 0x3A, y + 1, x + 0x3A + 0x79, y + 9, w->colours[1], INSET_RECT_F_30);
|
||||
|
||||
sint32 blink_flag = colour & (1u << 0x1F); //0x80000000
|
||||
colour &= ~(1u << 0x1F);
|
||||
sint32 blink_flag = colour & BAR_BLINK;
|
||||
colour &= ~BAR_BLINK;
|
||||
|
||||
if (!blink_flag ||
|
||||
game_is_paused() ||
|
||||
(gCurrentTicks & 8) == 0)
|
||||
|
@ -1380,7 +1383,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
if (happiness < 10)happiness = 10;
|
||||
sint32 ebp = COLOUR_BRIGHT_GREEN;
|
||||
if (happiness < 50){
|
||||
ebp |= 0x80000000;
|
||||
ebp |= BAR_BLINK;
|
||||
}
|
||||
window_guest_stats_bars_paint(happiness, x, y, w, dpi, ebp);
|
||||
|
||||
|
@ -1391,7 +1394,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
sint32 energy = ((peep->energy - 32) * 85) / 32;
|
||||
ebp = COLOUR_BRIGHT_GREEN;
|
||||
if (energy < 50){
|
||||
ebp |= 0x80000000;
|
||||
ebp |= BAR_BLINK;
|
||||
}
|
||||
if (energy < 10)energy = 10;
|
||||
window_guest_stats_bars_paint(energy, x, y, w, dpi, ebp);
|
||||
|
@ -1411,7 +1414,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
|
||||
ebp = COLOUR_BRIGHT_RED;
|
||||
if (hunger > 170){
|
||||
ebp |= 0x80000000;
|
||||
ebp |= BAR_BLINK;
|
||||
}
|
||||
window_guest_stats_bars_paint(hunger, x, y, w, dpi, ebp);
|
||||
|
||||
|
@ -1430,7 +1433,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
|
||||
ebp = COLOUR_BRIGHT_RED;
|
||||
if (thirst > 170){
|
||||
ebp |= 0x80000000;
|
||||
ebp |= BAR_BLINK;
|
||||
}
|
||||
window_guest_stats_bars_paint(thirst, x, y, w, dpi, ebp);
|
||||
|
||||
|
@ -1446,7 +1449,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
|
||||
ebp = COLOUR_BRIGHT_RED;
|
||||
if (nausea > 120){
|
||||
ebp |= 0x80000000;
|
||||
ebp |= BAR_BLINK;
|
||||
}
|
||||
window_guest_stats_bars_paint(nausea, x, y, w, dpi, ebp);
|
||||
|
||||
|
@ -1464,7 +1467,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
|
||||
ebp = COLOUR_BRIGHT_RED;
|
||||
if (bathroom > 160){
|
||||
ebp |= 0x80000000;
|
||||
ebp |= BAR_BLINK;
|
||||
}
|
||||
window_guest_stats_bars_paint(bathroom, x, y, w, dpi, ebp);
|
||||
|
||||
|
|
|
@ -1320,7 +1320,7 @@ static void window_ride_draw_tab_vehicle(rct_drawpixelinfo *dpi, rct_window *w)
|
|||
spriteIndex *= rideVehicleEntry->var_16;
|
||||
spriteIndex += rideVehicleEntry->base_image_id;
|
||||
spriteIndex |= (vehicleColour.additional_1 << 24) | (vehicleColour.main << 19);
|
||||
spriteIndex |= 0x80000000;
|
||||
spriteIndex |= IMAGE_TYPE_REMAP_2_PLUS;
|
||||
|
||||
gfx_draw_sprite(&clipDPI, spriteIndex, x, y, vehicleColour.additional_2);
|
||||
}
|
||||
|
@ -2987,7 +2987,7 @@ static void window_ride_vehicle_scrollpaint(rct_window *w, rct_drawpixelinfo *dp
|
|||
spriteIndex *= rideVehicleEntry->var_16;
|
||||
spriteIndex += rideVehicleEntry->base_image_id;
|
||||
spriteIndex |= (vehicleColour.additional_1 << 24) | (vehicleColour.main << 19);
|
||||
spriteIndex |= 0x80000000;
|
||||
spriteIndex |= IMAGE_TYPE_REMAP_2_PLUS;
|
||||
|
||||
nextSpriteToDraw->x = x;
|
||||
nextSpriteToDraw->y = y;
|
||||
|
@ -4473,21 +4473,27 @@ static void window_ride_colour_invalidate(rct_window *w)
|
|||
window_ride_colour_widgets[WIDX_VEHICLE_MAIN_COLOUR].type = WWT_COLOURBTN;
|
||||
window_ride_colour_widgets[WIDX_VEHICLE_MAIN_COLOUR].image = window_ride_get_colour_button_image(vehicleColour.main);
|
||||
|
||||
uint32 colourFlags = 0;
|
||||
bool allowChangingAdditionalColour1 = false;
|
||||
bool allowChangingAdditionalColour2 = false;
|
||||
|
||||
for (sint32 i = 0; i < ride->num_cars_per_train; i++) {
|
||||
uint8 vehicleTypeIndex = ride_entry_get_vehicle_at_position(ride->subtype, ride->num_cars_per_train, i);
|
||||
|
||||
colourFlags |= rideEntry->vehicles[vehicleTypeIndex].flags_b;
|
||||
colourFlags = ror32(colourFlags, 16);
|
||||
colourFlags |= rideEntry->vehicles[vehicleTypeIndex].flags_a;
|
||||
colourFlags = ror32(colourFlags, 16);
|
||||
if (rideEntry->vehicles[vehicleTypeIndex].flags_b & VEHICLE_ENTRY_FLAG_B_ENABLE_ADDITIONAL_COLOUR_1)
|
||||
{
|
||||
allowChangingAdditionalColour1 = true;
|
||||
}
|
||||
if (rideEntry->vehicles[vehicleTypeIndex].flags_a & VEHICLE_ENTRY_FLAG_A_ENABLE_ADDITIONAL_COLOUR_2)
|
||||
{
|
||||
allowChangingAdditionalColour2 = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Additional colours
|
||||
if (colourFlags & 1) {
|
||||
if (allowChangingAdditionalColour1) {
|
||||
window_ride_colour_widgets[WIDX_VEHICLE_ADDITIONAL_COLOUR_1].type = WWT_COLOURBTN;
|
||||
window_ride_colour_widgets[WIDX_VEHICLE_ADDITIONAL_COLOUR_1].image = window_ride_get_colour_button_image(vehicleColour.additional_1);
|
||||
if (colourFlags & 0x2000000) {
|
||||
if (allowChangingAdditionalColour2) {
|
||||
window_ride_colour_widgets[WIDX_VEHICLE_ADDITIONAL_COLOUR_2].type = WWT_COLOURBTN;
|
||||
window_ride_colour_widgets[WIDX_VEHICLE_ADDITIONAL_COLOUR_2].image = window_ride_get_colour_button_image(vehicleColour.additional_2);
|
||||
} else {
|
||||
|
@ -4676,7 +4682,7 @@ static void window_ride_colour_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi
|
|||
spriteIndex *= rideVehicleEntry->var_16;
|
||||
spriteIndex += rideVehicleEntry->base_image_id;
|
||||
spriteIndex |= (vehicleColour.additional_1 << 24) | (vehicleColour.main << 19);
|
||||
spriteIndex |= 0x80000000;
|
||||
spriteIndex |= IMAGE_TYPE_REMAP_2_PLUS;
|
||||
gfx_draw_sprite(dpi, spriteIndex, x, y, vehicleColour.additional_2);
|
||||
}
|
||||
|
||||
|
|
|
@ -1150,7 +1150,7 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 sc
|
|||
sceneryEntry = get_large_scenery_entry(currentSceneryGlobalId - SCENERY_LARGE_SCENERY_ID_MIN);
|
||||
uint32 imageId = sceneryEntry->image + gWindowSceneryRotation;
|
||||
imageId |= (gWindowSceneryPrimaryColour << 19) | 0x20000000;
|
||||
imageId |= (gWindowScenerySecondaryColour << 24) | 0x80000000;
|
||||
imageId |= (gWindowScenerySecondaryColour << 24) | IMAGE_TYPE_REMAP_2_PLUS;
|
||||
|
||||
gfx_draw_sprite(&clipdpi, imageId, 0x21, 0, w->colours[1]);
|
||||
}
|
||||
|
@ -1164,7 +1164,7 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 sc
|
|||
imageId |= (gWindowSceneryPrimaryColour << 19) | 0x20000000;
|
||||
|
||||
if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_SECONDARY_COLOUR) {
|
||||
imageId |= (gWindowScenerySecondaryColour << 24) | 0x80000000;
|
||||
imageId |= (gWindowScenerySecondaryColour << 24) | IMAGE_TYPE_REMAP_2_PLUS;
|
||||
}
|
||||
gfx_draw_sprite(&clipdpi, imageId, 0x2F, spriteTop, tertiaryColour);
|
||||
|
||||
|
@ -1175,7 +1175,7 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 sc
|
|||
imageId |= (gWindowSceneryPrimaryColour << 19) | 0x20000000;
|
||||
|
||||
if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_SECONDARY_COLOUR) {
|
||||
imageId |= (gWindowScenerySecondaryColour << 24) | 0x80000000;
|
||||
imageId |= (gWindowScenerySecondaryColour << 24) | IMAGE_TYPE_REMAP_2_PLUS;
|
||||
|
||||
if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_TERNARY_COLOUR) {
|
||||
imageId &= 0xDFFFFFFF;
|
||||
|
@ -1203,7 +1203,7 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 sc
|
|||
imageId |= (gWindowSceneryPrimaryColour << 19) | 0x20000000;
|
||||
|
||||
if (sceneryEntry->small_scenery.flags & SMALL_SCENERY_FLAG_HAS_SECONDARY_COLOUR) {
|
||||
imageId |= (gWindowScenerySecondaryColour << 24) | 0x80000000;
|
||||
imageId |= (gWindowScenerySecondaryColour << 24) | IMAGE_TYPE_REMAP_2_PLUS;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue