Skip to content

Commit

Permalink
Close #14804: Rename isBanner to isDoubleSided
Browse files Browse the repository at this point in the history
  • Loading branch information
KirilAngelov committed Jun 3, 2021
1 parent 0337878 commit 97002ca
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
1 change: 1 addition & 0 deletions contributors.md
Expand Up @@ -95,6 +95,7 @@ The following people are not part of the development team, but have been contrib
* Adrian Zdanowicz (CookiePLMonster) - Misc.

## Bug fixes
* (KirilAngelov)
* (halfbro)
* (Myrtle)
* (nean)
Expand Down
19 changes: 7 additions & 12 deletions src/openrct2-ui/windows/TileInspector.cpp
Expand Up @@ -2094,19 +2094,14 @@ static void window_tile_inspector_paint(rct_window* w, rct_drawpixelinfo* dpi)
int16_t wallType = tileElement->AsWall()->GetEntryIndex();
DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_WALL_TYPE, &wallType, { COLOUR_WHITE });

// Banner info
const auto wallEntry = tileElement->AsWall()->GetEntry();
if (wallEntry != nullptr && wallEntry->wall.flags & WALL_SCENERY_IS_BANNER)
auto banner = tileElement->AsWall()->GetBanner();
if (banner != nullptr && !banner->IsNull())
{
auto banner = tileElement->AsWall()->GetBanner();
if (banner != nullptr && !banner->IsNull())
{
Formatter ft;
banner->FormatTextTo(ft);
DrawTextBasic(
dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, ft,
{ COLOUR_WHITE });
}
Formatter ft;
banner->FormatTextTo(ft);
DrawTextBasic(
dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, ft,
{ COLOUR_WHITE });
}
else
{
Expand Down
3 changes: 2 additions & 1 deletion src/openrct2/object/WallObject.cpp
Expand Up @@ -119,7 +119,8 @@ void WallObject::ReadJson(IReadObjectContext* context, json_t& root)
{ "hasSecondaryColour", WALL_SCENERY_HAS_SECONDARY_COLOUR, Json::FlagType::Normal },
{ "hasTernaryColour", WALL_SCENERY_HAS_TERNARY_COLOUR, Json::FlagType::Normal },
{ "hasGlass", WALL_SCENERY_HAS_GLASS, Json::FlagType::Normal },
{ "isBanner", WALL_SCENERY_IS_BANNER, Json::FlagType::Normal },
{ "isBanner", WALL_SCENERY_IS_DOUBLE_SIDED, Json::FlagType::Normal },
{ "isDoubleSided", WALL_SCENERY_IS_DOUBLE_SIDED, Json::FlagType::Normal },
{ "isDoor", WALL_SCENERY_IS_DOOR, Json::FlagType::Normal },
{ "isLongDoorAnimation", WALL_SCENERY_LONG_DOOR_ANIMATION, Json::FlagType::Normal },
});
Expand Down
8 changes: 4 additions & 4 deletions src/openrct2/paint/tile_element/Paint.Wall.cpp
Expand Up @@ -54,7 +54,7 @@ static void fence_paint_door(
imageId = (imageId & 0x7FFFF) | dword_141F710;
}

if (sceneryEntry->wall.flags & WALL_SCENERY_IS_BANNER)
if (sceneryEntry->wall.flags & WALL_SCENERY_IS_DOUBLE_SIDED)
{
paint_struct* ps;

Expand Down Expand Up @@ -335,14 +335,14 @@ void fence_paint(paint_session* session, uint8_t direction, int32_t height, cons

if (sceneryEntry->wall.flags & WALL_SCENERY_HAS_GLASS)
{
if (sceneryEntry->wall.flags & WALL_SCENERY_IS_BANNER)
if (sceneryEntry->wall.flags & WALL_SCENERY_IS_DOUBLE_SIDED)
{
imageOffset += 12;
}
}
else
{
if (sceneryEntry->wall.flags & WALL_SCENERY_IS_BANNER)
if (sceneryEntry->wall.flags & WALL_SCENERY_IS_DOUBLE_SIDED)
{
imageOffset += 6;
}
Expand All @@ -367,7 +367,7 @@ void fence_paint(paint_session* session, uint8_t direction, int32_t height, cons
imageOffset = 1;
}

if (sceneryEntry->wall.flags & WALL_SCENERY_IS_BANNER)
if (sceneryEntry->wall.flags & WALL_SCENERY_IS_DOUBLE_SIDED)
{
imageOffset += 6;
}
Expand Down
2 changes: 1 addition & 1 deletion src/openrct2/world/Scenery.h
Expand Up @@ -116,7 +116,7 @@ enum WALL_SCENERY_FLAGS
WALL_SCENERY_HAS_PRIMARY_COLOUR = (1 << 0), // 0x1
WALL_SCENERY_HAS_GLASS = (1 << 1), // 0x2
WALL_SCENERY_CANT_BUILD_ON_SLOPE = (1 << 2), // 0x4
WALL_SCENERY_IS_BANNER = (1 << 3), // 0x8 // Probably indicates translucency
WALL_SCENERY_IS_DOUBLE_SIDED = (1 << 3), // 0x8
WALL_SCENERY_IS_DOOR = (1 << 4), // 0x10
WALL_SCENERY_LONG_DOOR_ANIMATION = (1 << 5), // 0x20
WALL_SCENERY_HAS_SECONDARY_COLOUR = (1 << 6), // 0x40
Expand Down

0 comments on commit 97002ca

Please sign in to comment.