Rename map element fence to wall

This commit is contained in:
duncanspumpkin committed 2017-02-20 21:10:49 +00:00
1 parent f54c71b61c
commit 810bf301f3
14 files changed
+79 -79

No files matched your search

@@ -490,9 +490,9 @@ void viewport_interaction_remove_park_entrance(rct_map_element *mapElement, sint
*/
static void viewport_interaction_remove_park_wall(rct_map_element *mapElement, sint32 x, sint32 y)
{
rct_scenery_entry *sceneryEntry = get_wall_entry(mapElement->properties.fence.type);
rct_scenery_entry *sceneryEntry = get_wall_entry(mapElement->properties.wall.type);
if (sceneryEntry->wall.scrolling_mode != 0xFF){
window_sign_small_open(mapElement->properties.fence.banner_index);
window_sign_small_open(mapElement->properties.wall.banner_index);
} else {
gGameCommandErrorTitle = STR_CANT_REMOVE_THIS;
game_do_command(
+7 -7
View File
@@ -134,7 +134,7 @@ void fence_paint(uint8 direction, sint32 height, rct_map_element * map_element)
{
gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_WALL;
rct_scenery_entry * sceneryEntry = get_wall_entry(map_element->properties.fence.type);
rct_scenery_entry * sceneryEntry = get_wall_entry(map_element->properties.wall.type);
if (sceneryEntry == NULL || sceneryEntry == (rct_scenery_entry *)-1) {
return;
}
@@ -145,18 +145,18 @@ void fence_paint(uint8 direction, sint32 height, rct_map_element * map_element)
}
sint32 primaryColour = map_element->properties.fence.colour_1 & 0x1F;
sint32 primaryColour = map_element->properties.wall.colour_1 & 0x1F;
uint32 imageColourFlags = primaryColour << 19 | 0x20000000;
uint32 dword_141F718 = imageColourFlags + 0x23800006;
if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_SECONDARY_COLOUR) {
uint8 secondaryColour = (map_element->properties.fence.colour_1 >> 5) | ((map_element->flags & 0x60) >> 2);
uint8 secondaryColour = (map_element->properties.wall.colour_1 >> 5) | ((map_element->flags & 0x60) >> 2);
imageColourFlags |= secondaryColour << 24 | 0x80000000;
}
uint32 tertiaryColour = 0;
if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_TERNARY_COLOUR) {
tertiaryColour = map_element->properties.fence.colour_3;
tertiaryColour = map_element->properties.wall.colour_3;
imageColourFlags &= 0x0DFFFFFFF;
}
@@ -184,7 +184,7 @@ void fence_paint(uint8 direction, sint32 height, rct_map_element * map_element)
rct_xyz16 boundsR1, boundsR1_, boundsR2, boundsR2_, boundsL1, boundsL1_;
uint8 animationFrame = wall_get_animation_frame(map_element);
// Add the direction as well
animationFrame |= (map_element->properties.fence.animation & 0x80) >> 3;
animationFrame |= (map_element->properties.wall.animation & 0x80) >> 3;
uint32 imageId;
switch (direction) {
case 0:
@@ -345,7 +345,7 @@ void fence_paint(uint8 direction, sint32 height, rct_map_element * map_element)
set_format_arg(0, uint32, 0);
set_format_arg(4, uint32, 0);
uint8 secondaryColour = map_element->properties.fence.colour_1 >> 5 | (map_element->flags & 0x60) >> 2;
uint8 secondaryColour = map_element->properties.wall.colour_1 >> 5 | (map_element->flags & 0x60) >> 2;
if (dword_141F710 != 0) {
secondaryColour = COLOUR_GREY;
@@ -359,7 +359,7 @@ void fence_paint(uint8 direction, sint32 height, rct_map_element * map_element)
uint16 scrollingMode = sceneryEntry->wall.scrolling_mode + ((direction + 1) & 0x3);
uint8 bannerIndex = map_element->properties.fence.banner_index;
uint8 bannerIndex = map_element->properties.wall.banner_index;
rct_banner * banner = &gBanners[bannerIndex];
set_format_arg(0, rct_string_id, banner->string_idx);
+6 -6
View File
@@ -11280,7 +11280,7 @@ static bool peep_find_ride_to_look_at(rct_peep *peep, uint8 edge, uint8 *rideToV
do {
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 (get_wall_entry(mapElement->properties.wall.type)->wall.flags2 & WALL_SCENERY_2_FLAG4) continue;
if (peep->next_z + 4 <= mapElement->base_height) continue;
if (peep->next_z + 1 >= mapElement->clearance_height) continue;
@@ -11301,7 +11301,7 @@ static bool peep_find_ride_to_look_at(rct_peep *peep, uint8 edge, uint8 *rideToV
do {
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 (get_wall_entry(mapElement->properties.wall.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.
if (peep->next_z + 4 >= mapElement->base_height) continue;
if (peep->next_z + 1 >= mapElement->clearance_height) continue;
@@ -11348,7 +11348,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_PATH) continue;
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_WALL) {
if (get_wall_entry(mapElement->properties.fence.type)->wall.flags2 & WALL_SCENERY_2_FLAG4) {
if (get_wall_entry(mapElement->properties.wall.type)->wall.flags2 & WALL_SCENERY_2_FLAG4) {
continue;
}
}
@@ -11371,7 +11371,7 @@ static bool peep_find_ride_to_look_at(rct_peep *peep, uint8 edge, uint8 *rideToV
do {
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 (get_wall_entry(mapElement->properties.wall.type)->wall.flags2 & WALL_SCENERY_2_FLAG4) continue;
if (peep->next_z + 6 <= mapElement->base_height) continue;
if (peep->next_z >= mapElement->clearance_height) continue;
@@ -11417,7 +11417,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_PATH) continue;
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_WALL) {
if (get_wall_entry(mapElement->properties.fence.type)->wall.flags2 & WALL_SCENERY_2_FLAG4) {
if (get_wall_entry(mapElement->properties.wall.type)->wall.flags2 & WALL_SCENERY_2_FLAG4) {
continue;
}
}
@@ -11439,7 +11439,7 @@ static bool peep_find_ride_to_look_at(rct_peep *peep, uint8 edge, uint8 *rideToV
do {
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 (get_wall_entry(mapElement->properties.wall.type)->wall.flags2 & WALL_SCENERY_2_FLAG4) continue;
if (peep->next_z + 8 <= mapElement->base_height) continue;
if (peep->next_z >= mapElement->clearance_height) continue;
+10 -10
View File
@@ -411,9 +411,9 @@ private:
break;
case MAP_ELEMENT_TYPE_WALL:
{
uint8 var_05 = mapElement->properties.fence.colour_3;
uint16 var_06 = mapElement->properties.fence.colour_1 |
(mapElement->properties.fence.animation << 8);
uint8 var_05 = mapElement->properties.wall.colour_3;
uint16 var_06 = mapElement->properties.wall.colour_1 |
(mapElement->properties.wall.animation << 8);
for (sint32 edge = 0; edge < 4; edge++)
{
@@ -2100,13 +2100,13 @@ private:
break;
case MAP_ELEMENT_TYPE_WALL:
colour = ((mapElement->type & 0xC0) >> 3) |
((mapElement->properties.fence.type & 0xE0) >> 5);
((mapElement->properties.wall.type & 0xE0) >> 5);
colour = RCT1::GetColour(colour);
mapElement->type &= 0x3F;
mapElement->properties.fence.type &= 0x1F;
mapElement->properties.wall.type &= 0x1F;
mapElement->type |= (colour & 0x18) << 3;
mapElement->properties.fence.type |= (colour & 7) << 5;
mapElement->properties.wall.type |= (colour & 7) << 5;
break;
case MAP_ELEMENT_TYPE_SCENERY_MULTIPLE:
colour = RCT1::GetColour(mapElement->properties.scenerymultiple.colour[0] & 0x1F);
@@ -2209,9 +2209,9 @@ private:
rct_map_element originalMapElement = *mapElement;
map_element_remove(mapElement);
uint8 var_05 = originalMapElement.properties.fence.colour_3;
uint16 var_06 = originalMapElement.properties.fence.colour_1 |
(originalMapElement.properties.fence.animation << 8);
uint8 var_05 = originalMapElement.properties.wall.colour_3;
uint16 var_06 = originalMapElement.properties.wall.colour_1 |
(originalMapElement.properties.wall.animation << 8);
for (sint32 edge = 0; edge < 4; edge++)
{
@@ -2221,7 +2221,7 @@ private:
{
sint32 type = typeA | (typeB << 2);
sint32 colourA = ((originalMapElement.type & 0xC0) >> 3) |
(originalMapElement.properties.fence.type >> 5);
(originalMapElement.properties.wall.type >> 5);
sint32 colourB = 0;
sint32 colourC = 0;
ConvertWall(&type, &colourA, &colourB, &colourC);
+8 -8
View File
@@ -332,15 +332,15 @@ static void track_design_save_add_large_scenery(sint32 x, sint32 y, rct_map_elem
static void track_design_save_add_wall(sint32 x, sint32 y, rct_map_element *mapElement)
{
sint32 entryType = mapElement->properties.fence.type;
sint32 entryType = mapElement->properties.wall.type;
rct_object_entry *entry = (rct_object_entry*)&object_entry_groups[OBJECT_TYPE_WALLS].entries[entryType];
uint8 flags = 0;
flags |= mapElement->type & 3;
flags |= mapElement->properties.fence.colour_3 << 2;
flags |= mapElement->properties.wall.colour_3 << 2;
uint8 secondaryColour = ((mapElement->flags & 0x60) >> 2) | (mapElement->properties.fence.colour_1 >> 5);
uint8 primaryColour = mapElement->properties.fence.colour_1 & 0x1F;
uint8 secondaryColour = ((mapElement->flags & 0x60) >> 2) | (mapElement->properties.wall.colour_1 >> 5);
uint8 primaryColour = mapElement->properties.wall.colour_1 & 0x1F;
track_design_save_push_map_element(x, y, mapElement);
track_design_save_push_map_element_desc(entry, x, y, mapElement->base_height, flags, primaryColour, secondaryColour);
@@ -515,15 +515,15 @@ static void track_design_save_remove_large_scenery(sint32 x, sint32 y, rct_map_e
static void track_design_save_remove_wall(sint32 x, sint32 y, rct_map_element *mapElement)
{
sint32 entryType = mapElement->properties.fence.type;
sint32 entryType = mapElement->properties.wall.type;
rct_object_entry *entry = (rct_object_entry*)&object_entry_groups[OBJECT_TYPE_WALLS].entries[entryType];
uint8 flags = 0;
flags |= mapElement->type & 3;
flags |= mapElement->properties.fence.colour_3 << 2;
flags |= mapElement->properties.wall.colour_3 << 2;
uint8 secondaryColour = ((mapElement->flags & 0x60) >> 2) | (mapElement->properties.fence.colour_1 >> 5);
uint8 primaryColour = mapElement->properties.fence.colour_1 & 0x1F;
uint8 secondaryColour = ((mapElement->flags & 0x60) >> 2) | (mapElement->properties.wall.colour_1 >> 5);
uint8 primaryColour = mapElement->properties.wall.colour_1 & 0x1F;
track_design_save_pop_map_element(x, y, mapElement);
track_design_save_pop_map_element_desc(entry, x, y, mapElement->base_height, flags, primaryColour, secondaryColour);
+10 -10
View File
@@ -6804,7 +6804,7 @@ static void sub_6D63D4(rct_vehicle *vehicle)
*/
static void vehicle_play_scenery_door_open_sound(rct_vehicle *vehicle, rct_map_element *mapElement)
{
rct_scenery_entry *wallEntry = get_wall_entry(mapElement->properties.fence.type);
rct_scenery_entry *wallEntry = get_wall_entry(mapElement->properties.wall.type);
sint32 doorSoundType = (wallEntry->wall.flags2 >> 1) & 3;
if (doorSoundType != 0) {
sint32 soundId = DoorOpenSoundIds[doorSoundType - 1];
@@ -6820,7 +6820,7 @@ static void vehicle_play_scenery_door_open_sound(rct_vehicle *vehicle, rct_map_e
*/
static void vehicle_play_scenery_door_close_sound(rct_vehicle *vehicle, rct_map_element *mapElement)
{
rct_scenery_entry *wallEntry = get_wall_entry(mapElement->properties.fence.type);
rct_scenery_entry *wallEntry = get_wall_entry(mapElement->properties.wall.type);
sint32 doorSoundType = (wallEntry->wall.flags2 >> 1) & 3;
if (doorSoundType != 0) {
sint32 soundId = DoorCloseSoundIds[doorSoundType - 1];
@@ -6853,13 +6853,13 @@ static void vehicle_update_scenery_door(rct_vehicle *vehicle)
}
if (vehicle->next_vehicle_on_train != SPRITE_INDEX_NULL) {
mapElement->properties.fence.animation &= 7;
mapElement->properties.fence.animation |= 8;
mapElement->properties.wall.animation &= 7;
mapElement->properties.wall.animation |= 8;
map_animation_create(MAP_ANIMATION_TYPE_WALL_DOOR, x, y, z);
vehicle_play_scenery_door_open_sound(vehicle, mapElement);
} else {
mapElement->properties.fence.animation &= 7;
mapElement->properties.fence.animation |= 0x30;
mapElement->properties.wall.animation &= 7;
mapElement->properties.wall.animation |= 0x30;
vehicle_play_scenery_door_close_sound(vehicle, mapElement);
}
}
@@ -6936,13 +6936,13 @@ static void sub_6DEDE8(rct_vehicle *vehicle)
}
if (vehicle->next_vehicle_on_train != SPRITE_INDEX_NULL) {
mapElement->properties.fence.animation &= 7;
mapElement->properties.fence.animation |= 0x88;
mapElement->properties.wall.animation &= 7;
mapElement->properties.wall.animation |= 0x88;
map_animation_create(MAP_ANIMATION_TYPE_WALL_DOOR, x, y, z);
vehicle_play_scenery_door_open_sound(vehicle, mapElement);
} else {
mapElement->properties.fence.animation &= 7;
mapElement->properties.fence.animation |= 0xB0;
mapElement->properties.wall.animation &= 7;
mapElement->properties.wall.animation |= 0xB0;
vehicle_play_scenery_door_close_sound(vehicle, mapElement);
}
}
@@ -597,7 +597,7 @@ static void setup_in_use_selection_flags()
gEditorSelectedObjects[OBJECT_TYPE_PATHS][type] |= (1 << 0);
break;
case MAP_ELEMENT_TYPE_WALL:
type = iter.element->properties.fence.type;
type = iter.element->properties.wall.type;
assert(type < object_entry_group_counts[OBJECT_TYPE_WALLS]);
gEditorSelectedObjects[OBJECT_TYPE_WALLS][type] |= (1 << 0);
break;
+7 -7
View File
@@ -435,9 +435,9 @@ void window_sign_small_open(rct_windownumber number){
while (1){
if (map_element_get_type(map_element) == MAP_ELEMENT_TYPE_WALL) {
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.fence.type);
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.wall.type);
if (scenery_entry->wall.scrolling_mode != 0xFF){
if (map_element->properties.fence.banner_index == w->number)
if (map_element->properties.wall.banner_index == w->number)
break;
}
}
@@ -447,10 +447,10 @@ void window_sign_small_open(rct_windownumber number){
sint32 view_z = map_element->base_height << 3;
w->frame_no = view_z;
w->list_information_type = map_element->properties.fence.colour_1 & 0x1F;
w->list_information_type = map_element->properties.wall.colour_1 & 0x1F;
w->var_492 =
((map_element->properties.fence.colour_1 >> 5) | ((map_element->flags & 0x60) >> 2));
w->var_48C = map_element->properties.fence.type;
((map_element->properties.wall.colour_1 >> 5) | ((map_element->flags & 0x60) >> 2));
w->var_48C = map_element->properties.wall.type;
view_x += 16;
view_y += 16;
@@ -497,9 +497,9 @@ static void window_sign_small_mouseup(rct_window *w, sint32 widgetIndex)
case WIDX_SIGN_DEMOLISH:
while (1){
if (map_element_get_type(map_element) == MAP_ELEMENT_TYPE_WALL) {
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.fence.type);
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.wall.type);
if (scenery_entry->wall.scrolling_mode != 0xFF){
if (map_element->properties.fence.banner_index == w->number)
if (map_element->properties.wall.banner_index == w->number)
break;
}
}
+3 -3
View File
@@ -1327,7 +1327,7 @@ void window_tile_inspector_auto_set_buttons(rct_window *w)
switch (w->page) {
case TILE_INSPECTOR_PAGE_FENCE: {
const rct_map_element *const mapElement = window_tile_inspector_get_selected_element(w);
const uint8 fenceType = mapElement->properties.fence.type;
const uint8 fenceType = mapElement->properties.wall.type;
const rct_wall_scenery_entry wallEntry = get_wall_entry(fenceType)->wall;
const bool canBeSloped = !(wallEntry.flags & WALL_SCENERY_CANT_BUILD_ON_SLOPE);
// Fence slope dropdown
@@ -1834,13 +1834,13 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi)
case TILE_INSPECTOR_PAGE_FENCE: {
// Details
// Type
sint16 fenceType = mapElement->properties.fence.type;
sint16 fenceType = mapElement->properties.wall.type;
gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_FENCE_TYPE, &fenceType, COLOUR_DARK_GREEN, x, y);
// Banner info
rct_wall_scenery_entry fenceEntry = get_wall_entry(fenceType)->wall;
if (fenceEntry.flags & WALL_SCENERY_IS_BANNER) {
gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, &gBanners[mapElement->properties.fence.banner_index].string_idx, COLOUR_DARK_GREEN, x, y + 11);
gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, &gBanners[mapElement->properties.wall.banner_index].string_idx, COLOUR_DARK_GREEN, x, y + 11);
}
else {
gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_ENTRY_BANNER_NONE, NULL, COLOUR_DARK_GREEN, x, y + 11);
+1 -1
View File
@@ -935,7 +935,7 @@ static void repaint_scenery_tool_down(sint16 x, sint16 y, sint16 widgetIndex){
}
case VIEWPORT_INTERACTION_ITEM_WALL:
{
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.fence.type);
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.wall.type);
// If can't repaint
if (!(scenery_entry->wall.flags &
+5 -5
View File
@@ -4006,11 +4006,11 @@ sint32 map_element_get_banner_index(rct_map_element *mapElement)
((mapElement->properties.scenerymultiple.colour[0] & 0xE0) >> 2) |
((mapElement->properties.scenerymultiple.colour[1] & 0xE0) >> 5);
case MAP_ELEMENT_TYPE_WALL:
sceneryEntry = get_wall_entry(mapElement->properties.fence.type);
sceneryEntry = get_wall_entry(mapElement->properties.wall.type);
if (sceneryEntry->wall.scrolling_mode == 0xFF)
return -1;
return mapElement->properties.fence.banner_index;
return mapElement->properties.wall.banner_index;
case MAP_ELEMENT_TYPE_BANNER:
return mapElement->properties.banner.index;
default:
@@ -4912,10 +4912,10 @@ void game_command_set_sign_style(sint32* eax, sint32* ebx, sint32* ecx, sint32*
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);
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.wall.type);
if (scenery_entry->wall.scrolling_mode == 0xFF)
continue;
if (map_element->properties.fence.banner_index != bannerId)
if (map_element->properties.wall.banner_index != bannerId)
continue;
fence_found = true;
break;
@@ -4932,7 +4932,7 @@ void game_command_set_sign_style(sint32* eax, sint32* ebx, sint32* ecx, sint32*
}
map_element->flags &= 0x9F;
map_element->properties.fence.colour_1 =
map_element->properties.wall.colour_1 =
mainColour |
((textColour & 0x7) << 5);
map_element->flags |= ((textColour & 0x18) << 2);
+4 -4
View File
@@ -68,7 +68,7 @@ typedef struct rct_map_element_entrance_properties {
} rct_map_element_entrance_properties;
assert_struct_size(rct_map_element_entrance_properties, 4);
typedef struct rct_map_element_fence_properties {
typedef struct rct_map_element_wall_properties {
uint8 type; //4
union {
uint8 colour_3; //5
@@ -76,8 +76,8 @@ typedef struct rct_map_element_fence_properties {
};
uint8 colour_1; //6 0b_2221_1111 2 = colour_2 (uses flags for rest of colour2), 1 = colour_1
uint8 animation; //7 0b_dfff_ft00 d = direction, f = frame num, t = across track flag (not used)
} rct_map_element_fence_properties;
assert_struct_size(rct_map_element_fence_properties, 4);
} rct_map_element_wall_properties;
assert_struct_size(rct_map_element_wall_properties, 4);
typedef struct rct_map_element_scenerymultiple_properties {
uint16 type; //4
@@ -99,7 +99,7 @@ typedef union {
rct_map_element_track_properties track;
rct_map_element_scenery_properties scenery;
rct_map_element_entrance_properties entrance;
rct_map_element_fence_properties fence;
rct_map_element_wall_properties wall;
rct_map_element_scenerymultiple_properties scenerymultiple;
rct_map_element_banner_properties banner;
} rct_map_element_properties;
+2 -2
View File
@@ -473,7 +473,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 bl = mapElement->properties.wall.animation & 0x87;
uint8 currentFrame = wall_get_animation_frame(mapElement);
if (currentFrame != 0) {
if (currentFrame == 15) {
@@ -491,7 +491,7 @@ static bool map_animation_invalidate_wall_door(sint32 x, sint32 y, sint32 baseZ)
}
bl |= currentFrame << 3;
mapElement->properties.fence.animation = bl;
mapElement->properties.wall.animation = bl;
if (invalidate) {
sint32 z = mapElement->base_height * 8;
map_invalidate_tile_zoom1(x, y, z, z + 32);
+13 -13
View File
@@ -436,21 +436,21 @@ money32 WallPlace(uint8 wall_type, sint16 x, sint16 y, sint16 z, uint8 edge, uin
map_element->type = bp | edge | MAP_ELEMENT_TYPE_WALL;
map_element->properties.fence.colour_1 = primary_colour;
map_element->properties.fence.colour_1 |= (secondary_colour & 7) << 5;
map_element->properties.wall.colour_1 = primary_colour;
map_element->properties.wall.colour_1 |= (secondary_colour & 7) << 5;
map_element->flags |= (secondary_colour & 0x18) << 2;
if (gWallAcrossTrack) {
map_element->properties.fence.animation |= (1 << 2);
map_element->properties.wall.animation |= (1 << 2);
}
map_element->properties.fence.type = wall_type;
map_element->properties.wall.type = wall_type;
if (banner_index != 0xFF){
map_element->properties.fence.banner_index = banner_index;
map_element->properties.wall.banner_index = banner_index;
}
if (wall_entry->wall.flags & WALL_SCENERY_HAS_TERNARY_COLOUR){
map_element->properties.fence.colour_3 = tertiary_colour;
map_element->properties.wall.colour_3 = tertiary_colour;
}
if (flags & (1 << 6)){
@@ -545,16 +545,16 @@ money32 WallSetColour(sint16 x, sint16 y, uint8 base_height, uint8 direction, ui
}
if(flags & GAME_COMMAND_FLAG_APPLY){
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.fence.type);
map_element->properties.fence.colour_1 &= 0xE0;
map_element->properties.fence.colour_1 |= primaryColour;
map_element->properties.fence.colour_1 &= 0x1F;
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.wall.type);
map_element->properties.wall.colour_1 &= 0xE0;
map_element->properties.wall.colour_1 |= primaryColour;
map_element->properties.wall.colour_1 &= 0x1F;
map_element->flags &= 0x9F;
map_element->properties.fence.colour_1 |= (secondaryColour & 0x7) * 32;
map_element->properties.wall.colour_1 |= (secondaryColour & 0x7) * 32;
map_element->flags |= (secondaryColour & 0x18) * 4;
if(scenery_entry->wall.flags & WALL_SCENERY_HAS_TERNARY_COLOUR){
map_element->properties.fence.colour_3 = tertiaryColour;
map_element->properties.wall.colour_3 = tertiaryColour;
}
map_invalidate_tile_zoom1(x, y, z, z + 72);
}
@@ -565,7 +565,7 @@ money32 WallSetColour(sint16 x, sint16 y, uint8 base_height, uint8 direction, ui
extern "C"
{
uint8 wall_get_animation_frame(rct_map_element *wallElement) {
return (wallElement->properties.fence.animation >> 3) & 0xF;
return (wallElement->properties.wall.animation >> 3) & 0xF;
}
/**