diff --git a/src/openrct2/drawing/X8DrawingEngine.cpp b/src/openrct2/drawing/X8DrawingEngine.cpp index 359a25da21..d7d8784953 100644 --- a/src/openrct2/drawing/X8DrawingEngine.cpp +++ b/src/openrct2/drawing/X8DrawingEngine.cpp @@ -746,7 +746,7 @@ void X8DrawingContext::DrawSpriteSolid(uint32 image, sint32 x, sint32 y, uint8 c palette[0] = 0; image &= 0x7FFFF; - gfx_draw_sprite_palette_set_software(_dpi, image | 0x20000000, x, y, palette, nullptr); + gfx_draw_sprite_palette_set_software(_dpi, image | IMAGE_TYPE_REMAP, x, y, palette, nullptr); } void X8DrawingContext::DrawGlyph(uint32 image, sint32 x, sint32 y, uint8 * palette) diff --git a/src/openrct2/interface/viewport.c b/src/openrct2/interface/viewport.c index 89ed7e1f4a..f70ad74152 100644 --- a/src/openrct2/interface/viewport.c +++ b/src/openrct2/interface/viewport.c @@ -1039,7 +1039,7 @@ static bool sub_679236_679662_679B0D_679FF1(uint32 ebx, rct_g1_element *image, u return false; } - if (ebx & 0x20000000) { + if (ebx & IMAGE_TYPE_REMAP) { uint8 *ebx_palette = unk_9ABDA4; uint8 al = *esi; @@ -1048,7 +1048,7 @@ static bool sub_679236_679662_679B0D_679FF1(uint32 ebx, rct_g1_element *image, u return (al2 != 0); } - if (ebx & 0x40000000) { + if (ebx & IMAGE_TYPE_TRANSPARENT) { return false; } @@ -1302,8 +1302,8 @@ static bool sub_679074(rct_drawpixelinfo *dpi, sint32 imageId, sint16 x, sint16 static bool sub_679023(rct_drawpixelinfo *dpi, sint32 imageId, sint32 x, sint32 y) { imageId &= 0xBFFFFFFF; - if (imageId & 0x20000000) { - gUnkEDF81C = 0x20000000; + if (imageId & IMAGE_TYPE_REMAP) { + gUnkEDF81C = IMAGE_TYPE_REMAP; sint32 index = (imageId >> 19) & 0x7F; if (imageId & IMAGE_TYPE_REMAP_2_PLUS) { index &= 0x1F; diff --git a/src/openrct2/interface/widget.c b/src/openrct2/interface/widget.c index b9ba46fe24..26de46e3fd 100644 --- a/src/openrct2/interface/widget.c +++ b/src/openrct2/interface/widget.c @@ -212,7 +212,7 @@ static void widget_frame_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widgeti // Draw the resize sprite at the bottom right corner l = w->x + widget->right - 18; t = w->y + widget->bottom - 18; - gfx_draw_sprite(dpi, SPR_RESIZE | 0x20000000 | ((colour & 0x7F) << 19), l, t, 0); + gfx_draw_sprite(dpi, SPR_RESIZE | IMAGE_TYPE_REMAP | ((colour & 0x7F) << 19), l, t, 0); } /** @@ -245,7 +245,7 @@ static void widget_resize_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widget // Draw the resize sprite at the bottom right corner l = w->x + widget->right - 18; t = w->y + widget->bottom - 18; - gfx_draw_sprite(dpi, SPR_RESIZE | 0x20000000 | ((colour & 0x7F) << 19), l, t, 0); + gfx_draw_sprite(dpi, SPR_RESIZE | IMAGE_TYPE_REMAP | ((colour & 0x7F) << 19), l, t, 0); } /** @@ -300,7 +300,7 @@ static void widget_tab_draw(rct_drawpixelinfo *dpi, rct_window *w, rct_widgetind } // Do not draw hidden tabs, unless given a sprite. - if (widget->type == WWT_TAB && widget->image != (0x20000000 | SPR_G2_TAB_DISABLED)) + if (widget->type == WWT_TAB && widget->image != (IMAGE_TYPE_REMAP | SPR_G2_TAB_DISABLED)) return; if (widget->type != WWT_TRNBTN) { @@ -861,8 +861,8 @@ static void widget_draw_image(rct_drawpixelinfo *dpi, rct_window *w, rct_widgeti // ? } - if (image & 0x40000000) - image &= ~0x40000000; + if (image & IMAGE_TYPE_TRANSPARENT) + image &= ~IMAGE_TYPE_TRANSPARENT; else image |= colour << 19; diff --git a/src/openrct2/interface/widget.h b/src/openrct2/interface/widget.h index 74d9dda5dd..2be23c30d3 100644 --- a/src/openrct2/interface/widget.h +++ b/src/openrct2/interface/widget.h @@ -49,7 +49,9 @@ typedef enum { WWT_TEXT_BOX = 27, WWT_LAST = 26, } WINDOW_WIDGET_TYPES; + #define WIDGETS_END WWT_LAST, 0, 0, 0, 0, 0, 0, 0 +#define BAR_BLINK (1u << 31) enum { SCROLL_HORIZONTAL = (1 << 0), diff --git a/src/openrct2/object/RideObject.cpp b/src/openrct2/object/RideObject.cpp index 244cddf1e0..0bff99a72c 100644 --- a/src/openrct2/object/RideObject.cpp +++ b/src/openrct2/object/RideObject.cpp @@ -496,6 +496,7 @@ void RideObject::PerformFixes() { _legacyType.cars_per_flat_ride = 0xFF; } + // All vanilla/WW/OCC Junior RC vehicles incorrectly have this flag set else if (String::Equals(identifier, "ZLDB ") || String::Equals(identifier, "ZLOG ") || String::Equals(identifier, "ZPANDA ") || diff --git a/src/openrct2/paint/map_element/banner.c b/src/openrct2/paint/map_element/banner.c index b78dfae6f1..e692240534 100644 --- a/src/openrct2/paint/map_element/banner.c +++ b/src/openrct2/paint/map_element/banner.c @@ -70,7 +70,7 @@ void banner_paint(uint8 direction, sint32 height, rct_map_element* map_element) else{ image_id |= (gBanners[map_element->properties.banner.index].colour << 19) | - 0x20000000; + IMAGE_TYPE_REMAP; } sub_98197C(image_id, 0, 0, 1, 1, 0x15, height, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ, get_current_rotation()); diff --git a/src/openrct2/paint/map_element/entrance.c b/src/openrct2/paint/map_element/entrance.c index 6aa17a8bad..5296574f6b 100644 --- a/src/openrct2/paint/map_element/entrance.c +++ b/src/openrct2/paint/map_element/entrance.c @@ -72,14 +72,14 @@ static void ride_entrance_exit_paint(uint8 direction, sint32 height, rct_map_ele uint8 colour_1, colour_2; uint32 transparant_image_id = 0, image_id = 0; - if (style->base_image_id & 0x40000000) { + if (style->base_image_id & IMAGE_TYPE_TRANSPARENT) { colour_1 = GlassPaletteIds[ride->track_colour_main[0]]; - transparant_image_id = (colour_1 << 19) | 0x40000000; + transparant_image_id = (colour_1 << 19) | IMAGE_TYPE_TRANSPARENT; } colour_1 = ride->track_colour_main[0]; colour_2 = ride->track_colour_additional[0]; - image_id = (colour_1 << 19) | (colour_2 << 24) | 0xA0000000; + image_id = (colour_1 << 19) | (colour_2 << 24) | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS; gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; _unk9E32BC = 0; diff --git a/src/openrct2/paint/map_element/fence.c b/src/openrct2/paint/map_element/fence.c index ffda3b6edc..089b57faf7 100644 --- a/src/openrct2/paint/map_element/fence.c +++ b/src/openrct2/paint/map_element/fence.c @@ -146,7 +146,7 @@ void fence_paint(uint8 direction, sint32 height, rct_map_element * map_element) sint32 primaryColour = map_element->properties.wall.colour_1 & 0x1F; - uint32 imageColourFlags = primaryColour << 19 | 0x20000000; + uint32 imageColourFlags = primaryColour << 19 | IMAGE_TYPE_REMAP; uint32 dword_141F718 = imageColourFlags + 0x23800006; if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_SECONDARY_COLOUR) { diff --git a/src/openrct2/paint/map_element/map_element.c b/src/openrct2/paint/map_element/map_element.c index 1a7f7be7b9..ed95731918 100644 --- a/src/openrct2/paint/map_element/map_element.c +++ b/src/openrct2/paint/map_element/map_element.c @@ -312,11 +312,11 @@ static void sub_68B3FB(sint32 x, sint32 y) for (sint32 sy = 0; sy < 3; sy++) { for (sint32 sx = 0; sx < 3; sx++) { uint16 segmentHeight = gSupportSegments[segmentPositions[sy][sx]].height; - sint32 imageColourFlats = 0b101111 << 19 | 0x40000000; + sint32 imageColourFlats = 0b101111 << 19 | IMAGE_TYPE_TRANSPARENT; if (segmentHeight == 0xFFFF) { segmentHeight = gSupport.height; // white: 0b101101 - imageColourFlats = 0b111011 << 19 | 0x40000000; + imageColourFlats = 0b111011 << 19 | IMAGE_TYPE_TRANSPARENT; } // Only draw supports below the clipping height. diff --git a/src/openrct2/paint/map_element/path.c b/src/openrct2/paint/map_element/path.c index edf7825664..3aa101eba3 100644 --- a/src/openrct2/paint/map_element/path.c +++ b/src/openrct2/paint/map_element/path.c @@ -748,7 +748,7 @@ void path_paint(uint8 direction, uint16 height, rct_map_element * map_element) height2 += 16; } - sub_98196C(imageId | patrolColour << 19 | 0x20000000, 16, 16, 1, 1, 0, height2 + 2, get_current_rotation()); + sub_98196C(imageId | patrolColour << 19 | IMAGE_TYPE_REMAP, 16, 16, 1, 1, 0, height2 + 2, get_current_rotation()); } } @@ -758,7 +758,7 @@ void path_paint(uint8 direction, uint16 height, rct_map_element * map_element) if (footpath_element_is_sloped(map_element)) { height2 += 8; } - uint32 imageId = (SPR_HEIGHT_MARKER_BASE + height2 / 16) | COLOUR_GREY << 19 | 0x20000000; + uint32 imageId = (SPR_HEIGHT_MARKER_BASE + height2 / 16) | COLOUR_GREY << 19 | IMAGE_TYPE_REMAP; imageId += get_height_marker_offset(); imageId -= gMapBaseZ; sub_98196C(imageId, 16, 16, 1, 1, 0, height2, get_current_rotation()); diff --git a/src/openrct2/paint/map_element/scenery.c b/src/openrct2/paint/map_element/scenery.c index 7680324a59..c2376696af 100644 --- a/src/openrct2/paint/map_element/scenery.c +++ b/src/openrct2/paint/map_element/scenery.c @@ -118,7 +118,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; + baseImageid |= ((mapElement->properties.scenery.colour_1 & 0x1F) << 19) | IMAGE_TYPE_REMAP; if (entry->small_scenery.flags & SMALL_SCENERY_FLAG_HAS_SECONDARY_COLOUR) { baseImageid |= ((mapElement->properties.scenery.colour_2 & 0x1F) << 24) | IMAGE_TYPE_REMAP_2_PLUS; } @@ -238,7 +238,7 @@ void scenery_paint(uint8 direction, sint32 height, rct_map_element* mapElement) image_id += 4; } if (entry->small_scenery.flags & SMALL_SCENERY_FLAG_HAS_PRIMARY_COLOUR) { - image_id |= ((mapElement->properties.scenery.colour_1 & 0x1F) << 19) | 0x20000000; + image_id |= ((mapElement->properties.scenery.colour_1 & 0x1F) << 19) | IMAGE_TYPE_REMAP; if (entry->small_scenery.flags & SMALL_SCENERY_FLAG_HAS_SECONDARY_COLOUR) { image_id |= ((mapElement->properties.scenery.colour_2 & 0x1F) << 24) | IMAGE_TYPE_REMAP_2_PLUS; } @@ -263,9 +263,9 @@ void scenery_paint(uint8 direction, sint32 height, rct_map_element* mapElement) supportHeight &= 0xFFFFFFF0; ax = 49; } - uint32 supportImageColourFlags = 0x20000000; + uint32 supportImageColourFlags = IMAGE_TYPE_REMAP; if (entry->small_scenery.flags & SMALL_SCENERY_FLAG_PAINT_SUPPORTS) { - supportImageColourFlags = ((mapElement->properties.scenery.colour_1 & 0x1F) << 19) | 0x20000000; + supportImageColourFlags = ((mapElement->properties.scenery.colour_1 & 0x1F) << 19) | IMAGE_TYPE_REMAP; } if (dword_F64EB0 != 0) { supportImageColourFlags = dword_F64EB0; diff --git a/src/openrct2/paint/map_element/scenery_multiple.c b/src/openrct2/paint/map_element/scenery_multiple.c index 549ebb04d8..64a26dbd27 100644 --- a/src/openrct2/paint/map_element/scenery_multiple.c +++ b/src/openrct2/paint/map_element/scenery_multiple.c @@ -40,7 +40,7 @@ static void scenery_multiple_paint_supports(uint8 direction, uint16 height, rct_ ax = 49; } - sint32 supportImageColourFlags = 0x20000000; + sint32 supportImageColourFlags = IMAGE_TYPE_REMAP; if (dword_F4387C) { supportImageColourFlags = dword_F4387C; @@ -194,7 +194,7 @@ void scenery_multiple_paint(uint8 direction, uint16 height, rct_map_element *map uint32 image_id = (ebp << 2) + entry->image + 4 + direction; rct_large_scenery_tile *tile = &entry->large_scenery.tiles[ebp]; uint32 dword_F4387C = 0; - image_id |= ((mapElement->properties.scenerymultiple.colour[0] & 0x1F) << 19) | ((mapElement->properties.scenerymultiple.colour[1] & 0x1F) << 24) | 0xA0000000; + image_id |= ((mapElement->properties.scenerymultiple.colour[0] & 0x1F) << 19) | ((mapElement->properties.scenerymultiple.colour[1] & 0x1F) << 24) | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS; rct_xyz16 boxlength; rct_xyz16 boxoffset; if (gTrackDesignSaveMode) { @@ -256,7 +256,7 @@ void scenery_multiple_paint(uint8 direction, uint16 height, rct_map_element *map if (dword_F4387C) { textColour = COLOUR_GREY; } - textColour = (textColour << 19) | 0x20000000; + textColour = (textColour << 19) | IMAGE_TYPE_REMAP; uint32 bannerIndex = (mapElement->type & 0xC0) | ((mapElement->properties.scenerymultiple.colour[0] & 0xE0) >> 2) | ((mapElement->properties.scenerymultiple.colour[1] & 0xE0) >> 5); rct_banner *banner = &gBanners[bannerIndex]; rct_string_id stringId = banner->string_idx; diff --git a/src/openrct2/paint/map_element/surface.c b/src/openrct2/paint/map_element/surface.c index 10ad04b44c..c9d9dbfa62 100644 --- a/src/openrct2/paint/map_element/surface.c +++ b/src/openrct2/paint/map_element/surface.c @@ -236,10 +236,10 @@ const uint32 dword_97B750[][2] = { {SPR_TERRAIN_CHECKERBOARD, SPR_TERRAIN_CHECKERBOARD_GRID}, {SPR_TERRAIN_GRASS_CLUMPS, SPR_TERRAIN_GRASS_CLUMPS_GRID}, {SPR_TERRAIN_ICE, SPR_TERRAIN_ICE_GRID}, - {SPR_TERRAIN_GRID | COLOUR_BRIGHT_RED << 19 | 0x20000000, SPR_TERRAIN_GRID_GRID | COLOUR_BRIGHT_RED << 19 | 0x20000000}, - {SPR_TERRAIN_GRID | COLOUR_YELLOW << 19 | 0x20000000, SPR_TERRAIN_GRID_GRID | COLOUR_YELLOW << 19 | 0x20000000}, - {SPR_TERRAIN_GRID | COLOUR_BRIGHT_PURPLE << 19 | 0x20000000, SPR_TERRAIN_GRID_GRID | COLOUR_BRIGHT_PURPLE << 19 | 0x20000000}, - {SPR_TERRAIN_GRID | COLOUR_BRIGHT_GREEN << 19 | 0x20000000, SPR_TERRAIN_GRID_GRID | COLOUR_BRIGHT_GREEN << 19 | 0x20000000}, + {SPR_TERRAIN_GRID | COLOUR_BRIGHT_RED << 19 | IMAGE_TYPE_REMAP, SPR_TERRAIN_GRID_GRID | COLOUR_BRIGHT_RED << 19 | IMAGE_TYPE_REMAP}, + {SPR_TERRAIN_GRID | COLOUR_YELLOW << 19 | IMAGE_TYPE_REMAP, SPR_TERRAIN_GRID_GRID | COLOUR_YELLOW << 19 | IMAGE_TYPE_REMAP}, + {SPR_TERRAIN_GRID | COLOUR_BRIGHT_PURPLE << 19 | IMAGE_TYPE_REMAP, SPR_TERRAIN_GRID_GRID | COLOUR_BRIGHT_PURPLE << 19 | IMAGE_TYPE_REMAP}, + {SPR_TERRAIN_GRID | COLOUR_BRIGHT_GREEN << 19 | IMAGE_TYPE_REMAP, SPR_TERRAIN_GRID_GRID | COLOUR_BRIGHT_GREEN << 19 | IMAGE_TYPE_REMAP}, {SPR_TERRAIN_SAND_RED, SPR_TERRAIN_SAND_RED_GRID}, {SPR_TERRAIN_SAND, SPR_TERRAIN_SAND_GRID}, {SPR_TERRAIN_CHECKERBOARD_INVERTED, SPR_TERRAIN_CHECKERBOARD_INVERTED_GRID}, @@ -254,10 +254,10 @@ const uint32 dword_97B7C8[] = { SPR_TERRAIN_CHECKERBOARD_UNDERGROUND, SPR_TERRAIN_GRASS_CLUMPS_UNDERGROUND, SPR_TERRAIN_ICE_UNDERGROUND, - SPR_TERRAIN_GRID_UNDERGROUND | COLOUR_BRIGHT_RED << 19 | 0x20000000, - SPR_TERRAIN_GRID_UNDERGROUND | COLOUR_YELLOW << 19 | 0x20000000, - SPR_TERRAIN_GRID_UNDERGROUND | COLOUR_BRIGHT_PURPLE << 19 | 0x20000000, - SPR_TERRAIN_GRID_UNDERGROUND | COLOUR_BRIGHT_GREEN << 19 | 0x20000000, + SPR_TERRAIN_GRID_UNDERGROUND | COLOUR_BRIGHT_RED << 19 | IMAGE_TYPE_REMAP, + SPR_TERRAIN_GRID_UNDERGROUND | COLOUR_YELLOW << 19 | IMAGE_TYPE_REMAP, + SPR_TERRAIN_GRID_UNDERGROUND | COLOUR_BRIGHT_PURPLE << 19 | IMAGE_TYPE_REMAP, + SPR_TERRAIN_GRID_UNDERGROUND | COLOUR_BRIGHT_GREEN << 19 | IMAGE_TYPE_REMAP, SPR_TERRAIN_SAND_RED_UNDERGROUND, SPR_TERRAIN_SAND_UNDERGROUND, SPR_TERRAIN_CHECKERBOARD_INVERTED_UNDERGROUND, @@ -1149,7 +1149,7 @@ void surface_paint(uint8 direction, uint16 height, rct_map_element * mapElement) uint8 staffType = staffIndex & 0x7FFF; sint16 x = gPaintMapPosition.x, y = gPaintMapPosition.y; - uint32 image_id = 0x20000000; + uint32 image_id = IMAGE_TYPE_REMAP; uint8 patrolColour = 7; if (!is_staff_list) { @@ -1232,13 +1232,13 @@ void surface_paint(uint8 direction, uint16 height, rct_map_element * mapElement) // Walls // loc_661089: uint32 eax = ((((mapSelectionType - 9) + rotation) & 3) + 0x21) << 19; - uint32 image_id = (SPR_TERRAIN_SELECTION_EDGE + byte_97B444[surfaceShape]) | eax | 0x20000000; + uint32 image_id = (SPR_TERRAIN_SELECTION_EDGE + byte_97B444[surfaceShape]) | eax | IMAGE_TYPE_REMAP; paint_attach_to_previous_ps(image_id, 0, 0); } else if (mapSelectionType >= MAP_SELECT_TYPE_QUARTER_0) { // loc_661051:(no jump) // Selection split into four quarter segments uint32 eax = ((((mapSelectionType - MAP_SELECT_TYPE_QUARTER_0) + rotation) & 3) + 0x27) << 19; - uint32 image_id = (SPR_TERRAIN_SELECTION_QUARTER + byte_97B444[surfaceShape]) | eax | 0x20000000; + uint32 image_id = (SPR_TERRAIN_SELECTION_QUARTER + byte_97B444[surfaceShape]) | eax | IMAGE_TYPE_REMAP; paint_attach_to_previous_ps(image_id, 0, 0); } else if (mapSelectionType <= MAP_SELECT_TYPE_FULL) { // Corners @@ -1248,7 +1248,7 @@ void surface_paint(uint8 direction, uint16 height, rct_map_element * mapElement) } eax = (eax + 0x21) << 19; - uint32 image_id = (SPR_TERRAIN_SELECTION_CORNER + byte_97B444[surfaceShape]) | eax | 0x20000000; + uint32 image_id = (SPR_TERRAIN_SELECTION_CORNER + byte_97B444[surfaceShape]) | eax | IMAGE_TYPE_REMAP; paint_attach_to_previous_ps(image_id, 0, 0); } else { sint32 local_surfaceShape = surfaceShape; @@ -1296,7 +1296,7 @@ void surface_paint(uint8 direction, uint16 height, rct_map_element * mapElement) colours = COLOUR_GREY << 24 | COLOUR_SATURATED_GREEN << 19; } - uint32 image_id = (SPR_TERRAIN_SELECTION_CORNER + byte_97B444[surfaceShape]) | colours | 0x20000000; + uint32 image_id = (SPR_TERRAIN_SELECTION_CORNER + byte_97B444[surfaceShape]) | colours | IMAGE_TYPE_REMAP; paint_attach_to_previous_ps(image_id, 0, 0); break; } @@ -1384,7 +1384,7 @@ void surface_paint(uint8 direction, uint16 height, rct_map_element * mapElement) image_offset = byte_97B740[surfaceShape & 0xF]; } - sint32 image_id = (SPR_WATER_MASK + image_offset) | 0x60000000 | PALETTE_WATER << 19; + sint32 image_id = (SPR_WATER_MASK + image_offset) | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT | PALETTE_WATER << 19; sub_98196C(image_id, 0, 0, 32, 32, -1, waterHeight, rotation); paint_attach_to_previous_ps(SPR_WATER_OVERLAY + image_offset, 0, 0); diff --git a/src/openrct2/paint/paint.c b/src/openrct2/paint/paint.c index f9f4df4ecf..120d187ebd 100644 --- a/src/openrct2/paint/paint.c +++ b/src/openrct2/paint/paint.c @@ -991,7 +991,7 @@ static uint32 paint_ps_colourify_image(uint32 imageId, uint8 spriteType, uint32 { if (viewFlags & VIEWPORT_FLAG_SEETHROUGH_RIDES) { if (spriteType == VIEWPORT_INTERACTION_ITEM_RIDE) { - if (!(imageId & 0x40000000)) { + if (!(imageId & IMAGE_TYPE_TRANSPARENT)) { imageId &= 0x7FFFF; imageId |= 0x41880000; } @@ -999,7 +999,7 @@ static uint32 paint_ps_colourify_image(uint32 imageId, uint8 spriteType, uint32 } if (viewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE) { if (spriteType == VIEWPORT_INTERACTION_ITEM_WALL) { - if (!(imageId & 0x40000000)) { + if (!(imageId & IMAGE_TYPE_TRANSPARENT)) { imageId &= 0x7FFFF; imageId |= 0x41880000; } @@ -1010,7 +1010,7 @@ static uint32 paint_ps_colourify_image(uint32 imageId, uint8 spriteType, uint32 case VIEWPORT_INTERACTION_ITEM_FOOTPATH: case VIEWPORT_INTERACTION_ITEM_FOOTPATH_ITEM: case VIEWPORT_INTERACTION_ITEM_BANNER: - if (!(imageId & 0x40000000)) { + if (!(imageId & IMAGE_TYPE_TRANSPARENT)) { imageId &= 0x7FFFF; imageId |= 0x41880000; } @@ -1022,7 +1022,7 @@ static uint32 paint_ps_colourify_image(uint32 imageId, uint8 spriteType, uint32 case VIEWPORT_INTERACTION_ITEM_SCENERY: case VIEWPORT_INTERACTION_ITEM_LARGE_SCENERY: case VIEWPORT_INTERACTION_ITEM_WALL: - if (!(imageId & 0x40000000)) { + if (!(imageId & IMAGE_TYPE_TRANSPARENT)) { imageId &= 0x7FFFF; imageId |= 0x41880000; } diff --git a/src/openrct2/paint/sprite/misc.c b/src/openrct2/paint/sprite/misc.c index acf1134bfe..7046bb7d06 100644 --- a/src/openrct2/paint/sprite/misc.c +++ b/src/openrct2/paint/sprite/misc.c @@ -70,7 +70,7 @@ void misc_paint(rct_sprite *misc, sint32 imageDirection) rct_crashed_vehicle_particle particle = misc->crashed_vehicle_particle; uint32 imageId = vehicle_particle_base_sprites[particle.var_2E] + particle.frame / 256; - imageId = imageId | (particle.colour[0] << 19) | (particle.colour[1] << 24) | 0xA0000000; + imageId = imageId | (particle.colour[0] << 19) | (particle.colour[1] << 24) | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS; sub_98196C(imageId, 0, 0, 1, 1, 0, misc->unknown.z, get_current_rotation()); break; } @@ -171,7 +171,7 @@ void misc_paint(rct_sprite *misc, sint32 imageDirection) imageId += 8; } - imageId = imageId | (balloon.colour << 19) | 0x20000000; + imageId = imageId | (balloon.colour << 19) | IMAGE_TYPE_REMAP; sub_98196C(imageId, 0, 0, 1, 1, 0, balloon.z, get_current_rotation()); break; } diff --git a/src/openrct2/paint/sprite/peep.c b/src/openrct2/paint/sprite/peep.c index 5a806adbc4..0f8ed27617 100644 --- a/src/openrct2/paint/sprite/peep.c +++ b/src/openrct2/paint/sprite/peep.c @@ -79,23 +79,23 @@ void peep_paint(rct_peep * peep, sint32 imageDirection) } uint32 baseImageId = (imageDirection >> 3) + sprite.sprite_animation[spriteType].base_image + imageOffset * 4; - uint32 imageId = baseImageId | peep->tshirt_colour << 19 | peep->trousers_colour << 24 | 0xA0000000; + uint32 imageId = baseImageId | peep->tshirt_colour << 19 | peep->trousers_colour << 24 | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS; sub_98197C(imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 3, get_current_rotation()); if (baseImageId >= 10717 && baseImageId < 10749) { - imageId = (baseImageId + 32) | peep->hat_colour << 19 | 0x20000000; + imageId = (baseImageId + 32) | peep->hat_colour << 19 | IMAGE_TYPE_REMAP; sub_98199C(imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 3, get_current_rotation()); return; } if (baseImageId >= 10781 && baseImageId < 10813) { - imageId = (baseImageId + 32) | peep->balloon_colour << 19 | 0x20000000; + imageId = (baseImageId + 32) | peep->balloon_colour << 19 | IMAGE_TYPE_REMAP; sub_98199C(imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 3, get_current_rotation()); return; } if (baseImageId >= 11197 && baseImageId < 11229) { - imageId = (baseImageId + 32) | peep->umbrella_colour << 19 | 0x20000000; + imageId = (baseImageId + 32) | peep->umbrella_colour << 19 | IMAGE_TYPE_REMAP; sub_98199C(imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 3, get_current_rotation()); return; } diff --git a/src/openrct2/ride/coaster/bolliger_mabillard_track.c b/src/openrct2/ride/coaster/bolliger_mabillard_track.c index 1c58794f71..6a4bdb429d 100644 --- a/src/openrct2/ride/coaster/bolliger_mabillard_track.c +++ b/src/openrct2/ride/coaster/bolliger_mabillard_track.c @@ -2969,25 +2969,25 @@ void bolliger_mabillard_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence { switch (direction) { case 0: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(supportType, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(supportType, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17146, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 1: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(supportType, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(supportType, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17147, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 2: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(supportType, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(supportType, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17146, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 3: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(supportType, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(supportType, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17147, 0, 0, 32, 20, 0, height, 0, 6, height + 3); diff --git a/src/openrct2/ride/coaster/compact_inverted_coaster.c b/src/openrct2/ride/coaster/compact_inverted_coaster.c index c8e851a542..025a00637e 100644 --- a/src/openrct2/ride/coaster/compact_inverted_coaster.c +++ b/src/openrct2/ride/coaster/compact_inverted_coaster.c @@ -3406,25 +3406,25 @@ static void compact_inverted_rc_track_on_ride_photo(uint8 rideIndex, uint8 track { switch (direction) { case 0: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26555, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; case 1: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26556, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; case 2: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26555, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; case 3: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26556, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); diff --git a/src/openrct2/ride/coaster/corkscrew_roller_coaster.c b/src/openrct2/ride/coaster/corkscrew_roller_coaster.c index 9cc60b4218..fe12f2f7d0 100644 --- a/src/openrct2/ride/coaster/corkscrew_roller_coaster.c +++ b/src/openrct2/ride/coaster/corkscrew_roller_coaster.c @@ -3223,25 +3223,25 @@ static void corkscrew_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequenc { switch (direction) { case 0: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16224, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 1: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16225, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 2: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16224, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 3: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16225, 0, 0, 32, 20, 0, height, 0, 6, height + 3); diff --git a/src/openrct2/ride/coaster/flying_roller_coaster.c b/src/openrct2/ride/coaster/flying_roller_coaster.c index 125916ffa2..9b93b2fff8 100644 --- a/src/openrct2/ride/coaster/flying_roller_coaster.c +++ b/src/openrct2/ride/coaster/flying_roller_coaster.c @@ -5992,25 +5992,25 @@ static void flying_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence, if (!track_element_is_inverted(mapElement)) { switch (direction) { case 0: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17146, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 1: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17147, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 2: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17146, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 3: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17147, 0, 0, 32, 20, 0, height, 0, 6, height + 3); @@ -6023,25 +6023,25 @@ static void flying_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence, } else { switch (direction) { case 0: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27129, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); break; case 1: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27130, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); break; case 2: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27129, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); break; case 3: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27130, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); diff --git a/src/openrct2/ride/coaster/giga_coaster.c b/src/openrct2/ride/coaster/giga_coaster.c index fa85b2f62c..798c17e13d 100644 --- a/src/openrct2/ride/coaster/giga_coaster.c +++ b/src/openrct2/ride/coaster/giga_coaster.c @@ -2739,25 +2739,25 @@ static void giga_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence, ui { switch (direction) { case 0: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18074, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 1: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18075, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 2: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18074, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 3: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18075, 0, 0, 32, 20, 0, height, 0, 6, height + 3); diff --git a/src/openrct2/ride/coaster/inverted_roller_coaster.c b/src/openrct2/ride/coaster/inverted_roller_coaster.c index c1fd0f1f35..3541de3b16 100644 --- a/src/openrct2/ride/coaster/inverted_roller_coaster.c +++ b/src/openrct2/ride/coaster/inverted_roller_coaster.c @@ -3439,25 +3439,25 @@ static void inverted_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence { switch (direction) { case 0: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_BOXED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_BOXED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27129, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; case 1: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_BOXED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_BOXED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27130, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; case 2: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_BOXED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_BOXED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27129, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; case 3: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_BOXED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_BOXED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27130, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); diff --git a/src/openrct2/ride/coaster/lay_down_roller_coaster.c b/src/openrct2/ride/coaster/lay_down_roller_coaster.c index 34541febb7..fc2013b961 100644 --- a/src/openrct2/ride/coaster/lay_down_roller_coaster.c +++ b/src/openrct2/ride/coaster/lay_down_roller_coaster.c @@ -5730,25 +5730,25 @@ static void lay_down_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence if (!track_element_is_inverted(mapElement)) { switch (direction) { case 0: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16224, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 1: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16225, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 2: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16224, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 3: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16225, 0, 0, 32, 20, 0, height, 0, 6, height + 3); @@ -5761,25 +5761,25 @@ static void lay_down_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence } else { switch (direction) { case 0: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26555, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); break; case 1: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26556, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); break; case 2: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26555, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); break; case 3: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26556, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); diff --git a/src/openrct2/ride/coaster/mine_ride.c b/src/openrct2/ride/coaster/mine_ride.c index 32aa944713..fdfb7eb3d3 100644 --- a/src/openrct2/ride/coaster/mine_ride.c +++ b/src/openrct2/ride/coaster/mine_ride.c @@ -2071,25 +2071,25 @@ static void mine_ride_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence, { switch (direction) { case 0: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK, 5, 6, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK, 8, 6, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19338, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 1: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK_ALT, 6, 6, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK_ALT, 7, 6, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19339, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 2: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK, 5, 6, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK, 8, 6, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19338, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 3: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK_ALT, 6, 6, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK_ALT, 7, 6, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19339, 0, 0, 32, 20, 0, height, 0, 6, height + 3); diff --git a/src/openrct2/ride/coaster/mini_roller_coaster.c b/src/openrct2/ride/coaster/mini_roller_coaster.c index 7506274194..ba4371472a 100644 --- a/src/openrct2/ride/coaster/mini_roller_coaster.c +++ b/src/openrct2/ride/coaster/mini_roller_coaster.c @@ -2899,25 +2899,25 @@ static void mini_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence, ui { switch (direction) { case 0: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK, 5, 6, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK, 8, 6, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18738, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 1: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK_ALT, 6, 6, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK_ALT, 7, 6, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18739, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 2: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK, 5, 6, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK, 8, 6, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18738, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 3: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK_ALT, 6, 6, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_FORK_ALT, 7, 6, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18739, 0, 0, 32, 20, 0, height, 0, 6, height + 3); diff --git a/src/openrct2/ride/coaster/multi_dimension_roller_coaster.c b/src/openrct2/ride/coaster/multi_dimension_roller_coaster.c index fa07c23cb8..aaedb805a0 100644 --- a/src/openrct2/ride/coaster/multi_dimension_roller_coaster.c +++ b/src/openrct2/ride/coaster/multi_dimension_roller_coaster.c @@ -4037,25 +4037,25 @@ static void multi_dimension_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackS if (!track_element_is_inverted(mapElement)) { switch (direction) { case 0: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 15806, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 1: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 15807, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 2: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 15806, 0, 0, 32, 20, 0, height, 0, 6, height + 3); break; case 3: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 15807, 0, 0, 32, 20, 0, height, 0, 6, height + 3); @@ -4068,25 +4068,25 @@ static void multi_dimension_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackS } else { switch (direction) { case 0: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26227, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); break; case 1: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26228, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); break; case 2: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26227, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); break; case 3: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES_INVERTED, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26228, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); diff --git a/src/openrct2/ride/coaster/stand_up_roller_coaster.c b/src/openrct2/ride/coaster/stand_up_roller_coaster.c index e3adcdcff0..424a1fd4bd 100644 --- a/src/openrct2/ride/coaster/stand_up_roller_coaster.c +++ b/src/openrct2/ride/coaster/stand_up_roller_coaster.c @@ -3387,25 +3387,25 @@ static void stand_up_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence { switch (direction) { case 0: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25229, 0, 6, 32, 20, 1, height, 0, 6, height + 3); break; case 1: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25230, 0, 6, 32, 20, 1, height, 0, 6, height + 3); break; case 2: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25229, 0, 6, 32, 20, 1, height, 0, 6, height + 3); break; case 3: - sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height); + sub_98196C_rotated(direction, IMAGE_TYPE_REMAP | 22432, 0, 0, 32, 32, 1, height); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]); metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25230, 0, 6, 32, 20, 1, height, 0, 6, height + 3); diff --git a/src/openrct2/ride/coaster/virginia_reel.c b/src/openrct2/ride/coaster/virginia_reel.c index 205679ba4f..aca729478a 100644 --- a/src/openrct2/ride/coaster/virginia_reel.c +++ b/src/openrct2/ride/coaster/virginia_reel.c @@ -209,7 +209,7 @@ void vehicle_visual_virginia_reel(sint32 x, sint32 imageDirection, sint32 y, sin baseImage_id += vehicleEntry->base_image_id; const vehicle_boundbox *bb = &_virginiaReelBoundbox[j]; - image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0xA0000000; + image_id = baseImage_id | SPRITE_ID_PALETTE_COLOUR_2(vehicle->colours.body_colour, vehicle->colours.trim_colour); 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 (unk_140E9A8->zoom_level < 2 && vehicle->num_peeps > 0) { @@ -220,7 +220,7 @@ void vehicle_visual_virginia_reel(sint32 x, sint32 imageDirection, sint32 y, sin sint32 draw_order[4] = {0, 1, 3, 2}; for (sint32 i = 0; i < countof(draw_order); i++) { if (riding_peep_sprites[draw_order[i]] != 0xFF) { - image_id = (baseImage_id + ((draw_order[i] + 1) * 72)) | (riding_peep_sprites[draw_order[i]] << 19) | 0x20000000; + image_id = (baseImage_id + ((draw_order[i] + 1) * 72)) | SPRITE_ID_PALETTE_COLOUR_1(riding_peep_sprites[draw_order[i]]); 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); } } diff --git a/src/openrct2/ride/gentle/circus_show.c b/src/openrct2/ride/gentle/circus_show.c index 151f7f8797..328eebd985 100644 --- a/src/openrct2/ride/gentle/circus_show.c +++ b/src/openrct2/ride/gentle/circus_show.c @@ -38,8 +38,8 @@ static void paint_circus_show_tent(uint8 rideIndex, uint8 direction, sint8 al, s uint32 imageColourFlags = gTrackColours[SCHEME_MISC]; uint32 imageId = rideEntry->vehicles[0].base_image_id; - if (imageColourFlags == 0x20000000) { - imageColourFlags = ride->vehicle_colours[0].body_colour << 19 | ride->vehicle_colours[0].trim_colour << 24 | 0xA0000000; + if (imageColourFlags == IMAGE_TYPE_REMAP) { + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); imageId += direction; } diff --git a/src/openrct2/ride/gentle/ferris_wheel.c b/src/openrct2/ride/gentle/ferris_wheel.c index 11e9323de3..05162d8223 100644 --- a/src/openrct2/ride/gentle/ferris_wheel.c +++ b/src/openrct2/ride/gentle/ferris_wheel.c @@ -85,8 +85,8 @@ static void paint_ferris_wheel_structure(uint8 rideIndex, uint8 direction, sint8 } uint32 imageColourFlags = gTrackColours[SCHEME_MISC]; - if (imageColourFlags == 0x20000000) { - imageColourFlags = ride->vehicle_colours[0].body_colour << 19 | ride->vehicle_colours[0].trim_colour << 24 | 0xA0000000; + if (imageColourFlags == IMAGE_TYPE_REMAP) { + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } ferris_wheel_bound_box boundBox = ferris_wheel_data[direction]; @@ -111,7 +111,7 @@ static void paint_ferris_wheel_structure(uint8 rideIndex, uint8 direction, sint8 } sint32 frameNum = (vehicle->vehicle_sprite_type + i * 4) % 128; - imageColourFlags = vehicle->peep_tshirt_colours[i] << 19 | vehicle->peep_tshirt_colours[i + 1] << 24 | 0xA0000000; + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[i], vehicle->peep_tshirt_colours[i + 1]); imageId = (baseImageId + 32 + direction * 128 + frameNum) | imageColourFlags; sub_98199C(imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x, boundBox.offset_y, height, get_current_rotation()); } diff --git a/src/openrct2/ride/gentle/merry_go_round.c b/src/openrct2/ride/gentle/merry_go_round.c index 059f9ee51e..75f029ad71 100644 --- a/src/openrct2/ride/gentle/merry_go_round.c +++ b/src/openrct2/ride/gentle/merry_go_round.c @@ -66,8 +66,8 @@ static void paint_merry_go_round_structure(uint8 rideIndex, uint8 direction, sin uint32 imageOffset = rotationOffset & 0x1F; uint32 imageColourFlags = gTrackColours[SCHEME_MISC]; - if (imageColourFlags == 0x20000000) { - imageColourFlags = ride->vehicle_colours[0].body_colour << 19 | ride->vehicle_colours[0].trim_colour << 24 | 0xA0000000; + if (imageColourFlags == IMAGE_TYPE_REMAP) { + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour , ride->vehicle_colours[0].trim_colour); } uint32 imageId = (baseImageId + imageOffset) | imageColourFlags; @@ -90,7 +90,7 @@ static void paint_merry_go_round_structure(uint8 rideIndex, uint8 direction, sin continue; } - imageColourFlags = vehicle->peep_tshirt_colours[peep] << 19 | vehicle->peep_tshirt_colours[peep + 1] << 24 | 0x0A0000000; + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[peep], vehicle->peep_tshirt_colours[peep + 1]); imageId = (baseImageId + 32 + imageOffset) | imageColourFlags; sub_98199C(imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height, get_current_rotation()); } diff --git a/src/openrct2/ride/gentle/space_rings.c b/src/openrct2/ride/gentle/space_rings.c index 9389b3eae4..528cc54e90 100644 --- a/src/openrct2/ride/gentle/space_rings.c +++ b/src/openrct2/ride/gentle/space_rings.c @@ -64,8 +64,8 @@ static void paint_space_rings_structure(rct_ride * ride, uint8 direction, uint3 vehicleIndex = 0; } - if (imageColourFlags == 0x20000000) { - imageColourFlags = ride->vehicle_colours[vehicleIndex].body_colour << 19 | ride->vehicle_colours[0].trim_colour << 24 | 0xA0000000; + if (imageColourFlags == IMAGE_TYPE_REMAP) { + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[vehicleIndex].body_colour, ride->vehicle_colours[0].trim_colour); } uint32 imageId = (baseImageId + frameNum) | imageColourFlags; @@ -73,7 +73,7 @@ static void paint_space_rings_structure(rct_ride * ride, uint8 direction, uint3 if (vehicle != NULL && vehicle->num_peeps > 0) { rct_peep * rider = GET_PEEP(vehicle->peep[0]); - imageColourFlags = rider->tshirt_colour << 19 | rider->trousers_colour << 24 | 0xA0000000; + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(rider->tshirt_colour, rider->trousers_colour); imageId = ((baseImageId & 0x7FFFF) + 352 + frameNum) | imageColourFlags; sub_98199C(imageId, 0, 0, 20, 20, 23, height, -10, -10, height, get_current_rotation()); } diff --git a/src/openrct2/ride/thrill/3d_cinema.c b/src/openrct2/ride/thrill/3d_cinema.c index fc79b77f11..55c61ec8e3 100644 --- a/src/openrct2/ride/thrill/3d_cinema.c +++ b/src/openrct2/ride/thrill/3d_cinema.c @@ -37,8 +37,8 @@ static void paint_3d_cinema_structure(uint8 rideIndex, uint8 direction, sint8 xO } uint32 imageColourFlags = gTrackColours[SCHEME_MISC]; - if (imageColourFlags == 0x20000000) { - imageColourFlags = ride->vehicle_colours[0].body_colour << 19 | ride->vehicle_colours[0].trim_colour << 24 | 0xA0000000; + if (imageColourFlags == IMAGE_TYPE_REMAP) { + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } uint32 imageId = (rideEntry->vehicles[0].base_image_id + direction) | imageColourFlags; diff --git a/src/openrct2/ride/thrill/enterprise.c b/src/openrct2/ride/thrill/enterprise.c index 5c7496bed4..87844b48bf 100644 --- a/src/openrct2/ride/thrill/enterprise.c +++ b/src/openrct2/ride/thrill/enterprise.c @@ -45,8 +45,8 @@ static void paint_enterprise_structure(rct_ride * ride, sint8 xOffset, sint8 yOf } uint32 imageColourFlags = gTrackColours[SCHEME_MISC]; - if (imageColourFlags == 0x20000000) { - imageColourFlags = ride->vehicle_colours[0].body_colour << 19 | ride->vehicle_colours[0].trim_colour << 24 | 0xA0000000; + if (imageColourFlags == IMAGE_TYPE_REMAP) { + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } uint32 imageId = (baseImageId + imageOffset) | imageColourFlags; @@ -65,7 +65,7 @@ static void paint_enterprise_structure(rct_ride * ride, sint8 xOffset, sint8 yOf uint32 peepFrameOffset = ((imageOffset % 4) * 4 + (i * 4) % 15) & 0x0F; uint32 ax = (imageOffset & 0xFFFFFFFC) << 2; - imageId = (baseImageId + 196 + peepFrameOffset + ax) | vehicle->peep_tshirt_colours[i] << 19 | 0x20000000; + imageId = (baseImageId + 196 + peepFrameOffset + ax) | SPRITE_ID_PALETTE_COLOUR_1(vehicle->peep_tshirt_colours[i]); sub_98199C(imageId, xOffset, yOffset, 24, 24, 48, height, 0, 0, height, get_current_rotation()); } } diff --git a/src/openrct2/ride/thrill/launched_freefall.c b/src/openrct2/ride/thrill/launched_freefall.c index 9b4702aaae..d58cf230fe 100644 --- a/src/openrct2/ride/thrill/launched_freefall.c +++ b/src/openrct2/ride/thrill/launched_freefall.c @@ -49,11 +49,11 @@ void vehicle_visual_launched_freefall(sint32 x, sint32 imageDirection, sint32 y, const uint8 rotation = get_current_rotation(); // Draw back: - image_id = (baseImage_id + 2) | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0xA0000000; + image_id = (baseImage_id + 2) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->colours.body_colour, vehicle->colours.trim_colour); sub_98197C(image_id, 0, 0, 2, 2, 41, z, -11, -11, z + 1, rotation); // Draw front: - image_id = (baseImage_id + 1) | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0xA0000000; + image_id = (baseImage_id + 1) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->colours.body_colour, vehicle->colours.trim_colour); sub_98197C(image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1, rotation); // Draw peeps: @@ -63,18 +63,18 @@ void vehicle_visual_launched_freefall(sint32 x, sint32 imageDirection, sint32 y, if ((vehicle->restraints_position / 64) == 3) { baseImage_id += 2; // Draw peeps sitting without transparent area between them for restraints } - image_id = (baseImage_id + ((((imageDirection / 8) + 0) & 3) * 3)) | (vehicle->peep_tshirt_colours[0] << 19) | (vehicle->peep_tshirt_colours[1] << 24) | 0xA0000000; + image_id = (baseImage_id + ((((imageDirection / 8) + 0) & 3) * 3)) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[0], vehicle->peep_tshirt_colours[1]); sub_98199C(image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1, rotation); if (vehicle->num_peeps > 2) { - image_id = (baseImage_id + ((((imageDirection / 8) + 1) & 3) * 3)) | (vehicle->peep_tshirt_colours[2] << 19) | (vehicle->peep_tshirt_colours[3] << 24) | 0xA0000000; + image_id = (baseImage_id + ((((imageDirection / 8) + 1) & 3) * 3)) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[2], vehicle->peep_tshirt_colours[3]); sub_98199C(image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1, rotation); } if (vehicle->num_peeps > 4) { - image_id = (baseImage_id + ((((imageDirection / 8) + 2) & 3) * 3)) | (vehicle->peep_tshirt_colours[4] << 19) | (vehicle->peep_tshirt_colours[5] << 24) | 0xA0000000; + image_id = (baseImage_id + ((((imageDirection / 8) + 2) & 3) * 3)) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[4], vehicle->peep_tshirt_colours[5]); sub_98199C(image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1, rotation); } if (vehicle->num_peeps > 6) { - image_id = (baseImage_id + ((((imageDirection / 8) + 3) & 3) * 3)) | (vehicle->peep_tshirt_colours[6] << 19) | (vehicle->peep_tshirt_colours[7] << 24) | 0xA0000000; + image_id = (baseImage_id + ((((imageDirection / 8) + 3) & 3) * 3)) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[6], vehicle->peep_tshirt_colours[7]); sub_98199C(image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1, rotation); } } diff --git a/src/openrct2/ride/thrill/magic_carpet.c b/src/openrct2/ride/thrill/magic_carpet.c index 23bcd0e978..1ce3df78f3 100644 --- a/src/openrct2/ride/thrill/magic_carpet.c +++ b/src/openrct2/ride/thrill/magic_carpet.c @@ -119,10 +119,9 @@ static void paint_magic_carpet_vehicle(rct_ride *ride, uint8 direction, uint32 s // Vehicle uint32 imageColourFlags = gTrackColours[SCHEME_MISC]; - if (imageColourFlags == 0x20000000) { - imageColourFlags = 0xA0000000 | - (ride->vehicle_colours[0].trim_colour << 24) | - (ride->vehicle_colours[0].body_colour << 19); + if (imageColourFlags == IMAGE_TYPE_REMAP) + { + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } sint8 directionalOffset = MagicCarpetOscillationXY[swingImageId]; @@ -141,7 +140,7 @@ static void paint_magic_carpet_vehicle(rct_ride *ride, uint8 direction, uint32 s if (dpi->zoom_level <= 1 && (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) { rct_vehicle *vehicle = get_first_vehicle(ride); if (vehicle != NULL) { - uint32 baseImageId = 0xA0000000 | (vehicleImageId + 4); + uint32 baseImageId = IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS | (vehicleImageId + 4); for (uint8 peepIndex = 0; peepIndex < vehicle->num_peeps; peepIndex += 2) { uint32 imageId = baseImageId + (peepIndex * 2); imageId |= (vehicle->peep_tshirt_colours[peepIndex + 0] << 19); diff --git a/src/openrct2/ride/thrill/motion_simulator.c b/src/openrct2/ride/thrill/motion_simulator.c index 0e3b846b8a..548d8290a7 100644 --- a/src/openrct2/ride/thrill/motion_simulator.c +++ b/src/openrct2/ride/thrill/motion_simulator.c @@ -62,10 +62,9 @@ static void paint_motionsimulator_vehicle(sint8 offsetX, sint8 offsetY, uint8 di } uint32 imageColourFlags = gTrackColours[SCHEME_MISC]; - if (imageColourFlags == 0x20000000) { - imageColourFlags = IMAGE_TYPE_REMAP_2_PLUS | IMAGE_TYPE_REMAP; - imageColourFlags |= ride->vehicle_colours[0].body_colour << 19; - imageColourFlags |= ride->vehicle_colours[0].trim_colour << 24; + if (imageColourFlags == IMAGE_TYPE_REMAP) + { + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } simulatorImageId |= imageColourFlags; diff --git a/src/openrct2/ride/thrill/pirate_ship.c b/src/openrct2/ride/thrill/pirate_ship.c index 7b24d4b9c3..d3b1021b6e 100644 --- a/src/openrct2/ride/thrill/pirate_ship.c +++ b/src/openrct2/ride/thrill/pirate_ship.c @@ -104,8 +104,8 @@ static void paint_pirate_ship_structure(rct_ride * ride, uint8 direction, sint8 } uint32 imageColourFlags = gTrackColours[SCHEME_MISC]; - if (imageColourFlags == 0x20000000) { - imageColourFlags = ride->vehicle_colours[0].body_colour << 19 | ride->vehicle_colours[0].trim_colour << 24 | 0xA0000000; + if (imageColourFlags == IMAGE_TYPE_REMAP) { + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } pirate_ship_bound_box bounds = pirate_ship_data[direction]; @@ -129,7 +129,7 @@ static void paint_pirate_ship_structure(rct_ride * ride, uint8 direction, sint8 } sint32 frameNum = offset + (direction >> 1); - imageColourFlags = vehicle->peep_tshirt_colours[peep] << 19 | vehicle->peep_tshirt_colours[peep + 1] << 24 | 0xA0000000; + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[peep], vehicle->peep_tshirt_colours[peep + 1]); imageId = (baseImageId + frameNum) | imageColourFlags; sub_98199C(imageId, xOffset, yOffset, bounds.length_x, bounds.length_y, 80, height, bounds.offset_x, bounds.offset_y, height, get_current_rotation()); @@ -140,7 +140,7 @@ static void paint_pirate_ship_structure(rct_ride * ride, uint8 direction, sint8 } frameNum = offset + ((direction >> 1) ^ 1); - imageColourFlags = vehicle->peep_tshirt_colours[peep] << 19 | vehicle->peep_tshirt_colours[peep + 1] << 24 | 0xA0000000; + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[peep], vehicle->peep_tshirt_colours[peep + 1]); imageId = (baseImageId + frameNum) | imageColourFlags; sub_98199C(imageId, xOffset, yOffset, bounds.length_x, bounds.length_y, 80, height, bounds.offset_x, bounds.offset_y, height, get_current_rotation()); diff --git a/src/openrct2/ride/thrill/roto_drop.c b/src/openrct2/ride/thrill/roto_drop.c index bfe71240b3..cf592100d9 100644 --- a/src/openrct2/ride/thrill/roto_drop.c +++ b/src/openrct2/ride/thrill/roto_drop.c @@ -47,11 +47,11 @@ void vehicle_visual_roto_drop(sint32 x, sint32 imageDirection, sint32 y, sint32 const uint8 rotation = get_current_rotation(); // Draw back: - image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0xA0000000; + image_id = baseImage_id | SPRITE_ID_PALETTE_COLOUR_2(vehicle->colours.body_colour, vehicle->colours.trim_colour); sub_98197C(image_id, 0, 0, 2, 2, 41, z, -11, -11, z + 1, rotation); // Draw front: - image_id = (baseImage_id + 4) | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0xA0000000; + image_id = (baseImage_id + 4) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->colours.body_colour, vehicle->colours.trim_colour); sub_98197C(image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1, rotation); uint8 riding_peep_sprites[64]; @@ -74,7 +74,7 @@ void vehicle_visual_roto_drop(sint32 x, sint32 imageDirection, sint32 y, sint32 baseImage_id += 64; baseImage_id += vehicle->restraints_position / 64; } - image_id = baseImage_id | (riding_peep_sprites[i] << 19) | 0x20000000; + image_id = baseImage_id | SPRITE_ID_PALETTE_COLOUR_1(riding_peep_sprites[i]); sub_98199C(image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1, rotation); } }; diff --git a/src/openrct2/ride/thrill/swinging_inverter_ship.c b/src/openrct2/ride/thrill/swinging_inverter_ship.c index f7d3e2e4d7..6f9c90b9e3 100644 --- a/src/openrct2/ride/thrill/swinging_inverter_ship.c +++ b/src/openrct2/ride/thrill/swinging_inverter_ship.c @@ -96,8 +96,8 @@ static void paint_swinging_inverter_ship_structure(rct_ride * ride, uint8 direct } uint32 colourFlags = gTrackColours[SCHEME_MISC]; - if (colourFlags == 0x20000000) { - colourFlags = ride->vehicle_colours[0].body_colour << 19 | ride->vehicle_colours[0].trim_colour << 24 | 0xA0000000; + if (colourFlags == IMAGE_TYPE_REMAP) { + colourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } swinging_inverter_ship_bound_box boundBox = swinging_inverter_ship_bounds[direction]; diff --git a/src/openrct2/ride/thrill/top_spin.c b/src/openrct2/ride/thrill/top_spin.c index 1a2fb9c85c..6461c26092 100644 --- a/src/openrct2/ride/thrill/top_spin.c +++ b/src/openrct2/ride/thrill/top_spin.c @@ -84,11 +84,8 @@ static void top_spin_paint_vehicle(sint8 al, sint8 cl, uint8 rideIndex, uint8 di uint8 lengthY = 24; uint32 image_id = gTrackColours[SCHEME_MISC]; - if (image_id == 0x20000000) { - image_id = - 0xA0000000 | - (ride->track_colour_main[0] << 19) | - (ride->track_colour_supports[0] << 24); + if (image_id == IMAGE_TYPE_REMAP) { + image_id = SPRITE_ID_PALETTE_COLOUR_2(ride->track_colour_main[0], ride->track_colour_supports[0]); } const uint8 rotation = get_current_rotation(); @@ -99,11 +96,8 @@ static void top_spin_paint_vehicle(sint8 al, sint8 cl, uint8 rideIndex, uint8 di sub_98197C(image_id, al, cl, lengthX, lengthY, 90, height, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ, rotation); image_id = gTrackColours[SCHEME_MISC]; - if (image_id == 0x20000000) { - image_id = - 0xA0000000 | - (ride->track_colour_main[0] << 19) | - (ride->track_colour_additional[0] << 24); + if (image_id == IMAGE_TYPE_REMAP) { + image_id = SPRITE_ID_PALETTE_COLOUR_2(ride->track_colour_main[0], ride->track_colour_additional[0]); } sint32 var_1F = armRotation; @@ -139,11 +133,8 @@ static void top_spin_paint_vehicle(sint8 al, sint8 cl, uint8 rideIndex, uint8 di } image_id = gTrackColours[SCHEME_MISC]; - if (image_id == 0x20000000) { - image_id = - 0xA0000000 | - (ride->vehicle_colours[0].body_colour << 19) | - (ride->vehicle_colours[0].trim_colour << 24); + if (image_id == IMAGE_TYPE_REMAP) { + image_id = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } image_id += seatImageId; @@ -174,56 +165,37 @@ static void top_spin_paint_vehicle(sint8 al, sint8 cl, uint8 rideIndex, uint8 di sub_98199C(image_id, (sint8) seatCoords.x, (sint8) seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ, rotation); rct_drawpixelinfo* dpi = unk_140E9A8; - if (dpi->zoom_level < 2 && vehicle != NULL && vehicle->num_peeps != 0) { - image_id = - (vehicle->peep_tshirt_colours[0] << 19) | - (vehicle->peep_tshirt_colours[1] << 24); - image_id += seatImageId; - image_id += 0xA0000000; - image_id += 76; + if (dpi->zoom_level < 2 && vehicle != NULL && vehicle->num_peeps != 0) + { + image_id = (seatImageId + (1 * 76)) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[0], vehicle->peep_tshirt_colours[1]); sub_98199C(image_id, (sint8) seatCoords.x, (sint8) seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ, rotation); - if (vehicle->num_peeps > 2) { - image_id = - (vehicle->peep_tshirt_colours[2] << 19) | - (vehicle->peep_tshirt_colours[3] << 24); - image_id += seatImageId; - image_id += 0xA0000000; - image_id += 152; + if (vehicle->num_peeps > 2) + { + image_id = (seatImageId + (2 * 76)) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[2], vehicle->peep_tshirt_colours[3]); sub_98199C(image_id, (sint8) seatCoords.x, (sint8) seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ, rotation); } - if (vehicle->num_peeps > 4) { - image_id = - (vehicle->peep_tshirt_colours[4] << 19) | - (vehicle->peep_tshirt_colours[5] << 24); - image_id += seatImageId; - image_id += 0xA0000000; - image_id += 228; + if (vehicle->num_peeps > 4) + { + image_id = (seatImageId + (3 * 76)) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[4], vehicle->peep_tshirt_colours[5]); sub_98199C(image_id, (sint8) seatCoords.x, (sint8) seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ, rotation); } - if (vehicle->num_peeps > 6) { - image_id = - (vehicle->peep_tshirt_colours[6] << 19) | - (vehicle->peep_tshirt_colours[7] << 24); - image_id += seatImageId; - image_id += 0xA0000000; - image_id += 304; + if (vehicle->num_peeps > 6) + { + image_id = (seatImageId + (4 * 76)) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[6], vehicle->peep_tshirt_colours[7]); sub_98199C(image_id, (sint8) seatCoords.x, (sint8) seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ, rotation); } } image_id = gTrackColours[SCHEME_MISC]; - if (image_id == 0x20000000) { - image_id = - 0xA0000000 | - (ride->track_colour_main[0] << 19) | - (ride->track_colour_additional[0] << 24); + if (image_id == IMAGE_TYPE_REMAP) { + image_id = SPRITE_ID_PALETTE_COLOUR_2(ride->track_colour_main[0], ride->track_colour_additional[0]); } image_id += var_1F; @@ -235,11 +207,9 @@ static void top_spin_paint_vehicle(sint8 al, sint8 cl, uint8 rideIndex, uint8 di sub_98199C(image_id, al, cl, lengthX, lengthY, 90, height, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ, rotation); image_id = gTrackColours[SCHEME_MISC]; - if (image_id == 0x20000000) { - image_id = - 0xA0000000 | - (ride->track_colour_main[0] << 19) | - (ride->track_colour_supports[0] << 24); + if (image_id == IMAGE_TYPE_REMAP) + { + image_id = SPRITE_ID_PALETTE_COLOUR_2(ride->track_colour_main[0], ride->track_colour_supports[0]); } image_id += (direction & 1) << 1; diff --git a/src/openrct2/ride/thrill/twist.c b/src/openrct2/ride/thrill/twist.c index 3611485f51..8b95480ccc 100644 --- a/src/openrct2/ride/thrill/twist.c +++ b/src/openrct2/ride/thrill/twist.c @@ -49,8 +49,9 @@ static void paint_twist_structure(rct_ride * ride, uint8 direction, sint8 xOffse uint32 imageColourFlags = gTrackColours[SCHEME_MISC]; - if (imageColourFlags == 0x20000000) { - imageColourFlags = ride->vehicle_colours[0].body_colour << 19 | ride->vehicle_colours[0].trim_colour << 24 | 0xA0000000; + if (imageColourFlags == IMAGE_TYPE_REMAP) + { + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].body_colour, ride->vehicle_colours[0].trim_colour); } uint32 structureFrameNum = frameNum % 24; @@ -64,7 +65,7 @@ static void paint_twist_structure(rct_ride * ride, uint8 direction, sint8 xOffse && vehicle != NULL) { for (sint32 i = 0; i < vehicle->num_peeps; i += 2) { - imageColourFlags = vehicle->peep_tshirt_colours[i] << 19 | vehicle->peep_tshirt_colours[i + 1] << 24 | 0xA0000000; + imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[i], vehicle->peep_tshirt_colours[i + 1]); uint32 peepFrameNum = (frameNum + i * 12) % 216; imageId = (baseImageId + 24 + peepFrameNum) | imageColourFlags; diff --git a/src/openrct2/ride/track_paint.c b/src/openrct2/ride/track_paint.c index b89ce59ac1..ff047cff33 100644 --- a/src/openrct2/ride/track_paint.c +++ b/src/openrct2/ride/track_paint.c @@ -616,7 +616,7 @@ bool track_paint_util_draw_station_covers_2(enum edge_t edge, bool hasFence, con break; } - if (gTrackColours[SCHEME_MISC] != 0x20000000) { + if (gTrackColours[SCHEME_MISC] != IMAGE_TYPE_REMAP) { baseImageId &= 0x7FFFF; } @@ -628,7 +628,7 @@ bool track_paint_util_draw_station_covers_2(enum edge_t edge, bool hasFence, con imageOffset += SPR_STATION_COVER_OFFSET_TALL; } - if (baseImageId & 0x40000000) { + if (baseImageId & IMAGE_TYPE_TRANSPARENT) { imageId = (baseImageId & 0xBFFFFFFF) + imageOffset; sub_98197C(imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, (sint8)bounds.z, offset.z, boundsOffset.x, boundsOffset.y, boundsOffset.z, get_current_rotation()); @@ -1772,9 +1772,9 @@ void track_paint(uint8 direction, sint32 height, rct_map_element *mapElement) } gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; - gTrackColours[SCHEME_TRACK] = (ride->track_colour_main[trackColourScheme] << 19) | (ride->track_colour_additional[trackColourScheme] << 24) | 0xA0000000; - gTrackColours[SCHEME_SUPPORTS] = (ride->track_colour_supports[trackColourScheme] << 19) | 0x20000000; - gTrackColours[SCHEME_MISC] = 0x20000000; + gTrackColours[SCHEME_TRACK] = SPRITE_ID_PALETTE_COLOUR_2(ride->track_colour_main[trackColourScheme], ride->track_colour_additional[trackColourScheme]); + gTrackColours[SCHEME_SUPPORTS] = SPRITE_ID_PALETTE_COLOUR_1(ride->track_colour_supports[trackColourScheme]); + gTrackColours[SCHEME_MISC] = IMAGE_TYPE_REMAP; gTrackColours[SCHEME_3] = 0x20C00000; if (mapElement->type & MAP_ELEMENT_TYPE_FLAG_HIGHLIGHT) { gTrackColours[SCHEME_TRACK] = 0x21600000; diff --git a/src/openrct2/ride/vehicle_paint.c b/src/openrct2/ride/vehicle_paint.c index d47f5b6b41..277d4cc085 100644 --- a/src/openrct2/ride/vehicle_paint.c +++ b/src/openrct2/ride/vehicle_paint.c @@ -912,7 +912,7 @@ static void vehicle_sprite_paint(rct_vehicle *vehicle, sint32 ebx, sint32 ecx, s baseImage_id += vehicleEntry->no_vehicle_images; 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; + image_id = baseImage_id | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[i * 2], vehicle->peep_tshirt_colours[(i * 2) + 1]); if (i == 0 && vehicleEntry->flags_b & VEHICLE_ENTRY_FLAG_B_8) { image_id += (vehicleEntry->no_vehicle_images * vehicle->var_C5); } diff --git a/src/openrct2/ride/water/log_flume.c b/src/openrct2/ride/water/log_flume.c index ad2c9f7954..1f41c6a4ba 100644 --- a/src/openrct2/ride/water/log_flume.c +++ b/src/openrct2/ride/water/log_flume.c @@ -628,7 +628,7 @@ static void paint_log_flume_track_right_quarter_turn_3_tiles(uint8 rideIndex, ui static void paint_log_flume_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence, uint8 direction, sint32 height, rct_map_element * mapElement) { - uint32 imageId = SPR_STATION_BASE_D | 0x20000000; + uint32 imageId = SPR_STATION_BASE_D | IMAGE_TYPE_REMAP; sub_98196C(imageId, 0, 0, 32, 32, 1, height, get_current_rotation()); if (direction & 1) { diff --git a/src/openrct2/ride/water/river_rapids.c b/src/openrct2/ride/water/river_rapids.c index bc648da7b4..091f3e1257 100644 --- a/src/openrct2/ride/water/river_rapids.c +++ b/src/openrct2/ride/water/river_rapids.c @@ -223,27 +223,27 @@ void vehicle_visual_river_rapids(sint32 x, sint32 imageDirection, sint32 y, sint baseImage_id += vehicleEntry->base_image_id; const vehicle_boundbox *bb = &_riverRapidsBoundbox[j]; - image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0xA0000000; + image_id = baseImage_id | SPRITE_ID_PALETTE_COLOUR_2(vehicle->colours.body_colour, vehicle->colours.trim_colour); 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 (unk_140E9A8->zoom_level < 2 && vehicle->num_peeps > 0) { // Draw peeps: (this particular vehicle doesn't sort them back to front like others so the back ones sometimes clip, but thats how the original does it...) sint32 peeps = ((ecx / 8) + 0) & 3; - image_id = (baseImage_id + ((peeps + 1) * 72)) | (vehicle->peep_tshirt_colours[0] << 19) | (vehicle->peep_tshirt_colours[1] << 24) | 0xA0000000; + image_id = (baseImage_id + ((peeps + 1) * 72)) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[0], vehicle->peep_tshirt_colours[1]) ; 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); if (vehicle->num_peeps > 2) { peeps = ((ecx / 8) + 2) & 3; - image_id = (baseImage_id + ((peeps + 1) * 72)) | (vehicle->peep_tshirt_colours[2] << 19) | (vehicle->peep_tshirt_colours[3] << 24) | 0xA0000000; + image_id = (baseImage_id + ((peeps + 1) * 72)) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[2], vehicle->peep_tshirt_colours[3]); 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); } if (vehicle->num_peeps > 4) { peeps = ((ecx / 8) + 1) & 3; - image_id = (baseImage_id + ((peeps + 1) * 72)) | (vehicle->peep_tshirt_colours[4] << 19) | (vehicle->peep_tshirt_colours[5] << 24) | 0xA0000000; + image_id = (baseImage_id + ((peeps + 1) * 72)) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[4], vehicle->peep_tshirt_colours[5]); 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); } if (vehicle->num_peeps > 6) { peeps = ((ecx / 8) + 3) & 3; - image_id = (baseImage_id + ((peeps + 1) * 72)) | (vehicle->peep_tshirt_colours[6] << 19) | (vehicle->peep_tshirt_colours[7] << 24) | 0xA0000000; + image_id = (baseImage_id + ((peeps + 1) * 72)) | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[6], vehicle->peep_tshirt_colours[7]); 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); } } diff --git a/src/openrct2/windows/banner.c b/src/openrct2/windows/banner.c index 282ea209f7..49350c2e2b 100644 --- a/src/openrct2/windows/banner.c +++ b/src/openrct2/windows/banner.c @@ -322,7 +322,7 @@ static void window_banner_invalidate(rct_window *w) (1ULL<image = (banner->colour << 19) | 0x60000000 | SPR_PALETTE_BTN; + colour_btn->image = SPRITE_ID_PALETTE_COLOUR_1(banner->colour) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; rct_widget* drop_down_widget = &window_banner_widgets[WIDX_TEXT_COLOUR_DROPDOWN]; drop_down_widget->text = BannerColouredTextFormats[banner->text_colour]; diff --git a/src/openrct2/windows/cheats.c b/src/openrct2/windows/cheats.c index 874df8b204..cd57d0852c 100644 --- a/src/openrct2/windows/cheats.c +++ b/src/openrct2/windows/cheats.c @@ -184,10 +184,10 @@ enum WINDOW_CHEATS_WIDGET_IDX { { WWT_CAPTION, 0, 1, WW - 2, 1, 14, STR_CHEAT_TITLE, STR_WINDOW_TITLE_TIP }, /* title bar */ \ { WWT_CLOSEBOX, 0, WW - 13, WW - 3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, /* close x button */ \ { WWT_IMGBTN, 1, 0, WW - 1, 43, WH - 1, 0xFFFFFFFF, STR_NONE }, /* tab content panel */ \ - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCIAL_CHEATS_TIP }, /* tab 1 */ \ - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_GUEST_CHEATS_TIP }, /* tab 2 */ \ - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_PARK_CHEATS_TIP }, /* tab 3 */ \ - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_RIDE_CHEATS_TIP } /* tab 4 */ + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCIAL_CHEATS_TIP }, /* tab 1 */ \ + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_GUEST_CHEATS_TIP }, /* tab 2 */ \ + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_PARK_CHEATS_TIP }, /* tab 3 */ \ + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_RIDE_CHEATS_TIP } /* tab 4 */ static rct_widget window_cheats_money_widgets[] = { MAIN_CHEATS_WIDGETS, diff --git a/src/openrct2/windows/clear_scenery.c b/src/openrct2/windows/clear_scenery.c index 4a2ce6f8d4..2ff82665fc 100644 --- a/src/openrct2/windows/clear_scenery.c +++ b/src/openrct2/windows/clear_scenery.c @@ -44,11 +44,11 @@ rct_widget window_clear_scenery_widgets[] = { { WWT_CAPTION, 0, 1, 96, 1, 14, STR_CLEAR_SCENERY, STR_WINDOW_TITLE_TIP }, // title bar { WWT_CLOSEBOX, 0, 85, 95, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // close x button { WWT_IMGBTN, 0, 27, 70, 17, 48, SPR_LAND_TOOL_SIZE_0, STR_NONE }, // preview box - { WWT_TRNBTN, 1, 28, 43, 18, 33, 0x20000000 | SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_LAND_TIP }, // decrement size - { WWT_TRNBTN, 1, 54, 69, 32, 47, 0x20000000 | SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_LAND_TIP }, // increment size - { WWT_FLATBTN, 1, 7, 30, 53, 76, 0x20000000 | SPR_G2_BUTTON_TREES, STR_CLEAR_SCENERY_REMOVE_SMALL_SCENERY_TIP }, // small scenery - { WWT_FLATBTN, 1, 37, 60, 53, 76, 0x20000000 | SPR_G2_BUTTON_LARGE_SCENERY, STR_CLEAR_SCENERY_REMOVE_LARGE_SCENERY_TIP }, // large scenery - { WWT_FLATBTN, 1, 67, 90, 53, 76, 0x20000000 | SPR_G2_BUTTON_FOOTPATH, STR_CLEAR_SCENERY_REMOVE_FOOTPATHS_TIP }, // footpaths + { WWT_TRNBTN, 1, 28, 43, 18, 33, IMAGE_TYPE_REMAP | SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_LAND_TIP }, // decrement size + { WWT_TRNBTN, 1, 54, 69, 32, 47, IMAGE_TYPE_REMAP | SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_LAND_TIP }, // increment size + { WWT_FLATBTN, 1, 7, 30, 53, 76, IMAGE_TYPE_REMAP | SPR_G2_BUTTON_TREES, STR_CLEAR_SCENERY_REMOVE_SMALL_SCENERY_TIP }, // small scenery + { WWT_FLATBTN, 1, 37, 60, 53, 76, IMAGE_TYPE_REMAP | SPR_G2_BUTTON_LARGE_SCENERY, STR_CLEAR_SCENERY_REMOVE_LARGE_SCENERY_TIP }, // large scenery + { WWT_FLATBTN, 1, 67, 90, 53, 76, IMAGE_TYPE_REMAP | SPR_G2_BUTTON_FOOTPATH, STR_CLEAR_SCENERY_REMOVE_FOOTPATHS_TIP }, // footpaths { WIDGETS_END }, }; diff --git a/src/openrct2/windows/dropdown.c b/src/openrct2/windows/dropdown.c index b6eb50acf5..9ecdfd31ef 100644 --- a/src/openrct2/windows/dropdown.c +++ b/src/openrct2/windows/dropdown.c @@ -404,7 +404,7 @@ void window_dropdown_show_colour(rct_window *w, rct_widget *widget, uint8 dropdo defaultIndex = i; gDropdownItemsFormat[i] = DROPDOWN_FORMAT_COLOUR_PICKER; - gDropdownItemsArgs[i] = (i << 32) | (0x20000000 | (i << 19) | SPR_PALETTE_BTN); + gDropdownItemsArgs[i] = (i << 32) | (SPRITE_ID_PALETTE_COLOUR_1(i) | SPR_PALETTE_BTN); } // Show dropdown diff --git a/src/openrct2/windows/editor_inventions_list.c b/src/openrct2/windows/editor_inventions_list.c index 2465ed490a..907642ee7f 100644 --- a/src/openrct2/windows/editor_inventions_list.c +++ b/src/openrct2/windows/editor_inventions_list.c @@ -50,7 +50,7 @@ static rct_widget window_editor_inventions_list_widgets[] = { { WWT_CAPTION, 0, 1, 598, 1, 14, STR_INVENTION_LIST, STR_WINDOW_TITLE_TIP }, { WWT_CLOSEBOX, 0, 587, 597, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, { WWT_RESIZE, 1, 0, 599, 43, 399, STR_NONE, STR_NONE }, - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_NONE }, + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_NONE }, { WWT_SCROLL, 1, 4, 371, 56, 175, SCROLL_VERTICAL, STR_NONE }, { WWT_SCROLL, 1, 4, 371, 189, 396, SCROLL_VERTICAL, STR_NONE }, { WWT_FLATBTN, 1, 431, 544, 106, 219, 0xFFFFFFFF, STR_NONE }, diff --git a/src/openrct2/windows/editor_object_selection.c b/src/openrct2/windows/editor_object_selection.c index 8d84a0d922..aba190aa7b 100644 --- a/src/openrct2/windows/editor_object_selection.c +++ b/src/openrct2/windows/editor_object_selection.c @@ -151,17 +151,17 @@ static rct_widget window_editor_object_selection_widgets[] = { { WWT_CAPTION, 0, 1, 598, 1, 14, STR_OBJECT_SELECTION, STR_WINDOW_TITLE_TIP }, { WWT_CLOSEBOX, 0, 587, 597, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, { WWT_RESIZE, 1, 0, 599, 43, 399, 0xFFFFFFFF, STR_NONE }, - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, - { WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, - { WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, - { WWT_TAB, 1, 189, 219, 17, 43, 0x20000000 | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, - { WWT_TAB, 1, 220, 250, 17, 43, 0x20000000 | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, - { WWT_TAB, 1, 251, 281, 17, 43, 0x20000000 | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, - { WWT_TAB, 1, 282, 312, 17, 43, 0x20000000 | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, - { WWT_TAB, 1, 313, 343, 17, 43, 0x20000000 | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, + { WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, + { WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, + { WWT_TAB, 1, 189, 219, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, + { WWT_TAB, 1, 220, 250, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, + { WWT_TAB, 1, 251, 281, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, + { WWT_TAB, 1, 282, 312, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, + { WWT_TAB, 1, 313, 343, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STRING_DEFINED_TOOLTIP }, { WWT_DROPDOWN_BUTTON, 0, 470, 591, 23, 34, STR_OBJECT_SELECTION_ADVANCED, STR_OBJECT_SELECTION_ADVANCED_TIP }, { WWT_SCROLL, 1, 4, 291, 60, 386, SCROLL_VERTICAL, STR_NONE }, { WWT_FLATBTN, 1, 391, 504, 46, 159, 0xFFFFFFFF, STR_NONE }, @@ -170,13 +170,13 @@ static rct_widget window_editor_object_selection_widgets[] = { { WWT_TEXT_BOX, 1, 4, 214, 46, 57, STR_NONE, STR_NONE }, { WWT_DROPDOWN_BUTTON, 1, 218, 287, 46, 57, STR_OBJECT_SEARCH_CLEAR, STR_NONE }, { WWT_IMGBTN, 1, 3, 287, 73, 76, 0xFFFFFFFF, STR_NONE }, - { WWT_TAB, 1, 3, 33, 47, 73, 0x20000000 | SPR_TAB, STR_OBJECT_FILTER_ALL_RIDES_TIP }, - { WWT_TAB, 1, 34, 64, 47, 73, 0x20000000 | SPR_TAB, STR_TRANSPORT_RIDES_TIP }, - { WWT_TAB, 1, 65, 95, 47, 73, 0x20000000 | SPR_TAB, STR_GENTLE_RIDES_TIP }, - { WWT_TAB, 1, 96, 126, 47, 73, 0x20000000 | SPR_TAB, STR_ROLLER_COASTERS_TIP }, - { WWT_TAB, 1, 127, 157, 47, 73, 0x20000000 | SPR_TAB, STR_THRILL_RIDES_TIP }, - { WWT_TAB, 1, 158, 188, 47, 73, 0x20000000 | SPR_TAB, STR_WATER_RIDES_TIP }, - { WWT_TAB, 1, 189, 219, 47, 73, 0x20000000 | SPR_TAB, STR_SHOPS_STALLS_TIP }, + { WWT_TAB, 1, 3, 33, 47, 73, IMAGE_TYPE_REMAP | SPR_TAB, STR_OBJECT_FILTER_ALL_RIDES_TIP }, + { WWT_TAB, 1, 34, 64, 47, 73, IMAGE_TYPE_REMAP | SPR_TAB, STR_TRANSPORT_RIDES_TIP }, + { WWT_TAB, 1, 65, 95, 47, 73, IMAGE_TYPE_REMAP | SPR_TAB, STR_GENTLE_RIDES_TIP }, + { WWT_TAB, 1, 96, 126, 47, 73, IMAGE_TYPE_REMAP | SPR_TAB, STR_ROLLER_COASTERS_TIP }, + { WWT_TAB, 1, 127, 157, 47, 73, IMAGE_TYPE_REMAP | SPR_TAB, STR_THRILL_RIDES_TIP }, + { WWT_TAB, 1, 158, 188, 47, 73, IMAGE_TYPE_REMAP | SPR_TAB, STR_WATER_RIDES_TIP }, + { WWT_TAB, 1, 189, 219, 47, 73, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOPS_STALLS_TIP }, { WWT_13, 1, 4, 204, 80, 93, STR_NONE, STR_NONE }, { WWT_13, 1, 205, 291, 80, 93, STR_NONE, STR_NONE }, { WIDGETS_END } @@ -1267,7 +1267,7 @@ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinf gfx_draw_sprite(dpi, SPR_TAB_RIDE_16 + i, x, y, 0); } - const sint32 ride_tabs[] = { SPR_TAB_RIDE_16, 0x20000000 | SPR_TAB_RIDES_TRANSPORT_0, SPR_TAB_RIDES_GENTLE_0, 0x20000000 | SPR_TAB_RIDES_ROLLER_COASTERS_0, SPR_TAB_RIDES_THRILL_0, SPR_TAB_RIDES_WATER_0, SPR_TAB_RIDES_SHOP_0, SPR_TAB_FINANCES_RESEARCH_0 }; + const sint32 ride_tabs[] = { SPR_TAB_RIDE_16, IMAGE_TYPE_REMAP | SPR_TAB_RIDES_TRANSPORT_0, SPR_TAB_RIDES_GENTLE_0, IMAGE_TYPE_REMAP | SPR_TAB_RIDES_ROLLER_COASTERS_0, SPR_TAB_RIDES_THRILL_0, SPR_TAB_RIDES_WATER_0, SPR_TAB_RIDES_SHOP_0, SPR_TAB_FINANCES_RESEARCH_0 }; const sint32 ThrillRidesTabAnimationSequence[] = { 5, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0 }; diff --git a/src/openrct2/windows/editor_objective_options.c b/src/openrct2/windows/editor_objective_options.c index f6d3fba39a..bbc9668944 100644 --- a/src/openrct2/windows/editor_objective_options.c +++ b/src/openrct2/windows/editor_objective_options.c @@ -90,8 +90,8 @@ enum { { WWT_CAPTION, 0, 1, 448, 1, 14, STR_OBJECTIVE_SELECTION, STR_WINDOW_TITLE_TIP }, \ { WWT_CLOSEBOX, 0, 437, 447, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, \ { WWT_RESIZE, 1, 0, 279, 43, 148, STR_NONE, STR_NONE }, \ - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_SELECT_OBJECTIVE_AND_PARK_NAME_TIP }, \ - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_SELECT_RIDES_TO_BE_PRESERVED_TIP } + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SELECT_OBJECTIVE_AND_PARK_NAME_TIP }, \ + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SELECT_RIDES_TO_BE_PRESERVED_TIP } static rct_widget window_editor_objective_options_main_widgets[] = { MAIN_OBJECTIVE_OPTIONS_WIDGETS, diff --git a/src/openrct2/windows/editor_scenario_options.c b/src/openrct2/windows/editor_scenario_options.c index 5e795f0a64..e42e9b2fc3 100644 --- a/src/openrct2/windows/editor_scenario_options.c +++ b/src/openrct2/windows/editor_scenario_options.c @@ -96,9 +96,9 @@ static rct_widget window_editor_scenario_options_financial_widgets[] = { { WWT_CAPTION, 0, 1, 278, 1, 14, STR_SCENARIO_OPTIONS_FINANCIAL, STR_WINDOW_TITLE_TIP }, { WWT_CLOSEBOX, 0, 267, 277, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, { WWT_RESIZE, 1, 0, 279, 43, 148, STR_NONE, STR_NONE }, - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_SCENARIO_OPTIONS_FINANCIAL_TIP }, - { WWT_TAB, 1, 34, 64, 17, 46, 0x20000000 | SPR_TAB, STR_SCENARIO_OPTIONS_GUESTS_TIP }, - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_SCENARIO_OPTIONS_PARK_TIP }, + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SCENARIO_OPTIONS_FINANCIAL_TIP }, + { WWT_TAB, 1, 34, 64, 17, 46, IMAGE_TYPE_REMAP | SPR_TAB, STR_SCENARIO_OPTIONS_GUESTS_TIP }, + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SCENARIO_OPTIONS_PARK_TIP }, { WWT_CHECKBOX, 1, 8, 271, 48, 59, STR_MAKE_PARK_NO_MONEY, STR_MAKE_PARK_NO_MONEY_TIP }, { WWT_SPINNER, 1, 168, 267, 65, 76, STR_NONE, STR_NONE }, @@ -122,9 +122,9 @@ static rct_widget window_editor_scenario_options_guests_widgets[] = { { WWT_CAPTION, 0, 1, 278, 1, 14, STR_SCENARIO_OPTIONS_GUESTS, STR_WINDOW_TITLE_TIP }, { WWT_CLOSEBOX, 0, 267, 277, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, { WWT_RESIZE, 1, 0, 279, 43, 148, STR_NONE, STR_NONE }, - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_SCENARIO_OPTIONS_FINANCIAL_TIP }, - { WWT_TAB, 1, 34, 64, 17, 46, 0x20000000 | SPR_TAB, STR_SCENARIO_OPTIONS_GUESTS_TIP }, - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_SCENARIO_OPTIONS_PARK_TIP }, + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SCENARIO_OPTIONS_FINANCIAL_TIP }, + { WWT_TAB, 1, 34, 64, 17, 46, IMAGE_TYPE_REMAP | SPR_TAB, STR_SCENARIO_OPTIONS_GUESTS_TIP }, + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SCENARIO_OPTIONS_PARK_TIP }, { WWT_SPINNER, 1, 268, 337, 48, 59, STR_NONE, STR_NONE }, { WWT_DROPDOWN_BUTTON, 1, 326, 336, 49, 53, STR_NUMERIC_UP, STR_NONE }, @@ -148,9 +148,9 @@ static rct_widget window_editor_scenario_options_park_widgets[] = { { WWT_CAPTION, 0, 1, 278, 1, 14, STR_SCENARIO_OPTIONS_PARK, STR_WINDOW_TITLE_TIP }, { WWT_CLOSEBOX, 0, 267, 277, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, { WWT_RESIZE, 1, 0, 279, 43, 148, STR_NONE, STR_NONE }, - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_SCENARIO_OPTIONS_FINANCIAL_TIP }, - { WWT_TAB, 1, 34, 64, 17, 46, 0x20000000 | SPR_TAB, STR_SCENARIO_OPTIONS_GUESTS_TIP }, - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_SCENARIO_OPTIONS_PARK_TIP }, + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SCENARIO_OPTIONS_FINANCIAL_TIP }, + { WWT_TAB, 1, 34, 64, 17, 46, IMAGE_TYPE_REMAP | SPR_TAB, STR_SCENARIO_OPTIONS_GUESTS_TIP }, + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SCENARIO_OPTIONS_PARK_TIP }, { WWT_SPINNER, 1, 188, 257, 48, 59, STR_NONE, STR_NONE }, { WWT_DROPDOWN_BUTTON, 1, 246, 256, 49, 53, STR_NUMERIC_UP, STR_NONE }, diff --git a/src/openrct2/windows/finances.c b/src/openrct2/windows/finances.c index 33f5c3f330..d54b9de0cd 100644 --- a/src/openrct2/windows/finances.c +++ b/src/openrct2/windows/finances.c @@ -83,12 +83,12 @@ static rct_widget window_finances_summary_widgets[] = { { WWT_CAPTION, 0, 1, 528, 1, 14, STR_FINANCIAL_SUMMARY, STR_WINDOW_TITLE_TIP }, { WWT_CLOSEBOX, 0, 517, 527, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, { WWT_RESIZE, 1, 0, 529, 43, 256, 0xFFFFFFFF, STR_NONE }, - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_SUMMARY_TAB_TIP }, - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_CASH_TAB_TIP }, - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_PARK_VALUE_TAB_TIP }, - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_WEEKLY_PROFIT_TAB_TIP }, - { WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_MARKETING_TAB_TIP }, - { WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_SUMMARY_TAB_TIP }, + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_CASH_TAB_TIP }, + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_PARK_VALUE_TAB_TIP }, + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_WEEKLY_PROFIT_TAB_TIP }, + { WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_MARKETING_TAB_TIP }, + { WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, { WWT_SPINNER, 1, 64, 153, 229, 240, STR_FINANCES_SUMMARY_LOAN_VALUE, STR_NONE }, { WWT_DROPDOWN_BUTTON, 1, 142, 152, 230, 234, STR_NUMERIC_UP, STR_NONE }, { WWT_DROPDOWN_BUTTON, 1, 142, 152, 235, 239, STR_NUMERIC_DOWN, STR_NONE }, @@ -100,12 +100,12 @@ static rct_widget window_finances_cash_widgets[] = { { WWT_CAPTION, 0, 1, 528, 1, 14, STR_FINANCIAL_GRAPH, STR_WINDOW_TITLE_TIP }, { WWT_CLOSEBOX, 0, 517, 527, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, { WWT_RESIZE, 1, 0, 529, 43, 256, 0xFFFFFFFF, STR_NONE }, - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_SUMMARY_TAB_TIP }, - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_CASH_TAB_TIP }, - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_PARK_VALUE_TAB_TIP }, - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_WEEKLY_PROFIT_TAB_TIP }, - { WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_MARKETING_TAB_TIP }, - { WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_SUMMARY_TAB_TIP }, + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_CASH_TAB_TIP }, + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_PARK_VALUE_TAB_TIP }, + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_WEEKLY_PROFIT_TAB_TIP }, + { WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_MARKETING_TAB_TIP }, + { WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, { WIDGETS_END }, }; @@ -114,12 +114,12 @@ static rct_widget window_finances_park_value_widgets[] = { { WWT_CAPTION, 0, 1, 528, 1, 14, STR_PARK_VALUE_GRAPH, STR_WINDOW_TITLE_TIP }, { WWT_CLOSEBOX, 0, 517, 527, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, { WWT_RESIZE, 1, 0, 529, 43, 256, 0xFFFFFFFF, STR_NONE }, - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_SUMMARY_TAB_TIP }, - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_CASH_TAB_TIP }, - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_PARK_VALUE_TAB_TIP }, - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_WEEKLY_PROFIT_TAB_TIP }, - { WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_MARKETING_TAB_TIP }, - { WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_SUMMARY_TAB_TIP }, + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_CASH_TAB_TIP }, + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_PARK_VALUE_TAB_TIP }, + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_WEEKLY_PROFIT_TAB_TIP }, + { WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_MARKETING_TAB_TIP }, + { WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, { WIDGETS_END }, }; @@ -128,12 +128,12 @@ static rct_widget window_finances_profit_widgets[] = { { WWT_CAPTION, 0, 1, 528, 1, 14, STR_PROFIT_GRAPH, STR_WINDOW_TITLE_TIP }, { WWT_CLOSEBOX, 0, 517, 527, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, { WWT_RESIZE, 1, 0, 529, 43, 256, 0xFFFFFFFF, STR_NONE }, - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_SUMMARY_TAB_TIP }, - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_CASH_TAB_TIP }, - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_PARK_VALUE_TAB_TIP }, - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_WEEKLY_PROFIT_TAB_TIP }, - { WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_MARKETING_TAB_TIP }, - { WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_SUMMARY_TAB_TIP }, + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_CASH_TAB_TIP }, + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_PARK_VALUE_TAB_TIP }, + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_WEEKLY_PROFIT_TAB_TIP }, + { WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_MARKETING_TAB_TIP }, + { WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, { WIDGETS_END }, }; @@ -142,12 +142,12 @@ static rct_widget window_finances_marketing_widgets[] = { { WWT_CAPTION, 0, 1, 528, 1, 14, STR_MARKETING, STR_WINDOW_TITLE_TIP }, { WWT_CLOSEBOX, 0, 517, 527, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, { WWT_RESIZE, 1, 0, 529, 43, 256, 0xFFFFFFFF, STR_NONE }, - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_SUMMARY_TAB_TIP }, - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_CASH_TAB_TIP }, - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_PARK_VALUE_TAB_TIP }, - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_WEEKLY_PROFIT_TAB_TIP }, - { WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_MARKETING_TAB_TIP }, - { WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_SUMMARY_TAB_TIP }, + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_CASH_TAB_TIP }, + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_PARK_VALUE_TAB_TIP }, + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_WEEKLY_PROFIT_TAB_TIP }, + { WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_MARKETING_TAB_TIP }, + { WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, { WWT_GROUPBOX, 2, 3, 526, 47, 91, STR_MARKETING_CAMPAIGNS_IN_OPERATION, STR_NONE }, { WWT_GROUPBOX, 2, 3, 526, 47, 252, STR_MARKETING_CAMPAIGNS_AVAILABLE, STR_NONE }, { WWT_IMGBTN, 1, 8, 521, 0, 11, 0xFFFFFFFF, STR_START_THIS_MARKETING_CAMPAIGN }, @@ -164,12 +164,12 @@ static rct_widget window_finances_research_widgets[] = { { WWT_CAPTION, 0, 1, 318, 1, 14, STR_RESEARCH_FUNDING, STR_WINDOW_TITLE_TIP }, { WWT_CLOSEBOX, 0, 307, 317, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, { WWT_RESIZE, 1, 0, 319, 43, 206, 0xFFFFFFFF, STR_NONE }, - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_SUMMARY_TAB_TIP }, - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_CASH_TAB_TIP }, - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_PARK_VALUE_TAB_TIP }, - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_WEEKLY_PROFIT_TAB_TIP }, - { WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_SHOW_MARKETING_TAB_TIP }, - { WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_SUMMARY_TAB_TIP }, + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_CASH_TAB_TIP }, + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_PARK_VALUE_TAB_TIP }, + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_WEEKLY_PROFIT_TAB_TIP }, + { WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_SHOW_MARKETING_TAB_TIP }, + { WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, { WWT_GROUPBOX, 2, 3, 316, 47, 91, STR_RESEARCH_FUNDING_, STR_NONE }, { WWT_DROPDOWN, 2, 8, 167, 59, 70, 0xFFFFFFFF, STR_SELECT_LEVEL_OF_RESEARCH_AND_DEVELOPMENT }, { WWT_DROPDOWN_BUTTON, 2, 156, 166, 60, 69, STR_DROPDOWN_GLYPH, STR_SELECT_LEVEL_OF_RESEARCH_AND_DEVELOPMENT }, diff --git a/src/openrct2/windows/game_bottom_toolbar.c b/src/openrct2/windows/game_bottom_toolbar.c index b3832b661e..3d812057fa 100644 --- a/src/openrct2/windows/game_bottom_toolbar.c +++ b/src/openrct2/windows/game_bottom_toolbar.c @@ -560,25 +560,25 @@ static void window_game_bottom_toolbar_draw_news_item(rct_drawpixelinfo *dpi, rc image_id_base++; uint32 image_id = image_id_base; - image_id |= 0xA0000000 | (peep->tshirt_colour << 19) | (peep->trousers_colour << 24); + image_id |= SPRITE_ID_PALETTE_COLOUR_2(peep->tshirt_colour, peep->trousers_colour); gfx_draw_sprite(&cliped_dpi, image_id, clip_x, clip_y, 0); if (image_id_base >= 0x2A1D && image_id_base < 0x2A3D){ image_id_base += 32; - image_id_base |= 0x20000000 | (peep->balloon_colour << 19); + image_id_base |= SPRITE_ID_PALETTE_COLOUR_1(peep->balloon_colour); gfx_draw_sprite(&cliped_dpi, image_id_base, clip_x, clip_y, 0); } else if (image_id_base >= 0x2BBD && image_id_base < 0x2BDD){ image_id_base += 32; - image_id_base |= 0x20000000 | (peep->umbrella_colour << 19); + image_id_base |= SPRITE_ID_PALETTE_COLOUR_1(peep->umbrella_colour); gfx_draw_sprite(&cliped_dpi, image_id_base, clip_x, clip_y, 0); } else if (image_id_base >= 0x29DD && image_id_base < 0x29FD){ image_id_base += 32; - image_id_base |= 0x20000000 | (peep->hat_colour << 19); + image_id_base |= SPRITE_ID_PALETTE_COLOUR_1(peep->hat_colour); gfx_draw_sprite(&cliped_dpi, image_id_base, clip_x, clip_y, 0); } diff --git a/src/openrct2/windows/guest.c b/src/openrct2/windows/guest.c index d2c3369efa..757ad89605 100644 --- a/src/openrct2/windows/guest.c +++ b/src/openrct2/windows/guest.c @@ -68,8 +68,6 @@ 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[] = { @@ -77,12 +75,12 @@ rct_widget window_guest_overview_widgets[] = { {WWT_CAPTION, 0, 1, 190, 1, 14, STR_STRINGID, STR_WINDOW_TITLE_TIP}, // Title {WWT_CLOSEBOX, 0, 179, 189, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP}, // Close x button {WWT_RESIZE, 1, 0, 191, 43, 156, 0xFFFFFFFF, STR_NONE}, // Resize - {WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VIEW_TIP}, // Tab 1 - {WWT_TAB, 1, 73, 64, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_NEEDS_TIP}, // Tab 2 - {WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VISITED_RIDES_TIP}, // Tab 3 - {WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_FINANCE_TIP}, // Tab 4 - {WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_THOUGHTS_TIP}, // Tab 5 - {WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_ITEMS_TIP}, // Tab 6 + {WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_VIEW_TIP}, // Tab 1 + {WWT_TAB, 1, 73, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_NEEDS_TIP}, // Tab 2 + {WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_VISITED_RIDES_TIP}, // Tab 3 + {WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_FINANCE_TIP}, // Tab 4 + {WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_THOUGHTS_TIP}, // Tab 5 + {WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_ITEMS_TIP}, // Tab 6 {WWT_12, 1, 3, 166, 45, 56, 0xFFFFFFFF, STR_NONE}, // Label Thought marquee {WWT_VIEWPORT, 1, 3, 166, 57, 143, 0xFFFFFFFF, STR_NONE}, // Viewport {WWT_12, 1, 3, 166, 144, 154, 0xFFFFFFFF, STR_NONE}, // Label Action @@ -98,12 +96,12 @@ rct_widget window_guest_stats_widgets[] = { {WWT_CAPTION, 0, 1, 190, 1, 14, STR_STRINGID, STR_WINDOW_TITLE_TIP}, {WWT_CLOSEBOX, 0, 179, 189, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP}, {WWT_RESIZE, 1, 0, 191, 43, 156, STR_NONE, STR_NONE}, - {WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VIEW_TIP}, - {WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_NEEDS_TIP}, - {WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VISITED_RIDES_TIP}, - {WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_FINANCE_TIP}, - {WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_THOUGHTS_TIP}, - {WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_ITEMS_TIP}, + {WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_VIEW_TIP}, + {WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_NEEDS_TIP}, + {WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_VISITED_RIDES_TIP}, + {WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_FINANCE_TIP}, + {WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_THOUGHTS_TIP}, + {WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_ITEMS_TIP}, {WIDGETS_END}, }; @@ -112,12 +110,12 @@ rct_widget window_guest_rides_widgets[] = { {WWT_CAPTION, 0, 1, 190, 1, 14, STR_STRINGID, STR_WINDOW_TITLE_TIP}, {WWT_CLOSEBOX, 0, 179, 189, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP}, {WWT_RESIZE, 1, 0, 191, 43, 156, STR_NONE, STR_NONE}, - {WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VIEW_TIP}, - {WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_NEEDS_TIP}, - {WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VISITED_RIDES_TIP}, - {WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_FINANCE_TIP}, - {WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_THOUGHTS_TIP}, - {WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_ITEMS_TIP}, + {WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_VIEW_TIP}, + {WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_NEEDS_TIP}, + {WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_VISITED_RIDES_TIP}, + {WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_FINANCE_TIP}, + {WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_THOUGHTS_TIP}, + {WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_ITEMS_TIP}, {WWT_SCROLL, 1, 3, 188, 57, 143, SCROLL_VERTICAL, STR_NONE}, {WIDGETS_END}, }; @@ -127,12 +125,12 @@ rct_widget window_guest_finance_widgets[] = { {WWT_CAPTION, 0, 1, 190, 1, 14, STR_STRINGID, STR_WINDOW_TITLE_TIP}, {WWT_CLOSEBOX, 0, 179, 189, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP}, {WWT_RESIZE, 1, 0, 191, 43, 156, STR_NONE, STR_NONE}, - {WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VIEW_TIP}, - {WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_NEEDS_TIP}, - {WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VISITED_RIDES_TIP}, - {WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_FINANCE_TIP}, - {WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_THOUGHTS_TIP}, - {WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_ITEMS_TIP}, + {WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_VIEW_TIP}, + {WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_NEEDS_TIP}, + {WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_VISITED_RIDES_TIP}, + {WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_FINANCE_TIP}, + {WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_THOUGHTS_TIP}, + {WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_ITEMS_TIP}, {WIDGETS_END}, }; @@ -141,12 +139,12 @@ rct_widget window_guest_thoughts_widgets[] = { {WWT_CAPTION, 0, 1, 190, 1, 14, STR_STRINGID, STR_WINDOW_TITLE_TIP}, {WWT_CLOSEBOX, 0, 179, 189, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP}, {WWT_RESIZE, 1, 0, 191, 43, 156, STR_NONE, STR_NONE}, - {WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VIEW_TIP}, - {WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_NEEDS_TIP}, - {WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VISITED_RIDES_TIP}, - {WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_FINANCE_TIP}, - {WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_THOUGHTS_TIP}, - {WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_ITEMS_TIP}, + {WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_VIEW_TIP}, + {WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_NEEDS_TIP}, + {WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_VISITED_RIDES_TIP}, + {WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_FINANCE_TIP}, + {WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_THOUGHTS_TIP}, + {WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_ITEMS_TIP}, {WIDGETS_END}, }; @@ -155,12 +153,12 @@ rct_widget window_guest_inventory_widgets[] = { {WWT_CAPTION, 0, 1, 190, 1, 14, STR_STRINGID, STR_WINDOW_TITLE_TIP}, {WWT_CLOSEBOX, 0, 179, 189, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP}, {WWT_RESIZE, 1, 0, 191, 43, 156, STR_NONE, STR_NONE}, - {WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VIEW_TIP}, - {WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_NEEDS_TIP}, - {WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_VISITED_RIDES_TIP}, - {WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_FINANCE_TIP}, - {WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_THOUGHTS_TIP}, - {WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_GUEST_ITEMS_TIP}, + {WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_VIEW_TIP}, + {WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_NEEDS_TIP}, + {WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_VISITED_RIDES_TIP}, + {WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_FINANCE_TIP}, + {WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_THOUGHTS_TIP}, + {WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_GUEST_ITEMS_TIP}, {WIDGETS_END}, }; @@ -849,27 +847,27 @@ static void window_guest_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dp } ebx += eax; - sint32 sprite_id = ebx | (peep->tshirt_colour << 19) | (peep->trousers_colour << 24) | 0xA0000000; + sint32 sprite_id = ebx | SPRITE_ID_PALETTE_COLOUR_2(peep->tshirt_colour, peep->trousers_colour); gfx_draw_sprite(&clip_dpi, sprite_id, x, y, 0); // If holding a balloon if (ebx >= 0x2A1D && ebx < 0x2A3D){ ebx += 32; - ebx |= (peep->balloon_colour << 19) | 0x20000000; + ebx |= SPRITE_ID_PALETTE_COLOUR_1(peep->balloon_colour); gfx_draw_sprite(&clip_dpi, ebx, x, y, 0); } // If holding umbrella if (ebx >= 0x2BBD && ebx < 0x2BDD){ ebx += 32; - ebx |= (peep->umbrella_colour << 19) | 0x20000000; + ebx |= SPRITE_ID_PALETTE_COLOUR_1(peep->umbrella_colour); gfx_draw_sprite(&clip_dpi, ebx, x, y, 0); } // If wearing hat if (ebx >= 0x29DD && ebx < 0x29FD){ ebx += 32; - ebx |= (peep->hat_colour << 19) | 0x20000000; + ebx |= SPRITE_ID_PALETTE_COLOUR_1(peep->hat_colour); gfx_draw_sprite(&clip_dpi, ebx, x, y, 0); } } @@ -1208,7 +1206,7 @@ void window_guest_overview_tool_update(rct_window* w, rct_widgetindex widgetInde uint32 imageId = g_peep_animation_entries[peep->sprite_type].sprite_animation[PEEP_ACTION_SPRITE_TYPE_UI].base_image; imageId += w->picked_peep_frame >> 2; - imageId |= (peep->tshirt_colour << 19) | (peep->trousers_colour << 24) | 0xA0000000; + imageId |= (peep->tshirt_colour << 19) | (peep->trousers_colour << 24) | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS; gPickupPeepImage = imageId; } @@ -2036,7 +2034,7 @@ static rct_string_id window_guest_inventory_format_item(rct_peep *peep, sint32 i // Special overrides switch (item) { case SHOP_ITEM_BALLOON: - set_format_arg(0, uint32, 0x20000000 | (peep->balloon_colour << 19) | ShopItemImage[item]); + set_format_arg(0, uint32, SPRITE_ID_PALETTE_COLOUR_1(peep->balloon_colour) | ShopItemImage[item]); break; case SHOP_ITEM_PHOTO: ride = get_ride(peep->photo1_ride_ref); @@ -2044,7 +2042,7 @@ static rct_string_id window_guest_inventory_format_item(rct_peep *peep, sint32 i set_format_arg(8, uint32, ride->name_arguments); break; case SHOP_ITEM_UMBRELLA: - set_format_arg(0, uint32, 0x20000000 | (peep->umbrella_colour << 19) | ShopItemImage[item]); + set_format_arg(0, uint32, SPRITE_ID_PALETTE_COLOUR_1(peep->umbrella_colour) | ShopItemImage[item]); break; case SHOP_ITEM_VOUCHER: switch (peep->voucher_type) { @@ -2071,10 +2069,10 @@ static rct_string_id window_guest_inventory_format_item(rct_peep *peep, sint32 i } break; case SHOP_ITEM_HAT: - set_format_arg(0, uint32, 0x20000000 | (peep->hat_colour << 19) | ShopItemImage[item]); + set_format_arg(0, uint32, SPRITE_ID_PALETTE_COLOUR_1(peep->hat_colour) | ShopItemImage[item]); break; case SHOP_ITEM_TSHIRT: - set_format_arg(0, uint32, 0x20000000 | (peep->tshirt_colour << 19) | ShopItemImage[item]); + set_format_arg(0, uint32, SPRITE_ID_PALETTE_COLOUR_1(peep->tshirt_colour) | ShopItemImage[item]); break; case SHOP_ITEM_PHOTO2: ride = get_ride(peep->photo2_ride_ref); diff --git a/src/openrct2/windows/guest_list.c b/src/openrct2/windows/guest_list.c index 3fa0c18565..c109092597 100644 --- a/src/openrct2/windows/guest_list.c +++ b/src/openrct2/windows/guest_list.c @@ -82,8 +82,8 @@ static rct_widget window_guest_list_widgets[] = { { WWT_DROPDOWN_BUTTON, 1, 284, 294, 60, 69, STR_DROPDOWN_GLYPH, STR_INFORMATION_TYPE_TIP }, // information type dropdown button { WWT_FLATBTN, 1, 297, 320, 46, 69, SPR_MAP, STR_SHOW_GUESTS_ON_MAP_TIP }, // map { WWT_FLATBTN, 1, 321, 344, 46, 69, SPR_TRACK_PEEP, STR_TRACKED_GUESTS_ONLY_TIP }, // tracking - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_INDIVIDUAL_GUESTS_TIP }, // tab 1 - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_SUMMARISED_GUESTS_TIP }, // tab 2 + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_INDIVIDUAL_GUESTS_TIP }, // tab 1 + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SUMMARISED_GUESTS_TIP }, // tab 2 { WWT_SCROLL, 1, 3, 346, 72, 326, SCROLL_BOTH, STR_NONE }, // guest list { WIDGETS_END }, }; diff --git a/src/openrct2/windows/land.c b/src/openrct2/windows/land.c index 4f49a70da7..95dfea3d26 100644 --- a/src/openrct2/windows/land.c +++ b/src/openrct2/windows/land.c @@ -51,8 +51,8 @@ static rct_widget window_land_widgets[] = { { WWT_FLATBTN, 1, 55, 78, 19, 42, SPR_PAINTBRUSH, STR_DISABLE_ELEVATION }, // paint mode { WWT_IMGBTN, 0, 27, 70, 48, 79, SPR_LAND_TOOL_SIZE_0, STR_NONE }, // preview box - { WWT_TRNBTN, 1, 28, 43, 49, 64, 0x20000000 | SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_LAND_TIP }, // decrement size - { WWT_TRNBTN, 1, 54, 69, 63, 78, 0x20000000 | SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_LAND_TIP }, // increment size + { WWT_TRNBTN, 1, 28, 43, 49, 64, IMAGE_TYPE_REMAP | SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_LAND_TIP }, // decrement size + { WWT_TRNBTN, 1, 54, 69, 63, 78, IMAGE_TYPE_REMAP | SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_LAND_TIP }, // increment size { WWT_FLATBTN, 1, 2, 48, 106, 141, 0xFFFFFFFF, STR_CHANGE_BASE_LAND_TIP }, // floor texture { WWT_FLATBTN, 1, 49, 95, 106, 141, 0xFFFFFFFF, STR_CHANGE_VERTICAL_LAND_TIP }, // wall texture diff --git a/src/openrct2/windows/land_rights.c b/src/openrct2/windows/land_rights.c index 078d1ff2c1..d222b2dc36 100644 --- a/src/openrct2/windows/land_rights.c +++ b/src/openrct2/windows/land_rights.c @@ -44,10 +44,10 @@ static rct_widget window_land_rights_widgets[] = { { WWT_CAPTION, 0, 1, 96, 1, 14, STR_LAND_RIGHTS, STR_WINDOW_TITLE_TIP }, // title bar { WWT_CLOSEBOX, 0, 85, 95, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // close x button { WWT_IMGBTN, 0, 27, 70, 17, 48, SPR_LAND_TOOL_SIZE_0, STR_NONE }, // preview box - { WWT_TRNBTN, 2, 28, 43, 18, 33, 0x20000000 | SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_LAND_RIGHTS_TIP }, // decrement size - { WWT_TRNBTN, 2, 54, 69, 32, 47, 0x20000000 | SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_LAND_RIGHTS_TIP }, // increment size - { WWT_FLATBTN, 2, 22, 45, 53, 76, 0x20000000 | SPR_BUY_LAND_RIGHTS, STR_BUY_LAND_RIGHTS_TIP }, // land rights - { WWT_FLATBTN, 2, 52, 75, 53, 76, 0x20000000 | SPR_BUY_CONSTRUCTION_RIGHTS, STR_BUY_CONSTRUCTION_RIGHTS_TIP }, // construction rights + { WWT_TRNBTN, 2, 28, 43, 18, 33, IMAGE_TYPE_REMAP | SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_LAND_RIGHTS_TIP }, // decrement size + { WWT_TRNBTN, 2, 54, 69, 32, 47, IMAGE_TYPE_REMAP | SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_LAND_RIGHTS_TIP }, // increment size + { WWT_FLATBTN, 2, 22, 45, 53, 76, IMAGE_TYPE_REMAP | SPR_BUY_LAND_RIGHTS, STR_BUY_LAND_RIGHTS_TIP }, // land rights + { WWT_FLATBTN, 2, 52, 75, 53, 76, IMAGE_TYPE_REMAP | SPR_BUY_CONSTRUCTION_RIGHTS, STR_BUY_CONSTRUCTION_RIGHTS_TIP }, // construction rights { WIDGETS_END }, }; diff --git a/src/openrct2/windows/map.c b/src/openrct2/windows/map.c index 48c3af4522..cb257b5ed4 100644 --- a/src/openrct2/windows/map.c +++ b/src/openrct2/windows/map.c @@ -74,8 +74,8 @@ static rct_widget window_map_widgets[] = { { WWT_CAPTION, 0, 1, 243, 1, 14, STR_MAP_LABEL, STR_WINDOW_TITLE_TIP }, { WWT_CLOSEBOX, 0, 232, 242, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, { WWT_RESIZE, 1, 0, 244, 43, 257, STR_NONE, STR_NONE }, - { WWT_COLOURBTN, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_PEOPLE_ON_MAP_TIP }, - { WWT_COLOURBTN, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_RIDES_STALLS_ON_MAP_TIP }, + { WWT_COLOURBTN, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_PEOPLE_ON_MAP_TIP }, + { WWT_COLOURBTN, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_RIDES_STALLS_ON_MAP_TIP }, { WWT_SCROLL, 1, 3, 241, 46, 225, SCROLL_BOTH, STR_NONE }, { WWT_SPINNER, 1, 104, 198, 229, 240, STR_MAP_SIZE_VALUE, STR_NONE }, { WWT_DROPDOWN_BUTTON, 1, 187, 197, 230, 234, STR_NUMERIC_UP, STR_NONE }, @@ -84,8 +84,8 @@ static rct_widget window_map_widgets[] = { { WWT_FLATBTN, 1, 4, 27, 1, 24, SPR_PARK_ENTRANCE, STR_BUILD_PARK_ENTRANCE_TIP }, { WWT_FLATBTN, 1, 28, 51, 1, 24, SPR_NONE, STR_SET_STARTING_POSITIONS_TIP }, { WWT_IMGBTN, 1, 4, 47, 17, 48, SPR_LAND_TOOL_SIZE_0, STR_NONE }, - { WWT_TRNBTN, 1, 5, 20, 18, 33, 0x20000000 | SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_LAND_TIP }, - { WWT_TRNBTN, 1, 31, 46, 32, 47, 0x20000000 | SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_LAND_TIP }, + { WWT_TRNBTN, 1, 5, 20, 18, 33, IMAGE_TYPE_REMAP | SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_LAND_TIP }, + { WWT_TRNBTN, 1, 31, 46, 32, 47, IMAGE_TYPE_REMAP | SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_LAND_TIP }, { WWT_CHECKBOX, 1, 58, 241, 197, 208, STR_LAND_OWNED, STR_SET_LAND_TO_BE_OWNED_TIP }, { WWT_CHECKBOX, 1, 58, 241, 197, 208, STR_CONSTRUCTION_RIGHTS_OWNED, STR_SET_CONSTRUCTION_RIGHTS_TO_BE_OWNED_TIP }, { WWT_CHECKBOX, 1, 58, 241, 197, 208, STR_LAND_SALE, STR_SET_LAND_TO_BE_AVAILABLE_TIP }, @@ -834,7 +834,7 @@ static void window_map_paint(rct_window *w, rct_drawpixelinfo *dpi) if (w->widgets[WIDX_PEOPLE_STARTING_POSITION].type != WWT_EMPTY) { x = w->x + w->widgets[WIDX_PEOPLE_STARTING_POSITION].left + 12; y = w->y + w->widgets[WIDX_PEOPLE_STARTING_POSITION].top + 18; - gfx_draw_sprite(dpi, 0xA0000000 | (COLOUR_LIGHT_BROWN << 24) | (COLOUR_BRIGHT_RED << 19) | SPR_6410, x, y, 0); + gfx_draw_sprite(dpi, IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS | (COLOUR_LIGHT_BROWN << 24) | (COLOUR_BRIGHT_RED << 19) | SPR_6410, x, y, 0); } if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode) { diff --git a/src/openrct2/windows/mapgen.c b/src/openrct2/windows/mapgen.c index 5af3ff7330..bf35550677 100644 --- a/src/openrct2/windows/mapgen.c +++ b/src/openrct2/windows/mapgen.c @@ -116,10 +116,10 @@ enum { { WWT_CAPTION, 0, 1, WW - 2, 1, 14, STR_MAPGEN_WINDOW_TITLE, STR_WINDOW_TITLE_TIP }, /* WIDX_TITLE */ \ { WWT_CLOSEBOX, 0, WW - 13, WW - 3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, /* WIDX_CLOSE */ \ { WWT_RESIZE, 1, 0, 299, 43, WH - 2, 0xFFFFFFFF, STR_NONE }, /* WIDX_PAGE_BACKGROUND */ \ - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_NONE }, /* WIDX_TAB_1 */ \ - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_NONE }, /* WIDX_TAB_2 */ \ - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_NONE }, /* WIDX_TAB_3 */ \ - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_NONE } /* WIDX_TAB_4 */ + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_NONE }, /* WIDX_TAB_1 */ \ + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_NONE }, /* WIDX_TAB_2 */ \ + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_NONE }, /* WIDX_TAB_3 */ \ + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_NONE } /* WIDX_TAB_4 */ static rct_widget MapWidgets[] = { SHARED_WIDGETS, diff --git a/src/openrct2/windows/multiplayer.c b/src/openrct2/windows/multiplayer.c index dcd5d0fa78..f02d38fd6d 100644 --- a/src/openrct2/windows/multiplayer.c +++ b/src/openrct2/windows/multiplayer.c @@ -61,10 +61,10 @@ enum WINDOW_MULTIPLAYER_WIDGET_IDX { { WWT_CAPTION, 0, 1, 338, 1, 14, STR_MULTIPLAYER, STR_WINDOW_TITLE_TIP }, /* title bar */ \ { WWT_CLOSEBOX, 0, 327, 337, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, /* close x button */ \ { WWT_RESIZE, 1, 0, 339, 43, 239, 0xFFFFFFFF, STR_NONE }, /* content panel */ \ - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_SHOW_SERVER_INFO_TIP }, /* tab */ \ - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_PLAYERS_TIP }, /* tab */ \ - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_GROUPS_TIP }, /* tab */ \ - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_OPTIONS_TIP } /* tab */ \ + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOW_SERVER_INFO_TIP }, /* tab */ \ + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_PLAYERS_TIP }, /* tab */ \ + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_GROUPS_TIP }, /* tab */ \ + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_OPTIONS_TIP } /* tab */ \ static rct_widget window_multiplayer_information_widgets[] = { MAIN_MULTIPLAYER_WIDGETS, diff --git a/src/openrct2/windows/new_ride.c b/src/openrct2/windows/new_ride.c index c6c160fed8..fe1925a37a 100644 --- a/src/openrct2/windows/new_ride.c +++ b/src/openrct2/windows/new_ride.c @@ -182,13 +182,13 @@ static rct_widget window_new_ride_widgets[] = { { WWT_CAPTION, 0, 1, 599, 1, 14, 0xFFFFFFFF, STR_WINDOW_TITLE_TIP }, { WWT_CLOSEBOX, 0, 588, 598, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, { WWT_RESIZE, 1, 0, 600, 43, 369, 0xFFFFFFFF, STR_NONE }, - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_TRANSPORT_RIDES_TIP }, - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_GENTLE_RIDES_TIP }, - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_ROLLER_COASTERS_TIP }, - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_THRILL_RIDES_TIP }, - { WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_WATER_RIDES_TIP }, - { WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_SHOPS_STALLS_TIP }, - { WWT_TAB, 1, 189, 219, 17, 43, 0x20000000 | SPR_TAB, STR_RESEARCH_AND_DEVELOPMENT_TIP }, + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_TRANSPORT_RIDES_TIP }, + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_GENTLE_RIDES_TIP }, + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_ROLLER_COASTERS_TIP }, + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_THRILL_RIDES_TIP }, + { WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_WATER_RIDES_TIP }, + { WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SHOPS_STALLS_TIP }, + { WWT_TAB, 1, 189, 219, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_RESEARCH_AND_DEVELOPMENT_TIP }, { WWT_SCROLL, 1, 3, 597, 46, 317, SCROLL_VERTICAL, STR_NONE }, { WWT_GROUPBOX, 2, 3, 292, 47, 116, STR_CURRENTLY_IN_DEVELOPMENT, STR_NONE }, { WWT_GROUPBOX, 2, 3, 292, 124, 188, STR_LAST_DEVELOPMENT, STR_NONE }, @@ -662,9 +662,9 @@ static void window_new_ride_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w static void window_new_ride_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w) { - window_new_ride_draw_tab_image(dpi, w, WINDOW_NEW_RIDE_PAGE_TRANSPORT, 0x20000000 | SPR_TAB_RIDES_TRANSPORT_0); + window_new_ride_draw_tab_image(dpi, w, WINDOW_NEW_RIDE_PAGE_TRANSPORT, IMAGE_TYPE_REMAP | SPR_TAB_RIDES_TRANSPORT_0); window_new_ride_draw_tab_image(dpi, w, WINDOW_NEW_RIDE_PAGE_GENTLE, SPR_TAB_RIDES_GENTLE_0); - window_new_ride_draw_tab_image(dpi, w, WINDOW_NEW_RIDE_PAGE_ROLLER_COASTER, 0x20000000 | SPR_TAB_RIDES_ROLLER_COASTERS_0); + window_new_ride_draw_tab_image(dpi, w, WINDOW_NEW_RIDE_PAGE_ROLLER_COASTER, IMAGE_TYPE_REMAP | SPR_TAB_RIDES_ROLLER_COASTERS_0); window_new_ride_draw_tab_image(dpi, w, WINDOW_NEW_RIDE_PAGE_THRILL, SPR_TAB_RIDES_THRILL_0); window_new_ride_draw_tab_image(dpi, w, WINDOW_NEW_RIDE_PAGE_WATER, SPR_TAB_RIDES_WATER_0); window_new_ride_draw_tab_image(dpi, w, WINDOW_NEW_RIDE_PAGE_SHOP, SPR_TAB_RIDES_SHOP_0); diff --git a/src/openrct2/windows/news_options.c b/src/openrct2/windows/news_options.c index 7992483e6f..b764902a9c 100644 --- a/src/openrct2/windows/news_options.c +++ b/src/openrct2/windows/news_options.c @@ -68,9 +68,9 @@ static rct_widget window_news_options_widgets[] = { { WWT_CAPTION, 0, 1, 398, 1, 14, STR_NOTIFICATION_SETTINGS, STR_WINDOW_TITLE_TIP }, // title bar { WWT_CLOSEBOX, 0, 387, 397, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // close x button { WWT_RESIZE, 1, 0, 399, 43, 299, 0xFFFFFFFF, STR_NONE }, // tab content panel - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_NONE }, // tab 1 - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_NONE }, // tab 2 - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_NONE }, // tab 2 + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_NONE }, // tab 1 + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_NONE }, // tab 2 + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_NONE }, // tab 2 { WWT_CHECKBOX, 2, 3, 349, 46, 59, STR_NONE, STR_NONE }, { WWT_CHECKBOX, 2, 0, 0, 0, 0, STR_NONE, STR_NONE }, diff --git a/src/openrct2/windows/options.c b/src/openrct2/windows/options.c index e7a7b03216..da4330bf02 100644 --- a/src/openrct2/windows/options.c +++ b/src/openrct2/windows/options.c @@ -191,10 +191,10 @@ enum WINDOW_OPTIONS_WIDGET_IDX { #define WH 332 #ifndef DISABLE_TWITCH - #define TWITCH_TAB_SPRITE 0x20000000 | SPR_TAB + #define TWITCH_TAB_SPRITE IMAGE_TYPE_REMAP | SPR_TAB #define TWITCH_TAB_COLOUR 1 #else - #define TWITCH_TAB_SPRITE 0x20000000 | SPR_G2_TAB_DISABLED + #define TWITCH_TAB_SPRITE IMAGE_TYPE_REMAP | SPR_G2_TAB_DISABLED #define TWITCH_TAB_COLOUR 0 #endif @@ -203,12 +203,12 @@ enum WINDOW_OPTIONS_WIDGET_IDX { { WWT_CAPTION, 0, 1, WW-2, 1, 14, STR_OPTIONS_TITLE, STR_WINDOW_TITLE_TIP }, \ { WWT_CLOSEBOX, 0, WW-13, WW-3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, \ { WWT_RESIZE, 1, 0, WW-1, 43, WH-1, 0xFFFFFFFF, STR_NONE }, \ - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_OPTIONS_DISPLAY_TIP }, \ - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_OPTIONS_RENDERING_TIP }, \ - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_OPTIONS_CULTURE_TIP }, \ - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_OPTIONS_AUDIO_TIP }, \ - { WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_OPTIONS_CONTROLS_AND_INTERFACE_TIP }, \ - { WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_OPTIONS_MISCELLANEOUS_TIP }, \ + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_OPTIONS_DISPLAY_TIP }, \ + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_OPTIONS_RENDERING_TIP }, \ + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_OPTIONS_CULTURE_TIP }, \ + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_OPTIONS_AUDIO_TIP }, \ + { WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_OPTIONS_CONTROLS_AND_INTERFACE_TIP }, \ + { WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_OPTIONS_MISCELLANEOUS_TIP }, \ { WWT_TAB, TWITCH_TAB_COLOUR, 189, 219, 17, 43, TWITCH_TAB_SPRITE, STR_OPTIONS_TWITCH_TIP } static rct_widget window_options_display_widgets[] = { diff --git a/src/openrct2/windows/park.c b/src/openrct2/windows/park.c index c43e4a394b..408b79e21c 100644 --- a/src/openrct2/windows/park.c +++ b/src/openrct2/windows/park.c @@ -87,13 +87,13 @@ enum WINDOW_PARK_WIDGET_IDX { { WWT_CAPTION, 0, 1, 228, 1, 14, STR_STRINGID, STR_WINDOW_TITLE_TIP }, /* title bar */ \ { WWT_CLOSEBOX, 0, 217, 227, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, /* close x button */ \ { WWT_RESIZE, 1, 0, 229, 43, 173, 0xFFFFFFFF, STR_NONE }, /* tab content panel */ \ - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_PARK_ENTRANCE_TAB_TIP }, /* tab 1 */ \ - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_PARK_RATING_TAB_TIP }, /* tab 2 */ \ - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_PARK_GUESTS_TAB_TIP }, /* tab 3 */ \ - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_PARK_PRICE_TAB_TIP }, /* tab 4 */ \ - { WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_PARK_STATS_TAB_TIP }, /* tab 5 */ \ - { WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_PARK_OBJECTIVE_TAB_TIP }, /* tab 6 */ \ - { WWT_TAB, 1, 189, 219, 17, 43, 0x20000000 | SPR_TAB, STR_PARK_AWARDS_TAB_TIP } /* tab 7 */ + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_PARK_ENTRANCE_TAB_TIP }, /* tab 1 */ \ + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_PARK_RATING_TAB_TIP }, /* tab 2 */ \ + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_PARK_GUESTS_TAB_TIP }, /* tab 3 */ \ + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_PARK_PRICE_TAB_TIP }, /* tab 4 */ \ + { WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_PARK_STATS_TAB_TIP }, /* tab 5 */ \ + { WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_PARK_OBJECTIVE_TAB_TIP }, /* tab 6 */ \ + { WWT_TAB, 1, 189, 219, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_PARK_AWARDS_TAB_TIP } /* tab 7 */ static rct_widget window_park_entrance_widgets[] = { MAIN_PARK_WIDGETS, @@ -885,7 +885,7 @@ static void window_park_init_viewport(rct_window *w) z = gParkEntrances[i].z + 32; r = get_current_rotation(); - xy = 0x40000000 | (y << 16) | x; + xy = IMAGE_TYPE_TRANSPARENT | (y << 16) | x; zr = (z << 16) | (r << 8); break; } diff --git a/src/openrct2/windows/player.c b/src/openrct2/windows/player.c index 6c83c28ba9..3a717620da 100644 --- a/src/openrct2/windows/player.c +++ b/src/openrct2/windows/player.c @@ -63,8 +63,8 @@ enum WINDOW_PLAYER_WIDGET_IDX { { WWT_CAPTION, 0, 1, 190, 1, 14, STR_STRING, STR_WINDOW_TITLE_TIP }, /* Title */ \ { WWT_CLOSEBOX, 0, 179, 189, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, /* Close x button */ \ { WWT_RESIZE, 1, 0, 191, 43, 156, 0xFFFFFFFF, STR_NONE }, /* Resize */ \ - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_NONE }, /* Tab 1 */ \ - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_NONE } /* Tab 2 */ + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_NONE }, /* Tab 1 */ \ + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_NONE } /* Tab 2 */ rct_widget window_player_overview_widgets[] = { WINDOW_PLAYER_COMMON_WIDGETS, diff --git a/src/openrct2/windows/research.c b/src/openrct2/windows/research.c index 83329a6191..5ff165e767 100644 --- a/src/openrct2/windows/research.c +++ b/src/openrct2/windows/research.c @@ -65,8 +65,8 @@ static rct_widget window_research_development_widgets[] = { { WWT_CAPTION, 0, 1, 298, 1, 14, STR_RESEARCH_AND_DEVELOPMENT, STR_WINDOW_TITLE_TIP }, { WWT_CLOSEBOX, 0, 287, 297, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, { WWT_RESIZE, 1, 0, 299, 43, 195, 0xFFFFFFFF, STR_NONE }, - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_RESEARCH_AND_DEVELOPMENT_TIP }, - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_RESEARCH_AND_DEVELOPMENT_TIP }, + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, { WWT_GROUPBOX, 2, 3, 292, 47, 116, STR_CURRENTLY_IN_DEVELOPMENT, STR_NONE }, { WWT_GROUPBOX, 2, 3, 292, 124, 188, STR_LAST_DEVELOPMENT, STR_NONE }, { WWT_FLATBTN, 2, 265, 288, 161, 184, 0xFFFFFFFF, STR_RESEARCH_SHOW_DETAILS_TIP }, @@ -78,8 +78,8 @@ static rct_widget window_research_funding_widgets[] = { { WWT_CAPTION, 0, 1, 318, 1, 14, STR_RESEARCH_FUNDING, STR_WINDOW_TITLE_TIP }, { WWT_CLOSEBOX, 0, 307, 317, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, { WWT_RESIZE, 1, 0, 319, 43, 206, 0xFFFFFFFF, STR_NONE }, - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_RESEARCH_AND_DEVELOPMENT_TIP }, - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_RESEARCH_AND_DEVELOPMENT_TIP }, + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_FINANCES_RESEARCH_TIP }, { WWT_GROUPBOX, 2, 3, 316, 47, 91, STR_RESEARCH_FUNDING_, STR_NONE }, { WWT_DROPDOWN, 2, 8, 167, 59, 70, 0xFFFFFFFF, STR_SELECT_LEVEL_OF_RESEARCH_AND_DEVELOPMENT }, { WWT_DROPDOWN_BUTTON, 2, 156, 166, 60, 69, STR_DROPDOWN_GLYPH, STR_SELECT_LEVEL_OF_RESEARCH_AND_DEVELOPMENT }, diff --git a/src/openrct2/windows/ride.c b/src/openrct2/windows/ride.c index 6929953bae..56dd329e73 100644 --- a/src/openrct2/windows/ride.c +++ b/src/openrct2/windows/ride.c @@ -196,16 +196,16 @@ enum { { WWT_CAPTION, 0, 1, 314, 1, 14, STR_RIDE_WINDOW_TITLE, STR_WINDOW_TITLE_TIP }, \ { WWT_CLOSEBOX, 0, 303, 313, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, \ { WWT_RESIZE, 1, 0, 315, 43, 179, 0xFFFFFFFF, STR_NONE }, \ - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_VIEW_OF_RIDE_ATTRACTION_TIP }, \ - { WWT_TAB, 1, 34, 64, 17, 46, 0x20000000 | SPR_TAB, STR_VEHICLE_DETAILS_AND_OPTIONS_TIP }, \ - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_OPERATING_OPTIONS_TIP }, \ - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_MAINTENANCE_OPTIONS_TIP }, \ - { WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_COLOUR_SCHEME_OPTIONS_TIP }, \ - { WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_SOUND_AND_MUSIC_OPTIONS_TIP }, \ - { WWT_TAB, 1, 189, 219, 17, 43, 0x20000000 | SPR_TAB, STR_MEASUREMENTS_AND_TEST_DATA_TIP }, \ - { WWT_TAB, 1, 220, 250, 17, 43, 0x20000000 | SPR_TAB, STR_GRAPHS_TIP }, \ - { WWT_TAB, 1, 251, 281, 17, 43, 0x20000000 | SPR_TAB, STR_INCOME_AND_COSTS_TIP }, \ - { WWT_TAB, 1, 282, 312, 17, 43, 0x20000000 | SPR_TAB, STR_CUSTOMER_INFORMATION_TIP } + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_VIEW_OF_RIDE_ATTRACTION_TIP }, \ + { WWT_TAB, 1, 34, 64, 17, 46, IMAGE_TYPE_REMAP | SPR_TAB, STR_VEHICLE_DETAILS_AND_OPTIONS_TIP }, \ + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_OPERATING_OPTIONS_TIP }, \ + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_MAINTENANCE_OPTIONS_TIP }, \ + { WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_COLOUR_SCHEME_OPTIONS_TIP }, \ + { WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_SOUND_AND_MUSIC_OPTIONS_TIP }, \ + { WWT_TAB, 1, 189, 219, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_MEASUREMENTS_AND_TEST_DATA_TIP }, \ + { WWT_TAB, 1, 220, 250, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_GRAPHS_TIP }, \ + { WWT_TAB, 1, 251, 281, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_INCOME_AND_COSTS_TIP }, \ + { WWT_TAB, 1, 282, 312, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_CUSTOMER_INFORMATION_TIP } // 0x009ADC34 static rct_widget window_ride_main_widgets[] = { @@ -3622,18 +3622,18 @@ static void window_ride_locate_mechanic(rct_window *w) * * rct2: 0x006B7D08 */ -static void window_ride_maintenance_draw_bar(rct_window *w, rct_drawpixelinfo *dpi, sint32 x, sint32 y, sint32 value, sint32 unk) +static void window_ride_maintenance_draw_bar(rct_window *w, rct_drawpixelinfo *dpi, sint32 x, sint32 y, sint32 value, sint32 colour) { gfx_fill_rect_inset(dpi, x, y, x + 149, y + 8, w->colours[1], INSET_RECT_F_30); - if (unk & (1u << 31)) { - unk &= ~(1u << 31); + if (colour & BAR_BLINK) { + colour &= ~BAR_BLINK; if (game_is_not_paused() && (gCurrentTicks & 8)) return; } value = ((186 * ((value * 2) & 0xFF)) >> 8) & 0xFF; if (value > 2) { - gfx_fill_rect_inset(dpi, x + 2, y + 1, x + value + 1, y + 7, unk, 0); + gfx_fill_rect_inset(dpi, x + 2, y + 1, x + value + 1, y + 7, colour, 0); } } @@ -3927,7 +3927,7 @@ static void window_ride_maintenance_paint(rct_window *w, rct_drawpixelinfo *dpi) rct_widget *widget = &window_ride_maintenance_widgets[WIDX_LOCATE_MECHANIC]; sint32 x = w->x + widget->left; sint32 y = w->y + widget->top; - gfx_draw_sprite(dpi, (gStaffMechanicColour << 24) | 0xA0000000 | SPR_MECHANIC, x, y, 0); + gfx_draw_sprite(dpi, (gStaffMechanicColour << 24) | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS | SPR_MECHANIC, x, y, 0); // Inspection label widget = &window_ride_maintenance_widgets[WIDX_INSPECTION_INTERVAL]; @@ -4041,7 +4041,7 @@ const uint8 window_ride_entrance_style_list[] = { static uint32 window_ride_get_colour_button_image(sint32 colour) { - return 0x60000000 | (colour << 19) | SPR_PALETTE_BTN; + return IMAGE_TYPE_TRANSPARENT | SPRITE_ID_PALETTE_COLOUR_1(colour) | SPR_PALETTE_BTN; } static sint32 window_ride_has_track_colour(rct_ride *ride, sint32 trackColour) @@ -4579,16 +4579,14 @@ static void window_ride_colour_paint(rct_window *w, rct_drawpixelinfo *dpi) } else { sint32 spriteIndex = TrackColourPreviews[ride->type].track; if (spriteIndex != 0) { - spriteIndex |= (trackColour.additional << 24) | (trackColour.main << 19); - spriteIndex |= 0xA0000000; + spriteIndex |= SPRITE_ID_PALETTE_COLOUR_2(trackColour.main, trackColour.additional); gfx_draw_sprite(dpi, spriteIndex, x, y, 0); } // Supports spriteIndex = TrackColourPreviews[ride->type].supports; if (spriteIndex != 0) { - spriteIndex |= trackColour.supports << 19; - spriteIndex |= 0x20000000; + spriteIndex |= SPRITE_ID_PALETTE_COLOUR_1(trackColour.supports); gfx_draw_sprite(dpi, spriteIndex, x, y, 0); } } @@ -4598,8 +4596,7 @@ static void window_ride_colour_paint(rct_window *w, rct_drawpixelinfo *dpi) uint8 shopItem = rideEntry->shop_item_secondary == 255 ? rideEntry->shop_item : rideEntry->shop_item_secondary; sint32 spriteIndex = ShopItemImage[shopItem]; - spriteIndex |= ride->track_colour_main[0] << 19; - spriteIndex |= 0x20000000; + spriteIndex |= SPRITE_ID_PALETTE_COLOUR_1(ride->track_colour_main[0]); gfx_draw_sprite(dpi, spriteIndex, x, y, 0); } @@ -4622,12 +4619,11 @@ static void window_ride_colour_paint(rct_window *w, rct_drawpixelinfo *dpi) const rct_ride_entrance_definition *entranceStyle = &RideEntranceDefinitions[ride->entrance_style]; sint32 terniaryColour = 0; - if (entranceStyle->base_image_id & 0x40000000) { - terniaryColour = 0x40000000 | (GlassPaletteIds[trackColour.main] << 19); + if (entranceStyle->base_image_id & IMAGE_TYPE_TRANSPARENT) { + terniaryColour = IMAGE_TYPE_TRANSPARENT | (GlassPaletteIds[trackColour.main] << 19); } - sint32 spriteIndex = (trackColour.additional << 24) | (trackColour.main << 19); - spriteIndex |= 0xA0000000; + sint32 spriteIndex = SPRITE_ID_PALETTE_COLOUR_2(trackColour.main, trackColour.additional); spriteIndex += RideEntranceDefinitions[ride->entrance_style].sprite_index; // Back diff --git a/src/openrct2/windows/ride_list.c b/src/openrct2/windows/ride_list.c index a28be3d180..92e52b55c1 100644 --- a/src/openrct2/windows/ride_list.c +++ b/src/openrct2/windows/ride_list.c @@ -62,9 +62,9 @@ static rct_widget window_ride_list_widgets[] = { { WWT_DROPDOWN, 1, 150, 273, 46, 57, 0xFFFFFFFF, STR_NONE }, // current information type { WWT_DROPDOWN_BUTTON, 1, 262, 272, 47, 56, STR_DROPDOWN_GLYPH, STR_RIDE_LIST_INFORMATION_TYPE_TIP }, // information type dropdown button { WWT_DROPDOWN_BUTTON, 1, 280, 333, 46, 57, STR_SORT, STR_RIDE_LIST_SORT_TIP }, // sort button - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_LIST_RIDES_TIP }, // tab 1 - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_LIST_SHOPS_AND_STALLS_TIP }, // tab 2 - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_LIST_KIOSKS_AND_FACILITIES_TIP }, // tab 3 + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_LIST_RIDES_TIP }, // tab 1 + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_LIST_SHOPS_AND_STALLS_TIP }, // tab 2 + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_LIST_KIOSKS_AND_FACILITIES_TIP }, // tab 3 { WWT_SCROLL, 1, 3, 336, 60, 236, SCROLL_VERTICAL, STR_NONE }, // list { WWT_IMGBTN, 1, 320, 333, 62, 75, SPR_G2_RCT1_CLOSE_BUTTON_0, STR_NONE }, { WWT_IMGBTN, 1, 320, 333, 76, 89, SPR_G2_RCT1_OPEN_BUTTON_0, STR_NONE }, diff --git a/src/openrct2/windows/scenery.c b/src/openrct2/windows/scenery.c index ad8193fcf6..289dd3cf25 100644 --- a/src/openrct2/windows/scenery.c +++ b/src/openrct2/windows/scenery.c @@ -170,7 +170,7 @@ static rct_widget window_scenery_widgets[] = { { WWT_TAB, 1, 468, 498, 17, 43, 0xFFFFFFFF, STR_STRING_DEFINED_TOOLTIP }, // 100000 0x009DE3D8 { WWT_TAB, 1, 468, 498, 17, 43, 0xFFFFFFFF, STR_STRING_DEFINED_TOOLTIP }, // 200000 0x009DE3E8 { WWT_TAB, 1, 468, 498, 17, 43, 0xFFFFFFFF, STR_STRING_DEFINED_TOOLTIP }, // 400000 0x009DE3F8 - { WWT_TAB, 1, 468, 498, 17, 43, 0x20000000 | SPR_TAB_QUESTION, STR_STRING_DEFINED_TOOLTIP }, // 800000 0x009DE408 + { WWT_TAB, 1, 468, 498, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB_QUESTION, STR_STRING_DEFINED_TOOLTIP }, // 800000 0x009DE408 { WWT_SCROLL, 1, 2, 608, 47, 126, SCROLL_VERTICAL, STR_NONE }, // 1000000 0x009DE418 { WWT_FLATBTN, 1, 609, 632, 44, 67, SPR_ROTATE_ARROW, STR_ROTATE_OBJECTS_90 }, // 2000000 0x009DE428 { WWT_FLATBTN, 1, 609, 632, 68, 91, SPR_PAINTBRUSH, STR_SCENERY_PAINTBRUSH_TIP }, // 4000000 0x009DE438 @@ -371,7 +371,7 @@ void init_scenery() if (tabIndex >= 19) continue; - tabWidget->image = get_scenery_group_entry(tabIndex)->image | 0x20000000; + tabWidget->image = get_scenery_group_entry(tabIndex)->image | IMAGE_TYPE_REMAP; } window_invalidate_by_class(WC_SCENERY); @@ -951,11 +951,11 @@ void window_scenery_invalidate(rct_window *w) } window_scenery_widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].image = - (gWindowSceneryPrimaryColour << 19) | 0x60000000 | SPR_PALETTE_BTN; + SPRITE_ID_PALETTE_COLOUR_1(gWindowSceneryPrimaryColour) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; window_scenery_widgets[WIDX_SCENERY_SECONDARY_COLOUR_BUTTON].image = - (gWindowScenerySecondaryColour << 19) | 0x60000000 | SPR_PALETTE_BTN; + SPRITE_ID_PALETTE_COLOUR_1(gWindowScenerySecondaryColour) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; window_scenery_widgets[WIDX_SCENERY_TERTIARY_COLOUR_BUTTON].image = - (gWindowSceneryTertiaryColour << 19) | 0x60000000 | SPR_PALETTE_BTN; + SPRITE_ID_PALETTE_COLOUR_1(gWindowSceneryTertiaryColour) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; window_scenery_widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].type = WWT_EMPTY; window_scenery_widgets[WIDX_SCENERY_SECONDARY_COLOUR_BUTTON].type = WWT_EMPTY; @@ -1141,7 +1141,7 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 sc if (currentSceneryGlobalId >= SCENERY_BANNERS_ID_MIN) { sceneryEntry = get_banner_entry(currentSceneryGlobalId - SCENERY_BANNERS_ID_MIN); uint32 imageId = sceneryEntry->image + gWindowSceneryRotation * 2; - imageId |= (gWindowSceneryPrimaryColour << 19) | 0x20000000; + imageId |= (gWindowSceneryPrimaryColour << 19) | IMAGE_TYPE_REMAP; gfx_draw_sprite(&clipdpi, imageId, 0x21, 0x28, w->colours[1]); gfx_draw_sprite(&clipdpi, imageId + 1, 0x21, 0x28, w->colours[1]); @@ -1149,7 +1149,7 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 sc else if (currentSceneryGlobalId >= SCENERY_LARGE_SCENERY_ID_MIN) { sceneryEntry = get_large_scenery_entry(currentSceneryGlobalId - SCENERY_LARGE_SCENERY_ID_MIN); uint32 imageId = sceneryEntry->image + gWindowSceneryRotation; - imageId |= (gWindowSceneryPrimaryColour << 19) | 0x20000000; + imageId |= (gWindowSceneryPrimaryColour << 19) | IMAGE_TYPE_REMAP; imageId |= (gWindowScenerySecondaryColour << 24) | IMAGE_TYPE_REMAP_2_PLUS; gfx_draw_sprite(&clipdpi, imageId, 0x21, 0, w->colours[1]); @@ -1161,7 +1161,7 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 sc uint16 spriteTop = (sceneryEntry->wall.height * 2) + 0x32; if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_GLASS) { - imageId |= (gWindowSceneryPrimaryColour << 19) | 0x20000000; + imageId |= (gWindowSceneryPrimaryColour << 19) | IMAGE_TYPE_REMAP; if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_SECONDARY_COLOUR) { imageId |= (gWindowScenerySecondaryColour << 24) | IMAGE_TYPE_REMAP_2_PLUS; @@ -1172,7 +1172,7 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 sc gfx_draw_sprite(&clipdpi, imageId, 0x2F, spriteTop, tertiaryColour); } else { - imageId |= (gWindowSceneryPrimaryColour << 19) | 0x20000000; + imageId |= (gWindowSceneryPrimaryColour << 19) | IMAGE_TYPE_REMAP; if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_SECONDARY_COLOUR) { imageId |= (gWindowScenerySecondaryColour << 24) | IMAGE_TYPE_REMAP_2_PLUS; @@ -1200,7 +1200,7 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 sc uint32 imageId = sceneryEntry->image + gWindowSceneryRotation; if (sceneryEntry->small_scenery.flags & SMALL_SCENERY_FLAG_HAS_PRIMARY_COLOUR) { - imageId |= (gWindowSceneryPrimaryColour << 19) | 0x20000000; + imageId |= (gWindowSceneryPrimaryColour << 19) | IMAGE_TYPE_REMAP; if (sceneryEntry->small_scenery.flags & SMALL_SCENERY_FLAG_HAS_SECONDARY_COLOUR) { imageId |= (gWindowScenerySecondaryColour << 24) | IMAGE_TYPE_REMAP_2_PLUS; diff --git a/src/openrct2/windows/sign.c b/src/openrct2/windows/sign.c index 1500f6cf49..f83de45189 100644 --- a/src/openrct2/windows/sign.c +++ b/src/openrct2/windows/sign.c @@ -339,8 +339,8 @@ static void window_sign_invalidate(rct_window *w) text_colour_btn->type = WWT_COLOURBTN; } - main_colour_btn->image = (w->list_information_type << 19) | 0x60000000 | SPR_PALETTE_BTN; - text_colour_btn->image = (w->var_492 << 19) | 0x60000000 | SPR_PALETTE_BTN; + main_colour_btn->image = SPRITE_ID_PALETTE_COLOUR_1(w->list_information_type) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; + text_colour_btn->image = SPRITE_ID_PALETTE_COLOUR_1(w->var_492) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; } /** @@ -571,6 +571,6 @@ static void window_sign_small_invalidate(rct_window *w) text_colour_btn->type = WWT_COLOURBTN; } - main_colour_btn->image = (w->list_information_type << 19) | 0x60000000 | SPR_PALETTE_BTN; - text_colour_btn->image = (w->var_492 << 19) | 0x60000000 | SPR_PALETTE_BTN; + main_colour_btn->image = SPRITE_ID_PALETTE_COLOUR_1(w->list_information_type) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; + text_colour_btn->image = SPRITE_ID_PALETTE_COLOUR_1(w->var_492) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; } diff --git a/src/openrct2/windows/staff.c b/src/openrct2/windows/staff.c index 9dd9be6f9b..953b84a8a4 100644 --- a/src/openrct2/windows/staff.c +++ b/src/openrct2/windows/staff.c @@ -72,10 +72,10 @@ rct_widget window_staff_overview_widgets[] = { { WWT_CAPTION, 0, 1, WW - 2, 1, 14, STR_STRINGID, STR_WINDOW_TITLE_TIP }, // Title { WWT_CLOSEBOX, 0, WW - 13, WW - 3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // Close x button { WWT_RESIZE, 1, 0, WW - 1, 43, WH - 1, 0xFFFFFFFF, STR_NONE }, // Resize - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_STAFF_OVERVIEW_TIP },// Tab 1 - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_STAFF_OPTIONS_TIP}, // Tab 2 - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_STAFF_STATS_TIP}, // Tab 3 - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_NONE}, // Tab 4 + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STAFF_OVERVIEW_TIP },// Tab 1 + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STAFF_OPTIONS_TIP}, // Tab 2 + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STAFF_STATS_TIP}, // Tab 3 + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_NONE}, // Tab 4 { WWT_VIEWPORT, 1, 3, WW - 26, 47, WH - 14,0xFFFFFFFF, STR_NONE}, // Viewport { WWT_12, 1, 3, WW - 26, WH - 13, WH - 3, 0xFFFFFFFF, STR_NONE }, // Label at bottom of viewport { WWT_FLATBTN, 1, WW - 25, WW - 2, 45, 68, SPR_PICKUP_BTN, STR_PICKUP_TIP}, // Pickup Button @@ -92,10 +92,10 @@ rct_widget window_staff_options_widgets[] = { { WWT_CAPTION, 0, 1, WW - 2, 1, 14, STR_STRINGID, STR_WINDOW_TITLE_TIP }, // Title { WWT_CLOSEBOX, 0, WW - 13, WW - 3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // Close x button { WWT_RESIZE, 1, 0, WW - 1, 43, WH - 1, 0xFFFFFFFF, STR_NONE }, // Resize - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_STAFF_OVERVIEW_TIP },// Tab 1 - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_STAFF_OPTIONS_TIP}, // Tab 2 - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_STAFF_STATS_TIP}, // Tab 3 - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_NONE}, // Tab 4 + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STAFF_OVERVIEW_TIP },// Tab 1 + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STAFF_OPTIONS_TIP}, // Tab 2 + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STAFF_STATS_TIP}, // Tab 3 + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_NONE}, // Tab 4 { WWT_CHECKBOX, 1, 5, WW - 6, 50, 61, 0xFFFFFFFF, STR_NONE}, // Checkbox 1 { WWT_CHECKBOX, 1, 5, WW - 6, 67, 78, 0xFFFFFFFF, STR_NONE }, // Checkbox 2 { WWT_CHECKBOX, 1, 5, WW - 6, 84, 95, 0xFFFFFFFF, STR_NONE}, // Checkbox 3 @@ -111,10 +111,10 @@ rct_widget window_staff_stats_widgets[] = { { WWT_CAPTION, 0, 1, WW - 2, 1, 14, STR_STRINGID, STR_WINDOW_TITLE_TIP }, // Title { WWT_CLOSEBOX, 0, WW - 13, WW - 3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // Close x button { WWT_RESIZE, 1, 0, WW - 1, 43, WH - 1, 0xFFFFFFFF, STR_NONE }, // Resize - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_STAFF_OVERVIEW_TIP },// Tab 1 - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_STAFF_OPTIONS_TIP}, // Tab 2 - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_STAFF_STATS_TIP}, // Tab 3 - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_NONE}, // Tab 4 + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STAFF_OVERVIEW_TIP },// Tab 1 + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STAFF_OPTIONS_TIP}, // Tab 2 + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STAFF_STATS_TIP}, // Tab 3 + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_NONE}, // Tab 4 { WIDGETS_END }, }; @@ -1008,27 +1008,27 @@ void window_staff_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dpi) } ebx += eax; - sint32 sprite_id = ebx | (peep->tshirt_colour << 19) | (peep->trousers_colour << 24) | 0xA0000000; + sint32 sprite_id = ebx | SPRITE_ID_PALETTE_COLOUR_2(peep->tshirt_colour , peep->trousers_colour); gfx_draw_sprite(&clip_dpi, sprite_id, x, y, 0); // If holding a balloon if (ebx >= 0x2A1D && ebx < 0x2A3D){ ebx += 32; - ebx |= (peep->balloon_colour << 19) | 0x20000000; + ebx |= SPRITE_ID_PALETTE_COLOUR_1(peep->balloon_colour); gfx_draw_sprite(&clip_dpi, ebx, x, y, 0); } // If holding umbrella if (ebx >= 0x2BBD && ebx < 0x2BDD){ ebx += 32; - ebx |= (peep->umbrella_colour << 19) | 0x20000000; + ebx |= SPRITE_ID_PALETTE_COLOUR_1(peep->umbrella_colour); gfx_draw_sprite(&clip_dpi, ebx, x, y, 0); } // If wearing hat if (ebx >= 0x29DD && ebx < 0x29FD){ ebx += 32; - ebx |= (peep->hat_colour << 19) | 0x20000000; + ebx |= SPRITE_ID_PALETTE_COLOUR_1(peep->hat_colour); gfx_draw_sprite(&clip_dpi, ebx, x, y, 0); } } @@ -1135,7 +1135,7 @@ void window_staff_overview_tool_update(rct_window* w, rct_widgetindex widgetInde uint32 imageId = g_peep_animation_entries[peep->sprite_type].sprite_animation[PEEP_ACTION_SPRITE_TYPE_UI].base_image; imageId += w->picked_peep_frame >> 2; - imageId |= (peep->tshirt_colour << 19) | (peep->trousers_colour << 24) | 0xA0000000; + imageId |= (peep->tshirt_colour << 19) | (peep->trousers_colour << 24) | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS; gPickupPeepImage = imageId; } diff --git a/src/openrct2/windows/staff_list.c b/src/openrct2/windows/staff_list.c index b2cc27672b..d076fd0c97 100644 --- a/src/openrct2/windows/staff_list.c +++ b/src/openrct2/windows/staff_list.c @@ -115,10 +115,10 @@ static rct_widget window_staff_list_widgets[] = { { WWT_CAPTION, 0, 1, 318, 1, 14, STR_STAFF, STR_WINDOW_TITLE_TIP }, // title bar { WWT_CLOSEBOX, 0, 307, 317, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // close button { WWT_RESIZE, 1, 0, 319, 43, 269, 0xFFFFFFFF, STR_NONE }, // tab content panel - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_STAFF_HANDYMEN_TAB_TIP }, // handymen tab - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_STAFF_MECHANICS_TAB_TIP }, // mechanics tab - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_STAFF_SECURITY_TAB_TIP }, // security guards tab - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_STAFF_ENTERTAINERS_TAB_TIP }, // entertainers tab + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STAFF_HANDYMEN_TAB_TIP }, // handymen tab + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STAFF_MECHANICS_TAB_TIP }, // mechanics tab + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STAFF_SECURITY_TAB_TIP }, // security guards tab + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_STAFF_ENTERTAINERS_TAB_TIP }, // entertainers tab { WWT_SCROLL, 1, 3, 316, 72, 266, SCROLL_BOTH, STR_NONE }, // staff list { WWT_COLOURBTN, 1, 130, 141, 58, 69, STR_NONE, STR_UNIFORM_COLOUR_TIP }, // uniform colour picker { WWT_DROPDOWN_BUTTON, 0, WW - 155, WW - 11, 17, 29, STR_NONE, STR_HIRE_STAFF_TIP }, // hire button @@ -508,7 +508,7 @@ void window_staff_list_invalidate(rct_window *w) if (tabIndex < 3) { window_staff_list_widgets[WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER].type = WWT_COLOURBTN; window_staff_list_widgets[WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER].image = - ((uint32)staff_get_colour(tabIndex) << 19) | 0x60000000 | SPR_PALETTE_BTN; + SPRITE_ID_PALETTE_COLOUR_1((uint32)staff_get_colour(tabIndex)) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; } if (_quick_fire_mode) w->pressed_widgets |= (1ULL << WIDX_STAFF_LIST_QUICK_FIRE); @@ -551,8 +551,7 @@ void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi) // Handymen tab image i = (selectedTab == 0 ? (w->list_information_type & ~3) : 0); i += g_peep_animation_entries[PEEP_SPRITE_TYPE_HANDYMAN].sprite_animation->base_image + 1; - i |= 0x20000000; - i |= gStaffHandymanColour << 19; + i |= SPRITE_ID_PALETTE_COLOUR_1(gStaffHandymanColour); gfx_draw_sprite( dpi, i, @@ -563,8 +562,7 @@ void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi) // Mechanic tab image i = (selectedTab == 1 ? (w->list_information_type & ~3) : 0); i += g_peep_animation_entries[PEEP_SPRITE_TYPE_MECHANIC].sprite_animation->base_image + 1; - i |= 0x20000000; - i |= gStaffMechanicColour << 19; + i |= SPRITE_ID_PALETTE_COLOUR_1(gStaffMechanicColour); gfx_draw_sprite( dpi, i, @@ -575,8 +573,7 @@ void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi) // Security tab image i = (selectedTab == 2 ? (w->list_information_type & ~3) : 0); i += g_peep_animation_entries[PEEP_SPRITE_TYPE_SECURITY].sprite_animation->base_image + 1; - i |= 0x20000000; - i |= gStaffSecurityColour << 19; + i |= SPRITE_ID_PALETTE_COLOUR_1(gStaffSecurityColour); gfx_draw_sprite( dpi, i, diff --git a/src/openrct2/windows/themes.c b/src/openrct2/windows/themes.c index 1e752cc692..ca9ed8d89c 100644 --- a/src/openrct2/windows/themes.c +++ b/src/openrct2/windows/themes.c @@ -121,15 +121,15 @@ static rct_widget window_themes_widgets[] = { { WWT_CAPTION, 0, 1, 318, 1, 14, STR_THEMES_TITLE, STR_WINDOW_TITLE_TIP }, // title bar { WWT_CLOSEBOX, 0, 307, 317, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // close button { WWT_RESIZE, 1, 0, 319, 43, 106, 0xFFFFFFFF, STR_NONE }, // tab content panel - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_THEMES_TAB_SETTINGS_TIP }, // settings tab - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_THEMES_TAB_MAIN_TIP }, // main ui tab - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_THEMES_TAB_PARK_TIP }, // park tab - { WWT_TAB, 1, 96, 126, 17, 43, 0x20000000 | SPR_TAB, STR_THEMES_TAB_TOOLS_TIP }, // tools tab - { WWT_TAB, 1, 127, 157, 17, 43, 0x20000000 | SPR_TAB, STR_THEMES_TAB_RIDES_AND_GUESTS_TIP }, // rides and peeps tab - { WWT_TAB, 1, 158, 188, 17, 43, 0x20000000 | SPR_TAB, STR_THEMES_TAB_EDITORS_TIP }, // editors tab - { WWT_TAB, 1, 189, 219, 17, 43, 0x20000000 | SPR_TAB, STR_THEMES_TAB_MISC_TIP }, // misc tab - { WWT_TAB, 1, 220, 250, 17, 43, 0x20000000 | SPR_TAB, STR_THEMES_TAB_PROMPTS_TIP }, // prompts tab - { WWT_TAB, 1, 251, 281, 17, 43, 0x20000000 | SPR_TAB, STR_THEMES_TAB_FEATURES_TIP }, // features tab + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_THEMES_TAB_SETTINGS_TIP }, // settings tab + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_THEMES_TAB_MAIN_TIP }, // main ui tab + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_THEMES_TAB_PARK_TIP }, // park tab + { WWT_TAB, 1, 96, 126, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_THEMES_TAB_TOOLS_TIP }, // tools tab + { WWT_TAB, 1, 127, 157, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_THEMES_TAB_RIDES_AND_GUESTS_TIP }, // rides and peeps tab + { WWT_TAB, 1, 158, 188, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_THEMES_TAB_EDITORS_TIP }, // editors tab + { WWT_TAB, 1, 189, 219, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_THEMES_TAB_MISC_TIP }, // misc tab + { WWT_TAB, 1, 220, 250, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_THEMES_TAB_PROMPTS_TIP }, // prompts tab + { WWT_TAB, 1, 251, 281, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_THEMES_TAB_FEATURES_TIP }, // features tab { WWT_DROPDOWN, 1, 125, 299, 60, 71, STR_NONE, STR_NONE }, // Preset colour schemes { WWT_DROPDOWN_BUTTON, 1, 288, 298, 61, 70, STR_DROPDOWN_GLYPH, STR_NONE }, { WWT_DROPDOWN_BUTTON, 1, 10, 100, 82, 93, STR_TITLE_EDITOR_ACTION_DUPLICATE, STR_THEMES_ACTION_DUPLICATE_TIP }, // Duplicate button @@ -837,9 +837,9 @@ void window_themes_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32 scr gfx_draw_string_left(dpi, theme_desc_get_name(wc), NULL, w->colours[1], 2, y + 4); uint8 colour = theme_get_colour(wc, j); - uint32 image = ((colour & ~COLOUR_FLAG_TRANSLUCENT) << 19) | 0x60000000 | SPR_PALETTE_BTN; + uint32 image = SPRITE_ID_PALETTE_COLOUR_1(colour & ~COLOUR_FLAG_TRANSLUCENT) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN; if (i == _colour_index_1 && j == _colour_index_2) { - image = ((colour & ~COLOUR_FLAG_TRANSLUCENT) << 19) | 0x60000000 | SPR_PALETTE_BTN_PRESSED; + image = SPRITE_ID_PALETTE_COLOUR_1(colour & ~COLOUR_FLAG_TRANSLUCENT) | IMAGE_TYPE_TRANSPARENT | SPR_PALETTE_BTN_PRESSED; } gfx_draw_sprite(dpi, image, _button_offset_x + 12 * j, y + _button_offset_y, 0); diff --git a/src/openrct2/windows/title_editor.c b/src/openrct2/windows/title_editor.c index 97bbe6ed90..02e2512367 100644 --- a/src/openrct2/windows/title_editor.c +++ b/src/openrct2/windows/title_editor.c @@ -156,9 +156,9 @@ static rct_widget window_title_editor_widgets[] = { { WWT_CAPTION, 0, 1, WW-2, 1, 14, STR_TITLE_EDITOR_TITLE, STR_WINDOW_TITLE_TIP }, // title bar { WWT_CLOSEBOX, 0, WW-13, WW-3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // close button { WWT_RESIZE, 1, 0, WW-1, 43, WH2-1, 0xFFFFFFFF, STR_NONE }, // tab content panel - { WWT_TAB, 1, 3, 33, 17, 43, 0x20000000 | SPR_TAB, STR_THEMES_TAB_SETTINGS_TIP }, // presets tab - { WWT_TAB, 1, 34, 64, 17, 43, 0x20000000 | SPR_TAB, STR_TITLE_EDITOR_SAVES_TAB_TIP }, // saves tab - { WWT_TAB, 1, 65, 95, 17, 43, 0x20000000 | SPR_TAB, STR_TITLE_EDITOR_SCRIPT_TAB_TIP }, // script tab + { WWT_TAB, 1, 3, 33, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_THEMES_TAB_SETTINGS_TIP }, // presets tab + { WWT_TAB, 1, 34, 64, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_TITLE_EDITOR_SAVES_TAB_TIP }, // saves tab + { WWT_TAB, 1, 65, 95, 17, 43, IMAGE_TYPE_REMAP | SPR_TAB, STR_TITLE_EDITOR_SCRIPT_TAB_TIP }, // script tab { WWT_SCROLL, 1, BX+BW+9,WW-4, 48, WH-4, SCROLL_BOTH, STR_NONE }, // command/save list // Presets Tab diff --git a/src/openrct2/windows/title_scenarioselect.c b/src/openrct2/windows/title_scenarioselect.c index 9d9c1c2e7f..d272a46103 100644 --- a/src/openrct2/windows/title_scenarioselect.c +++ b/src/openrct2/windows/title_scenarioselect.c @@ -70,14 +70,14 @@ static rct_widget window_scenarioselect_widgets[] = { { WWT_CAPTION, 0, 1, 732, 1, 14, STR_SELECT_SCENARIO, STR_WINDOW_TITLE_TIP }, // title bar { WWT_CLOSEBOX, 0, 721, 731, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // close x button { WWT_IMGBTN, 1, 0, 733, 50, 333, 0xFFFFFFFF, STR_NONE }, // tab content panel - { WWT_TAB, 1, 3, 93, 17, 50, 0x20000000 | SPR_TAB_LARGE, STR_NONE }, // tab 1 - { WWT_TAB, 1, 94, 184, 17, 50, 0x20000000 | SPR_TAB_LARGE, STR_NONE }, // tab 2 - { WWT_TAB, 1, 185, 275, 17, 50, 0x20000000 | SPR_TAB_LARGE, STR_NONE }, // tab 3 - { WWT_TAB, 1, 276, 366, 17, 50, 0x20000000 | SPR_TAB_LARGE, STR_NONE }, // tab 4 - { WWT_TAB, 1, 367, 457, 17, 50, 0x20000000 | SPR_TAB_LARGE, STR_NONE }, // tab 5 - { WWT_TAB, 1, 458, 593, 17, 50, 0x20000000 | SPR_TAB_LARGE, STR_NONE }, // tab 6 - { WWT_TAB, 1, 594, 684, 17, 50, 0x20000000 | SPR_TAB_LARGE, STR_NONE }, // tab 7 - { WWT_TAB, 1, 685, 775, 17, 50, 0x20000000 | SPR_TAB_LARGE, STR_NONE }, // tab 8 + { WWT_TAB, 1, 3, 93, 17, 50, IMAGE_TYPE_REMAP | SPR_TAB_LARGE, STR_NONE }, // tab 1 + { WWT_TAB, 1, 94, 184, 17, 50, IMAGE_TYPE_REMAP | SPR_TAB_LARGE, STR_NONE }, // tab 2 + { WWT_TAB, 1, 185, 275, 17, 50, IMAGE_TYPE_REMAP | SPR_TAB_LARGE, STR_NONE }, // tab 3 + { WWT_TAB, 1, 276, 366, 17, 50, IMAGE_TYPE_REMAP | SPR_TAB_LARGE, STR_NONE }, // tab 4 + { WWT_TAB, 1, 367, 457, 17, 50, IMAGE_TYPE_REMAP | SPR_TAB_LARGE, STR_NONE }, // tab 5 + { WWT_TAB, 1, 458, 593, 17, 50, IMAGE_TYPE_REMAP | SPR_TAB_LARGE, STR_NONE }, // tab 6 + { WWT_TAB, 1, 594, 684, 17, 50, IMAGE_TYPE_REMAP | SPR_TAB_LARGE, STR_NONE }, // tab 7 + { WWT_TAB, 1, 685, 775, 17, 50, IMAGE_TYPE_REMAP | SPR_TAB_LARGE, STR_NONE }, // tab 8 { WWT_SCROLL, 1, 3, 555, 54, 329, SCROLL_VERTICAL, STR_NONE }, // level list { WIDGETS_END }, }; diff --git a/src/openrct2/windows/top_toolbar.c b/src/openrct2/windows/top_toolbar.c index af09f78bb3..7d1506b32b 100644 --- a/src/openrct2/windows/top_toolbar.c +++ b/src/openrct2/windows/top_toolbar.c @@ -191,31 +191,31 @@ static const sint32 right_aligned_widgets_order[] = { #pragma endregion static rct_widget window_top_toolbar_widgets[] = { - { WWT_TRNBTN, 0, 0x0000, 0x001D, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_PAUSE, STR_PAUSE_GAME_TIP }, // Pause - { WWT_TRNBTN, 0, 0x001E + 30, 0x003B + 30, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_FILE, STR_DISC_AND_GAME_OPTIONS_TIP }, // File menu - { WWT_TRNBTN, 0, 0x00DC + 30, 0x00F9 + 30, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_G2_TOOLBAR_MUTE, STR_TOOLBAR_MUTE_TIP }, // Mute - { WWT_TRNBTN, 1, 0x0046 + 30, 0x0063 + 30, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_ZOOM_OUT, STR_ZOOM_OUT_TIP }, // Zoom out - { WWT_TRNBTN, 1, 0x0064 + 30, 0x0081 + 30, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_ZOOM_IN, STR_ZOOM_IN_TIP }, // Zoom in - { WWT_TRNBTN, 1, 0x0082 + 30, 0x009F + 30, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_ROTATE, STR_ROTATE_TIP }, // Rotate camera - { WWT_TRNBTN, 1, 0x00A0 + 30, 0x00BD + 30, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_VIEW, STR_VIEW_OPTIONS_TIP }, // Transparency menu - { WWT_TRNBTN, 1, 0x00BE + 30, 0x00DB + 30, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_MAP, STR_SHOW_MAP_TIP }, // Map - { WWT_TRNBTN, 2, 0x010B, 0x0128, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_LAND, STR_ADJUST_LAND_TIP }, // Land - { WWT_TRNBTN, 2, 0x0129, 0x0146, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_WATER, STR_ADJUST_WATER_TIP }, // Water - { WWT_TRNBTN, 2, 0x0147, 0x0164, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_SCENERY, STR_PLACE_SCENERY_TIP }, // Scenery - { WWT_TRNBTN, 2, 0x0165, 0x0182, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_FOOTPATH, STR_BUILD_FOOTPATH_TIP }, // Path - { WWT_TRNBTN, 2, 0x0183, 0x01A0, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_CONSTRUCT_RIDE, STR_BUILD_RIDE_TIP }, // Construct ride - { WWT_TRNBTN, 3, 0x01EA, 0x0207, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_RIDES, STR_RIDES_IN_PARK_TIP }, // Rides - { WWT_TRNBTN, 3, 0x0208, 0x0225, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_PARK, STR_PARK_INFORMATION_TIP }, // Park - { WWT_TRNBTN, 3, 0x0226, 0x0243, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TAB_TOOLBAR, STR_STAFF_TIP }, // Staff - { WWT_TRNBTN, 3, 0x0230, 0x024D, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_GUESTS, STR_GUESTS_TIP }, // Guests - { WWT_TRNBTN, 2, 0x0230, 0x024D, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TOOLBAR_CLEAR_SCENERY, STR_CLEAR_SCENERY_TIP }, // Clear scenery - { WWT_TRNBTN, 0, 0x001E, 0x003B, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TAB_TOOLBAR, STR_GAME_SPEED_TIP }, // Fast forward - { WWT_TRNBTN, 0, 0x001E, 0x003B, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TAB_TOOLBAR, STR_CHEATS_TIP }, // Cheats - { WWT_TRNBTN, 0, 0x001E, 0x003B, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TAB_TOOLBAR, STR_DEBUG_TIP }, // Debug - { WWT_TRNBTN, 3, 0x001E, 0x003B, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TAB_TOOLBAR, STR_SCENARIO_OPTIONS_FINANCIAL_TIP },// Finances - { WWT_TRNBTN, 3, 0x001E, 0x003B, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TAB_TOOLBAR, STR_FINANCES_RESEARCH_TIP }, // Research - { WWT_TRNBTN, 3, 0x001E, 0x003B, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TAB_TOOLBAR, STR_SHOW_RECENT_MESSAGES_TIP }, // News - { WWT_TRNBTN, 0, 0x001E, 0x003B, 0, TOP_TOOLBAR_HEIGHT, 0x20000000 | SPR_TAB_TOOLBAR, STR_SHOW_MULTIPLAYER_STATUS_TIP }, // Network + { WWT_TRNBTN, 0, 0x0000, 0x001D, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_PAUSE, STR_PAUSE_GAME_TIP }, // Pause + { WWT_TRNBTN, 0, 0x001E + 30, 0x003B + 30, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_FILE, STR_DISC_AND_GAME_OPTIONS_TIP }, // File menu + { WWT_TRNBTN, 0, 0x00DC + 30, 0x00F9 + 30, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_G2_TOOLBAR_MUTE, STR_TOOLBAR_MUTE_TIP }, // Mute + { WWT_TRNBTN, 1, 0x0046 + 30, 0x0063 + 30, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_ZOOM_OUT, STR_ZOOM_OUT_TIP }, // Zoom out + { WWT_TRNBTN, 1, 0x0064 + 30, 0x0081 + 30, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_ZOOM_IN, STR_ZOOM_IN_TIP }, // Zoom in + { WWT_TRNBTN, 1, 0x0082 + 30, 0x009F + 30, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_ROTATE, STR_ROTATE_TIP }, // Rotate camera + { WWT_TRNBTN, 1, 0x00A0 + 30, 0x00BD + 30, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_VIEW, STR_VIEW_OPTIONS_TIP }, // Transparency menu + { WWT_TRNBTN, 1, 0x00BE + 30, 0x00DB + 30, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_MAP, STR_SHOW_MAP_TIP }, // Map + { WWT_TRNBTN, 2, 0x010B, 0x0128, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_LAND, STR_ADJUST_LAND_TIP }, // Land + { WWT_TRNBTN, 2, 0x0129, 0x0146, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_WATER, STR_ADJUST_WATER_TIP }, // Water + { WWT_TRNBTN, 2, 0x0147, 0x0164, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_SCENERY, STR_PLACE_SCENERY_TIP }, // Scenery + { WWT_TRNBTN, 2, 0x0165, 0x0182, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_FOOTPATH, STR_BUILD_FOOTPATH_TIP }, // Path + { WWT_TRNBTN, 2, 0x0183, 0x01A0, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_CONSTRUCT_RIDE, STR_BUILD_RIDE_TIP }, // Construct ride + { WWT_TRNBTN, 3, 0x01EA, 0x0207, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_RIDES, STR_RIDES_IN_PARK_TIP }, // Rides + { WWT_TRNBTN, 3, 0x0208, 0x0225, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_PARK, STR_PARK_INFORMATION_TIP }, // Park + { WWT_TRNBTN, 3, 0x0226, 0x0243, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TAB_TOOLBAR, STR_STAFF_TIP }, // Staff + { WWT_TRNBTN, 3, 0x0230, 0x024D, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_GUESTS, STR_GUESTS_TIP }, // Guests + { WWT_TRNBTN, 2, 0x0230, 0x024D, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TOOLBAR_CLEAR_SCENERY, STR_CLEAR_SCENERY_TIP }, // Clear scenery + { WWT_TRNBTN, 0, 0x001E, 0x003B, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TAB_TOOLBAR, STR_GAME_SPEED_TIP }, // Fast forward + { WWT_TRNBTN, 0, 0x001E, 0x003B, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TAB_TOOLBAR, STR_CHEATS_TIP }, // Cheats + { WWT_TRNBTN, 0, 0x001E, 0x003B, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TAB_TOOLBAR, STR_DEBUG_TIP }, // Debug + { WWT_TRNBTN, 3, 0x001E, 0x003B, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TAB_TOOLBAR, STR_SCENARIO_OPTIONS_FINANCIAL_TIP },// Finances + { WWT_TRNBTN, 3, 0x001E, 0x003B, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TAB_TOOLBAR, STR_FINANCES_RESEARCH_TIP }, // Research + { WWT_TRNBTN, 3, 0x001E, 0x003B, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TAB_TOOLBAR, STR_SHOW_RECENT_MESSAGES_TIP }, // News + { WWT_TRNBTN, 0, 0x001E, 0x003B, 0, TOP_TOOLBAR_HEIGHT, IMAGE_TYPE_REMAP | SPR_TAB_TOOLBAR, STR_SHOW_MULTIPLAYER_STATUS_TIP }, // Network { WWT_EMPTY, 0, 0, 10-1, 0, 0, 0xFFFFFFFF, STR_NONE }, // Artificial widget separator { WIDGETS_END }, @@ -796,9 +796,9 @@ static void window_top_toolbar_invalidate(rct_window *w) w->pressed_widgets &= ~(1 << WIDX_PAUSE); if (!gGameSoundsOff) - window_top_toolbar_widgets[WIDX_MUTE].image = 0x20000000 | SPR_G2_TOOLBAR_MUTE; + window_top_toolbar_widgets[WIDX_MUTE].image = IMAGE_TYPE_REMAP | SPR_G2_TOOLBAR_MUTE; else - window_top_toolbar_widgets[WIDX_MUTE].image = 0x20000000 | SPR_G2_TOOLBAR_UNMUTE; + window_top_toolbar_widgets[WIDX_MUTE].image = IMAGE_TYPE_REMAP | SPR_G2_TOOLBAR_UNMUTE; // Zoomed out/in disable. Not sure where this code is in the original. if (window_get_main()->viewport->zoom == 0){ @@ -827,7 +827,7 @@ static void window_top_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi) imgId = SPR_TOOLBAR_STAFF; if (widget_is_pressed(w, WIDX_STAFF)) imgId++; - imgId |= (gStaffHandymanColour << 19) | 0xA0000000 | (gStaffMechanicColour << 24); + imgId |= SPRITE_ID_PALETTE_COLOUR_2(gStaffHandymanColour, gStaffMechanicColour); gfx_draw_sprite(dpi, imgId, x, y, 0); } diff --git a/src/openrct2/windows/track_place.c b/src/openrct2/windows/track_place.c index 03e2709499..2cfeaefc54 100644 --- a/src/openrct2/windows/track_place.c +++ b/src/openrct2/windows/track_place.c @@ -463,7 +463,7 @@ static void window_track_place_paint(rct_window *w, rct_drawpixelinfo *dpi) substituteElement->x_offset = 0; substituteElement->y_offset = 0; substituteElement->flags = 0; - gfx_draw_sprite(&clippedDpi, 0 | IMAGE_TYPE_REMAP | NOT_TRANSLUCENT(w->colours[0]) << 19, 0, 0, 0); + gfx_draw_sprite(&clippedDpi, SPRITE_ID_PALETTE_COLOUR_1(NOT_TRANSLUCENT(w->colours[0])), 0, 0, 0); *substituteElement = tmpElement; } diff --git a/src/openrct2/windows/water.c b/src/openrct2/windows/water.c index 9fd8f2deb0..3469ab310d 100644 --- a/src/openrct2/windows/water.c +++ b/src/openrct2/windows/water.c @@ -40,8 +40,8 @@ static rct_widget window_water_widgets[] = { { WWT_CAPTION, 0, 1, 74, 1, 14, STR_WATER, STR_WINDOW_TITLE_TIP }, // title bar { WWT_CLOSEBOX, 0, 63, 73, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // close x button { WWT_IMGBTN, 0, 16, 59, 17, 48, SPR_LAND_TOOL_SIZE_0, STR_NONE }, // preview box - { WWT_TRNBTN, 2, 17, 32, 18, 33, 0x20000000 | SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_WATER_TIP }, // decrement size - { WWT_TRNBTN, 2, 43, 58, 32, 47, 0x20000000 | SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_WATER_TIP }, // increment size + { WWT_TRNBTN, 2, 17, 32, 18, 33, IMAGE_TYPE_REMAP | SPR_LAND_TOOL_DECREASE, STR_ADJUST_SMALLER_WATER_TIP }, // decrement size + { WWT_TRNBTN, 2, 43, 58, 32, 47, IMAGE_TYPE_REMAP | SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_WATER_TIP }, // increment size { WIDGETS_END }, }; diff --git a/test/testpaint/TestPaint.hpp b/test/testpaint/TestPaint.hpp index 1a02915640..3e0d67ba93 100644 --- a/test/testpaint/TestPaint.hpp +++ b/test/testpaint/TestPaint.hpp @@ -22,6 +22,7 @@ extern "C" { + #include #include #include #include @@ -38,10 +39,10 @@ enum { namespace TestPaint { - static const uint32 DEFAULT_SCHEME_TRACK = COLOUR_GREY << 19 | COLOUR_WHITE << 24 | 0xA0000000; - static const uint32 DEFAULT_SCHEME_SUPPORTS = COLOUR_LIGHT_BLUE << 19 | COLOUR_ICY_BLUE << 24 | 0xA0000000; - static const uint32 DEFAULT_SCHEME_MISC = COLOUR_DARK_PURPLE << 19 | COLOUR_LIGHT_PURPLE << 24 | 0xA0000000; - static const uint32 DEFAULT_SCHEME_3 = COLOUR_BRIGHT_PURPLE << 19 | COLOUR_DARK_BLUE << 24 | 0xA0000000; + static const uint32 DEFAULT_SCHEME_TRACK = SPRITE_ID_PALETTE_COLOUR_2(COLOUR_GREY, COLOUR_WHITE); + static const uint32 DEFAULT_SCHEME_SUPPORTS = SPRITE_ID_PALETTE_COLOUR_2(COLOUR_LIGHT_BLUE, COLOUR_ICY_BLUE); + static const uint32 DEFAULT_SCHEME_MISC = SPRITE_ID_PALETTE_COLOUR_2(COLOUR_DARK_PURPLE, COLOUR_LIGHT_PURPLE); + static const uint32 DEFAULT_SCHEME_3 = SPRITE_ID_PALETTE_COLOUR_2(COLOUR_BRIGHT_PURPLE, COLOUR_DARK_BLUE); void ResetEnvironment(); void ResetTunnels();