mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 04:23:20 +01:00
Clean up small scenery GC calls a bit
This commit is contained in:
@@ -467,8 +467,8 @@ static void viewport_interaction_remove_scenery(rct_tile_element* tileElement, i
|
||||
{
|
||||
gGameCommandErrorTitle = STR_CANT_REMOVE_THIS;
|
||||
game_do_command(
|
||||
x, (tileElement->type << 8) | 1, y, (tileElement->AsSmallScenery()->GetEntryIndex() << 8) | tileElement->base_height,
|
||||
GAME_COMMAND_REMOVE_SCENERY, 0, 0);
|
||||
x, (tileElement->type << 8) | GAME_COMMAND_FLAG_APPLY, y,
|
||||
(tileElement->AsSmallScenery()->GetEntryIndex() << 8) | tileElement->base_height, GAME_COMMAND_REMOVE_SCENERY, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -816,7 +816,8 @@ static int32_t track_design_place_scenery(
|
||||
uint8_t quadrant = (scenery->flags >> 2) + _currentTrackPieceDirection;
|
||||
quadrant &= 3;
|
||||
|
||||
uint8_t bh = rotation | (quadrant << 6) | TILE_ELEMENT_TYPE_SMALL_SCENERY;
|
||||
// So called because it mirrors the SmallSceneryElement->type byte.
|
||||
uint8_t typeByte = rotation | (quadrant << 6) | TILE_ELEMENT_TYPE_SMALL_SCENERY;
|
||||
|
||||
rct_scenery_entry* small_scenery = get_small_scenery_entry(entry_index);
|
||||
if (!(!scenery_small_entry_has_flag(small_scenery, SMALL_SCENERY_FLAG_FULL_TILE)
|
||||
@@ -826,12 +827,13 @@ static int32_t track_design_place_scenery(
|
||||
SMALL_SCENERY_FLAG_DIAGONAL | SMALL_SCENERY_FLAG_HALF_SPACE
|
||||
| SMALL_SCENERY_FLAG_THREE_QUARTERS))
|
||||
{
|
||||
bh &= 0x3F;
|
||||
typeByte &= ~TILE_ELEMENT_QUADRANT_MASK;
|
||||
}
|
||||
|
||||
z = (scenery->z * 8 + originZ) / 8;
|
||||
game_do_command(
|
||||
mapCoord.x, flags | bh << 8, mapCoord.y, (entry_index << 8) | z, GAME_COMMAND_REMOVE_SCENERY, 0, 0);
|
||||
mapCoord.x, flags | typeByte << 8, mapCoord.y, (entry_index << 8) | z, GAME_COMMAND_REMOVE_SCENERY,
|
||||
0, 0);
|
||||
break;
|
||||
}
|
||||
case OBJECT_TYPE_LARGE_SCENERY:
|
||||
|
||||
@@ -184,8 +184,10 @@ void scenery_remove_ghost_tool_placement()
|
||||
if (gSceneryGhostType & SCENERY_ENTRY_FLAG_0)
|
||||
{
|
||||
gSceneryGhostType &= ~SCENERY_ENTRY_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, 105 | (gSceneryTileElementType << 8), y, z | (gSceneryPlaceObject << 8), GAME_COMMAND_REMOVE_SCENERY, 0, 0);
|
||||
x, flags | (gSceneryTileElementType << 8), y, z | (gSceneryPlaceObject << 8), GAME_COMMAND_REMOVE_SCENERY, 0, 0);
|
||||
}
|
||||
|
||||
if (gSceneryGhostType & SCENERY_ENTRY_FLAG_1)
|
||||
|
||||
Reference in New Issue
Block a user