MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / importStation

Function importStation

src/OpenLoco/src/S5/S5Station.cpp:67–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 }
66
67 OpenLoco::Station importStation(const S5::Station& src)
68 {
69 OpenLoco::Station dst{};
70 dst.name = src.name;
71 dst.x = src.x;
72 dst.y = src.y;
73 dst.z = src.z;
74 dst.labelFrame = importLabelFrame(src.labelFrame);
75 dst.owner = static_cast<CompanyId>(src.owner);
76 dst.noTilesTimeout = src.noTilesTimeout;
77 dst.flags = static_cast<StationFlags>(src.flags);
78 dst.town = static_cast<TownId>(src.town);
79 for (size_t i = 0; i < std::size(dst.cargoStats); ++i)
80 {
81 dst.cargoStats[i] = importCargoStats(src.cargoStats[i]);
82 }
83 dst.stationTileSize = src.stationTileSize;
84 std::ranges::copy(src.stationTiles, dst.stationTiles);
85 dst.var_3B0 = src.var_3B0;
86 dst.var_3B1 = src.var_3B1;
87 dst.var_3B2 = src.var_3B2;
88 dst.airportRotation = src.airportRotation;
89 dst.airportStartPos = src.airportStartPos;
90 dst.airportMovementOccupiedEdges = src.airportMovementOccupiedEdges;
91 return dst;
92 }
93}

Callers 1

importGameStateFunction · 0.85

Calls 2

importLabelFrameFunction · 0.85
importCargoStatsFunction · 0.85

Tested by

no test coverage detected