Rename _tileElement to _bannerElement

This commit is contained in:
Gymnasiast 2021-04-03 22:43:57 +02:00
parent f5ec127eaf
commit 79302e88a5
No known key found for this signature in database
GPG Key ID: DBFFF47AB2CA3EDD
1 changed files with 7 additions and 7 deletions

View File

@ -76,7 +76,7 @@ class BannerWindow final : public Window
private:
Banner* _banner;
CoordsXYZ _bannerViewPos;
BannerElement* _tileElement = nullptr;
BannerElement* _bannerElement = nullptr;
void CreateViewport()
{
@ -99,7 +99,7 @@ private:
{
if ((tileElement->GetType() == TILE_ELEMENT_TYPE_BANNER) && (tileElement->AsBanner()->GetIndex() == number))
{
_tileElement = tileElement->AsBanner();
_bannerElement = tileElement->AsBanner();
return;
}
if (tileElement->IsLastForTile())
@ -107,7 +107,7 @@ private:
tileElement++;
}
}
_tileElement = nullptr;
_bannerElement = nullptr;
}
public:
@ -126,10 +126,10 @@ public:
_banner = GetBanner(number);
InitTileElement();
if (_tileElement == nullptr)
if (_bannerElement == nullptr)
return;
frame_no = _tileElement->GetBaseZ();
frame_no = _bannerElement->GetBaseZ();
_bannerViewPos = CoordsXYZ{ _banner->position.ToCoordsXY().ToTileCentre(), frame_no };
CreateViewport();
}
@ -172,11 +172,11 @@ public:
break;
case WIDX_BANNER_DEMOLISH:
{
if (_banner == nullptr || _tileElement == nullptr)
if (_banner == nullptr || _bannerElement == nullptr)
break;
auto bannerRemoveAction = BannerRemoveAction(
{ _banner->position.ToCoordsXY(), _tileElement->GetBaseZ(), _tileElement->GetPosition() });
{ _banner->position.ToCoordsXY(), _bannerElement->GetBaseZ(), _bannerElement->GetPosition() });
GameActions::Execute(&bannerRemoveAction);
break;
}