mirror of https://github.com/OpenRCT2/OpenRCT2.git
parent
1b61b4b104
commit
4adf745237
|
@ -103,7 +103,7 @@ public:
|
|||
|
||||
void Clear(uint8_t paletteIndex) override;
|
||||
void FillRect(uint32_t colour, int32_t x, int32_t y, int32_t w, int32_t h) override;
|
||||
void FilterRect(FILTER_PALETTE_ID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) override;
|
||||
void FilterRect(FilterPaletteID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) override;
|
||||
void DrawLine(uint32_t colour, int32_t x1, int32_t y1, int32_t x2, int32_t y2) override;
|
||||
void DrawSprite(uint32_t image, int32_t x, int32_t y, uint32_t tertiaryColour) override;
|
||||
void DrawSpriteRawMasked(int32_t x, int32_t y, uint32_t maskImage, uint32_t colourImage) override;
|
||||
|
@ -582,7 +582,7 @@ void OpenGLDrawingContext::FillRect(uint32_t colour, int32_t left, int32_t top,
|
|||
}
|
||||
}
|
||||
|
||||
void OpenGLDrawingContext::FilterRect(FILTER_PALETTE_ID palette, int32_t left, int32_t top, int32_t right, int32_t bottom)
|
||||
void OpenGLDrawingContext::FilterRect(FilterPaletteID palette, int32_t left, int32_t top, int32_t right, int32_t bottom)
|
||||
{
|
||||
left += _offsetX;
|
||||
top += _offsetY;
|
||||
|
@ -709,8 +709,8 @@ void OpenGLDrawingContext::DrawSprite(uint32_t image, int32_t x, int32_t y, uint
|
|||
bool special = false;
|
||||
if (image & IMAGE_TYPE_REMAP_2_PLUS)
|
||||
{
|
||||
palettes.x = TextureCache::PaletteToY((image >> 19) & 0x1F);
|
||||
palettes.y = TextureCache::PaletteToY((image >> 24) & 0x1F);
|
||||
palettes.x = TextureCache::PaletteToY(static_cast<FilterPaletteID>((image >> 19) & 0x1F));
|
||||
palettes.y = TextureCache::PaletteToY(static_cast<FilterPaletteID>((image >> 24) & 0x1F));
|
||||
if (image & IMAGE_TYPE_REMAP)
|
||||
{
|
||||
paletteCount = 2;
|
||||
|
@ -718,15 +718,15 @@ void OpenGLDrawingContext::DrawSprite(uint32_t image, int32_t x, int32_t y, uint
|
|||
else
|
||||
{
|
||||
paletteCount = 3;
|
||||
palettes.z = TextureCache::PaletteToY(tertiaryColour & 0xFF);
|
||||
palettes.z = TextureCache::PaletteToY(static_cast<FilterPaletteID>(tertiaryColour & 0xFF));
|
||||
}
|
||||
}
|
||||
else if ((image & IMAGE_TYPE_REMAP) || (image & IMAGE_TYPE_TRANSPARENT))
|
||||
{
|
||||
paletteCount = 1;
|
||||
uint32_t palette = (image >> 19) & 0xFF;
|
||||
FilterPaletteID palette = static_cast<FilterPaletteID>((image >> 19) & 0xFF);
|
||||
palettes.x = TextureCache::PaletteToY(palette);
|
||||
if (palette == PALETTE_WATER)
|
||||
if (palette == FilterPaletteID::PaletteWater)
|
||||
{
|
||||
special = true;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
# include <algorithm>
|
||||
# include <openrct2/drawing/Drawing.h>
|
||||
# include <openrct2/util/Util.h>
|
||||
# include <openrct2/world/Location.hpp>
|
||||
# include <stdexcept>
|
||||
# include <vector>
|
||||
|
@ -183,7 +184,7 @@ void TextureCache::GeneratePaletteTexture()
|
|||
|
||||
for (int i = 0; i < PALETTE_TO_G1_OFFSET_COUNT; ++i)
|
||||
{
|
||||
GLint y = PaletteToY(i);
|
||||
GLint y = PaletteToY(static_cast<FilterPaletteID>(i));
|
||||
|
||||
auto g1Index = GetPaletteG1Index(i);
|
||||
if (g1Index)
|
||||
|
@ -369,9 +370,9 @@ GLuint TextureCache::GetPaletteTexture()
|
|||
return _paletteTexture;
|
||||
}
|
||||
|
||||
GLint TextureCache::PaletteToY(uint32_t palette)
|
||||
GLint TextureCache::PaletteToY(FilterPaletteID palette)
|
||||
{
|
||||
return palette > PALETTE_WATER ? palette + 5 : palette + 1;
|
||||
return palette > FilterPaletteID::PaletteWater ? EnumValue(palette) + 5 : EnumValue(palette) + 1;
|
||||
}
|
||||
|
||||
#endif /* DISABLE_OPENGL */
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
struct rct_drawpixelinfo;
|
||||
struct PaletteMap;
|
||||
enum class FilterPaletteID : int32_t;
|
||||
|
||||
struct GlyphId
|
||||
{
|
||||
|
@ -223,7 +224,7 @@ public:
|
|||
|
||||
GLuint GetAtlasesTexture();
|
||||
GLuint GetPaletteTexture();
|
||||
static GLint PaletteToY(uint32_t palette);
|
||||
static GLint PaletteToY(FilterPaletteID palette);
|
||||
|
||||
private:
|
||||
void CreateTextures();
|
||||
|
|
|
@ -290,11 +290,12 @@ void InGameConsole::Draw(rct_drawpixelinfo* dpi) const
|
|||
Invalidate();
|
||||
|
||||
// Give console area a translucent effect.
|
||||
gfx_filter_rect(dpi, { { _consoleLeft, _consoleTop }, { _consoleRight, _consoleBottom } }, PALETTE_51);
|
||||
gfx_filter_rect(dpi, { { _consoleLeft, _consoleTop }, { _consoleRight, _consoleBottom } }, FilterPaletteID::Palette51);
|
||||
|
||||
// Make input area more opaque.
|
||||
gfx_filter_rect(
|
||||
dpi, { { _consoleLeft, _consoleBottom - lineHeight - 10 }, { _consoleRight, _consoleBottom - 1 } }, PALETTE_51);
|
||||
dpi, { { _consoleLeft, _consoleBottom - lineHeight - 10 }, { _consoleRight, _consoleBottom - 1 } },
|
||||
FilterPaletteID::Palette51);
|
||||
|
||||
// Paint background colour.
|
||||
uint8_t backgroundColour = ThemeGetColour(WC_CONSOLE, 0);
|
||||
|
|
|
@ -532,7 +532,8 @@ static void WidgetCaptionDraw(rct_drawpixelinfo* dpi, rct_window* w, rct_widgeti
|
|||
dpi, { { topLeft + ScreenCoordsXY{ 1, 1 } }, { bottomRight - ScreenCoordsXY{ 1, 1 } } }, ColourMapA[colour].dark);
|
||||
else
|
||||
gfx_filter_rect(
|
||||
dpi, { { topLeft + ScreenCoordsXY{ 1, 1 } }, { bottomRight - ScreenCoordsXY{ 1, 1 } } }, PALETTE_DARKEN_3);
|
||||
dpi, { { topLeft + ScreenCoordsXY{ 1, 1 } }, { bottomRight - ScreenCoordsXY{ 1, 1 } } },
|
||||
FilterPaletteID::PaletteDarken3);
|
||||
|
||||
// Draw text
|
||||
if (widget->text == STR_NONE)
|
||||
|
|
|
@ -596,7 +596,8 @@ void WindowDrawWidgets(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
rct_widgetindex widgetIndex;
|
||||
|
||||
if ((w->flags & WF_TRANSPARENT) && !(w->flags & WF_NO_BACKGROUND))
|
||||
gfx_filter_rect(dpi, { w->windowPos, w->windowPos + ScreenCoordsXY{ w->width - 1, w->height - 1 } }, PALETTE_51);
|
||||
gfx_filter_rect(
|
||||
dpi, { w->windowPos, w->windowPos + ScreenCoordsXY{ w->width - 1, w->height - 1 } }, FilterPaletteID::Palette51);
|
||||
|
||||
// todo: some code missing here? Between 006EB18C and 006EB260
|
||||
|
||||
|
|
|
@ -556,11 +556,15 @@ void CustomListView::Paint(rct_window* w, rct_drawpixelinfo* dpi, const rct_scro
|
|||
auto isSelected = (SelectedCell && itemIndex == SelectedCell->Row);
|
||||
if (isSelected)
|
||||
{
|
||||
gfx_filter_rect(dpi, { { dpi->x, y }, { dpi->x + dpi->width, y + (LIST_ROW_HEIGHT - 1) } }, PALETTE_DARKEN_2);
|
||||
gfx_filter_rect(
|
||||
dpi, { { dpi->x, y }, { dpi->x + dpi->width, y + (LIST_ROW_HEIGHT - 1) } },
|
||||
FilterPaletteID::PaletteDarken2);
|
||||
}
|
||||
else if (isHighlighted)
|
||||
{
|
||||
gfx_filter_rect(dpi, { { dpi->x, y }, { dpi->x + dpi->width, y + (LIST_ROW_HEIGHT - 1) } }, PALETTE_DARKEN_1);
|
||||
gfx_filter_rect(
|
||||
dpi, { { dpi->x, y }, { dpi->x + dpi->width, y + (LIST_ROW_HEIGHT - 1) } },
|
||||
FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
else if (isStriped)
|
||||
{
|
||||
|
|
|
@ -334,7 +334,7 @@ static void window_dropdown_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
t = w->windowPos.y + 2 + (cell_y * _dropdown_item_height);
|
||||
r = l + _dropdown_item_width - 1;
|
||||
b = t + _dropdown_item_height - 1;
|
||||
gfx_filter_rect(dpi, l, t, r, b, PALETTE_DARKEN_3);
|
||||
gfx_filter_rect(dpi, l, t, r, b, FilterPaletteID::PaletteDarken3);
|
||||
}
|
||||
|
||||
item = gDropdownItemsFormat[i];
|
||||
|
|
|
@ -392,7 +392,7 @@ void window_editor_bottom_toolbar_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
dpi, window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].left + w->windowPos.x,
|
||||
window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].top + w->windowPos.y,
|
||||
window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].right + w->windowPos.x,
|
||||
window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].bottom + w->windowPos.y, PALETTE_51);
|
||||
window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].bottom + w->windowPos.y, FilterPaletteID::Palette51);
|
||||
}
|
||||
|
||||
if ((drawPreviousButton || drawNextButton) && gS6Info.editor_step != EDITOR_STEP_ROLLERCOASTER_DESIGNER)
|
||||
|
@ -401,7 +401,7 @@ void window_editor_bottom_toolbar_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
dpi, window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].left + w->windowPos.x,
|
||||
window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].top + w->windowPos.y,
|
||||
window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].right + w->windowPos.x,
|
||||
window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].bottom + w->windowPos.y, PALETTE_51);
|
||||
window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].bottom + w->windowPos.y, FilterPaletteID::Palette51);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -609,7 +609,7 @@ static void window_editor_inventions_list_scrollpaint(rct_window* w, rct_drawpix
|
|||
bottom = itemY;
|
||||
}
|
||||
|
||||
gfx_filter_rect(dpi, 0, top, boxWidth, bottom, PALETTE_DARKEN_1);
|
||||
gfx_filter_rect(dpi, 0, top, boxWidth, bottom, FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
|
||||
if (researchItem.Equals(&_editorInventionsListDraggedItem))
|
||||
|
|
|
@ -1150,7 +1150,7 @@ static void window_editor_object_selection_scrollpaint(rct_window* w, rct_drawpi
|
|||
if (highlighted)
|
||||
{
|
||||
auto bottom = screenCoords.y + (SCROLLABLE_ROW_HEIGHT - 1);
|
||||
gfx_filter_rect(dpi, 0, screenCoords.y, w->width, bottom, PALETTE_DARKEN_1);
|
||||
gfx_filter_rect(dpi, 0, screenCoords.y, w->width, bottom, FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
|
||||
// Draw checkmark
|
||||
|
|
|
@ -1091,7 +1091,7 @@ static void window_editor_objective_options_rides_scrollpaint(rct_window* w, rct
|
|||
if (i == w->selected_list_item)
|
||||
{
|
||||
stringId = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
gfx_filter_rect(dpi, 0, y, w->width, y + 11, PALETTE_DARKEN_1);
|
||||
gfx_filter_rect(dpi, 0, y, w->width, y + 11, FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
|
||||
// Checkbox mark
|
||||
|
|
|
@ -145,18 +145,18 @@ static void window_error_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
r = w->windowPos.x + w->width - 1;
|
||||
b = w->windowPos.y + w->height - 1;
|
||||
|
||||
gfx_filter_rect(dpi, l + 1, t + 1, r - 1, b - 1, PALETTE_45);
|
||||
gfx_filter_rect(dpi, l, t, r, b, PALETTE_GLASS_SATURATED_RED);
|
||||
gfx_filter_rect(dpi, l + 1, t + 1, r - 1, b - 1, FilterPaletteID::Palette45);
|
||||
gfx_filter_rect(dpi, l, t, r, b, FilterPaletteID::PaletteGlassSaturatedRed);
|
||||
|
||||
gfx_filter_rect(dpi, l, t + 2, l, b - 2, PALETTE_DARKEN_3);
|
||||
gfx_filter_rect(dpi, r, t + 2, r, b - 2, PALETTE_DARKEN_3);
|
||||
gfx_filter_rect(dpi, l + 2, b, r - 2, b, PALETTE_DARKEN_3);
|
||||
gfx_filter_rect(dpi, l + 2, t, r - 2, t, PALETTE_DARKEN_3);
|
||||
gfx_filter_rect(dpi, l, t + 2, l, b - 2, FilterPaletteID::PaletteDarken3);
|
||||
gfx_filter_rect(dpi, r, t + 2, r, b - 2, FilterPaletteID::PaletteDarken3);
|
||||
gfx_filter_rect(dpi, l + 2, b, r - 2, b, FilterPaletteID::PaletteDarken3);
|
||||
gfx_filter_rect(dpi, l + 2, t, r - 2, t, FilterPaletteID::PaletteDarken3);
|
||||
|
||||
gfx_filter_rect(dpi, r + 1, t + 1, r + 1, t + 1, PALETTE_DARKEN_3);
|
||||
gfx_filter_rect(dpi, r - 1, t + 1, r - 1, t + 1, PALETTE_DARKEN_3);
|
||||
gfx_filter_rect(dpi, l + 1, b - 1, l + 1, b - 1, PALETTE_DARKEN_3);
|
||||
gfx_filter_rect(dpi, r - 1, b - 1, r - 1, b - 1, PALETTE_DARKEN_3);
|
||||
gfx_filter_rect(dpi, r + 1, t + 1, r + 1, t + 1, FilterPaletteID::PaletteDarken3);
|
||||
gfx_filter_rect(dpi, r - 1, t + 1, r - 1, t + 1, FilterPaletteID::PaletteDarken3);
|
||||
gfx_filter_rect(dpi, l + 1, b - 1, l + 1, b - 1, FilterPaletteID::PaletteDarken3);
|
||||
gfx_filter_rect(dpi, r - 1, b - 1, r - 1, b - 1, FilterPaletteID::PaletteDarken3);
|
||||
|
||||
l = w->windowPos.x + (w->width + 1) / 2 - 1;
|
||||
t = w->windowPos.y + 1;
|
||||
|
|
|
@ -355,12 +355,12 @@ static void window_game_bottom_toolbar_paint(rct_window* w, rct_drawpixelinfo* d
|
|||
dpi, w->windowPos.x + window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].left,
|
||||
w->windowPos.y + window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].top,
|
||||
w->windowPos.x + window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].right,
|
||||
w->windowPos.y + window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].bottom, PALETTE_51);
|
||||
w->windowPos.y + window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].bottom, FilterPaletteID::Palette51);
|
||||
gfx_filter_rect(
|
||||
dpi, w->windowPos.x + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].left,
|
||||
w->windowPos.y + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].top,
|
||||
w->windowPos.x + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].right,
|
||||
w->windowPos.y + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].bottom, PALETTE_51);
|
||||
w->windowPos.y + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].bottom, FilterPaletteID::Palette51);
|
||||
|
||||
if (ThemeGetFlags() & UITHEME_FLAG_USE_FULL_BOTTOM_TOOLBAR)
|
||||
{
|
||||
|
@ -369,7 +369,7 @@ static void window_game_bottom_toolbar_paint(rct_window* w, rct_drawpixelinfo* d
|
|||
dpi, w->windowPos.x + window_game_bottom_toolbar_widgets[WIDX_MIDDLE_OUTSET].left,
|
||||
w->windowPos.y + window_game_bottom_toolbar_widgets[WIDX_MIDDLE_OUTSET].top,
|
||||
w->windowPos.x + window_game_bottom_toolbar_widgets[WIDX_MIDDLE_OUTSET].right,
|
||||
w->windowPos.y + window_game_bottom_toolbar_widgets[WIDX_MIDDLE_OUTSET].bottom, PALETTE_51);
|
||||
w->windowPos.y + window_game_bottom_toolbar_widgets[WIDX_MIDDLE_OUTSET].bottom, FilterPaletteID::Palette51);
|
||||
}
|
||||
|
||||
WindowDrawWidgets(w, dpi);
|
||||
|
|
|
@ -1603,7 +1603,7 @@ void window_guest_rides_scroll_paint(rct_window* w, rct_drawpixelinfo* dpi, int3
|
|||
rct_string_id stringId = STR_BLACK_STRING;
|
||||
if (list_index == w->selected_list_item)
|
||||
{
|
||||
gfx_filter_rect(dpi, 0, y, 800, y + 9, PALETTE_DARKEN_1);
|
||||
gfx_filter_rect(dpi, 0, y, 800, y + 9, FilterPaletteID::PaletteDarken1);
|
||||
stringId = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
}
|
||||
|
||||
|
|
|
@ -759,7 +759,7 @@ static void window_guest_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi,
|
|||
format = STR_BLACK_STRING;
|
||||
if (i == _window_guest_list_highlighted_index)
|
||||
{
|
||||
gfx_filter_rect(dpi, 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1, PALETTE_DARKEN_1);
|
||||
gfx_filter_rect(dpi, 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1, FilterPaletteID::PaletteDarken1);
|
||||
format = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
}
|
||||
|
||||
|
@ -832,7 +832,7 @@ static void window_guest_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi,
|
|||
format = STR_BLACK_STRING;
|
||||
if (i == _window_guest_list_highlighted_index)
|
||||
{
|
||||
gfx_filter_rect(dpi, 0, y, 800, y + SUMMARISED_GUEST_ROW_HEIGHT, PALETTE_DARKEN_1);
|
||||
gfx_filter_rect(dpi, 0, y, 800, y + SUMMARISED_GUEST_ROW_HEIGHT, FilterPaletteID::PaletteDarken1);
|
||||
format = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
}
|
||||
|
||||
|
|
|
@ -756,7 +756,7 @@ static void window_loadsave_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i
|
|||
if (i == w->selected_list_item)
|
||||
{
|
||||
stringId = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
gfx_filter_rect(dpi, 0, y, listWidth, y + SCROLLABLE_ROW_HEIGHT, PALETTE_DARKEN_1);
|
||||
gfx_filter_rect(dpi, 0, y, listWidth, y + SCROLLABLE_ROW_HEIGHT, FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
// display a marker next to the currently loaded game file
|
||||
if (_listItems[i].loaded)
|
||||
|
|
|
@ -584,7 +584,8 @@ static void window_multiplayer_players_scrollpaint(rct_window* w, rct_drawpixeli
|
|||
int32_t colour = COLOUR_BLACK;
|
||||
if (i == w->selected_list_item)
|
||||
{
|
||||
gfx_filter_rect(dpi, 0, screenCoords.y, 800, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1, PALETTE_DARKEN_1);
|
||||
gfx_filter_rect(
|
||||
dpi, 0, screenCoords.y, 800, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1, FilterPaletteID::PaletteDarken1);
|
||||
buffer += network_get_player_name(i);
|
||||
colour = w->colours[2];
|
||||
}
|
||||
|
@ -884,7 +885,8 @@ static void window_multiplayer_groups_scrollpaint(rct_window* w, rct_drawpixelin
|
|||
{
|
||||
if (i == w->selected_list_item)
|
||||
{
|
||||
gfx_filter_rect(dpi, 0, screenCoords.y, 800, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1, PALETTE_DARKEN_1);
|
||||
gfx_filter_rect(
|
||||
dpi, 0, screenCoords.y, 800, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1, FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
if (screenCoords.y > dpi->y + dpi->height)
|
||||
{
|
||||
|
|
|
@ -4870,7 +4870,7 @@ static void window_ride_colour_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
int32_t terniaryColour = 0;
|
||||
if (stationObj->Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT)
|
||||
{
|
||||
terniaryColour = IMAGE_TYPE_TRANSPARENT | (GlassPaletteIds[trackColour.main] << 19);
|
||||
terniaryColour = IMAGE_TYPE_TRANSPARENT | (EnumValue(GlassPaletteIds[trackColour.main]) << 19);
|
||||
}
|
||||
|
||||
int32_t spriteIndex = SPRITE_ID_PALETTE_COLOUR_2(trackColour.main, trackColour.additional);
|
||||
|
|
|
@ -582,7 +582,7 @@ static void window_ride_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi,
|
|||
if (i == w->selected_list_item)
|
||||
{
|
||||
// Background highlight
|
||||
gfx_filter_rect(dpi, 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1, PALETTE_DARKEN_1);
|
||||
gfx_filter_rect(dpi, 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1, FilterPaletteID::PaletteDarken1);
|
||||
format = (_quickDemolishMode ? STR_LIGHTPINK_STRINGID : STR_WINDOW_COLOUR_2_STRINGID);
|
||||
}
|
||||
|
||||
|
|
|
@ -585,7 +585,7 @@ static void window_scenarioselect_scrollpaint(rct_window* w, rct_drawpixelinfo*
|
|||
bool isHighlighted = w->highlighted_scenario == scenario;
|
||||
if (isHighlighted)
|
||||
{
|
||||
gfx_filter_rect(dpi, 0, y, w->width, y + scenarioItemHeight - 1, PALETTE_DARKEN_1);
|
||||
gfx_filter_rect(dpi, 0, y, w->width, y + scenarioItemHeight - 1, FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
|
||||
bool isCompleted = scenario->highscore != nullptr;
|
||||
|
|
|
@ -1268,7 +1268,8 @@ void window_scenery_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t s
|
|||
}
|
||||
gfx_draw_sprite(&clipdpi, imageId, { 0x2F, spriteTop }, tertiaryColour);
|
||||
|
||||
imageId = (sceneryEntry->image + 0x40000006) | (GlassPaletteIds[gWindowSceneryPrimaryColour] << 19);
|
||||
imageId = (sceneryEntry->image + 0x40000006)
|
||||
| (EnumValue(GlassPaletteIds[gWindowSceneryPrimaryColour]) << 19);
|
||||
gfx_draw_sprite(&clipdpi, imageId, { 0x2F, spriteTop }, tertiaryColour);
|
||||
}
|
||||
else
|
||||
|
@ -1328,7 +1329,7 @@ void window_scenery_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t s
|
|||
if (scenery_small_entry_has_flag(sceneryEntry, SMALL_SCENERY_FLAG_HAS_GLASS))
|
||||
{
|
||||
imageId = ((sceneryEntry->image + gWindowSceneryRotation) + 0x40000004)
|
||||
+ (GlassPaletteIds[gWindowSceneryPrimaryColour] << 19);
|
||||
+ (EnumValue(GlassPaletteIds[gWindowSceneryPrimaryColour]) << 19);
|
||||
|
||||
gfx_draw_sprite(&clipdpi, imageId, { 0x20, spriteTop }, w->colours[1]);
|
||||
}
|
||||
|
|
|
@ -437,7 +437,7 @@ static void window_server_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi
|
|||
// Draw hover highlight
|
||||
if (highlighted)
|
||||
{
|
||||
gfx_filter_rect(dpi, 0, screenCoords.y, width, screenCoords.y + ITEM_HEIGHT, PALETTE_DARKEN_1);
|
||||
gfx_filter_rect(dpi, 0, screenCoords.y, width, screenCoords.y + ITEM_HEIGHT, FilterPaletteID::PaletteDarken1);
|
||||
_version = serverDetails.Version;
|
||||
w->widgets[WIDX_LIST].tooltip = STR_NETWORK_VERSION_TIP;
|
||||
}
|
||||
|
|
|
@ -347,7 +347,7 @@ static void window_shortcut_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, i
|
|||
if (i == w->selected_list_item)
|
||||
{
|
||||
format = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
gfx_filter_rect(dpi, 0, y - 1, scrollWidth, y + (SCROLLABLE_ROW_HEIGHT - 2), PALETTE_DARKEN_1);
|
||||
gfx_filter_rect(dpi, 0, y - 1, scrollWidth, y + (SCROLLABLE_ROW_HEIGHT - 2), FilterPaletteID::PaletteDarken1);
|
||||
}
|
||||
|
||||
const int32_t bindingOffset = scrollWidth - 150;
|
||||
|
|
|
@ -698,7 +698,7 @@ void window_staff_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_
|
|||
|
||||
if (i == _windowStaffListHighlightedIndex)
|
||||
{
|
||||
gfx_filter_rect(dpi, 0, y, 800, y + (SCROLLABLE_ROW_HEIGHT - 1), PALETTE_DARKEN_1);
|
||||
gfx_filter_rect(dpi, 0, y, 800, y + (SCROLLABLE_ROW_HEIGHT - 1), FilterPaletteID::PaletteDarken1);
|
||||
format = (_quick_fire_mode ? STR_LIGHTPINK_STRINGID : STR_WINDOW_COLOUR_2_STRINGID);
|
||||
}
|
||||
|
||||
|
|
|
@ -233,6 +233,6 @@ static void window_title_menu_invalidate(rct_window* w)
|
|||
|
||||
static void window_title_menu_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
||||
{
|
||||
gfx_filter_rect(dpi, _filterRect, PALETTE_51);
|
||||
gfx_filter_rect(dpi, _filterRect, FilterPaletteID::Palette51);
|
||||
WindowDrawWidgets(w, dpi);
|
||||
}
|
||||
|
|
|
@ -169,20 +169,20 @@ static void window_tooltip_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
int32_t bottom = w->windowPos.y + w->height - 1;
|
||||
|
||||
// Background
|
||||
gfx_filter_rect(dpi, { { left + 1, top + 1 }, { right - 1, bottom - 1 } }, PALETTE_45);
|
||||
gfx_filter_rect(dpi, { { left + 1, top + 1 }, { right - 1, bottom - 1 } }, PALETTE_GLASS_LIGHT_ORANGE);
|
||||
gfx_filter_rect(dpi, { { left + 1, top + 1 }, { right - 1, bottom - 1 } }, FilterPaletteID::Palette45);
|
||||
gfx_filter_rect(dpi, { { left + 1, top + 1 }, { right - 1, bottom - 1 } }, FilterPaletteID::PaletteGlassLightOrange);
|
||||
|
||||
// Sides
|
||||
gfx_filter_rect(dpi, { { left + 0, top + 2 }, { left + 0, bottom - 2 } }, PALETTE_DARKEN_3);
|
||||
gfx_filter_rect(dpi, { { right + 0, top + 2 }, { right + 0, bottom - 2 } }, PALETTE_DARKEN_3);
|
||||
gfx_filter_rect(dpi, { { left + 2, bottom + 0 }, { right - 2, bottom + 0 } }, PALETTE_DARKEN_3);
|
||||
gfx_filter_rect(dpi, { { left + 2, top + 0 }, { right - 2, top + 0 } }, PALETTE_DARKEN_3);
|
||||
gfx_filter_rect(dpi, { { left + 0, top + 2 }, { left + 0, bottom - 2 } }, FilterPaletteID::PaletteDarken3);
|
||||
gfx_filter_rect(dpi, { { right + 0, top + 2 }, { right + 0, bottom - 2 } }, FilterPaletteID::PaletteDarken3);
|
||||
gfx_filter_rect(dpi, { { left + 2, bottom + 0 }, { right - 2, bottom + 0 } }, FilterPaletteID::PaletteDarken3);
|
||||
gfx_filter_rect(dpi, { { left + 2, top + 0 }, { right - 2, top + 0 } }, FilterPaletteID::PaletteDarken3);
|
||||
|
||||
// Corners
|
||||
gfx_filter_pixel(dpi, { left + 1, top + 1 }, PALETTE_DARKEN_3);
|
||||
gfx_filter_pixel(dpi, { right - 1, top + 1 }, PALETTE_DARKEN_3);
|
||||
gfx_filter_pixel(dpi, { left + 1, bottom - 1 }, PALETTE_DARKEN_3);
|
||||
gfx_filter_pixel(dpi, { right - 1, bottom - 1 }, PALETTE_DARKEN_3);
|
||||
gfx_filter_pixel(dpi, { left + 1, top + 1 }, FilterPaletteID::PaletteDarken3);
|
||||
gfx_filter_pixel(dpi, { right - 1, top + 1 }, FilterPaletteID::PaletteDarken3);
|
||||
gfx_filter_pixel(dpi, { left + 1, bottom - 1 }, FilterPaletteID::PaletteDarken3);
|
||||
gfx_filter_pixel(dpi, { right - 1, bottom - 1 }, FilterPaletteID::PaletteDarken3);
|
||||
|
||||
// Text
|
||||
left = w->windowPos.x + ((w->width + 1) / 2) - 1;
|
||||
|
|
|
@ -709,7 +709,8 @@ static void window_track_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi,
|
|||
{
|
||||
// Highlight
|
||||
gfx_filter_rect(
|
||||
dpi, screenCoords.x, screenCoords.y, w->width, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1, PALETTE_DARKEN_1);
|
||||
dpi, screenCoords.x, screenCoords.y, w->width, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1,
|
||||
FilterPaletteID::PaletteDarken1);
|
||||
stringId = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
}
|
||||
else
|
||||
|
@ -733,7 +734,7 @@ static void window_track_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi,
|
|||
// Highlight
|
||||
gfx_filter_rect(
|
||||
dpi, screenCoords.x, screenCoords.y, w->width, screenCoords.y + SCROLLABLE_ROW_HEIGHT - 1,
|
||||
PALETTE_DARKEN_1);
|
||||
FilterPaletteID::PaletteDarken1);
|
||||
stringId = STR_WINDOW_COLOUR_2_STRINGID;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -203,10 +203,10 @@ void update_palette_effects()
|
|||
if (gConfigGeneral.render_weather_gloom)
|
||||
{
|
||||
auto paletteId = climate_get_weather_gloom_palette_id(gClimateCurrent);
|
||||
if (paletteId != PALETTE_NULL)
|
||||
if (paletteId != FilterPaletteID::PaletteNull)
|
||||
{
|
||||
shade = 1;
|
||||
if (paletteId != PALETTE_DARKEN_1)
|
||||
if (paletteId != FilterPaletteID::PaletteDarken1)
|
||||
{
|
||||
shade = 2;
|
||||
}
|
||||
|
|
|
@ -294,39 +294,39 @@ enum
|
|||
SPR_PALETTE_GLASS_LIGHT_PINK = 5047,
|
||||
};
|
||||
|
||||
const FILTER_PALETTE_ID GlassPaletteIds[COLOUR_COUNT] = {
|
||||
PALETTE_GLASS_BLACK,
|
||||
PALETTE_GLASS_GREY,
|
||||
PALETTE_GLASS_WHITE,
|
||||
PALETTE_GLASS_DARK_PURPLE,
|
||||
PALETTE_GLASS_LIGHT_PURPLE,
|
||||
PALETTE_GLASS_BRIGHT_PURPLE,
|
||||
PALETTE_GLASS_DARK_BLUE,
|
||||
PALETTE_GLASS_LIGHT_BLUE,
|
||||
PALETTE_GLASS_ICY_BLUE,
|
||||
PALETTE_GLASS_TEAL,
|
||||
PALETTE_GLASS_AQUAMARINE,
|
||||
PALETTE_GLASS_SATURATED_GREEN,
|
||||
PALETTE_GLASS_DARK_GREEN,
|
||||
PALETTE_GLASS_MOSS_GREEN,
|
||||
PALETTE_GLASS_BRIGHT_GREEN,
|
||||
PALETTE_GLASS_OLIVE_GREEN,
|
||||
PALETTE_GLASS_DARK_OLIVE_GREEN,
|
||||
PALETTE_GLASS_BRIGHT_YELLOW,
|
||||
PALETTE_GLASS_YELLOW,
|
||||
PALETTE_GLASS_DARK_YELLOW,
|
||||
PALETTE_GLASS_LIGHT_ORANGE,
|
||||
PALETTE_GLASS_DARK_ORANGE,
|
||||
PALETTE_GLASS_LIGHT_BROWN,
|
||||
PALETTE_GLASS_SATURATED_BROWN,
|
||||
PALETTE_GLASS_DARK_BROWN,
|
||||
PALETTE_GLASS_SALMON_PINK,
|
||||
PALETTE_GLASS_BORDEAUX_RED,
|
||||
PALETTE_GLASS_SATURATED_RED,
|
||||
PALETTE_GLASS_BRIGHT_RED,
|
||||
PALETTE_GLASS_DARK_PINK,
|
||||
PALETTE_GLASS_BRIGHT_PINK,
|
||||
PALETTE_GLASS_LIGHT_PINK,
|
||||
const FilterPaletteID GlassPaletteIds[COLOUR_COUNT] = {
|
||||
FilterPaletteID::PaletteGlassBlack,
|
||||
FilterPaletteID::PaletteGlassGrey,
|
||||
FilterPaletteID::PaletteGlassWhite,
|
||||
FilterPaletteID::PaletteGlassDarkPurple,
|
||||
FilterPaletteID::PaletteGlassLightPurple,
|
||||
FilterPaletteID::PaletteGlassBrightPurple,
|
||||
FilterPaletteID::PaletteGlassDarkBlue,
|
||||
FilterPaletteID::PaletteGlassLightBlue,
|
||||
FilterPaletteID::PaletteGlassIcyBlue,
|
||||
FilterPaletteID::PaletteGlassTeal,
|
||||
FilterPaletteID::PaletteGlassAquamarine,
|
||||
FilterPaletteID::PaletteGlassSaturatedGreen,
|
||||
FilterPaletteID::PaletteGlassDarkGreen,
|
||||
FilterPaletteID::PaletteGlassMossGreen,
|
||||
FilterPaletteID::PaletteGlassBrightGreen,
|
||||
FilterPaletteID::PaletteGlassOliveGreen,
|
||||
FilterPaletteID::PaletteGlassDarkOliveGreen,
|
||||
FilterPaletteID::PaletteGlassBrightYellow,
|
||||
FilterPaletteID::PaletteGlassYellow,
|
||||
FilterPaletteID::PaletteGlassDarkYellow,
|
||||
FilterPaletteID::PaletteGlassLightOrange,
|
||||
FilterPaletteID::PaletteGlassDarkOrange,
|
||||
FilterPaletteID::PaletteGlassLightBrown,
|
||||
FilterPaletteID::PaletteGlassSaturatedBrown,
|
||||
FilterPaletteID::PaletteGlassDarkBrown,
|
||||
FilterPaletteID::PaletteGlassSalmonPink,
|
||||
FilterPaletteID::PaletteGlassBordeauxRed,
|
||||
FilterPaletteID::PaletteGlassSaturatedRed,
|
||||
FilterPaletteID::PaletteGlassBrightRed,
|
||||
FilterPaletteID::PaletteGlassDarkPink,
|
||||
FilterPaletteID::PaletteGlassBrightPink,
|
||||
FilterPaletteID::PaletteGlassLightPink,
|
||||
};
|
||||
|
||||
// Previously 0x97FCBC use it to get the correct palette from g1_elements
|
||||
|
@ -365,9 +365,9 @@ static const uint16_t palette_to_g1_offset[PALETTE_TO_G1_OFFSET_COUNT] = {
|
|||
SPR_PALETTE_LIGHT_PINK,
|
||||
|
||||
|
||||
SPR_PALETTE_WATER, // PALETTE_WATER (water)
|
||||
SPR_PALETTE_WATER, // PaletteWater (water)
|
||||
SPR_PALETTE_3100,
|
||||
SPR_PALETTE_3101, // PALETTE_34
|
||||
SPR_PALETTE_3101, // Palette34
|
||||
SPR_PALETTE_3102,
|
||||
SPR_PALETTE_3103,
|
||||
SPR_PALETTE_3104,
|
||||
|
@ -378,13 +378,13 @@ static const uint16_t palette_to_g1_offset[PALETTE_TO_G1_OFFSET_COUNT] = {
|
|||
SPR_PALETTE_3110,
|
||||
SPR_PALETTE_3105,
|
||||
SPR_PALETTE_4948,
|
||||
SPR_PALETTE_4949, // PALETTE_45
|
||||
SPR_PALETTE_4949, // Palette45
|
||||
SPR_PALETTE_4950,
|
||||
SPR_PALETTE_DARKEN_3, // PALETTE_DARKEN_3
|
||||
SPR_PALETTE_DARKEN_3, // PaletteDarken3
|
||||
SPR_PALETTE_4952, // Decreases contrast
|
||||
SPR_PALETTE_DARKEN_1, // PALETTE_DARKEN_1
|
||||
SPR_PALETTE_DARKEN_2, // PALETTE_DARKEN_2 (construction marker)
|
||||
SPR_PALETTE_4955, // PALETTE_51
|
||||
SPR_PALETTE_DARKEN_1, // PaletteDarken1
|
||||
SPR_PALETTE_DARKEN_2, // PaletteDarken2 (construction marker)
|
||||
SPR_PALETTE_4955, // Palette51
|
||||
|
||||
SPR_PALETTE_TRANSLUCENT_GREY,
|
||||
SPR_PALETTE_TRANSLUCENT_GREY_HIGHLIGHT,
|
||||
|
@ -481,35 +481,35 @@ static const uint16_t palette_to_g1_offset[PALETTE_TO_G1_OFFSET_COUNT] = {
|
|||
SPR_PALETTE_GLASS_LIGHT_PINK,
|
||||
};
|
||||
|
||||
#define WINDOW_PALETTE_GREY {PALETTE_TRANSLUCENT_GREY, PALETTE_TRANSLUCENT_GREY_HIGHLIGHT, PALETTE_TRANSLUCENT_GREY_SHADOW}
|
||||
#define WINDOW_PALETTE_LIGHT_PURPLE {PALETTE_TRANSLUCENT_LIGHT_PURPLE, PALETTE_TRANSLUCENT_LIGHT_PURPLE_HIGHLIGHT, PALETTE_TRANSLUCENT_LIGHT_PURPLE_SHADOW}
|
||||
#define WINDOW_PALETTE_LIGHT_BLUE {PALETTE_TRANSLUCENT_LIGHT_BLUE, PALETTE_TRANSLUCENT_LIGHT_BLUE_HIGHLIGHT, PALETTE_TRANSLUCENT_LIGHT_BLUE_SHADOW}
|
||||
#define WINDOW_PALETTE_TEAL {PALETTE_TRANSLUCENT_TEAL, PALETTE_TRANSLUCENT_TEAL_HIGHLIGHT, PALETTE_TRANSLUCENT_TEAL_SHADOW}
|
||||
#define WINDOW_PALETTE_BRIGHT_GREEN {PALETTE_TRANSLUCENT_BRIGHT_GREEN, PALETTE_TRANSLUCENT_BRIGHT_GREEN_HIGHLIGHT, PALETTE_TRANSLUCENT_BRIGHT_GREEN_SHADOW}
|
||||
#define WINDOW_PALETTE_YELLOW {PALETTE_TRANSLUCENT_YELLOW, PALETTE_TRANSLUCENT_YELLOW_HIGHLIGHT, PALETTE_TRANSLUCENT_YELLOW_SHADOW}
|
||||
#define WINDOW_PALETTE_LIGHT_ORANGE {PALETTE_TRANSLUCENT_LIGHT_ORANGE, PALETTE_TRANSLUCENT_LIGHT_ORANGE_HIGHLIGHT, PALETTE_TRANSLUCENT_LIGHT_ORANGE_SHADOW}
|
||||
#define WINDOW_PALETTE_LIGHT_BROWN {PALETTE_TRANSLUCENT_LIGHT_BROWN, PALETTE_TRANSLUCENT_LIGHT_BROWN_HIGHLIGHT, PALETTE_TRANSLUCENT_LIGHT_BROWN_SHADOW}
|
||||
#define WINDOW_PALETTE_BRIGHT_RED {PALETTE_TRANSLUCENT_BRIGHT_RED, PALETTE_TRANSLUCENT_BRIGHT_RED_HIGHLIGHT, PALETTE_TRANSLUCENT_BRIGHT_RED_SHADOW}
|
||||
#define WINDOW_PALETTE_BRIGHT_PINK {PALETTE_TRANSLUCENT_BRIGHT_PINK, PALETTE_TRANSLUCENT_BRIGHT_PINK_HIGHLIGHT, PALETTE_TRANSLUCENT_BRIGHT_PINK_SHADOW}
|
||||
#define WINDOW_PALETTE_GREY {FilterPaletteID::PaletteTranslucentGrey, FilterPaletteID::PaletteTranslucentGreyHighlight, FilterPaletteID::PaletteTranslucentGreyShadow}
|
||||
#define WINDOW_PALETTE_LIGHT_PURPLE {FilterPaletteID::PaletteTranslucentLightPurple, FilterPaletteID::PaletteTranslucentLightPurpleHighlight, FilterPaletteID::PaletteTranslucentLightPurpleShadow}
|
||||
#define WINDOW_PALETTE_LIGHT_BLUE {FilterPaletteID::PaletteTranslucentLightBlue, FilterPaletteID::PaletteTranslucentLightBlueHighlight, FilterPaletteID::PaletteTranslucentLightBlueShadow}
|
||||
#define WINDOW_PALETTE_TEAL {FilterPaletteID::PaletteTranslucentTeal, FilterPaletteID::PaletteTranslucentTealHighlight, FilterPaletteID::PaletteTranslucentTealShadow}
|
||||
#define WINDOW_PALETTE_BRIGHT_GREEN {FilterPaletteID::PaletteTranslucentBrightGreen, FilterPaletteID::PaletteTranslucentBrightGreenHighlight, FilterPaletteID::PaletteTranslucentBrightGreenShadow}
|
||||
#define WINDOW_PALETTE_YELLOW {FilterPaletteID::PaletteTranslucentYellow, FilterPaletteID::PaletteTranslucentYellowHighlight, FilterPaletteID::PaletteTranslucentYellowShadow}
|
||||
#define WINDOW_PALETTE_LIGHT_ORANGE {FilterPaletteID::PaletteTranslucentLightOrange, FilterPaletteID::PaletteTranslucentLightOrangeHighlight, FilterPaletteID::PaletteTranslucentLightOrangeShadow}
|
||||
#define WINDOW_PALETTE_LIGHT_BROWN {FilterPaletteID::PaletteTranslucentLightBrown, FilterPaletteID::PaletteTranslucentLightBrownHighlight, FilterPaletteID::PaletteTranslucentLightBrownShadow}
|
||||
#define WINDOW_PALETTE_BRIGHT_RED {FilterPaletteID::PaletteTranslucentBrightRed, FilterPaletteID::PaletteTranslucentBrightRedHighlight, FilterPaletteID::PaletteTranslucentBrightRedShadow}
|
||||
#define WINDOW_PALETTE_BRIGHT_PINK {FilterPaletteID::PaletteTranslucentBrightPink, FilterPaletteID::PaletteTranslucentBrightPinkHighlight, FilterPaletteID::PaletteTranslucentBrightPinkShadow}
|
||||
|
||||
const translucent_window_palette TranslucentWindowPalettes[COLOUR_COUNT] = {
|
||||
WINDOW_PALETTE_GREY, // COLOUR_BLACK
|
||||
WINDOW_PALETTE_GREY, // COLOUR_GREY
|
||||
{PALETTE_TRANSLUCENT_WHITE, PALETTE_TRANSLUCENT_WHITE_HIGHLIGHT, PALETTE_TRANSLUCENT_WHITE_SHADOW},
|
||||
{FilterPaletteID::PaletteTranslucentWhite, FilterPaletteID::PaletteTranslucentWhiteHighlight, FilterPaletteID::PaletteTranslucentWhiteShadow},
|
||||
WINDOW_PALETTE_LIGHT_PURPLE, // COLOUR_DARK_PURPLE
|
||||
WINDOW_PALETTE_LIGHT_PURPLE, // COLOUR_LIGHT_PURPLE
|
||||
{PALETTE_TRANSLUCENT_BRIGHT_PURPLE, PALETTE_TRANSLUCENT_BRIGHT_PURPLE_HIGHLIGHT, PALETTE_TRANSLUCENT_BRIGHT_PURPLE_SHADOW},
|
||||
{FilterPaletteID::PaletteTranslucentBrightPurple, FilterPaletteID::PaletteTranslucentBrightPurpleHighlight, FilterPaletteID::PaletteTranslucentBrightPurpleShadow},
|
||||
WINDOW_PALETTE_LIGHT_BLUE, // COLOUR_DARK_BLUE
|
||||
WINDOW_PALETTE_LIGHT_BLUE, // COLOUR_LIGHT_BLUE
|
||||
WINDOW_PALETTE_LIGHT_BLUE, // COLOUR_ICY_BLUE
|
||||
WINDOW_PALETTE_TEAL, // COLOUR_TEAL
|
||||
WINDOW_PALETTE_TEAL, // COLOUR_AQUAMARINE
|
||||
WINDOW_PALETTE_BRIGHT_GREEN, // COLOUR_SATURATED_GREEN
|
||||
{PALETTE_TRANSLUCENT_DARK_GREEN, PALETTE_TRANSLUCENT_DARK_GREEN_HIGHLIGHT, PALETTE_TRANSLUCENT_DARK_GREEN_SHADOW},
|
||||
{PALETTE_TRANSLUCENT_MOSS_GREEN, PALETTE_TRANSLUCENT_MOSS_GREEN_HIGHLIGHT, PALETTE_TRANSLUCENT_MOSS_GREEN_SHADOW},
|
||||
{FilterPaletteID::PaletteTranslucentDarkGreen, FilterPaletteID::PaletteTranslucentDarkGreenHighlight, FilterPaletteID::PaletteTranslucentDarkGreenShadow},
|
||||
{FilterPaletteID::PaletteTranslucentMossGreen, FilterPaletteID::PaletteTranslucentMossGreenHighlight, FilterPaletteID::PaletteTranslucentMossGreenShadow},
|
||||
WINDOW_PALETTE_BRIGHT_GREEN, // COLOUR_BRIGHT_GREEN
|
||||
{PALETTE_TRANSLUCENT_OLIVE_GREEN, PALETTE_TRANSLUCENT_OLIVE_GREEN_HIGHLIGHT, PALETTE_TRANSLUCENT_OLIVE_GREEN_SHADOW},
|
||||
{PALETTE_TRANSLUCENT_DARK_OLIVE_GREEN, PALETTE_TRANSLUCENT_DARK_OLIVE_GREEN_HIGHLIGHT, PALETTE_TRANSLUCENT_DARK_OLIVE_GREEN_SHADOW},
|
||||
{FilterPaletteID::PaletteTranslucentOliveGreen, FilterPaletteID::PaletteTranslucentOliveGreenHighlight, FilterPaletteID::PaletteTranslucentOliveGreenShadow},
|
||||
{FilterPaletteID::PaletteTranslucentDarkOliveGreen, FilterPaletteID::PaletteTranslucentDarkOliveGreenHighlight, FilterPaletteID::PaletteTranslucentDarkOliveGreenShadow},
|
||||
WINDOW_PALETTE_YELLOW, // COLOUR_BRIGHT_YELLOW
|
||||
WINDOW_PALETTE_YELLOW, // COLOUR_YELLOW
|
||||
WINDOW_PALETTE_YELLOW, // COLOUR_DARK_YELLOW
|
||||
|
@ -517,14 +517,14 @@ const translucent_window_palette TranslucentWindowPalettes[COLOUR_COUNT] = {
|
|||
WINDOW_PALETTE_LIGHT_ORANGE, // COLOUR_DARK_ORANGE
|
||||
WINDOW_PALETTE_LIGHT_BROWN, // COLOUR_LIGHT_BROWN
|
||||
WINDOW_PALETTE_LIGHT_BROWN, // COLOUR_SATURATED_BROWN
|
||||
{PALETTE_TRANSLUCENT_DARK_BROWN, PALETTE_TRANSLUCENT_DARK_BROWN_HIGHLIGHT, PALETTE_TRANSLUCENT_DARK_BROWN_SHADOW},
|
||||
{PALETTE_TRANSLUCENT_SALMON_PINK, PALETTE_TRANSLUCENT_SALMON_PINK_HIGHLIGHT, PALETTE_TRANSLUCENT_SALMON_PINK_SHADOW},
|
||||
{PALETTE_TRANSLUCENT_BORDEAUX_RED, PALETTE_TRANSLUCENT_BORDEAUX_RED_HIGHLIGHT, PALETTE_TRANSLUCENT_BORDEAUX_RED_SHADOW},
|
||||
{FilterPaletteID::PaletteTranslucentDarkBrown, FilterPaletteID::PaletteTranslucentDarkBrownHighlight, FilterPaletteID::PaletteTranslucentDarkBrownShadow},
|
||||
{FilterPaletteID::PaletteTranslucentSalmonPink, FilterPaletteID::PaletteTranslucentSalmonPinkHighlight, FilterPaletteID::PaletteTranslucentSalmonPinkShadow},
|
||||
{FilterPaletteID::PaletteTranslucentBordeauxRed, FilterPaletteID::PaletteTranslucentBordeauxRedHighlight, FilterPaletteID::PaletteTranslucentBordeauxRedShadow},
|
||||
WINDOW_PALETTE_BRIGHT_RED, // COLOUR_SATURATED_RED
|
||||
WINDOW_PALETTE_BRIGHT_RED, // COLOUR_BRIGHT_RED
|
||||
WINDOW_PALETTE_BRIGHT_PINK, // COLOUR_DARK_PINK
|
||||
WINDOW_PALETTE_BRIGHT_PINK, // COLOUR_BRIGHT_PINK
|
||||
{PALETTE_TRANSLUCENT_LIGHT_PINK, PALETTE_TRANSLUCENT_LIGHT_PINK_HIGHLIGHT, PALETTE_TRANSLUCENT_LIGHT_PINK_SHADOW},
|
||||
{FilterPaletteID::PaletteTranslucentLightPink, FilterPaletteID::PaletteTranslucentLightPinkHighlight, FilterPaletteID::PaletteTranslucentLightPinkShadow},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
@ -583,7 +583,7 @@ void gfx_draw_pixel(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, int32_
|
|||
gfx_fill_rect(dpi, { coords, coords }, colour);
|
||||
}
|
||||
|
||||
void gfx_filter_pixel(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, FILTER_PALETTE_ID palette)
|
||||
void gfx_filter_pixel(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, FilterPaletteID palette)
|
||||
{
|
||||
gfx_filter_rect(dpi, { coords, coords }, palette);
|
||||
}
|
||||
|
|
|
@ -189,121 +189,122 @@ enum
|
|||
INSET_RECT_FLAG_FILL_MID_LIGHT = (1 << 7), // 0x80
|
||||
};
|
||||
|
||||
enum FILTER_PALETTE_ID
|
||||
enum class FilterPaletteID : int32_t
|
||||
{
|
||||
PALETTE_NULL = 0,
|
||||
PaletteNull = 0,
|
||||
|
||||
PALETTE_WATER = 32,
|
||||
PaletteWater = 32,
|
||||
|
||||
PALETTE_34 = 34,
|
||||
Palette34 = 34,
|
||||
|
||||
PALETTE_45 = 45, // Decolourise + lighten
|
||||
PALETTE_46 = 46,
|
||||
Palette45 = 45, // Decolourise + lighten
|
||||
Palette46 = 46,
|
||||
|
||||
PALETTE_DARKEN_3 = 47,
|
||||
PaletteDarken3 = 47,
|
||||
|
||||
PALETTE_DARKEN_1 = 49,
|
||||
PALETTE_DARKEN_2 = 50,
|
||||
PALETTE_51 = 51, // Decolourise + darken
|
||||
PALETTE_TRANSLUCENT_GREY = 52,
|
||||
PALETTE_TRANSLUCENT_GREY_HIGHLIGHT = 53,
|
||||
PALETTE_TRANSLUCENT_GREY_SHADOW = 54,
|
||||
PALETTE_TRANSLUCENT_LIGHT_BLUE = 55,
|
||||
PALETTE_TRANSLUCENT_LIGHT_BLUE_HIGHLIGHT = 56,
|
||||
PALETTE_TRANSLUCENT_LIGHT_BLUE_SHADOW = 57,
|
||||
PALETTE_TRANSLUCENT_BORDEAUX_RED = 58,
|
||||
PALETTE_TRANSLUCENT_BORDEAUX_RED_HIGHLIGHT = 59,
|
||||
PALETTE_TRANSLUCENT_BORDEAUX_RED_SHADOW = 60,
|
||||
PALETTE_TRANSLUCENT_DARK_GREEN = 61,
|
||||
PALETTE_TRANSLUCENT_DARK_GREEN_HIGHLIGHT = 62,
|
||||
PALETTE_TRANSLUCENT_DARK_GREEN_SHADOW = 63,
|
||||
PALETTE_TRANSLUCENT_LIGHT_PURPLE = 64,
|
||||
PALETTE_TRANSLUCENT_LIGHT_PURPLE_HIGHLIGHT = 65,
|
||||
PALETTE_TRANSLUCENT_LIGHT_PURPLE_SHADOW = 66,
|
||||
PALETTE_TRANSLUCENT_DARK_OLIVE_GREEN = 67,
|
||||
PALETTE_TRANSLUCENT_DARK_OLIVE_GREEN_HIGHLIGHT = 68,
|
||||
PALETTE_TRANSLUCENT_DARK_OLIVE_GREEN_SHADOW = 69,
|
||||
PALETTE_TRANSLUCENT_LIGHT_BROWN = 70,
|
||||
PALETTE_TRANSLUCENT_LIGHT_BROWN_HIGHLIGHT = 71,
|
||||
PALETTE_TRANSLUCENT_LIGHT_BROWN_SHADOW = 72,
|
||||
PALETTE_TRANSLUCENT_YELLOW = 73,
|
||||
PALETTE_TRANSLUCENT_YELLOW_HIGHLIGHT = 74,
|
||||
PALETTE_TRANSLUCENT_YELLOW_SHADOW = 75,
|
||||
PALETTE_TRANSLUCENT_MOSS_GREEN = 76,
|
||||
PALETTE_TRANSLUCENT_MOSS_GREEN_HIGHLIGHT = 77,
|
||||
PALETTE_TRANSLUCENT_MOSS_GREEN_SHADOW = 78,
|
||||
PALETTE_TRANSLUCENT_OLIVE_GREEN = 79,
|
||||
PALETTE_TRANSLUCENT_OLIVE_GREEN_HIGHLIGHT = 80,
|
||||
PALETTE_TRANSLUCENT_OLIVE_GREEN_SHADOW = 81,
|
||||
PALETTE_TRANSLUCENT_BRIGHT_GREEN = 82,
|
||||
PALETTE_TRANSLUCENT_BRIGHT_GREEN_HIGHLIGHT = 83,
|
||||
PALETTE_TRANSLUCENT_BRIGHT_GREEN_SHADOW = 84,
|
||||
PALETTE_TRANSLUCENT_SALMON_PINK = 85,
|
||||
PALETTE_TRANSLUCENT_SALMON_PINK_HIGHLIGHT = 86,
|
||||
PALETTE_TRANSLUCENT_SALMON_PINK_SHADOW = 87,
|
||||
PALETTE_TRANSLUCENT_BRIGHT_PURPLE = 88,
|
||||
PALETTE_TRANSLUCENT_BRIGHT_PURPLE_HIGHLIGHT = 89,
|
||||
PALETTE_TRANSLUCENT_BRIGHT_PURPLE_SHADOW = 90,
|
||||
PALETTE_TRANSLUCENT_BRIGHT_RED = 91,
|
||||
PALETTE_TRANSLUCENT_BRIGHT_RED_HIGHLIGHT = 92,
|
||||
PALETTE_TRANSLUCENT_BRIGHT_RED_SHADOW = 93,
|
||||
PALETTE_TRANSLUCENT_LIGHT_ORANGE = 94,
|
||||
PALETTE_TRANSLUCENT_LIGHT_ORANGE_HIGHLIGHT = 95,
|
||||
PALETTE_TRANSLUCENT_LIGHT_ORANGE_SHADOW = 96,
|
||||
PALETTE_TRANSLUCENT_TEAL = 97,
|
||||
PALETTE_TRANSLUCENT_TEAL_HIGHLIGHT = 98,
|
||||
PALETTE_TRANSLUCENT_TEAL_SHADOW = 99,
|
||||
PALETTE_TRANSLUCENT_BRIGHT_PINK = 100,
|
||||
PALETTE_TRANSLUCENT_BRIGHT_PINK_HIGHLIGHT = 101,
|
||||
PALETTE_TRANSLUCENT_BRIGHT_PINK_SHADOW = 102,
|
||||
PALETTE_TRANSLUCENT_DARK_BROWN = 103,
|
||||
PALETTE_TRANSLUCENT_DARK_BROWN_HIGHLIGHT = 104,
|
||||
PALETTE_TRANSLUCENT_DARK_BROWN_SHADOW = 105,
|
||||
PALETTE_TRANSLUCENT_LIGHT_PINK = 106,
|
||||
PALETTE_TRANSLUCENT_LIGHT_PINK_HIGHLIGHT = 107,
|
||||
PALETTE_TRANSLUCENT_LIGHT_PINK_SHADOW = 108,
|
||||
PALETTE_TRANSLUCENT_WHITE = 109,
|
||||
PALETTE_TRANSLUCENT_WHITE_HIGHLIGHT = 110,
|
||||
PALETTE_TRANSLUCENT_WHITE_SHADOW = 111,
|
||||
PALETTE_GLASS_BLACK = 112 + COLOUR_BLACK,
|
||||
PALETTE_GLASS_GREY = 112 + COLOUR_GREY,
|
||||
PALETTE_GLASS_WHITE = 112 + COLOUR_WHITE,
|
||||
PALETTE_GLASS_DARK_PURPLE = 112 + COLOUR_DARK_PURPLE,
|
||||
PALETTE_GLASS_LIGHT_PURPLE = 112 + COLOUR_LIGHT_PURPLE,
|
||||
PALETTE_GLASS_BRIGHT_PURPLE = 112 + COLOUR_BRIGHT_PURPLE,
|
||||
PALETTE_GLASS_DARK_BLUE = 112 + COLOUR_DARK_BLUE,
|
||||
PALETTE_GLASS_LIGHT_BLUE = 112 + COLOUR_LIGHT_BLUE,
|
||||
PALETTE_GLASS_ICY_BLUE = 112 + COLOUR_ICY_BLUE,
|
||||
PALETTE_GLASS_TEAL = 112 + COLOUR_TEAL,
|
||||
PALETTE_GLASS_AQUAMARINE = 112 + COLOUR_AQUAMARINE,
|
||||
PALETTE_GLASS_SATURATED_GREEN = 112 + COLOUR_SATURATED_GREEN,
|
||||
PALETTE_GLASS_DARK_GREEN = 112 + COLOUR_DARK_GREEN,
|
||||
PALETTE_GLASS_MOSS_GREEN = 112 + COLOUR_MOSS_GREEN,
|
||||
PALETTE_GLASS_BRIGHT_GREEN = 112 + COLOUR_BRIGHT_GREEN,
|
||||
PALETTE_GLASS_OLIVE_GREEN = 112 + COLOUR_OLIVE_GREEN,
|
||||
PALETTE_GLASS_DARK_OLIVE_GREEN = 112 + COLOUR_DARK_OLIVE_GREEN,
|
||||
PALETTE_GLASS_BRIGHT_YELLOW = 112 + COLOUR_BRIGHT_YELLOW,
|
||||
PALETTE_GLASS_YELLOW = 112 + COLOUR_YELLOW,
|
||||
PALETTE_GLASS_DARK_YELLOW = 112 + COLOUR_DARK_YELLOW,
|
||||
PALETTE_GLASS_LIGHT_ORANGE = 112 + COLOUR_LIGHT_ORANGE,
|
||||
PALETTE_GLASS_DARK_ORANGE = 112 + COLOUR_DARK_ORANGE,
|
||||
PALETTE_GLASS_LIGHT_BROWN = 112 + COLOUR_LIGHT_BROWN,
|
||||
PALETTE_GLASS_SATURATED_BROWN = 112 + COLOUR_SATURATED_BROWN,
|
||||
PALETTE_GLASS_DARK_BROWN = 112 + COLOUR_DARK_BROWN,
|
||||
PALETTE_GLASS_SALMON_PINK = 112 + COLOUR_SALMON_PINK,
|
||||
PALETTE_GLASS_BORDEAUX_RED = 112 + COLOUR_BORDEAUX_RED,
|
||||
PALETTE_GLASS_SATURATED_RED = 112 + COLOUR_SATURATED_RED,
|
||||
PALETTE_GLASS_BRIGHT_RED = 112 + COLOUR_BRIGHT_RED,
|
||||
PALETTE_GLASS_DARK_PINK = 112 + COLOUR_DARK_PINK,
|
||||
PALETTE_GLASS_BRIGHT_PINK = 112 + COLOUR_BRIGHT_PINK,
|
||||
PALETTE_GLASS_LIGHT_PINK = 112 + COLOUR_LIGHT_PINK,
|
||||
PaletteDarken1 = 49,
|
||||
PaletteDarken2 = 50,
|
||||
Palette51 = 51, // Decolourise + darken
|
||||
PaletteTranslucentGrey = 52,
|
||||
PaletteTranslucentGreyHighlight = 53,
|
||||
PaletteTranslucentGreyShadow = 54,
|
||||
PaletteTranslucentLightBlue = 55,
|
||||
PaletteTranslucentLightBlueHighlight = 56,
|
||||
PaletteTranslucentLightBlueShadow = 57,
|
||||
PaletteTranslucentBordeauxRed = 58,
|
||||
PaletteTranslucentBordeauxRedHighlight = 59,
|
||||
PaletteTranslucentBordeauxRedShadow = 60,
|
||||
PaletteTranslucentDarkGreen = 61,
|
||||
PaletteTranslucentDarkGreenHighlight = 62,
|
||||
PaletteTranslucentDarkGreenShadow = 63,
|
||||
PaletteTranslucentLightPurple = 64,
|
||||
PaletteTranslucentLightPurpleHighlight = 65,
|
||||
PaletteTranslucentLightPurpleShadow = 66,
|
||||
PaletteTranslucentDarkOliveGreen = 67,
|
||||
PaletteTranslucentDarkOliveGreenHighlight = 68,
|
||||
PaletteTranslucentDarkOliveGreenShadow = 69,
|
||||
PaletteTranslucentLightBrown = 70,
|
||||
PaletteTranslucentLightBrownHighlight = 71,
|
||||
PaletteTranslucentLightBrownShadow = 72,
|
||||
PaletteTranslucentYellow = 73,
|
||||
PaletteTranslucentYellowHighlight = 74,
|
||||
PaletteTranslucentYellowShadow = 75,
|
||||
PaletteTranslucentMossGreen = 76,
|
||||
PaletteTranslucentMossGreenHighlight = 77,
|
||||
PaletteTranslucentMossGreenShadow = 78,
|
||||
PaletteTranslucentOliveGreen = 79,
|
||||
PaletteTranslucentOliveGreenHighlight = 80,
|
||||
PaletteTranslucentOliveGreenShadow = 81,
|
||||
PaletteTranslucentBrightGreen = 82,
|
||||
PaletteTranslucentBrightGreenHighlight = 83,
|
||||
PaletteTranslucentBrightGreenShadow = 84,
|
||||
PaletteTranslucentSalmonPink = 85,
|
||||
PaletteTranslucentSalmonPinkHighlight = 86,
|
||||
PaletteTranslucentSalmonPinkShadow = 87,
|
||||
PaletteTranslucentBrightPurple = 88,
|
||||
PaletteTranslucentBrightPurpleHighlight = 89,
|
||||
PaletteTranslucentBrightPurpleShadow = 90,
|
||||
PaletteTranslucentBrightRed = 91,
|
||||
PaletteTranslucentBrightRedHighlight = 92,
|
||||
PaletteTranslucentBrightRedShadow = 93,
|
||||
PaletteTranslucentLightOrange = 94,
|
||||
PaletteTranslucentLightOrangeHighlight = 95,
|
||||
PaletteTranslucentLightOrangeShadow = 96,
|
||||
PaletteTranslucentTeal = 97,
|
||||
PaletteTranslucentTealHighlight = 98,
|
||||
PaletteTranslucentTealShadow = 99,
|
||||
PaletteTranslucentBrightPink = 100,
|
||||
PaletteTranslucentBrightPinkHighlight = 101,
|
||||
PaletteTranslucentBrightPinkShadow = 102,
|
||||
PaletteTranslucentDarkBrown = 103,
|
||||
PaletteTranslucentDarkBrownHighlight = 104,
|
||||
PaletteTranslucentDarkBrownShadow = 105,
|
||||
PaletteTranslucentLightPink = 106,
|
||||
PaletteTranslucentLightPinkHighlight = 107,
|
||||
PaletteTranslucentLightPinkShadow = 108,
|
||||
PaletteTranslucentWhite = 109,
|
||||
PaletteTranslucentWhiteHighlight = 110,
|
||||
PaletteTranslucentWhiteShadow = 111,
|
||||
PaletteGlass = 112,
|
||||
PaletteGlassBlack = PaletteGlass + COLOUR_BLACK,
|
||||
PaletteGlassGrey = PaletteGlass + COLOUR_GREY,
|
||||
PaletteGlassWhite = PaletteGlass + COLOUR_WHITE,
|
||||
PaletteGlassDarkPurple = PaletteGlass + COLOUR_DARK_PURPLE,
|
||||
PaletteGlassLightPurple = PaletteGlass + COLOUR_LIGHT_PURPLE,
|
||||
PaletteGlassBrightPurple = PaletteGlass + COLOUR_BRIGHT_PURPLE,
|
||||
PaletteGlassDarkBlue = PaletteGlass + COLOUR_DARK_BLUE,
|
||||
PaletteGlassLightBlue = PaletteGlass + COLOUR_LIGHT_BLUE,
|
||||
PaletteGlassIcyBlue = PaletteGlass + COLOUR_ICY_BLUE,
|
||||
PaletteGlassTeal = PaletteGlass + COLOUR_TEAL,
|
||||
PaletteGlassAquamarine = PaletteGlass + COLOUR_AQUAMARINE,
|
||||
PaletteGlassSaturatedGreen = PaletteGlass + COLOUR_SATURATED_GREEN,
|
||||
PaletteGlassDarkGreen = PaletteGlass + COLOUR_DARK_GREEN,
|
||||
PaletteGlassMossGreen = PaletteGlass + COLOUR_MOSS_GREEN,
|
||||
PaletteGlassBrightGreen = PaletteGlass + COLOUR_BRIGHT_GREEN,
|
||||
PaletteGlassOliveGreen = PaletteGlass + COLOUR_OLIVE_GREEN,
|
||||
PaletteGlassDarkOliveGreen = PaletteGlass + COLOUR_DARK_OLIVE_GREEN,
|
||||
PaletteGlassBrightYellow = PaletteGlass + COLOUR_BRIGHT_YELLOW,
|
||||
PaletteGlassYellow = PaletteGlass + COLOUR_YELLOW,
|
||||
PaletteGlassDarkYellow = PaletteGlass + COLOUR_DARK_YELLOW,
|
||||
PaletteGlassLightOrange = PaletteGlass + COLOUR_LIGHT_ORANGE,
|
||||
PaletteGlassDarkOrange = PaletteGlass + COLOUR_DARK_ORANGE,
|
||||
PaletteGlassLightBrown = PaletteGlass + COLOUR_LIGHT_BROWN,
|
||||
PaletteGlassSaturatedBrown = PaletteGlass + COLOUR_SATURATED_BROWN,
|
||||
PaletteGlassDarkBrown = PaletteGlass + COLOUR_DARK_BROWN,
|
||||
PaletteGlassSalmonPink = PaletteGlass + COLOUR_SALMON_PINK,
|
||||
PaletteGlassBordeauxRed = PaletteGlass + COLOUR_BORDEAUX_RED,
|
||||
PaletteGlassSaturatedRed = PaletteGlass + COLOUR_SATURATED_RED,
|
||||
PaletteGlassBrightRed = PaletteGlass + COLOUR_BRIGHT_RED,
|
||||
PaletteGlassDarkPink = PaletteGlass + COLOUR_DARK_PINK,
|
||||
PaletteGlassBrightPink = PaletteGlass + COLOUR_BRIGHT_PINK,
|
||||
PaletteGlassLightPink = PaletteGlass + COLOUR_LIGHT_PINK,
|
||||
};
|
||||
|
||||
struct translucent_window_palette
|
||||
{
|
||||
FILTER_PALETTE_ID base;
|
||||
FILTER_PALETTE_ID highlight;
|
||||
FILTER_PALETTE_ID shadow;
|
||||
FilterPaletteID base;
|
||||
FilterPaletteID highlight;
|
||||
FilterPaletteID shadow;
|
||||
};
|
||||
|
||||
struct rct_size16
|
||||
|
@ -649,7 +650,7 @@ extern thread_local uint16_t gCurrentFontFlags;
|
|||
extern GamePalette gPalette;
|
||||
extern uint8_t gGamePalette[256 * 4];
|
||||
extern uint32_t gPaletteEffectFrame;
|
||||
extern const FILTER_PALETTE_ID GlassPaletteIds[COLOUR_COUNT];
|
||||
extern const FilterPaletteID GlassPaletteIds[COLOUR_COUNT];
|
||||
extern uint8_t gPeepPalette[256];
|
||||
extern uint8_t gOtherPalette[256];
|
||||
extern uint8_t text_palette[];
|
||||
|
@ -680,7 +681,7 @@ void load_palette();
|
|||
// other
|
||||
void gfx_clear(rct_drawpixelinfo* dpi, uint8_t paletteIndex);
|
||||
void gfx_draw_pixel(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, int32_t colour);
|
||||
void gfx_filter_pixel(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, FILTER_PALETTE_ID palette);
|
||||
void gfx_filter_pixel(rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, FilterPaletteID palette);
|
||||
void gfx_invalidate_pickedup_peep();
|
||||
void gfx_draw_pickedup_peep(rct_drawpixelinfo* dpi);
|
||||
|
||||
|
@ -695,9 +696,8 @@ void gfx_fill_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t colou
|
|||
void gfx_fill_rect_inset(
|
||||
rct_drawpixelinfo* dpi, int16_t left, int16_t top, int16_t right, int16_t bottom, int32_t colour, uint8_t flags);
|
||||
void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t colour, uint8_t flags);
|
||||
void gfx_filter_rect(
|
||||
rct_drawpixelinfo* dpi, int32_t left, int32_t top, int32_t right, int32_t bottom, FILTER_PALETTE_ID palette);
|
||||
void gfx_filter_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, FILTER_PALETTE_ID palette);
|
||||
void gfx_filter_rect(rct_drawpixelinfo* dpi, int32_t left, int32_t top, int32_t right, int32_t bottom, FilterPaletteID palette);
|
||||
void gfx_filter_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, FilterPaletteID palette);
|
||||
|
||||
// sprite
|
||||
bool gfx_load_g1(const OpenRCT2::IPlatformEnvironment& env);
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace OpenRCT2::Drawing
|
|||
|
||||
virtual void Clear(uint8_t paletteIndex) abstract;
|
||||
virtual void FillRect(uint32_t colour, int32_t left, int32_t top, int32_t right, int32_t bottom) abstract;
|
||||
virtual void FilterRect(FILTER_PALETTE_ID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) abstract;
|
||||
virtual void FilterRect(FilterPaletteID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) abstract;
|
||||
virtual void DrawLine(uint32_t colour, int32_t x1, int32_t y1, int32_t x2, int32_t y2) abstract;
|
||||
virtual void DrawSprite(uint32_t image, int32_t x, int32_t y, uint32_t tertiaryColour) abstract;
|
||||
virtual void DrawSpriteRawMasked(int32_t x, int32_t y, uint32_t maskImage, uint32_t colourImage) abstract;
|
||||
|
|
|
@ -191,13 +191,12 @@ void gfx_fill_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, int32_t colou
|
|||
}
|
||||
}
|
||||
|
||||
void gfx_filter_rect(
|
||||
rct_drawpixelinfo* dpi, int32_t left, int32_t top, int32_t right, int32_t bottom, FILTER_PALETTE_ID palette)
|
||||
void gfx_filter_rect(rct_drawpixelinfo* dpi, int32_t left, int32_t top, int32_t right, int32_t bottom, FilterPaletteID palette)
|
||||
{
|
||||
gfx_filter_rect(dpi, { left, top, right, bottom }, palette);
|
||||
}
|
||||
|
||||
void gfx_filter_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, FILTER_PALETTE_ID palette)
|
||||
void gfx_filter_rect(rct_drawpixelinfo* dpi, const ScreenRect& rect, FilterPaletteID palette)
|
||||
{
|
||||
auto drawingEngine = dpi->DrawingEngine;
|
||||
if (drawingEngine != nullptr)
|
||||
|
|
|
@ -654,7 +654,7 @@ void X8DrawingContext::FillRect(uint32_t colour, int32_t left, int32_t top, int3
|
|||
}
|
||||
}
|
||||
|
||||
void X8DrawingContext::FilterRect(FILTER_PALETTE_ID palette, int32_t left, int32_t top, int32_t right, int32_t bottom)
|
||||
void X8DrawingContext::FilterRect(FilterPaletteID palette, int32_t left, int32_t top, int32_t right, int32_t bottom)
|
||||
{
|
||||
rct_drawpixelinfo* dpi = _dpi;
|
||||
|
||||
|
@ -706,7 +706,7 @@ void X8DrawingContext::FilterRect(FILTER_PALETTE_ID palette, int32_t left, int32
|
|||
(startY / dpi->zoom_level) * ((dpi->width / dpi->zoom_level) + dpi->pitch) + (startX / dpi->zoom_level));
|
||||
|
||||
// Find colour in colour table?
|
||||
auto paletteMap = GetPaletteMapForColour(palette);
|
||||
auto paletteMap = GetPaletteMapForColour(EnumValue(palette));
|
||||
if (paletteMap)
|
||||
{
|
||||
const int32_t scaled_width = width / dpi->zoom_level;
|
||||
|
|
|
@ -145,7 +145,7 @@ namespace OpenRCT2
|
|||
|
||||
void Clear(uint8_t paletteIndex) override;
|
||||
void FillRect(uint32_t colour, int32_t x, int32_t y, int32_t w, int32_t h) override;
|
||||
void FilterRect(FILTER_PALETTE_ID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) override;
|
||||
void FilterRect(FilterPaletteID palette, int32_t left, int32_t top, int32_t right, int32_t bottom) override;
|
||||
void DrawLine(uint32_t colour, int32_t x1, int32_t y1, int32_t x2, int32_t y2) override;
|
||||
void DrawSprite(uint32_t image, int32_t x, int32_t y, uint32_t tertiaryColour) override;
|
||||
void DrawSpriteRawMasked(int32_t x, int32_t y, uint32_t maskImage, uint32_t colourImage) override;
|
||||
|
|
|
@ -143,7 +143,7 @@ void chat_draw(rct_drawpixelinfo* dpi, uint8_t chatBackgroundColor)
|
|||
{ topLeft - ScreenCoordsXY{ 0, 5 }, bottomRight + ScreenCoordsXY{ 0, 5 } }); // Background area + Textbox
|
||||
gfx_filter_rect(
|
||||
dpi, { topLeft - ScreenCoordsXY{ 0, 5 }, bottomRight + ScreenCoordsXY{ 0, 5 } },
|
||||
PALETTE_51); // Opaque gray background
|
||||
FilterPaletteID::Palette51); // Opaque gray background
|
||||
gfx_fill_rect_inset(
|
||||
dpi, { topLeft - ScreenCoordsXY{ 0, 5 }, bottomRight + ScreenCoordsXY{ 0, 5 } }, chatBackgroundColor,
|
||||
INSET_RECT_FLAG_FILL_NONE);
|
||||
|
|
|
@ -1017,7 +1017,7 @@ void viewport_paint(
|
|||
static void viewport_paint_weather_gloom(rct_drawpixelinfo* dpi)
|
||||
{
|
||||
auto paletteId = climate_get_weather_gloom_palette_id(gClimateCurrent);
|
||||
if (paletteId != PALETTE_NULL)
|
||||
if (paletteId != FilterPaletteID::PaletteNull)
|
||||
{
|
||||
// Only scale width if zoomed in more than 1:1
|
||||
auto zoomLevel = dpi->zoom_level < 0 ? dpi->zoom_level : 0;
|
||||
|
|
|
@ -50,14 +50,14 @@ void StationObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t h
|
|||
|
||||
auto colour0 = COLOUR_LIGHT_BLUE;
|
||||
auto colour1 = COLOUR_BORDEAUX_RED;
|
||||
auto tcolour0 = GlassPaletteIds[colour0];
|
||||
auto tcolour0 = EnumValue(GlassPaletteIds[colour0]);
|
||||
|
||||
uint32_t imageId = BaseImageId;
|
||||
uint32_t tImageId = BaseImageId + 16;
|
||||
if (Flags & STATION_OBJECT_FLAGS::HAS_PRIMARY_COLOUR)
|
||||
{
|
||||
imageId |= (colour0 << 19) | IMAGE_TYPE_REMAP;
|
||||
tImageId |= (GlassPaletteIds[tcolour0] << 19) | IMAGE_TYPE_TRANSPARENT;
|
||||
tImageId |= (EnumValue(GlassPaletteIds[tcolour0]) << 19) | IMAGE_TYPE_TRANSPARENT;
|
||||
}
|
||||
if (Flags & STATION_OBJECT_FLAGS::HAS_SECONDARY_COLOUR)
|
||||
{
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "../config/Config.h"
|
||||
#include "../interface/Viewport.h"
|
||||
#include "../sprites.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../world/Location.hpp"
|
||||
#include "../world/Map.h"
|
||||
#include "Paint.h"
|
||||
|
@ -404,7 +405,7 @@ void virtual_floor_paint(paint_session* session)
|
|||
if (!weAreOccupied && !weAreLit && weAreAboveGround && weAreOwned)
|
||||
{
|
||||
int32_t imageColourFlats = SPR_G2_SURFACE_GLASSY_RECOLOURABLE | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT
|
||||
| PALETTE_WATER << 19;
|
||||
| EnumValue(FilterPaletteID::PaletteWater) << 19;
|
||||
PaintAddImageAsParent(session, imageColourFlats, 0, 0, 30, 30, 0, _virtualFloorHeight, 2, 2, _virtualFloorHeight - 3);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ static void ride_entrance_exit_paint(paint_session* session, uint8_t direction,
|
|||
uint32_t transparant_image_id = 0, image_id = 0;
|
||||
if (stationObj->Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT)
|
||||
{
|
||||
colour_1 = GlassPaletteIds[ride->track_colour[0].main];
|
||||
colour_1 = EnumValue(GlassPaletteIds[ride->track_colour[0].main]);
|
||||
transparant_image_id = (colour_1 << 19) | IMAGE_TYPE_TRANSPARENT;
|
||||
}
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ void large_scenery_paint(paint_session* session, uint8_t direction, uint16_t hei
|
|||
{
|
||||
if (!track_design_save_contains_tile_element(tileElement))
|
||||
{
|
||||
sequenceNum = SPRITE_ID_PALETTE_COLOUR_1(PALETTE_46);
|
||||
sequenceNum = SPRITE_ID_PALETTE_COLOUR_1(EnumValue(FilterPaletteID::Palette46));
|
||||
image_id &= 0x7FFFF;
|
||||
dword_F4387C = sequenceNum;
|
||||
image_id |= dword_F4387C;
|
||||
|
|
|
@ -826,13 +826,13 @@ void path_paint(paint_session* session, uint16_t height, const TileElement* tile
|
|||
|
||||
if (!track_design_save_contains_tile_element(tile_element))
|
||||
{
|
||||
imageFlags = SPRITE_ID_PALETTE_COLOUR_1(PALETTE_46);
|
||||
imageFlags = SPRITE_ID_PALETTE_COLOUR_1(EnumValue(FilterPaletteID::Palette46));
|
||||
}
|
||||
}
|
||||
|
||||
if (session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)
|
||||
{
|
||||
imageFlags = SPRITE_ID_PALETTE_COLOUR_1(PALETTE_46);
|
||||
imageFlags = SPRITE_ID_PALETTE_COLOUR_1(EnumValue(FilterPaletteID::Palette46));
|
||||
}
|
||||
|
||||
if (tile_element->AsPath()->AdditionIsGhost())
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../localisation/Date.h"
|
||||
#include "../../ride/TrackDesign.h"
|
||||
#include "../../util/Util.h"
|
||||
#include "../../world/Map.h"
|
||||
#include "../../world/Scenery.h"
|
||||
#include "../../world/SmallScenery.h"
|
||||
|
@ -49,7 +50,7 @@ void scenery_paint(paint_session* session, uint8_t direction, int32_t height, co
|
|||
{
|
||||
if (!track_design_save_contains_tile_element(tileElement))
|
||||
{
|
||||
baseImageid = SPRITE_ID_PALETTE_COLOUR_1(PALETTE_46);
|
||||
baseImageid = SPRITE_ID_PALETTE_COLOUR_1(EnumValue(FilterPaletteID::Palette46));
|
||||
}
|
||||
}
|
||||
if (tileElement->IsGhost())
|
||||
|
@ -165,7 +166,7 @@ void scenery_paint(paint_session* session, uint8_t direction, int32_t height, co
|
|||
{
|
||||
// Draw translucent overlay:
|
||||
// TODO: Name palette entries
|
||||
int32_t image_id = (baseImageid & 0x7FFFF) + (GlassPaletteIds[sceneryElement->GetPrimaryColour()] << 19)
|
||||
int32_t image_id = (baseImageid & 0x7FFFF) + (EnumValue(GlassPaletteIds[sceneryElement->GetPrimaryColour()]) << 19)
|
||||
+ 0x40000004;
|
||||
PaintAddImageAsChild(
|
||||
session, image_id, x_offset, y_offset, boxlength.x, boxlength.y, boxlength.z - 1, height, boxoffset.x,
|
||||
|
|
|
@ -1312,7 +1312,7 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
|
|||
}
|
||||
|
||||
const int32_t image_id = (SPR_WATER_MASK + image_offset) | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT
|
||||
| PALETTE_WATER << 19;
|
||||
| EnumValue(FilterPaletteID::PaletteWater) << 19;
|
||||
PaintAddImageAsParent(session, image_id, 0, 0, 32, 32, -1, waterHeight);
|
||||
|
||||
PaintAttachToPreviousPS(session, SPR_WATER_OVERLAY + image_offset, 0, 0);
|
||||
|
|
|
@ -194,7 +194,7 @@ void fence_paint(paint_session* session, uint8_t direction, int32_t height, cons
|
|||
{
|
||||
if (!track_design_save_contains_tile_element(tile_element))
|
||||
{
|
||||
dword_141F710 = SPRITE_ID_PALETTE_COLOUR_1(PALETTE_46);
|
||||
dword_141F710 = SPRITE_ID_PALETTE_COLOUR_1(EnumValue(FilterPaletteID::Palette46));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "../../interface/Viewport.h"
|
||||
#include "../../paint/Paint.h"
|
||||
#include "../../paint/Supports.h"
|
||||
#include "../../util/Util.h"
|
||||
#include "../Track.h"
|
||||
#include "../TrackPaint.h"
|
||||
|
||||
|
@ -32,7 +33,7 @@ static void paint_dodgems_roof(paint_session* session, int32_t height, int32_t o
|
|||
uint32_t image_id = (SPR_DODGEMS_ROOF_FRAME + offset) | session->TrackColours[SCHEME_TRACK];
|
||||
PaintAddImageAsParent(session, image_id, 0, 0, 32, 32, 2, height);
|
||||
|
||||
image_id = (SPR_DODGEMS_ROOF_GLASS + offset) | (PALETTE_DARKEN_3 << 19) | IMAGE_TYPE_TRANSPARENT;
|
||||
image_id = (SPR_DODGEMS_ROOF_GLASS + offset) | (EnumValue(FilterPaletteID::PaletteDarken3) << 19) | IMAGE_TYPE_TRANSPARENT;
|
||||
PaintAttachToPreviousPS(session, image_id, 0, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -629,8 +629,9 @@ static void paint_miniature_railway_track_flat(
|
|||
imageId, session->PathElementOnSameHeight, direction, session->CurrentRotation);
|
||||
PaintAddImageAsChildRotated(
|
||||
session, direction,
|
||||
(imageIdAlt & 0x7FFFF) | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT | (PALETTE_DARKEN_2 << 19), 0, 6, 32, 20, 2,
|
||||
height, 0, 6, height + 2);
|
||||
(imageIdAlt & 0x7FFFF) | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT
|
||||
| (EnumValue(FilterPaletteID::PaletteDarken2) << 19),
|
||||
0, 6, 32, 20, 2, height, 0, 6, height + 2);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -653,8 +654,9 @@ static void paint_miniature_railway_track_flat(
|
|||
imageId, session->PathElementOnSameHeight, direction, session->CurrentRotation);
|
||||
PaintAddImageAsParentRotated(
|
||||
session, direction,
|
||||
(imageIdAlt & 0x7FFFF) | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT | (PALETTE_DARKEN_2 << 19), 0, 6, 32, 20, 2,
|
||||
height, 0, 6, height + 2);
|
||||
(imageIdAlt & 0x7FFFF) | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT
|
||||
| (EnumValue(FilterPaletteID::PaletteDarken2) << 19),
|
||||
0, 6, 32, 20, 2, height, 0, 6, height + 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ struct WeatherTransition
|
|||
|
||||
extern const WeatherTransition* ClimateTransitions[4];
|
||||
extern const WeatherState ClimateWeatherData[EnumValue(WeatherType::Count)];
|
||||
extern const FILTER_PALETTE_ID ClimateWeatherGloomColours[4];
|
||||
extern const FilterPaletteID ClimateWeatherGloomColours[4];
|
||||
|
||||
// Climate data
|
||||
ClimateType gClimate;
|
||||
|
@ -247,9 +247,9 @@ bool WeatherIsDry(WeatherType weatherType)
|
|||
|| weatherType == WeatherType::Cloudy;
|
||||
}
|
||||
|
||||
FILTER_PALETTE_ID climate_get_weather_gloom_palette_id(const ClimateState& state)
|
||||
FilterPaletteID climate_get_weather_gloom_palette_id(const ClimateState& state)
|
||||
{
|
||||
auto paletteId = PALETTE_NULL;
|
||||
auto paletteId = FilterPaletteID::PaletteNull;
|
||||
auto gloom = state.WeatherGloom;
|
||||
if (gloom < std::size(ClimateWeatherGloomColours))
|
||||
{
|
||||
|
@ -436,11 +436,11 @@ static void climate_play_thunder(int32_t instanceIndex, OpenRCT2::Audio::SoundId
|
|||
|
||||
#pragma region Climate / Weather data tables
|
||||
|
||||
const FILTER_PALETTE_ID ClimateWeatherGloomColours[4] = {
|
||||
PALETTE_NULL,
|
||||
PALETTE_DARKEN_1,
|
||||
PALETTE_DARKEN_2,
|
||||
PALETTE_DARKEN_3,
|
||||
const FilterPaletteID ClimateWeatherGloomColours[4] = {
|
||||
FilterPaletteID::PaletteNull,
|
||||
FilterPaletteID::PaletteDarken1,
|
||||
FilterPaletteID::PaletteDarken2,
|
||||
FilterPaletteID::PaletteDarken3,
|
||||
};
|
||||
|
||||
// There is actually a sprite at 0x5A9C for snow but only these weather types seem to be fully implemented
|
||||
|
|
|
@ -85,5 +85,5 @@ void climate_force_weather(WeatherType weather);
|
|||
bool climate_is_raining();
|
||||
bool climate_is_snowing();
|
||||
bool WeatherIsDry(WeatherType);
|
||||
FILTER_PALETTE_ID climate_get_weather_gloom_palette_id(const ClimateState& state);
|
||||
FilterPaletteID climate_get_weather_gloom_palette_id(const ClimateState& state);
|
||||
uint32_t climate_get_weather_sprite_id(const ClimateState& state);
|
||||
|
|
Loading…
Reference in New Issue