mirror of https://github.com/OpenRCT2/OpenRCT2.git
Label fence offsets
This commit is contained in:
parent
50e1c831a6
commit
133266deb0
|
@ -492,7 +492,7 @@ static void viewport_interaction_remove_park_wall(rct_map_element *mapElement, s
|
||||||
{
|
{
|
||||||
rct_scenery_entry *sceneryEntry = get_wall_entry(mapElement->properties.fence.type);
|
rct_scenery_entry *sceneryEntry = get_wall_entry(mapElement->properties.fence.type);
|
||||||
if (sceneryEntry->wall.scrolling_mode != 0xFF){
|
if (sceneryEntry->wall.scrolling_mode != 0xFF){
|
||||||
window_sign_small_open(mapElement->properties.fence.item[0]);
|
window_sign_small_open(mapElement->properties.fence.banner_index);
|
||||||
} else {
|
} else {
|
||||||
gGameCommandErrorTitle = STR_CANT_REMOVE_THIS;
|
gGameCommandErrorTitle = STR_CANT_REMOVE_THIS;
|
||||||
game_do_command(
|
game_do_command(
|
||||||
|
|
|
@ -145,18 +145,18 @@ void fence_paint(uint8 direction, sint32 height, rct_map_element * map_element)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sint32 primaryColour = map_element->properties.fence.item[1] & 0x1F;
|
sint32 primaryColour = map_element->properties.fence.colour_1 & 0x1F;
|
||||||
uint32 imageColourFlags = primaryColour << 19 | 0x20000000;
|
uint32 imageColourFlags = primaryColour << 19 | 0x20000000;
|
||||||
uint32 dword_141F718 = imageColourFlags + 0x23800006;
|
uint32 dword_141F718 = imageColourFlags + 0x23800006;
|
||||||
|
|
||||||
if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_SECONDARY_COLOUR) {
|
if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_SECONDARY_COLOUR) {
|
||||||
uint8 secondaryColour = (map_element->properties.fence.item[1] >> 5) | ((map_element->flags & 0x60) >> 2);
|
uint8 secondaryColour = (map_element->properties.fence.colour_1 >> 5) | ((map_element->flags & 0x60) >> 2);
|
||||||
imageColourFlags |= secondaryColour << 24 | 0x80000000;
|
imageColourFlags |= secondaryColour << 24 | 0x80000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 tertiaryColour = 0;
|
uint32 tertiaryColour = 0;
|
||||||
if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_TERNARY_COLOUR) {
|
if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_TERNARY_COLOUR) {
|
||||||
tertiaryColour = map_element->properties.fence.item[0];
|
tertiaryColour = map_element->properties.fence.colour_3;
|
||||||
imageColourFlags &= 0x0DFFFFFFF;
|
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_;
|
rct_xyz16 boundsR1, boundsR1_, boundsR2, boundsR2_, boundsL1, boundsL1_;
|
||||||
uint8 animationFrame = fence_get_animation_frame(map_element);
|
uint8 animationFrame = fence_get_animation_frame(map_element);
|
||||||
// Add the direction as well
|
// Add the direction as well
|
||||||
animationFrame |= (map_element->properties.fence.item[2] & 0x80) >> 3;
|
animationFrame |= (map_element->properties.fence.animation & 0x80) >> 3;
|
||||||
uint32 imageId;
|
uint32 imageId;
|
||||||
switch (direction) {
|
switch (direction) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -345,21 +345,21 @@ void fence_paint(uint8 direction, sint32 height, rct_map_element * map_element)
|
||||||
set_format_arg(0, uint32, 0);
|
set_format_arg(0, uint32, 0);
|
||||||
set_format_arg(4, uint32, 0);
|
set_format_arg(4, uint32, 0);
|
||||||
|
|
||||||
uint8 al_2 = map_element->properties.fence.item[1] >> 5 | (map_element->flags & 0x60) >> 2;
|
uint8 secondaryColour = map_element->properties.fence.colour_1 >> 5 | (map_element->flags & 0x60) >> 2;
|
||||||
|
|
||||||
if (dword_141F710 != 0) {
|
if (dword_141F710 != 0) {
|
||||||
al_2 = COLOUR_GREY;
|
secondaryColour = COLOUR_GREY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (direction == 0) {
|
if (direction == 0) {
|
||||||
al_2 |= 0x80;
|
secondaryColour |= 0x80;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_format_arg(7, uint8, al_2);
|
set_format_arg(7, uint8, secondaryColour);
|
||||||
|
|
||||||
uint16 scrollingMode = sceneryEntry->wall.scrolling_mode + ((direction + 1) & 0x3);
|
uint16 scrollingMode = sceneryEntry->wall.scrolling_mode + ((direction + 1) & 0x3);
|
||||||
|
|
||||||
uint8 bannerIndex = map_element->properties.fence.item[0];
|
uint8 bannerIndex = map_element->properties.fence.banner_index;
|
||||||
rct_banner * banner = &gBanners[bannerIndex];
|
rct_banner * banner = &gBanners[bannerIndex];
|
||||||
|
|
||||||
set_format_arg(0, rct_string_id, banner->string_idx);
|
set_format_arg(0, rct_string_id, banner->string_idx);
|
||||||
|
@ -386,5 +386,5 @@ void fence_paint(uint8 direction, sint32 height, rct_map_element * map_element)
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8 fence_get_animation_frame(rct_map_element *fenceElement) {
|
uint8 fence_get_animation_frame(rct_map_element *fenceElement) {
|
||||||
return (fenceElement->properties.fence.item[2] >> 3) & 0xF;
|
return (fenceElement->properties.fence.animation >> 3) & 0xF;
|
||||||
}
|
}
|
||||||
|
|
|
@ -411,9 +411,9 @@ private:
|
||||||
break;
|
break;
|
||||||
case MAP_ELEMENT_TYPE_FENCE:
|
case MAP_ELEMENT_TYPE_FENCE:
|
||||||
{
|
{
|
||||||
uint8 var_05 = mapElement->properties.fence.item[0];
|
uint8 var_05 = mapElement->properties.fence.colour_3;
|
||||||
uint16 var_06 = mapElement->properties.fence.item[1] |
|
uint16 var_06 = mapElement->properties.fence.colour_1 |
|
||||||
(mapElement->properties.fence.item[2] << 8);
|
(mapElement->properties.fence.animation << 8);
|
||||||
|
|
||||||
for (sint32 edge = 0; edge < 4; edge++)
|
for (sint32 edge = 0; edge < 4; edge++)
|
||||||
{
|
{
|
||||||
|
@ -2209,9 +2209,9 @@ private:
|
||||||
rct_map_element originalMapElement = *mapElement;
|
rct_map_element originalMapElement = *mapElement;
|
||||||
map_element_remove(mapElement);
|
map_element_remove(mapElement);
|
||||||
|
|
||||||
uint8 var_05 = originalMapElement.properties.fence.item[0];
|
uint8 var_05 = originalMapElement.properties.fence.colour_3;
|
||||||
uint16 var_06 = originalMapElement.properties.fence.item[1] |
|
uint16 var_06 = originalMapElement.properties.fence.colour_1 |
|
||||||
(originalMapElement.properties.fence.item[2] << 8);
|
(originalMapElement.properties.fence.animation << 8);
|
||||||
|
|
||||||
for (sint32 edge = 0; edge < 4; edge++)
|
for (sint32 edge = 0; edge < 4; edge++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -337,10 +337,10 @@ static void track_design_save_add_wall(sint32 x, sint32 y, rct_map_element *mapE
|
||||||
|
|
||||||
uint8 flags = 0;
|
uint8 flags = 0;
|
||||||
flags |= mapElement->type & 3;
|
flags |= mapElement->type & 3;
|
||||||
flags |= mapElement->properties.fence.item[0] << 2;
|
flags |= mapElement->properties.fence.colour_3 << 2;
|
||||||
|
|
||||||
uint8 secondaryColour = ((mapElement->flags & 0x60) >> 2) | (mapElement->properties.fence.item[1] >> 5);
|
uint8 secondaryColour = ((mapElement->flags & 0x60) >> 2) | (mapElement->properties.fence.colour_1 >> 5);
|
||||||
uint8 primaryColour = mapElement->properties.fence.item[1] & 0x1F;
|
uint8 primaryColour = mapElement->properties.fence.colour_1 & 0x1F;
|
||||||
|
|
||||||
track_design_save_push_map_element(x, y, mapElement);
|
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);
|
track_design_save_push_map_element_desc(entry, x, y, mapElement->base_height, flags, primaryColour, secondaryColour);
|
||||||
|
@ -520,10 +520,10 @@ static void track_design_save_remove_wall(sint32 x, sint32 y, rct_map_element *m
|
||||||
|
|
||||||
uint8 flags = 0;
|
uint8 flags = 0;
|
||||||
flags |= mapElement->type & 3;
|
flags |= mapElement->type & 3;
|
||||||
flags |= mapElement->properties.fence.item[0] << 2;
|
flags |= mapElement->properties.fence.colour_3 << 2;
|
||||||
|
|
||||||
uint8 secondaryColour = ((mapElement->flags & 0x60) >> 2) | (mapElement->properties.fence.item[1] >> 5);
|
uint8 secondaryColour = ((mapElement->flags & 0x60) >> 2) | (mapElement->properties.fence.colour_1 >> 5);
|
||||||
uint8 primaryColour = mapElement->properties.fence.item[1] & 0x1F;
|
uint8 primaryColour = mapElement->properties.fence.colour_1 & 0x1F;
|
||||||
|
|
||||||
track_design_save_pop_map_element(x, y, mapElement);
|
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);
|
track_design_save_pop_map_element_desc(entry, x, y, mapElement->base_height, flags, primaryColour, secondaryColour);
|
||||||
|
|
|
@ -6853,13 +6853,13 @@ static void vehicle_update_scenery_door(rct_vehicle *vehicle)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vehicle->next_vehicle_on_train != SPRITE_INDEX_NULL) {
|
if (vehicle->next_vehicle_on_train != SPRITE_INDEX_NULL) {
|
||||||
mapElement->properties.fence.item[2] &= 7;
|
mapElement->properties.fence.animation &= 7;
|
||||||
mapElement->properties.fence.item[2] |= 8;
|
mapElement->properties.fence.animation |= 8;
|
||||||
map_animation_create(MAP_ANIMATION_TYPE_WALL_DOOR, x, y, z);
|
map_animation_create(MAP_ANIMATION_TYPE_WALL_DOOR, x, y, z);
|
||||||
vehicle_play_scenery_door_open_sound(vehicle, mapElement);
|
vehicle_play_scenery_door_open_sound(vehicle, mapElement);
|
||||||
} else {
|
} else {
|
||||||
mapElement->properties.fence.item[2] &= 7;
|
mapElement->properties.fence.animation &= 7;
|
||||||
mapElement->properties.fence.item[2] |= 0x30;
|
mapElement->properties.fence.animation |= 0x30;
|
||||||
vehicle_play_scenery_door_close_sound(vehicle, mapElement);
|
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) {
|
if (vehicle->next_vehicle_on_train != SPRITE_INDEX_NULL) {
|
||||||
mapElement->properties.fence.item[2] &= 7;
|
mapElement->properties.fence.animation &= 7;
|
||||||
mapElement->properties.fence.item[2] |= 0x88;
|
mapElement->properties.fence.animation |= 0x88;
|
||||||
map_animation_create(MAP_ANIMATION_TYPE_WALL_DOOR, x, y, z);
|
map_animation_create(MAP_ANIMATION_TYPE_WALL_DOOR, x, y, z);
|
||||||
vehicle_play_scenery_door_open_sound(vehicle, mapElement);
|
vehicle_play_scenery_door_open_sound(vehicle, mapElement);
|
||||||
} else {
|
} else {
|
||||||
mapElement->properties.fence.item[2] &= 7;
|
mapElement->properties.fence.animation &= 7;
|
||||||
mapElement->properties.fence.item[2] |= 0xB0;
|
mapElement->properties.fence.animation |= 0xB0;
|
||||||
vehicle_play_scenery_door_close_sound(vehicle, mapElement);
|
vehicle_play_scenery_door_close_sound(vehicle, mapElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -437,7 +437,7 @@ void window_sign_small_open(rct_windownumber number){
|
||||||
if (map_element_get_type(map_element) == MAP_ELEMENT_TYPE_FENCE) {
|
if (map_element_get_type(map_element) == MAP_ELEMENT_TYPE_FENCE) {
|
||||||
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.fence.type);
|
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.fence.type);
|
||||||
if (scenery_entry->wall.scrolling_mode != 0xFF){
|
if (scenery_entry->wall.scrolling_mode != 0xFF){
|
||||||
if (map_element->properties.fence.item[0] == w->number)
|
if (map_element->properties.fence.banner_index == w->number)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -447,9 +447,9 @@ void window_sign_small_open(rct_windownumber number){
|
||||||
sint32 view_z = map_element->base_height << 3;
|
sint32 view_z = map_element->base_height << 3;
|
||||||
w->frame_no = view_z;
|
w->frame_no = view_z;
|
||||||
|
|
||||||
w->list_information_type = map_element->properties.fence.item[1] & 0x1F;
|
w->list_information_type = map_element->properties.fence.colour_1 & 0x1F;
|
||||||
w->var_492 =
|
w->var_492 =
|
||||||
((map_element->properties.fence.item[1] >> 5) | ((map_element->flags & 0x60) >> 2));
|
((map_element->properties.fence.colour_1 >> 5) | ((map_element->flags & 0x60) >> 2));
|
||||||
w->var_48C = map_element->properties.fence.type;
|
w->var_48C = map_element->properties.fence.type;
|
||||||
|
|
||||||
view_x += 16;
|
view_x += 16;
|
||||||
|
@ -499,7 +499,7 @@ static void window_sign_small_mouseup(rct_window *w, sint32 widgetIndex)
|
||||||
if (map_element_get_type(map_element) == MAP_ELEMENT_TYPE_FENCE) {
|
if (map_element_get_type(map_element) == MAP_ELEMENT_TYPE_FENCE) {
|
||||||
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.fence.type);
|
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.fence.type);
|
||||||
if (scenery_entry->wall.scrolling_mode != 0xFF){
|
if (scenery_entry->wall.scrolling_mode != 0xFF){
|
||||||
if (map_element->properties.fence.item[0] == w->number)
|
if (map_element->properties.fence.banner_index == w->number)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1840,7 +1840,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||||
// Banner info
|
// Banner info
|
||||||
rct_wall_scenery_entry fenceEntry = get_wall_entry(fenceType)->wall;
|
rct_wall_scenery_entry fenceEntry = get_wall_entry(fenceType)->wall;
|
||||||
if (fenceEntry.flags & WALL_SCENERY_IS_BANNER) {
|
if (fenceEntry.flags & WALL_SCENERY_IS_BANNER) {
|
||||||
gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, &gBanners[mapElement->properties.fence.item[0]].string_idx, COLOUR_DARK_GREEN, x, y + 11);
|
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);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_ENTRY_BANNER_NONE, NULL, COLOUR_DARK_GREEN, x, y + 11);
|
gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_ENTRY_BANNER_NONE, NULL, COLOUR_DARK_GREEN, x, y + 11);
|
||||||
|
|
|
@ -128,7 +128,7 @@ rct_xyz16 gCommandPosition;
|
||||||
|
|
||||||
uint8 gUnk9E2E28;
|
uint8 gUnk9E2E28;
|
||||||
|
|
||||||
static uint8 _unk141F725;
|
static bool gWallAcrossTrack;
|
||||||
|
|
||||||
static void map_update_grass_length(sint32 x, sint32 y, rct_map_element *mapElement);
|
static void map_update_grass_length(sint32 x, sint32 y, rct_map_element *mapElement);
|
||||||
static void map_set_grass_length(sint32 x, sint32 y, rct_map_element *mapElement, sint32 length);
|
static void map_set_grass_length(sint32 x, sint32 y, rct_map_element *mapElement, sint32 length);
|
||||||
|
@ -1244,15 +1244,15 @@ void game_command_set_fence_colour(sint32* eax, sint32* ebx, sint32* ecx, sint32
|
||||||
|
|
||||||
if(flags & GAME_COMMAND_FLAG_APPLY){
|
if(flags & GAME_COMMAND_FLAG_APPLY){
|
||||||
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.fence.type);
|
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.fence.type);
|
||||||
map_element->properties.fence.item[1] &= 0xE0;
|
map_element->properties.fence.colour_1 &= 0xE0;
|
||||||
map_element->properties.fence.item[1] |= colour1;
|
map_element->properties.fence.colour_1 |= colour1;
|
||||||
map_element->properties.fence.item[1] &= 0x1F;
|
map_element->properties.fence.colour_1 &= 0x1F;
|
||||||
map_element->flags &= 0x9F;
|
map_element->flags &= 0x9F;
|
||||||
map_element->properties.fence.item[1] |= (colour2 & 0x7) * 32;
|
map_element->properties.fence.colour_1 |= (colour2 & 0x7) * 32;
|
||||||
map_element->flags |= (colour2 & 0x18) * 4;
|
map_element->flags |= (colour2 & 0x18) * 4;
|
||||||
|
|
||||||
if(scenery_entry->wall.flags & WALL_SCENERY_HAS_TERNARY_COLOUR){
|
if(scenery_entry->wall.flags & WALL_SCENERY_HAS_TERNARY_COLOUR){
|
||||||
map_element->properties.fence.item[0] = colour3;
|
map_element->properties.fence.colour_3 = colour3;
|
||||||
}
|
}
|
||||||
map_invalidate_tile_zoom1(x, y, z, z + 72);
|
map_invalidate_tile_zoom1(x, y, z, z + 72);
|
||||||
}
|
}
|
||||||
|
@ -3329,7 +3329,7 @@ static bool map_place_fence_check_obstruction_with_track(rct_scenery_entry *wall
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_unk141F725 |= 1;
|
gWallAcrossTrack = true;
|
||||||
if (z0 & 1) {
|
if (z0 & 1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -3393,7 +3393,7 @@ static bool map_place_fence_check_obstruction(rct_scenery_entry *wall, sint32 x,
|
||||||
rct_scenery_entry *entry;
|
rct_scenery_entry *entry;
|
||||||
rct_large_scenery_tile *tile;
|
rct_large_scenery_tile *tile;
|
||||||
|
|
||||||
_unk141F725 = 0;
|
gWallAcrossTrack = false;
|
||||||
gMapGroundFlags = ELEMENT_IS_ABOVE_GROUND;
|
gMapGroundFlags = ELEMENT_IS_ABOVE_GROUND;
|
||||||
if (map_is_location_at_edge(x, y)) {
|
if (map_is_location_at_edge(x, y)) {
|
||||||
gGameCommandErrorText = STR_OFF_EDGE_OF_MAP;
|
gGameCommandErrorText = STR_OFF_EDGE_OF_MAP;
|
||||||
|
@ -3717,21 +3717,21 @@ void game_command_place_fence(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx
|
||||||
|
|
||||||
map_element->type = bp | edge | MAP_ELEMENT_TYPE_FENCE;
|
map_element->type = bp | edge | MAP_ELEMENT_TYPE_FENCE;
|
||||||
|
|
||||||
map_element->properties.fence.item[1] = primary_colour;
|
map_element->properties.fence.colour_1 = primary_colour;
|
||||||
map_element->properties.fence.item[1] |= (secondary_colour & 7) << 5;
|
map_element->properties.fence.colour_1 |= (secondary_colour & 7) << 5;
|
||||||
map_element->flags |= (secondary_colour & 0x18) << 2;
|
map_element->flags |= (secondary_colour & 0x18) << 2;
|
||||||
|
|
||||||
if (_unk141F725 & 1) {
|
if (gWallAcrossTrack) {
|
||||||
map_element->properties.fence.item[2] |= (1 << 2);
|
map_element->properties.fence.animation |= (1 << 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
map_element->properties.fence.type = fence_type;
|
map_element->properties.fence.type = fence_type;
|
||||||
if (banner_index != 0xFF){
|
if (banner_index != 0xFF){
|
||||||
map_element->properties.fence.item[0] = banner_index;
|
map_element->properties.fence.banner_index = banner_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fence->wall.flags & WALL_SCENERY_HAS_TERNARY_COLOUR){
|
if (fence->wall.flags & WALL_SCENERY_HAS_TERNARY_COLOUR){
|
||||||
map_element->properties.fence.item[0] = tertiary_colour;
|
map_element->properties.fence.colour_3 = tertiary_colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & (1 << 6)){
|
if (flags & (1 << 6)){
|
||||||
|
@ -4637,7 +4637,7 @@ sint32 map_element_get_banner_index(rct_map_element *mapElement)
|
||||||
if (sceneryEntry->wall.scrolling_mode == 0xFF)
|
if (sceneryEntry->wall.scrolling_mode == 0xFF)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return mapElement->properties.fence.item[0];
|
return mapElement->properties.fence.banner_index;
|
||||||
case MAP_ELEMENT_TYPE_BANNER:
|
case MAP_ELEMENT_TYPE_BANNER:
|
||||||
return mapElement->properties.banner.index;
|
return mapElement->properties.banner.index;
|
||||||
default:
|
default:
|
||||||
|
@ -5594,7 +5594,7 @@ void game_command_set_sign_style(sint32* eax, sint32* ebx, sint32* ecx, sint32*
|
||||||
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.fence.type);
|
rct_scenery_entry* scenery_entry = get_wall_entry(map_element->properties.fence.type);
|
||||||
if (scenery_entry->wall.scrolling_mode == 0xFF)
|
if (scenery_entry->wall.scrolling_mode == 0xFF)
|
||||||
continue;
|
continue;
|
||||||
if (map_element->properties.fence.item[0] != bannerId)
|
if (map_element->properties.fence.banner_index != bannerId)
|
||||||
continue;
|
continue;
|
||||||
fence_found = true;
|
fence_found = true;
|
||||||
break;
|
break;
|
||||||
|
@ -5611,7 +5611,7 @@ void game_command_set_sign_style(sint32* eax, sint32* ebx, sint32* ecx, sint32*
|
||||||
}
|
}
|
||||||
|
|
||||||
map_element->flags &= 0x9F;
|
map_element->flags &= 0x9F;
|
||||||
map_element->properties.fence.item[1] =
|
map_element->properties.fence.colour_1 =
|
||||||
mainColour |
|
mainColour |
|
||||||
((textColour & 0x7) << 5);
|
((textColour & 0x7) << 5);
|
||||||
map_element->flags |= ((textColour & 0x18) << 2);
|
map_element->flags |= ((textColour & 0x18) << 2);
|
||||||
|
|
|
@ -70,7 +70,12 @@ assert_struct_size(rct_map_element_entrance_properties, 4);
|
||||||
|
|
||||||
typedef struct rct_map_element_fence_properties {
|
typedef struct rct_map_element_fence_properties {
|
||||||
uint8 type; //4
|
uint8 type; //4
|
||||||
uint8 item[3]; //5
|
union {
|
||||||
|
uint8 colour_3; //5
|
||||||
|
uint8 banner_index; //5
|
||||||
|
};
|
||||||
|
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;
|
} rct_map_element_fence_properties;
|
||||||
assert_struct_size(rct_map_element_fence_properties, 4);
|
assert_struct_size(rct_map_element_fence_properties, 4);
|
||||||
|
|
||||||
|
|
|
@ -473,7 +473,7 @@ static bool map_animation_invalidate_wall_door(sint32 x, sint32 y, sint32 baseZ)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool invalidate = false;
|
bool invalidate = false;
|
||||||
uint8 bl = mapElement->properties.fence.item[2] & 0x87;
|
uint8 bl = mapElement->properties.fence.animation & 0x87;
|
||||||
uint8 currentFrame = fence_get_animation_frame(mapElement);
|
uint8 currentFrame = fence_get_animation_frame(mapElement);
|
||||||
if (currentFrame != 0) {
|
if (currentFrame != 0) {
|
||||||
if (currentFrame == 15) {
|
if (currentFrame == 15) {
|
||||||
|
@ -491,7 +491,7 @@ static bool map_animation_invalidate_wall_door(sint32 x, sint32 y, sint32 baseZ)
|
||||||
}
|
}
|
||||||
bl |= currentFrame << 3;
|
bl |= currentFrame << 3;
|
||||||
|
|
||||||
mapElement->properties.fence.item[2] = bl;
|
mapElement->properties.fence.animation = bl;
|
||||||
if (invalidate) {
|
if (invalidate) {
|
||||||
sint32 z = mapElement->base_height * 8;
|
sint32 z = mapElement->base_height * 8;
|
||||||
map_invalidate_tile_zoom1(x, y, z, z + 32);
|
map_invalidate_tile_zoom1(x, y, z, z + 32);
|
||||||
|
|
Loading…
Reference in New Issue