1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Prepare transport enum

This commit is contained in:
nordsoft
2023-04-18 13:04:49 +04:00
parent 2babb5add5
commit ed798b06da
27 changed files with 78 additions and 63 deletions

View File

@@ -1079,7 +1079,7 @@ void CExchangeWindow::updateWidgets()
}
}
CShipyardWindow::CShipyardWindow(const TResources & cost, int state, int boatType, const std::function<void()> & onBuy)
CShipyardWindow::CShipyardWindow(const TResources & cost, int state, TransportId boatType, const std::function<void()> & onBuy)
: CStatusbarWindow(PLAYER_COLORED, "TPSHIP")
{
OBJECT_CONSTRUCTION_CAPTURING(255-DISPOSE);
@@ -1089,7 +1089,7 @@ CShipyardWindow::CShipyardWindow(const TResources & cost, int state, int boatTyp
std::string boatFilenames[3] = {"AB01_", "AB02_", "AB03_"};
Point waterCenter = Point(bgWater->pos.x+bgWater->pos.w/2, bgWater->pos.y+bgWater->pos.h/2);
bgShip = std::make_shared<CAnimImage>(boatFilenames[boatType], 0, 7, 120, 96, 0);
bgShip = std::make_shared<CAnimImage>(boatFilenames[boatType.getNum()], 0, 7, 120, 96, 0);
bgShip->center(waterCenter);
// Create resource icons and costs.