From f5db6dbde96337e6015fb2eaceeec787a84130f0 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Mon, 29 Jan 2018 20:54:49 +0100 Subject: [PATCH] Replace constants with palette codes. --- src/openrct2/drawing/Drawing.h | 1 + src/openrct2/paint/tile_element/Fence.cpp | 2 +- src/openrct2/paint/tile_element/LargeScenery.cpp | 2 +- src/openrct2/paint/tile_element/Path.cpp | 4 ++-- src/openrct2/paint/tile_element/SmallScenery.cpp | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/openrct2/drawing/Drawing.h b/src/openrct2/drawing/Drawing.h index 1a1aae3a5b..234f0dc930 100644 --- a/src/openrct2/drawing/Drawing.h +++ b/src/openrct2/drawing/Drawing.h @@ -87,6 +87,7 @@ typedef enum { PALETTE_34 = 34, PALETTE_45 = 45, // Decolourise + lighten + PALETTE_46 = 46, PALETTE_DARKEN_3 = 47, diff --git a/src/openrct2/paint/tile_element/Fence.cpp b/src/openrct2/paint/tile_element/Fence.cpp index 4b004fa16e..a95804a7a2 100644 --- a/src/openrct2/paint/tile_element/Fence.cpp +++ b/src/openrct2/paint/tile_element/Fence.cpp @@ -167,7 +167,7 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, rct_ti uint32 dword_141F710 = 0; if (gTrackDesignSaveMode || (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) { if (!track_design_save_contains_tile_element(tile_element)) { - dword_141F710 = 0x21700000; + dword_141F710 = SPRITE_ID_PALETTE_COLOUR_1(PALETTE_46); } } diff --git a/src/openrct2/paint/tile_element/LargeScenery.cpp b/src/openrct2/paint/tile_element/LargeScenery.cpp index 06c3495a84..156636fc3d 100644 --- a/src/openrct2/paint/tile_element/LargeScenery.cpp +++ b/src/openrct2/paint/tile_element/LargeScenery.cpp @@ -205,7 +205,7 @@ void large_scenery_paint(paint_session * session, uint8 direction, uint16 height LocationXYZ16 boxoffset; if (gTrackDesignSaveMode) { if (!track_design_save_contains_tile_element(tileElement)) { - sequenceNum = 0x21700000; + sequenceNum = SPRITE_ID_PALETTE_COLOUR_1(PALETTE_46); image_id &= 0x7FFFF; dword_F4387C = sequenceNum; image_id |= dword_F4387C; diff --git a/src/openrct2/paint/tile_element/Path.cpp b/src/openrct2/paint/tile_element/Path.cpp index 40102f4d3a..68acb90e7a 100644 --- a/src/openrct2/paint/tile_element/Path.cpp +++ b/src/openrct2/paint/tile_element/Path.cpp @@ -699,13 +699,13 @@ void path_paint(paint_session * session, uint8 direction, uint16 height, rct_til } if (!track_design_save_contains_tile_element(tile_element)) { - imageFlags = 0x21700000; + imageFlags = SPRITE_ID_PALETTE_COLOUR_1(PALETTE_46); } } if (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) { - imageFlags = 0x21700000; + imageFlags = SPRITE_ID_PALETTE_COLOUR_1(PALETTE_46); } if (footpath_element_path_scenery_is_ghost(tile_element)) { diff --git a/src/openrct2/paint/tile_element/SmallScenery.cpp b/src/openrct2/paint/tile_element/SmallScenery.cpp index 94d275142b..33a546f799 100644 --- a/src/openrct2/paint/tile_element/SmallScenery.cpp +++ b/src/openrct2/paint/tile_element/SmallScenery.cpp @@ -59,7 +59,7 @@ void scenery_paint(paint_session * session, uint8 direction, sint32 height, rct_ const sint32 rotation = get_current_rotation(); if (gTrackDesignSaveMode) { if (!track_design_save_contains_tile_element(tileElement)) { - baseImageid = 0x21700000; + baseImageid = SPRITE_ID_PALETTE_COLOUR_1(PALETTE_46); } } if (tileElement->flags & TILE_ELEMENT_FLAG_GHOST) {