diff --git a/src/openrct2-ui/windows/TopToolbar.cpp b/src/openrct2-ui/windows/TopToolbar.cpp index a1ea9c7d83..015fd7d8b1 100644 --- a/src/openrct2-ui/windows/TopToolbar.cpp +++ b/src/openrct2-ui/windows/TopToolbar.cpp @@ -2432,7 +2432,7 @@ static money32 try_place_ghost_scenery( viewport_set_visibility(5); } - gSceneryGhostType |= (1 << 0); + gSceneryGhostType |= SCENERY_GHOST_FLAG_0; break; case 1: // Path Bits @@ -2454,7 +2454,7 @@ static money32 try_place_ghost_scenery( gSceneryPlacePathType = ((parameter_2 >> 8) & 0xFF); gSceneryGhostPathObjectType = parameter_3; - gSceneryGhostType |= (1 << 1); + gSceneryGhostType |= SCENERY_GHOST_FLAG_1; break; case 2: // Walls @@ -2473,7 +2473,7 @@ static money32 try_place_ghost_scenery( tileElement = gSceneryTileElement; gSceneryGhostPosition.z = tileElement->base_height; - gSceneryGhostType |= (1 << 2); + gSceneryGhostType |= SCENERY_GHOST_FLAG_2; break; case 3: // Large Scenery @@ -2503,7 +2503,7 @@ static money32 try_place_ghost_scenery( viewport_set_visibility(5); } - gSceneryGhostType |= (1 << 3); + gSceneryGhostType |= SCENERY_GHOST_FLAG_3; break; case 4: // Banners @@ -2518,7 +2518,7 @@ static money32 try_place_ghost_scenery( gSceneryGhostPosition.y = map_tile.y; gSceneryGhostPosition.z = (parameter_2 & 0xFF) * 2 + 2; gSceneryPlaceRotation = ((parameter_2 >> 8) & 0xFF); - gSceneryGhostType |= (1 << 4); + gSceneryGhostType |= SCENERY_GHOST_FLAG_4; break; } diff --git a/src/openrct2/world/Scenery.cpp b/src/openrct2/world/Scenery.cpp index bd02acefd6..e88f54b59e 100644 --- a/src/openrct2/world/Scenery.cpp +++ b/src/openrct2/world/Scenery.cpp @@ -181,18 +181,18 @@ void scenery_remove_ghost_tool_placement() y = gSceneryGhostPosition.y; z = gSceneryGhostPosition.z; - if (gSceneryGhostType & SCENERY_ENTRY_FLAG_0) + if (gSceneryGhostType & SCENERY_GHOST_FLAG_0) { - gSceneryGhostType &= ~SCENERY_ENTRY_FLAG_0; + gSceneryGhostType &= ~SCENERY_GHOST_FLAG_0; uint8_t flags = GAME_COMMAND_FLAG_APPLY | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_5 | GAME_COMMAND_FLAG_GHOST; game_do_command( x, flags | (gSceneryQuadrant << 8), y, z | (gSceneryPlaceObject << 8), GAME_COMMAND_REMOVE_SCENERY, 0, 0); } - if (gSceneryGhostType & SCENERY_ENTRY_FLAG_1) + if (gSceneryGhostType & SCENERY_GHOST_FLAG_1) { - gSceneryGhostType &= ~SCENERY_ENTRY_FLAG_1; + gSceneryGhostType &= ~SCENERY_GHOST_FLAG_1; TileElement* tileElement = map_get_first_element_at(x / 32, y / 32); do @@ -210,9 +210,9 @@ void scenery_remove_ghost_tool_placement() } while (!(tileElement++)->IsLastForTile()); } - if (gSceneryGhostType & SCENERY_ENTRY_FLAG_2) + if (gSceneryGhostType & SCENERY_GHOST_FLAG_2) { - gSceneryGhostType &= ~SCENERY_ENTRY_FLAG_2; + gSceneryGhostType &= ~SCENERY_GHOST_FLAG_2; TileCoordsXYZD wallLocation = { x >> 5, y >> 5, z, gSceneryGhostWallRotation }; auto wallRemoveAction = WallRemoveAction(wallLocation); @@ -220,15 +220,15 @@ void scenery_remove_ghost_tool_placement() wallRemoveAction.Execute(); } - if (gSceneryGhostType & SCENERY_ENTRY_FLAG_3) + if (gSceneryGhostType & SCENERY_GHOST_FLAG_3) { - gSceneryGhostType &= ~SCENERY_ENTRY_FLAG_3; + gSceneryGhostType &= ~SCENERY_GHOST_FLAG_3; game_do_command(x, 105 | (gSceneryPlaceRotation << 8), y, z, GAME_COMMAND_REMOVE_LARGE_SCENERY, 0, 0); } - if (gSceneryGhostType & SCENERY_ENTRY_FLAG_4) + if (gSceneryGhostType & SCENERY_GHOST_FLAG_4) { - gSceneryGhostType &= ~SCENERY_ENTRY_FLAG_4; + gSceneryGhostType &= ~SCENERY_GHOST_FLAG_4; game_do_command(x, 105, y, z | (gSceneryPlaceRotation << 8), GAME_COMMAND_REMOVE_BANNER, 0, 0); } } diff --git a/src/openrct2/world/Scenery.h b/src/openrct2/world/Scenery.h index 5ff14fdb36..beb7ef241f 100644 --- a/src/openrct2/world/Scenery.h +++ b/src/openrct2/world/Scenery.h @@ -229,15 +229,6 @@ enum SCENERY_TYPE_BANNER }; -enum -{ - SCENERY_ENTRY_FLAG_0 = (1 << 0), - SCENERY_ENTRY_FLAG_1 = (1 << 1), - SCENERY_ENTRY_FLAG_2 = (1 << 2), - SCENERY_ENTRY_FLAG_3 = (1 << 3), - SCENERY_ENTRY_FLAG_4 = (1 << 4) -}; - enum { SCENERY_GHOST_FLAG_0 = (1 << SCENERY_TYPE_SMALL),