mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename functions to wall. Refactor game commands
This commit is contained in:
parent
72d97371b1
commit
f54c71b61c
|
@ -494,7 +494,7 @@ sint32 game_do_command_p(sint32 command, sint32 *eax, sint32 *ebx, sint32 *ecx,
|
|||
|
||||
// Remove ghost scenery so it doesn't interfere with incoming network command
|
||||
if ((flags & GAME_COMMAND_FLAG_NETWORKED) && !(flags & GAME_COMMAND_FLAG_GHOST) &&
|
||||
(command == GAME_COMMAND_PLACE_FENCE ||
|
||||
(command == GAME_COMMAND_PLACE_WALL ||
|
||||
command == GAME_COMMAND_PLACE_SCENERY ||
|
||||
command == GAME_COMMAND_PLACE_LARGE_SCENERY ||
|
||||
command == GAME_COMMAND_PLACE_BANNER ||
|
||||
|
@ -1217,8 +1217,8 @@ GAME_COMMAND_POINTER* new_game_command_table[GAME_COMMAND_COUNT] = {
|
|||
game_command_set_maze_track,
|
||||
game_command_set_park_entrance_fee,
|
||||
game_command_update_staff_colour,
|
||||
game_command_place_fence,
|
||||
game_command_remove_fence,
|
||||
game_command_place_wall,
|
||||
game_command_remove_wall,
|
||||
game_command_place_large_scenery,
|
||||
game_command_remove_large_scenery,
|
||||
game_command_set_current_loan,
|
||||
|
@ -1229,7 +1229,7 @@ GAME_COMMAND_POINTER* new_game_command_table[GAME_COMMAND_COUNT] = {
|
|||
game_command_place_banner,
|
||||
game_command_remove_banner,
|
||||
game_command_set_scenery_colour,
|
||||
game_command_set_fence_colour,
|
||||
game_command_set_wall_colour,
|
||||
game_command_set_large_scenery_colour,
|
||||
game_command_set_banner_colour,
|
||||
game_command_set_land_ownership,
|
||||
|
|
|
@ -65,8 +65,8 @@ enum GAME_COMMAND {
|
|||
GAME_COMMAND_SET_MAZE_TRACK,
|
||||
GAME_COMMAND_SET_PARK_ENTRANCE_FEE,
|
||||
GAME_COMMAND_SET_STAFF_COLOUR,
|
||||
GAME_COMMAND_PLACE_FENCE,
|
||||
GAME_COMMAND_REMOVE_FENCE,
|
||||
GAME_COMMAND_PLACE_WALL,
|
||||
GAME_COMMAND_REMOVE_WALL,
|
||||
GAME_COMMAND_PLACE_LARGE_SCENERY,
|
||||
GAME_COMMAND_REMOVE_LARGE_SCENERY,
|
||||
GAME_COMMAND_SET_CURRENT_LOAN,
|
||||
|
@ -77,7 +77,7 @@ enum GAME_COMMAND {
|
|||
GAME_COMMAND_PLACE_BANNER,
|
||||
GAME_COMMAND_REMOVE_BANNER,
|
||||
GAME_COMMAND_SET_SCENERY_COLOUR,
|
||||
GAME_COMMAND_SET_FENCE_COLOUR,
|
||||
GAME_COMMAND_SET_WALL_COLOUR,
|
||||
GAME_COMMAND_SET_LARGE_SCENERY_COLOUR,
|
||||
GAME_COMMAND_SET_BANNER_COLOUR,
|
||||
GAME_COMMAND_SET_LAND_OWNERSHIP,
|
||||
|
|
|
@ -500,7 +500,7 @@ static void viewport_interaction_remove_park_wall(rct_map_element *mapElement, s
|
|||
GAME_COMMAND_FLAG_APPLY,
|
||||
y,
|
||||
(mapElement->type & 0x3) | (mapElement->base_height << 8),
|
||||
GAME_COMMAND_REMOVE_FENCE,
|
||||
GAME_COMMAND_REMOVE_WALL,
|
||||
0,
|
||||
0
|
||||
);
|
||||
|
|
|
@ -128,14 +128,14 @@ const std::vector<NetworkAction> NetworkActions::Actions =
|
|||
GAME_COMMAND_REMOVE_SCENERY,
|
||||
GAME_COMMAND_PLACE_SCENERY,
|
||||
GAME_COMMAND_SET_BRAKES_SPEED,
|
||||
GAME_COMMAND_REMOVE_FENCE,
|
||||
GAME_COMMAND_PLACE_FENCE,
|
||||
GAME_COMMAND_REMOVE_WALL,
|
||||
GAME_COMMAND_PLACE_WALL,
|
||||
GAME_COMMAND_REMOVE_LARGE_SCENERY,
|
||||
GAME_COMMAND_PLACE_LARGE_SCENERY,
|
||||
GAME_COMMAND_PLACE_BANNER,
|
||||
GAME_COMMAND_REMOVE_BANNER,
|
||||
GAME_COMMAND_SET_SCENERY_COLOUR,
|
||||
GAME_COMMAND_SET_FENCE_COLOUR,
|
||||
GAME_COMMAND_SET_WALL_COLOUR,
|
||||
GAME_COMMAND_SET_LARGE_SCENERY_COLOUR,
|
||||
GAME_COMMAND_SET_BANNER_COLOUR,
|
||||
GAME_COMMAND_SET_BANNER_NAME,
|
||||
|
|
|
@ -182,7 +182,7 @@ void fence_paint(uint8 direction, sint32 height, rct_map_element * map_element)
|
|||
if (sceneryEntry->wall.flags & WALL_SCENERY_IS_DOOR) {
|
||||
rct_xyz16 offset;
|
||||
rct_xyz16 boundsR1, boundsR1_, boundsR2, boundsR2_, boundsL1, boundsL1_;
|
||||
uint8 animationFrame = fence_get_animation_frame(map_element);
|
||||
uint8 animationFrame = wall_get_animation_frame(map_element);
|
||||
// Add the direction as well
|
||||
animationFrame |= (map_element->properties.fence.animation & 0x80) >> 3;
|
||||
uint32 imageId;
|
||||
|
|
|
@ -273,7 +273,7 @@ static void sub_68B3FB(sint32 x, sint32 y)
|
|||
case MAP_ELEMENT_TYPE_ENTRANCE:
|
||||
entrance_paint(direction, height, map_element);
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_FENCE:
|
||||
case MAP_ELEMENT_TYPE_WALL:
|
||||
fence_paint(direction, height, map_element);
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_SCENERY_MULTIPLE:
|
||||
|
|
|
@ -11278,7 +11278,7 @@ static bool peep_find_ride_to_look_at(rct_peep *peep, uint8 edge, uint8 *rideToV
|
|||
|
||||
mapElement = surfaceElement;
|
||||
do {
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_FENCE) continue;
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_WALL) continue;
|
||||
if (map_element_get_direction(mapElement) != edge) continue;
|
||||
if (get_wall_entry(mapElement->properties.fence.type)->wall.flags2 & WALL_SCENERY_2_FLAG4) continue;
|
||||
if (peep->next_z + 4 <= mapElement->base_height) continue;
|
||||
|
@ -11299,7 +11299,7 @@ static bool peep_find_ride_to_look_at(rct_peep *peep, uint8 edge, uint8 *rideToV
|
|||
|
||||
mapElement = surfaceElement;
|
||||
do {
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_FENCE) continue;
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_WALL) continue;
|
||||
if ((map_element_get_direction(mapElement) ^ 0x2) != edge) continue;
|
||||
if (get_wall_entry(mapElement->properties.fence.type)->wall.flags2 & WALL_SCENERY_2_FLAG4) continue;
|
||||
// TODO: Check whether this shouldn't be <=, as the other loops use. If so, also extract as loop A.
|
||||
|
@ -11347,7 +11347,7 @@ static bool peep_find_ride_to_look_at(rct_peep *peep, uint8 edge, uint8 *rideToV
|
|||
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_SURFACE) continue;
|
||||
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_PATH) continue;
|
||||
|
||||
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_FENCE) {
|
||||
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_WALL) {
|
||||
if (get_wall_entry(mapElement->properties.fence.type)->wall.flags2 & WALL_SCENERY_2_FLAG4) {
|
||||
continue;
|
||||
}
|
||||
|
@ -11369,7 +11369,7 @@ static bool peep_find_ride_to_look_at(rct_peep *peep, uint8 edge, uint8 *rideToV
|
|||
// TODO: extract loop A
|
||||
mapElement = surfaceElement;
|
||||
do {
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_FENCE) continue;
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_WALL) continue;
|
||||
if ((map_element_get_direction(mapElement) ^ 0x2) != edge) continue;
|
||||
if (get_wall_entry(mapElement->properties.fence.type)->wall.flags2 & WALL_SCENERY_2_FLAG4) continue;
|
||||
if (peep->next_z + 6 <= mapElement->base_height) continue;
|
||||
|
@ -11416,7 +11416,7 @@ static bool peep_find_ride_to_look_at(rct_peep *peep, uint8 edge, uint8 *rideToV
|
|||
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_SURFACE) continue;
|
||||
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_PATH) continue;
|
||||
|
||||
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_FENCE) {
|
||||
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_WALL) {
|
||||
if (get_wall_entry(mapElement->properties.fence.type)->wall.flags2 & WALL_SCENERY_2_FLAG4) {
|
||||
continue;
|
||||
}
|
||||
|
@ -11437,7 +11437,7 @@ static bool peep_find_ride_to_look_at(rct_peep *peep, uint8 edge, uint8 *rideToV
|
|||
// TODO: extract loop A
|
||||
mapElement = surfaceElement;
|
||||
do {
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_FENCE) continue;
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_WALL) continue;
|
||||
if ((map_element_get_direction(mapElement) ^ 0x2) != edge) continue;
|
||||
if (get_wall_entry(mapElement->properties.fence.type)->wall.flags2 & WALL_SCENERY_2_FLAG4) continue;
|
||||
if (peep->next_z + 8 <= mapElement->base_height) continue;
|
||||
|
|
|
@ -409,7 +409,7 @@ private:
|
|||
case MAP_ELEMENT_TYPE_SCENERY_MULTIPLE:
|
||||
AddEntryForLargeScenery(mapElement->properties.scenerymultiple.type & MAP_ELEMENT_LARGE_TYPE_MASK);
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_FENCE:
|
||||
case MAP_ELEMENT_TYPE_WALL:
|
||||
{
|
||||
uint8 var_05 = mapElement->properties.fence.colour_3;
|
||||
uint16 var_06 = mapElement->properties.fence.colour_1 |
|
||||
|
@ -2098,7 +2098,7 @@ private:
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_FENCE:
|
||||
case MAP_ELEMENT_TYPE_WALL:
|
||||
colour = ((mapElement->type & 0xC0) >> 3) |
|
||||
((mapElement->properties.fence.type & 0xE0) >> 5);
|
||||
colour = RCT1::GetColour(colour);
|
||||
|
@ -2204,7 +2204,7 @@ private:
|
|||
rct_map_element * mapElement = map_get_first_element_at(x, y);
|
||||
do
|
||||
{
|
||||
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_FENCE)
|
||||
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_WALL)
|
||||
{
|
||||
rct_map_element originalMapElement = *mapElement;
|
||||
map_element_remove(mapElement);
|
||||
|
@ -2227,7 +2227,7 @@ private:
|
|||
ConvertWall(&type, &colourA, &colourB, &colourC);
|
||||
|
||||
type = _wallTypeToEntryMap[type];
|
||||
map_place_fence(type, x * 32, y * 32, 0, edge, colourA, colourB, colourC, 169);
|
||||
wall_place(type, x * 32, y * 32, 0, edge, colourA, colourB, colourC, 169);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -8268,7 +8268,7 @@ static money32 place_ride_entrance_or_exit(sint16 x, sint16 y, sint16 z, uint8 d
|
|||
!(flags & GAME_COMMAND_FLAG_GHOST)
|
||||
) {
|
||||
footpath_remove_litter(x, y, z);
|
||||
map_remove_walls_at_z(x, y, z);
|
||||
wall_remove_at_z(x, y, z);
|
||||
}
|
||||
|
||||
if (!gCheatsSandboxMode && !map_is_location_owned(x, y, z)) {
|
||||
|
|
|
@ -1121,14 +1121,14 @@ static money32 track_place(sint32 rideIndex, sint32 type, sint32 originX, sint32
|
|||
if ((flags & GAME_COMMAND_FLAG_APPLY) && !(flags & GAME_COMMAND_FLAG_GHOST) && !gCheatsDisableClearanceChecks) {
|
||||
footpath_remove_litter(x, y, z);
|
||||
if (rideTypeFlags & RIDE_TYPE_FLAG_TRACK_NO_WALLS) {
|
||||
map_remove_walls_at(x, y, baseZ * 8, clearanceZ * 8);
|
||||
wall_remove_at(x, y, baseZ * 8, clearanceZ * 8);
|
||||
} else {
|
||||
// Remove walls in the directions this track intersects
|
||||
uint8 intersectingDirections = (*wallEdges)[blockIndex];
|
||||
intersectingDirections ^= 0x0F;
|
||||
for (sint32 i = 0; i < 4; i++) {
|
||||
if (intersectingDirections & (1 << i)) {
|
||||
map_remove_intersecting_walls(x, y, baseZ, clearanceZ, i);
|
||||
wall_remove_intersecting_walls(x, y, baseZ, clearanceZ, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1228,7 +1228,7 @@ static money32 track_place(sint32 rideIndex, sint32 type, sint32 originX, sint32
|
|||
temp_x += TileDirectionDelta[temp_direction].x;
|
||||
temp_y += TileDirectionDelta[temp_direction].y;
|
||||
temp_direction ^= (1 << 1);
|
||||
map_remove_intersecting_walls(temp_x, temp_y, baseZ, clearanceZ, temp_direction & 3);
|
||||
wall_remove_intersecting_walls(temp_x, temp_y, baseZ, clearanceZ, temp_direction & 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1779,7 +1779,7 @@ static money32 set_maze_track(uint16 x, uint8 flags, uint8 direction, uint16 y,
|
|||
if ((flags & GAME_COMMAND_FLAG_APPLY) != 0) {
|
||||
if (!(flags & GAME_COMMAND_FLAG_GHOST) && !(flags & GAME_COMMAND_FLAG_2)) {
|
||||
footpath_remove_litter(x, y, z);
|
||||
map_remove_walls_at(floor2(x, 32), floor2(y, 32), z, z + 32);
|
||||
wall_remove_at(floor2(x, 32), floor2(y, 32), z, z + 32);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -682,7 +682,7 @@ static sint32 track_design_place_scenery(rct_td6_scenery_element *scenery_start,
|
|||
0x69,
|
||||
mapCoord.y,
|
||||
(z << 8) | ((rotation + scenery->flags) & 0x3),
|
||||
GAME_COMMAND_REMOVE_FENCE,
|
||||
GAME_COMMAND_REMOVE_WALL,
|
||||
0,
|
||||
0);
|
||||
break;
|
||||
|
@ -819,7 +819,7 @@ static sint32 track_design_place_scenery(rct_td6_scenery_element *scenery_start,
|
|||
bl | (entry_index << 8),
|
||||
mapCoord.y,
|
||||
rotation | (scenery->primary_colour << 8),
|
||||
GAME_COMMAND_PLACE_FENCE,
|
||||
GAME_COMMAND_PLACE_WALL,
|
||||
z,
|
||||
scenery->secondary_colour | ((scenery->flags & 0xFC) << 6)
|
||||
);
|
||||
|
@ -1536,7 +1536,7 @@ static money32 place_maze_design(uint8 flags, uint8 rideIndex, uint16 mazeEntry,
|
|||
if (flags & GAME_COMMAND_FLAG_APPLY) {
|
||||
if (!(flags & GAME_COMMAND_FLAG_GHOST)) {
|
||||
footpath_remove_litter(x, y, z);
|
||||
map_remove_walls_at(floor2(x, 32), floor2(y, 32), z, z + 32);
|
||||
wall_remove_at(floor2(x, 32), floor2(y, 32), z, z + 32);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ static sint32 map_element_get_total_element_count(rct_map_element *mapElement)
|
|||
switch (map_element_get_type(mapElement)) {
|
||||
case MAP_ELEMENT_TYPE_PATH:
|
||||
case MAP_ELEMENT_TYPE_SCENERY:
|
||||
case MAP_ELEMENT_TYPE_FENCE:
|
||||
case MAP_ELEMENT_TYPE_WALL:
|
||||
return 1;
|
||||
|
||||
case MAP_ELEMENT_TYPE_SCENERY_MULTIPLE:
|
||||
|
@ -608,7 +608,7 @@ static void track_design_save_select_nearby_scenery_for_tile(sint32 rideIndex, s
|
|||
case MAP_ELEMENT_TYPE_SCENERY:
|
||||
interactionType = VIEWPORT_INTERACTION_ITEM_SCENERY;
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_FENCE:
|
||||
case MAP_ELEMENT_TYPE_WALL:
|
||||
interactionType = VIEWPORT_INTERACTION_ITEM_WALL;
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_SCENERY_MULTIPLE:
|
||||
|
|
|
@ -6847,7 +6847,7 @@ static void vehicle_update_scenery_door(rct_vehicle *vehicle)
|
|||
sint32 z = (vehicle->track_z - trackBlock->z + trackCoordinates->z_end) >> 3;
|
||||
sint32 direction = (vehicle->track_direction + trackCoordinates->rotation_end) & 3;
|
||||
|
||||
rct_map_element *mapElement = map_get_fence_element_at(x, y, z, direction);
|
||||
rct_map_element *mapElement = map_get_wall_element_at(x, y, z, direction);
|
||||
if (mapElement == NULL) {
|
||||
return;
|
||||
}
|
||||
|
@ -6930,7 +6930,7 @@ static void sub_6DEDE8(rct_vehicle *vehicle)
|
|||
sint32 direction = (vehicle->track_direction + trackCoordinates->rotation_begin) & 3;
|
||||
direction ^= 2;
|
||||
|
||||
rct_map_element *mapElement = map_get_fence_element_at(x, y, z, direction);
|
||||
rct_map_element *mapElement = map_get_wall_element_at(x, y, z, direction);
|
||||
if (mapElement == NULL) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -596,7 +596,7 @@ static void setup_in_use_selection_flags()
|
|||
assert(type < object_entry_group_counts[OBJECT_TYPE_PATHS]);
|
||||
gEditorSelectedObjects[OBJECT_TYPE_PATHS][type] |= (1 << 0);
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_FENCE:
|
||||
case MAP_ELEMENT_TYPE_WALL:
|
||||
type = iter.element->properties.fence.type;
|
||||
assert(type < object_entry_group_counts[OBJECT_TYPE_WALLS]);
|
||||
gEditorSelectedObjects[OBJECT_TYPE_WALLS][type] |= (1 << 0);
|
||||
|
|
|
@ -894,8 +894,8 @@ static void window_footpath_construct()
|
|||
if (cost != MONEY32_UNDEFINED && !gCheatsDisableClearanceChecks) {
|
||||
// It is possible, let's remove walls between the old and new piece of path
|
||||
uint8 direction = gFootpathConstructDirection;
|
||||
map_remove_intersecting_walls(x, y, z, z + 4 + ((slope & 0xf) ? 2 : 0), direction ^ 2);
|
||||
map_remove_intersecting_walls(
|
||||
wall_remove_intersecting_walls(x, y, z, z + 4 + ((slope & 0xf) ? 2 : 0), direction ^ 2);
|
||||
wall_remove_intersecting_walls(
|
||||
x - TileDirectionDelta[direction].x,
|
||||
y - TileDirectionDelta[direction].y,
|
||||
z, z + 4, direction
|
||||
|
|
|
@ -1448,7 +1448,7 @@ static const uint16 ElementTypeMaskColour[] = {
|
|||
0x00FF, // MAP_ELEMENT_TYPE_TRACK
|
||||
0xFF00, // MAP_ELEMENT_TYPE_SCENERY
|
||||
0x0000, // MAP_ELEMENT_TYPE_ENTRANCE
|
||||
0xFFFF, // MAP_ELEMENT_TYPE_FENCE
|
||||
0xFFFF, // MAP_ELEMENT_TYPE_WALL
|
||||
0x0000, // MAP_ELEMENT_TYPE_SCENERY_MULTIPLE
|
||||
0xFFFF, // MAP_ELEMENT_TYPE_BANNER
|
||||
0x0000, // MAP_ELEMENT_TYPE_CORRUPT
|
||||
|
@ -1460,7 +1460,7 @@ static const uint16 ElementTypeAddColour[] = {
|
|||
0xB700, // MAP_ELEMENT_TYPE_TRACK
|
||||
0x0063, // MAP_ELEMENT_TYPE_SCENERY
|
||||
0xBABA, // MAP_ELEMENT_TYPE_ENTRANCE
|
||||
0x0000, // MAP_ELEMENT_TYPE_FENCE
|
||||
0x0000, // MAP_ELEMENT_TYPE_WALL
|
||||
0x6363, // MAP_ELEMENT_TYPE_SCENERY_MULTIPLE
|
||||
0x0000, // MAP_ELEMENT_TYPE_BANNER
|
||||
0x4444, // MAP_ELEMENT_TYPE_CORRUPT
|
||||
|
|
|
@ -434,7 +434,7 @@ void window_sign_small_open(rct_windownumber number){
|
|||
rct_map_element* map_element = map_get_first_element_at(view_x / 32, view_y / 32);
|
||||
|
||||
while (1){
|
||||
if (map_element_get_type(map_element) == MAP_ELEMENT_TYPE_FENCE) {
|
||||
if (map_element_get_type(map_element) == MAP_ELEMENT_TYPE_WALL) {
|
||||
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.fence.type);
|
||||
if (scenery_entry->wall.scrolling_mode != 0xFF){
|
||||
if (map_element->properties.fence.banner_index == w->number)
|
||||
|
@ -496,7 +496,7 @@ static void window_sign_small_mouseup(rct_window *w, sint32 widgetIndex)
|
|||
break;
|
||||
case WIDX_SIGN_DEMOLISH:
|
||||
while (1){
|
||||
if (map_element_get_type(map_element) == MAP_ELEMENT_TYPE_FENCE) {
|
||||
if (map_element_get_type(map_element) == MAP_ELEMENT_TYPE_WALL) {
|
||||
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.fence.type);
|
||||
if (scenery_entry->wall.scrolling_mode != 0xFF){
|
||||
if (map_element->properties.fence.banner_index == w->number)
|
||||
|
@ -511,7 +511,7 @@ static void window_sign_small_mouseup(rct_window *w, sint32 widgetIndex)
|
|||
1 | ((map_element->type & 0x3) << 8),
|
||||
y,
|
||||
(map_element->base_height << 8) | (map_element->type & 0x3),
|
||||
GAME_COMMAND_REMOVE_FENCE,
|
||||
GAME_COMMAND_REMOVE_WALL,
|
||||
0,
|
||||
0);
|
||||
break;
|
||||
|
|
|
@ -1203,7 +1203,7 @@ static void window_tile_inspector_dropdown(rct_window *w, sint32 widgetIndex, si
|
|||
|
||||
switch (w->page) {
|
||||
case TILE_INSPECTOR_PAGE_FENCE:
|
||||
openrct2_assert(map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_FENCE, "Element is not a fence");
|
||||
openrct2_assert(map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_WALL, "Element is not a fence");
|
||||
|
||||
switch (widgetIndex) {
|
||||
case WIDX_FENCE_DROPDOWN_SLOPE_BUTTON:
|
||||
|
@ -1994,7 +1994,7 @@ static void window_tile_inspector_scrollpaint(rct_window *w, rct_drawpixelinfo *
|
|||
case MAP_ELEMENT_TYPE_ENTRANCE:
|
||||
typeName = "Entrance";
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_FENCE:
|
||||
case MAP_ELEMENT_TYPE_WALL:
|
||||
snprintf(
|
||||
buffer, sizeof(buffer),
|
||||
"Fence (%s)",
|
||||
|
|
|
@ -949,7 +949,7 @@ static void repaint_scenery_tool_down(sint16 x, sint16 y, sint16 widgetIndex){
|
|||
1 | (gWindowSceneryPrimaryColour << 8),
|
||||
grid_y,
|
||||
(map_element->type & MAP_ELEMENT_DIRECTION_MASK) | (map_element->base_height << 8),
|
||||
GAME_COMMAND_SET_FENCE_COLOUR,
|
||||
GAME_COMMAND_SET_WALL_COLOUR,
|
||||
0,
|
||||
gWindowScenerySecondaryColour | (gWindowSceneryTertiaryColour << 8));
|
||||
break;
|
||||
|
@ -1573,7 +1573,7 @@ static void window_top_toolbar_scenery_tool_down(sint16 x, sint16 y, rct_window
|
|||
|
||||
gDisableErrorWindowSound = true;
|
||||
gGameCommandErrorTitle = STR_CANT_BUILD_PARK_ENTRANCE_HERE;
|
||||
sint32 cost = game_do_command(gridX, flags, gridY, parameter_2, GAME_COMMAND_PLACE_FENCE, gSceneryPlaceZ, _unkF64F15);
|
||||
sint32 cost = game_do_command(gridX, flags, gridY, parameter_2, GAME_COMMAND_PLACE_WALL, gSceneryPlaceZ, _unkF64F15);
|
||||
gDisableErrorWindowSound = false;
|
||||
|
||||
if (cost != MONEY32_UNDEFINED){
|
||||
|
@ -2182,7 +2182,7 @@ static money32 try_place_ghost_scenery(rct_xy16 map_tile, uint32 parameter_1, ui
|
|||
parameter_1 | 0x69,
|
||||
map_tile.y,
|
||||
parameter_2,
|
||||
GAME_COMMAND_PLACE_FENCE,
|
||||
GAME_COMMAND_PLACE_WALL,
|
||||
gSceneryPlaceZ,
|
||||
_unkF64F15);
|
||||
|
||||
|
|
|
@ -153,8 +153,8 @@ static void loc_6A6620(sint32 flags, sint32 x, sint32 y, rct_map_element *mapEle
|
|||
if ((mapElement->properties.path.type & 4) && !(flags & GAME_COMMAND_FLAG_GHOST)) {
|
||||
sint32 direction = mapElement->properties.path.type & 3;
|
||||
sint32 z = mapElement->base_height;
|
||||
map_remove_intersecting_walls(x, y, z, z + 6, direction ^ 2);
|
||||
map_remove_intersecting_walls(x, y, z, z + 6, direction);
|
||||
wall_remove_intersecting_walls(x, y, z, z + 6, direction ^ 2);
|
||||
wall_remove_intersecting_walls(x, y, z, z + 6, direction);
|
||||
mapElement = map_get_footpath_element(x / 32, y / 32, z);
|
||||
}
|
||||
|
||||
|
@ -852,7 +852,7 @@ bool fence_in_the_way(sint32 x, sint32 y, sint32 z0, sint32 z1, sint32 direction
|
|||
if (mapElement == NULL)
|
||||
return false;
|
||||
do {
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_FENCE)
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_WALL)
|
||||
continue;
|
||||
if (mapElement->flags & MAP_ELEMENT_FLAG_GHOST)
|
||||
continue;
|
||||
|
|
|
@ -1391,14 +1391,14 @@ restart_from_beginning:
|
|||
goto restart_from_beginning;
|
||||
|
||||
} break;
|
||||
case MAP_ELEMENT_TYPE_FENCE:
|
||||
case MAP_ELEMENT_TYPE_WALL:
|
||||
if (clear & (1 << 0)) {
|
||||
sint32 eax = x * 32;
|
||||
sint32 ebx = flags;
|
||||
sint32 ecx = y * 32;
|
||||
sint32 edx = (mapElement->base_height << 8) | (mapElement->type & MAP_ELEMENT_DIRECTION_MASK);
|
||||
sint32 edi = 0, ebp = 0;
|
||||
cost = game_do_command(eax, ebx, ecx, edx, GAME_COMMAND_REMOVE_FENCE, edi, ebp);
|
||||
cost = game_do_command(eax, ebx, ecx, edx, GAME_COMMAND_REMOVE_WALL, edi, ebp);
|
||||
|
||||
if (cost == MONEY32_UNDEFINED)
|
||||
return MONEY32_UNDEFINED;
|
||||
|
@ -1742,7 +1742,7 @@ static money32 map_set_land_height(sint32 flags, sint32 x, sint32 y, sint32 heig
|
|||
{
|
||||
footpath_remove_litter(x, y, map_element_height(x, y));
|
||||
if(!gCheatsDisableClearanceChecks)
|
||||
map_remove_walls_at(x, y, height * 8 - 16, height * 8 + 32);
|
||||
wall_remove_at(x, y, height * 8 - 16, height * 8 + 32);
|
||||
}
|
||||
cost += MONEY(20, 0);
|
||||
|
||||
|
@ -1833,7 +1833,7 @@ static money32 map_set_land_height(sint32 flags, sint32 x, sint32 y, sint32 heig
|
|||
do {
|
||||
sint32 elementType = map_element_get_type(mapElement);
|
||||
|
||||
if (elementType == MAP_ELEMENT_TYPE_FENCE)
|
||||
if (elementType == MAP_ELEMENT_TYPE_WALL)
|
||||
continue;
|
||||
if (elementType == MAP_ELEMENT_TYPE_SCENERY)
|
||||
continue;
|
||||
|
@ -2703,7 +2703,7 @@ void game_command_set_water_height(sint32* eax, sint32* ebx, sint32* ecx, sint32
|
|||
sint32 element_height = map_element_height(x, y);
|
||||
footpath_remove_litter(x, y, element_height);
|
||||
if(!gCheatsDisableClearanceChecks)
|
||||
map_remove_walls_at_z(x, y, element_height);
|
||||
wall_remove_at_z(x, y, element_height);
|
||||
}
|
||||
|
||||
rct_map_element* map_element = map_get_surface_element_at(x / 32, y / 32);
|
||||
|
@ -3023,7 +3023,7 @@ void game_command_place_scenery(sint32* eax, sint32* ebx, sint32* ecx, sint32* e
|
|||
if(flags & GAME_COMMAND_FLAG_APPLY && !(flags & GAME_COMMAND_FLAG_GHOST)){
|
||||
footpath_remove_litter(x, y, targetHeight);
|
||||
if(!gCheatsDisableClearanceChecks && (scenery_entry->small_scenery.flags & SMALL_SCENERY_FLAG_ALLOW_WALLS)) {
|
||||
map_remove_walls_at(x, y, targetHeight, targetHeight + scenery_entry->small_scenery.height);
|
||||
wall_remove_at(x, y, targetHeight, targetHeight + scenery_entry->small_scenery.height);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3341,7 +3341,7 @@ void game_command_place_large_scenery(sint32* eax, sint32* ebx, sint32* ecx, sin
|
|||
if (!(flags & GAME_COMMAND_FLAG_GHOST)) {
|
||||
footpath_remove_litter(curTile.x, curTile.y, zLow * 8);
|
||||
if (!gCheatsDisableClearanceChecks) {
|
||||
map_remove_walls_at(curTile.x, curTile.y, zLow * 8, zHigh * 8);
|
||||
wall_remove_at(curTile.x, curTile.y, zLow * 8, zHigh * 8);
|
||||
}
|
||||
}
|
||||
if (gGameCommandNestLevel == 1 && !(*ebx & GAME_COMMAND_FLAG_GHOST)) {
|
||||
|
@ -3714,7 +3714,7 @@ void map_obstruction_set_error_text(rct_map_element *mapElement)
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_FENCE:
|
||||
case MAP_ELEMENT_TYPE_WALL:
|
||||
sceneryEntry = get_wall_entry(mapElement->properties.scenery.type);
|
||||
errorStringId = STR_X_IN_THE_WAY;
|
||||
set_format_arg(0, rct_string_id, sceneryEntry->name);
|
||||
|
@ -3935,7 +3935,7 @@ static void map_update_grass_length(sint32 x, sint32 y, rct_map_element *mapElem
|
|||
}
|
||||
} else {
|
||||
mapElementAbove++;
|
||||
if (map_element_get_type(mapElementAbove) == MAP_ELEMENT_TYPE_FENCE)
|
||||
if (map_element_get_type(mapElementAbove) == MAP_ELEMENT_TYPE_WALL)
|
||||
continue;
|
||||
if (z0 >= mapElementAbove->clearance_height)
|
||||
continue;
|
||||
|
@ -4005,7 +4005,7 @@ sint32 map_element_get_banner_index(rct_map_element *mapElement)
|
|||
(mapElement->type & MAP_ELEMENT_QUADRANT_MASK) |
|
||||
((mapElement->properties.scenerymultiple.colour[0] & 0xE0) >> 2) |
|
||||
((mapElement->properties.scenerymultiple.colour[1] & 0xE0) >> 5);
|
||||
case MAP_ELEMENT_TYPE_FENCE:
|
||||
case MAP_ELEMENT_TYPE_WALL:
|
||||
sceneryEntry = get_wall_entry(mapElement->properties.fence.type);
|
||||
if (sceneryEntry->wall.scrolling_mode == 0xFF)
|
||||
return -1;
|
||||
|
@ -4154,14 +4154,14 @@ static void clear_element_at(sint32 x, sint32 y, rct_map_element **elementPtr)
|
|||
case MAP_ELEMENT_TYPE_ENTRANCE:
|
||||
viewport_interaction_remove_park_entrance(element, x, y);
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_FENCE:
|
||||
case MAP_ELEMENT_TYPE_WALL:
|
||||
gGameCommandErrorTitle = STR_CANT_REMOVE_THIS;
|
||||
game_do_command(
|
||||
x,
|
||||
GAME_COMMAND_FLAG_APPLY,
|
||||
y,
|
||||
(element->type & MAP_ELEMENT_DIRECTION_MASK) | (element->base_height << 8),
|
||||
GAME_COMMAND_REMOVE_FENCE,
|
||||
GAME_COMMAND_REMOVE_WALL,
|
||||
0,
|
||||
0
|
||||
);
|
||||
|
@ -4552,7 +4552,7 @@ bool map_surface_is_blocked(sint16 x, sint16 y){
|
|||
continue;
|
||||
|
||||
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_PATH ||
|
||||
map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_FENCE)
|
||||
map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_WALL)
|
||||
continue;
|
||||
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_SCENERY)
|
||||
|
@ -4909,7 +4909,7 @@ void game_command_set_sign_style(sint32* eax, sint32* ebx, sint32* ecx, sint32*
|
|||
rct_map_element* map_element = map_get_first_element_at(x / 32, y / 32);
|
||||
bool fence_found = false;
|
||||
do{
|
||||
if (map_element_get_type(map_element) != MAP_ELEMENT_TYPE_FENCE)
|
||||
if (map_element_get_type(map_element) != MAP_ELEMENT_TYPE_WALL)
|
||||
continue;
|
||||
|
||||
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.fence.type);
|
||||
|
@ -5277,3 +5277,19 @@ void map_offset_with_rotation(sint16 *x, sint16 *y, sint16 offsetX, sint16 offse
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
rct_map_element *map_get_wall_element_at(sint32 x, sint32 y, sint32 z, sint32 direction)
|
||||
{
|
||||
rct_map_element *mapElement = map_get_first_element_at(x >> 5, y >> 5);
|
||||
do {
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_WALL)
|
||||
continue;
|
||||
if (mapElement->base_height != z)
|
||||
continue;
|
||||
if (map_element_get_direction(mapElement) != direction)
|
||||
continue;
|
||||
|
||||
return mapElement;
|
||||
} while (!map_element_is_last_for_tile(mapElement++));
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ enum {
|
|||
MAP_ELEMENT_TYPE_TRACK = (2 << 2),
|
||||
MAP_ELEMENT_TYPE_SCENERY = (3 << 2),
|
||||
MAP_ELEMENT_TYPE_ENTRANCE = (4 << 2),
|
||||
MAP_ELEMENT_TYPE_FENCE = (5 << 2),
|
||||
MAP_ELEMENT_TYPE_WALL = (5 << 2),
|
||||
MAP_ELEMENT_TYPE_SCENERY_MULTIPLE = (6 << 2),
|
||||
MAP_ELEMENT_TYPE_BANNER = (7 << 2),
|
||||
// The corrupt element type is used for skipping drawing other following
|
||||
|
@ -418,7 +418,7 @@ sint32 map_height_from_slope(sint32 x, sint32 y, sint32 slope);
|
|||
rct_map_element* map_get_banner_element_at(sint32 x, sint32 y, sint32 z, uint8 direction);
|
||||
rct_map_element *map_get_surface_element_at(sint32 x, sint32 y);
|
||||
rct_map_element* map_get_path_element_at(sint32 x, sint32 y, sint32 z);
|
||||
rct_map_element *map_get_fence_element_at(sint32 x, sint32 y, sint32 z, sint32 direction);
|
||||
rct_map_element *map_get_wall_element_at(sint32 x, sint32 y, sint32 z, sint32 direction);
|
||||
rct_map_element *map_get_small_scenery_element_at(sint32 x, sint32 y, sint32 z, sint32 type, uint8 quadrant);
|
||||
rct_map_element *map_get_park_entrance_element_at(sint32 x, sint32 y, sint32 z, bool ghost);
|
||||
sint32 map_element_height(sint32 x, sint32 y);
|
||||
|
@ -451,7 +451,7 @@ rct_xy16 coordinate_3d_to_2d(const rct_xyz16* coordinate_3d, sint32 rotation);
|
|||
money32 map_clear_scenery(sint32 x0, sint32 y0, sint32 x1, sint32 y1, sint32 clear, sint32 flags);
|
||||
money32 lower_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags);
|
||||
money32 raise_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags);
|
||||
money32 map_place_fence(sint32 type, sint32 x, sint32 y, sint32 z, sint32 edge, sint32 primaryColour, sint32 secondaryColour, sint32 tertiaryColour, sint32 flags);
|
||||
money32 wall_place(sint32 type, sint32 x, sint32 y, sint32 z, sint32 edge, sint32 primaryColour, sint32 secondaryColour, sint32 tertiaryColour, sint32 flags);
|
||||
|
||||
void game_command_set_land_height(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp);
|
||||
void game_command_set_land_ownership(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 *edx, sint32 *esi, sint32 *edi, sint32 *ebp);
|
||||
|
@ -459,7 +459,7 @@ void game_command_remove_scenery(sint32* eax, sint32* ebx, sint32* ecx, sint32*
|
|||
void game_command_remove_large_scenery(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_remove_banner(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_set_scenery_colour(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_set_fence_colour(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_set_wall_colour(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_set_large_scenery_colour(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_set_banner_colour(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_clear_scenery(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
|
@ -470,10 +470,10 @@ void game_command_smooth_land(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx
|
|||
void game_command_raise_water(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_lower_water(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_set_water_height(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_remove_fence(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_remove_wall(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_place_banner(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_place_scenery(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_place_fence(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_place_wall(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_place_large_scenery(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_place_park_entrance(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_set_banner_name(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
|
@ -495,7 +495,7 @@ void map_element_iterator_begin(map_element_iterator *it);
|
|||
sint32 map_element_iterator_next(map_element_iterator *it);
|
||||
void map_element_iterator_restart_for_tile(map_element_iterator *it);
|
||||
|
||||
void map_remove_intersecting_walls(sint32 x, sint32 y, sint32 z0, sint32 z1, sint32 direction);
|
||||
void wall_remove_intersecting_walls(sint32 x, sint32 y, sint32 z0, sint32 z1, sint32 direction);
|
||||
void map_update_tiles();
|
||||
sint32 map_get_highest_z(sint32 tileX, sint32 tileY);
|
||||
|
||||
|
@ -508,8 +508,8 @@ void map_remove_out_of_range_elements();
|
|||
void map_extend_boundary_surface();
|
||||
|
||||
bool sign_set_colour(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 sequence, uint8 mainColour, uint8 textColour);
|
||||
void map_remove_walls_at(sint32 x, sint32 y, sint32 z0, sint32 z1);
|
||||
void map_remove_walls_at_z(sint32 x, sint32 y, sint32 z);
|
||||
void wall_remove_at(sint32 x, sint32 y, sint32 z0, sint32 z1);
|
||||
void wall_remove_at_z(sint32 x, sint32 y, sint32 z);
|
||||
|
||||
void map_invalidate_tile(sint32 x, sint32 y, sint32 z0, sint32 z1);
|
||||
void map_invalidate_tile_zoom1(sint32 x, sint32 y, sint32 z0, sint32 z1);
|
||||
|
@ -540,6 +540,6 @@ rct_map_element *map_get_track_element_at_with_direction_from_ride(sint32 x, sin
|
|||
|
||||
bool map_is_location_at_edge(sint32 x, sint32 y);
|
||||
void map_obstruction_set_error_text(rct_map_element *mapElement);
|
||||
uint8 fence_get_animation_frame(rct_map_element *fenceElement);
|
||||
uint8 wall_get_animation_frame(rct_map_element *fenceElement);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -461,7 +461,7 @@ static bool map_animation_invalidate_wall_door(sint32 x, sint32 y, sint32 baseZ)
|
|||
do {
|
||||
if (mapElement->base_height != baseZ)
|
||||
continue;
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_FENCE)
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_WALL)
|
||||
continue;
|
||||
|
||||
sceneryEntry = get_wall_entry(mapElement->properties.scenery.type);
|
||||
|
@ -474,7 +474,7 @@ static bool map_animation_invalidate_wall_door(sint32 x, sint32 y, sint32 baseZ)
|
|||
|
||||
bool invalidate = false;
|
||||
uint8 bl = mapElement->properties.fence.animation & 0x87;
|
||||
uint8 currentFrame = fence_get_animation_frame(mapElement);
|
||||
uint8 currentFrame = wall_get_animation_frame(mapElement);
|
||||
if (currentFrame != 0) {
|
||||
if (currentFrame == 15) {
|
||||
currentFrame = 0;
|
||||
|
@ -515,7 +515,7 @@ static bool map_animation_invalidate_wall(sint32 x, sint32 y, sint32 baseZ)
|
|||
do {
|
||||
if (mapElement->base_height != baseZ)
|
||||
continue;
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_FENCE)
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_WALL)
|
||||
continue;
|
||||
|
||||
sceneryEntry = get_wall_entry(mapElement->properties.scenery.type);
|
||||
|
|
|
@ -210,7 +210,7 @@ void scenery_remove_ghost_tool_placement(){
|
|||
105 | (gSceneryMapElementType << 8),
|
||||
y,
|
||||
gSceneryGhostWallRotation |(z << 8),
|
||||
GAME_COMMAND_REMOVE_FENCE,
|
||||
GAME_COMMAND_REMOVE_WALL,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
|
|
|
@ -225,7 +225,7 @@ sint32 tile_inspector_rotate_element_at(sint32 x, sint32 y, sint32 elementIndex,
|
|||
case MAP_ELEMENT_TYPE_TRACK:
|
||||
case MAP_ELEMENT_TYPE_SCENERY:
|
||||
case MAP_ELEMENT_TYPE_ENTRANCE:
|
||||
case MAP_ELEMENT_TYPE_FENCE:
|
||||
case MAP_ELEMENT_TYPE_WALL:
|
||||
newRotation = (mapElement->type + 1) & MAP_ELEMENT_DIRECTION_MASK;
|
||||
mapElement->type &= ~MAP_ELEMENT_DIRECTION_MASK;
|
||||
mapElement->type |= newRotation;
|
||||
|
@ -553,7 +553,7 @@ sint32 tile_inspector_fence_set_slope(sint32 x, sint32 y, sint32 elementIndex, s
|
|||
{
|
||||
rct_map_element *const fenceElement = map_get_nth_element_at(x, y, elementIndex);
|
||||
|
||||
if (!fenceElement || map_element_get_type(fenceElement) != MAP_ELEMENT_TYPE_FENCE)
|
||||
if (!fenceElement || map_element_get_type(fenceElement) != MAP_ELEMENT_TYPE_WALL)
|
||||
{
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue