Add support for road stop animation, availability callback
Add animation, callback mask, general flags properties Add animation frame variables
This commit is contained in:
@@ -185,26 +185,26 @@ void BaseStation::PostDestructor(size_t index)
|
||||
InvalidateWindowData(WC_SELECT_STATION, 0, 0);
|
||||
}
|
||||
|
||||
void BaseStation::SetRoadStopRandomBits(TileIndex tile, byte random_bits)
|
||||
void BaseStation::SetRoadStopTileData(TileIndex tile, byte data, byte offset)
|
||||
{
|
||||
for (size_t i = 0; i < this->custom_road_stop_tiles.size(); i++) {
|
||||
if (this->custom_road_stop_tiles[i] == tile) {
|
||||
this->custom_road_stop_random_bits[i] = random_bits;
|
||||
SB(this->custom_road_stop_data[i], offset, 8, data);
|
||||
return;
|
||||
}
|
||||
}
|
||||
this->custom_road_stop_tiles.push_back(tile);
|
||||
this->custom_road_stop_random_bits.push_back(random_bits);
|
||||
this->custom_road_stop_data.push_back(((uint)data) << offset);
|
||||
}
|
||||
|
||||
void BaseStation::RemoveRoadStopRandomBits(TileIndex tile)
|
||||
void BaseStation::RemoveRoadStopTileData(TileIndex tile)
|
||||
{
|
||||
for (size_t i = 0; i < this->custom_road_stop_tiles.size(); i++) {
|
||||
if (this->custom_road_stop_tiles[i] == tile) {
|
||||
this->custom_road_stop_tiles[i] = this->custom_road_stop_tiles.back();
|
||||
this->custom_road_stop_random_bits[i] = this->custom_road_stop_random_bits.back();
|
||||
this->custom_road_stop_data[i] = this->custom_road_stop_data.back();
|
||||
this->custom_road_stop_tiles.pop_back();
|
||||
this->custom_road_stop_random_bits.pop_back();
|
||||
this->custom_road_stop_data.pop_back();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user