From 273edee6340644e7ee9549b16855bcf84ec69e13 Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Mon, 4 Dec 2017 10:12:42 +0100 Subject: [PATCH] Turn construction marker into a define --- data/language/en-GB.txt | 2 +- src/openrct2/paint/Paint.cpp | 3 --- src/openrct2/paint/paint.h | 4 ++-- src/openrct2/paint/tile_element/banner.c | 2 +- src/openrct2/paint/tile_element/entrance.c | 4 ++-- src/openrct2/paint/tile_element/fence.c | 2 +- src/openrct2/paint/tile_element/large_scenery.c | 2 +- src/openrct2/paint/tile_element/path.c | 4 ++-- src/openrct2/paint/tile_element/scenery.c | 2 +- src/openrct2/ride/track_paint.c | 2 +- 10 files changed, 12 insertions(+), 15 deletions(-) diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index d9effcd08f..aa6ebf0646 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -3845,7 +3845,7 @@ STR_5503 :Enter hostname or IP address: STR_5504 :{SMALLFONT}{BLACK}Show multiplayer status STR_5505 :Unable to connect to server. STR_5506 :Guests ignore intensities -STR_5507 : +STR_5507 : STR_5508 :Allow loading files with incorrect checksums STR_5509 :{SMALLFONT}{BLACK}Allows loading scenarios and saves{NEWLINE}that have an incorrect checksum,{NEWLINE}like the scenarios from the demo{NEWLINE}or damaged saves. STR_5510 :Default sound device diff --git a/src/openrct2/paint/Paint.cpp b/src/openrct2/paint/Paint.cpp index be7cb86018..bba6fd914e 100644 --- a/src/openrct2/paint/Paint.cpp +++ b/src/openrct2/paint/Paint.cpp @@ -28,9 +28,6 @@ // Global for paint clipping height uint8 gClipHeight = 128; // Default to middle value -// Global for (white) construction marker mask. -uint32 const gConstructionMarker = COLOUR_DARK_GREEN << 19 | COLOUR_GREY << 24 | IMAGE_TYPE_REMAP; - paint_session gPaintSession; static bool _paintSessionInUse; diff --git a/src/openrct2/paint/paint.h b/src/openrct2/paint/paint.h index a9816ec784..6a5850797a 100644 --- a/src/openrct2/paint/paint.h +++ b/src/openrct2/paint/paint.h @@ -210,8 +210,8 @@ extern "C" { // Global for paint clipping height. extern uint8 gClipHeight; -/** rct2: 0x00993CC4 */ -extern const uint32 gConstructionMarker; +/** rct2: 0x00993CC4. The white ghost that indicates not-yet-built elements. */ +#define CONSTRUCTION_MARKER (COLOUR_DARK_GREEN << 19 | COLOUR_GREY << 24 | IMAGE_TYPE_REMAP); extern bool gShowDirtyVisuals; extern bool gPaintBoundingBoxes; diff --git a/src/openrct2/paint/tile_element/banner.c b/src/openrct2/paint/tile_element/banner.c index 33e70132b4..c3002d96ca 100644 --- a/src/openrct2/paint/tile_element/banner.c +++ b/src/openrct2/paint/tile_element/banner.c @@ -65,7 +65,7 @@ void banner_paint(paint_session * session, uint8 direction, sint32 height, rct_t if (tile_element->flags & TILE_ELEMENT_FLAG_GHOST) // if being placed { session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE; - image_id |= gConstructionMarker; + image_id |= CONSTRUCTION_MARKER; } else{ image_id |= diff --git a/src/openrct2/paint/tile_element/entrance.c b/src/openrct2/paint/tile_element/entrance.c index b8e6266d50..c2a9be1ac4 100644 --- a/src/openrct2/paint/tile_element/entrance.c +++ b/src/openrct2/paint/tile_element/entrance.c @@ -86,7 +86,7 @@ static void ride_entrance_exit_paint(paint_session * session, uint8 direction, s if (tile_element->flags & TILE_ELEMENT_FLAG_GHOST){ session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE; - image_id = gConstructionMarker; + image_id = CONSTRUCTION_MARKER; _unk9E32BC = image_id; if (transparant_image_id) transparant_image_id = image_id; @@ -200,7 +200,7 @@ static void park_entrance_paint(paint_session * session, uint8 direction, sint32 uint32 image_id, ghost_id = 0; if (tile_element->flags & TILE_ELEMENT_FLAG_GHOST){ session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE; - ghost_id = gConstructionMarker; + ghost_id = CONSTRUCTION_MARKER; _unk9E32BC = ghost_id; } diff --git a/src/openrct2/paint/tile_element/fence.c b/src/openrct2/paint/tile_element/fence.c index 1d36cf9e06..749fa527f6 100644 --- a/src/openrct2/paint/tile_element/fence.c +++ b/src/openrct2/paint/tile_element/fence.c @@ -173,7 +173,7 @@ void fence_paint(paint_session * session, uint8 direction, sint32 height, rct_ti if (tile_element->flags & TILE_ELEMENT_FLAG_GHOST) { session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE; - dword_141F710 = gConstructionMarker; + dword_141F710 = CONSTRUCTION_MARKER; } // Save tile_element diff --git a/src/openrct2/paint/tile_element/large_scenery.c b/src/openrct2/paint/tile_element/large_scenery.c index 4cccfc1650..2359f1eed5 100644 --- a/src/openrct2/paint/tile_element/large_scenery.c +++ b/src/openrct2/paint/tile_element/large_scenery.c @@ -208,7 +208,7 @@ void large_scenery_paint(paint_session * session, uint8 direction, uint16 height } if (tileElement->flags & TILE_ELEMENT_FLAG_GHOST) { session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE; - sequenceNum = gConstructionMarker; + sequenceNum = CONSTRUCTION_MARKER; image_id &= 0x7FFFF; dword_F4387C = sequenceNum; image_id |= dword_F4387C; diff --git a/src/openrct2/paint/tile_element/path.c b/src/openrct2/paint/tile_element/path.c index cc55c4060e..be910e3462 100644 --- a/src/openrct2/paint/tile_element/path.c +++ b/src/openrct2/paint/tile_element/path.c @@ -686,12 +686,12 @@ void path_paint(paint_session * session, uint8 direction, uint16 height, rct_til } if (footpath_element_path_scenery_is_ghost(tile_element)) { - sceneryImageFlags = gConstructionMarker; + sceneryImageFlags = CONSTRUCTION_MARKER; } if (tile_element->flags & TILE_ELEMENT_FLAG_GHOST) { session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE; - imageFlags = gConstructionMarker; + imageFlags = CONSTRUCTION_MARKER; } sint16 x = session->MapPosition.x, y = session->MapPosition.y; diff --git a/src/openrct2/paint/tile_element/scenery.c b/src/openrct2/paint/tile_element/scenery.c index 66c50cd81e..9150365945 100644 --- a/src/openrct2/paint/tile_element/scenery.c +++ b/src/openrct2/paint/tile_element/scenery.c @@ -60,7 +60,7 @@ void scenery_paint(paint_session * session, uint8 direction, sint32 height, rct_ } if (tileElement->flags & TILE_ELEMENT_FLAG_GHOST) { session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE; - baseImageid = gConstructionMarker; + baseImageid = CONSTRUCTION_MARKER; } uint32 dword_F64EB0 = baseImageid; diff --git a/src/openrct2/ride/track_paint.c b/src/openrct2/ride/track_paint.c index 497bcbafac..4ae5767915 100644 --- a/src/openrct2/ride/track_paint.c +++ b/src/openrct2/ride/track_paint.c @@ -1779,7 +1779,7 @@ void track_paint(paint_session * session, uint8 direction, sint32 height, rct_ti session->TrackColours[SCHEME_3] = 0x21600000; } if (tileElement->flags & TILE_ELEMENT_FLAG_GHOST) { - uint32 ghost_id = gConstructionMarker; + uint32 ghost_id = CONSTRUCTION_MARKER; session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE; session->TrackColours[SCHEME_TRACK] = ghost_id; session->TrackColours[SCHEME_SUPPORTS] = ghost_id;