Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: Road waypoints #12572

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 19 additions & 2 deletions docs/landscape.html
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,22 @@ <h3><a name="Landscape">Landscape</a></h3>
<li>m2: index into the array of stations</li>
<li>m3 bits 7..4: persistent random data for railway stations/waypoints and airports)</li>
<li>m3 bits 7..4: <a href="#OwnershipInfo">owner</a> of tram tracks (road stop)</li>
<li>m3 bits 3..2: ground type (road waypoints)
<table>
<tr>
<td><tt>0</tt>&nbsp; </td>
<td>on bare land</td>
</tr>
<tr>
<td><tt>1</tt>&nbsp; </td>
<td>on grass</td>
</tr>
<tr>
<td><tt>2</tt>&nbsp; </td>
<td>paved</td>
</tr>
</table>
</li>
<li>m4: custom station id; 0 means standard graphics</li>
<li>m4: <a href="#RoadType">Roadtype</a> for road stops</li>
<li>m5: graphics index (range from 0..255 for each station type):
Expand Down Expand Up @@ -990,13 +1006,14 @@ <h3><a name="Landscape">Landscape</a></h3>
</table>
</li>
<li>m6 bit 7: rail station / waypoint may have catenary pylons</li>
<li>m6 bit 6: rail station / waypoint may have catenary wires</li>
<li>m6 bits 5..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy, waypoint)</li>
<li>m6 bits 6..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy, waypoint, road waypoint)</li>
<li>m6 bit 2: pbs reservation state for railway stations/waypoints</li>
<li>m6 bit 1: rail station / waypoint may have catenary wires</li>
<li>m6 bit 0: rail station / waypoint is blocked</li>

<li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road (road stops)</li>
<li>m7: animation frame (railway stations/waypoints, airports)</li>
<li>m8 bit 15: Snow or desert present (road waypoints)</li>
<li>m8 bits 11..6: <a href="#TramType">Tramtype</a></li>
<li>m8 bits 5..0: <a href="#TrackType">track type</a> for railway stations/waypoints</li>
<li>m8 bits 5..0: custom road stop id; 0 means standard graphics</li>
Expand Down
21 changes: 13 additions & 8 deletions docs/landscape_grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ <h3 style="font-weight: bold;">Landscape</h3>
<td class="bits"><span class="free">OOOO OOOO OOOO OOOO</span></td>
</tr>
<tr>
<td rowspan=7>5</td>
<td rowspan=8>5</td>
<td class="caption">rail station</td>
<td class="bits" rowspan=7><span class="free">O</span><span class="used" title="Water class">XX</span> <span class="used" title="Owner">XXXXX</span></td>
<td class="bits" rowspan=7><span class="pool" title="Station index on pool">XXXX XXXX XXXX XXXX</span></td>
<td class="bits" rowspan=8><span class="free">O</span><span class="used" title="Water class">XX</span> <span class="used" title="Owner">XXXXX</span></td>
<td class="bits" rowspan=8><span class="pool" title="Station index on pool">XXXX XXXX XXXX XXXX</span></td>
<td class="bits" rowspan=2><span class="used" title="Random bits">XXXX</span> <span class="free">OOOO</span></td>
<td class="bits" rowspan=2><span class="used" title="Custom station specifications ID">XXXX XXXX</span></td>
<td class="bits"><span class="used" title="Graphics index">XXXX XXXX</span></td>
<td class="bits" rowspan=2><span class="used" title="May have pylons">X</span><span class="used" title="May have wires">X</span><span class="used" title="Station type">XXX</span> <span class="used" title="Reserved track">X</span><span class="free">O</span><span class="used" title="Tile is blocked">X</span></td>
<td class="bits" rowspan=2><span class="used" title="May have pylons">X</span><span class="used" title="Station type">XXXX</span> <span class="used" title="Reserved track">X</span><span class="used" title="May have wires">X</span><span class="used" title="Tile is blocked">X</span></td>
<td class="bits" rowspan=2><span class="used" title="Animation frame">XXXX XXXX</span></td>
<td class="bits" rowspan=2><span class="free">OOOO OOOO OO</span><span class="used" title="Railway type">XX XXXX</span></td>
</tr>
Expand All @@ -199,12 +199,17 @@ <h3 style="font-weight: bold;">Landscape</h3>
<tr>
<td class="caption">road stop</td>
<td class="bits"><span class="used" title="Owner of tram">XXXX</span> <span class="free">OOOO</span></td>
<td class="bits"><span class="free">OO</span><span class="used" title="Roadtype for road stop">XX XXXX</span></td>
<td class="bits"><span class="usable" title="Graphics index">OOOO O</span><span class="used" title="Graphics index: 00 (exit towards NE), 01 (exit towards SE), 02 (exit towards SW), 03 (exit towards NW), 04 (drive through X), 05 (drive through Y)">XXX</span></td>
<td class="bits" rowspan=5><span class="free">OO</span><span class="used" title="Station type">XX X</span><span class="free">OOO</span></td>
<td class="bits"><span class="free">OOO</span><span class="used" title="Owner of road">X XXXX</span></td>
<td class="bits" rowspan=2><span class="free">OO</span><span class="used" title="Roadtype for road stop">XX XXXX</span></td>
<td class="bits" rowspan=2><span class="usable" title="Graphics index">OOOO O</span><span class="used" title="Graphics index: 00 (exit towards NE), 01 (exit towards SE), 02 (exit towards SW), 03 (exit towards NW), 04 (drive through X), 05 (drive through Y)">XXX</span></td>
<td class="bits" rowspan=6><span class="free">O</span><span class="used" title="Station type">XXX X</span><span class="free">OOO</span></td>
<td class="bits" rowspan=2><span class="free">OOO</span><span class="used" title="Owner of road">X XXXX</span></td>
<td class="bits"><span class="free">OOOO</span> <span class="used" title="Tram type">XXXX XX</span> <span class="used" title="Custom road stops specifications ID">XXXXXX</span></td>
</tr>
<tr>
<td class="caption">road waypoint</td>
<td class="bits"><span class="used" title="Owner of tram">XXXX</span> <span class="used" title="Pavement type">XX</span><span class="free">OO</span></td>
<td class="bits"><span class="used" title="Snow/desert present">X</span><span class="free">OOO</span> <span class="used" title="Tram type">XXXX XX<span class="free">OO OOOO</span></td>
</tr>
<tr>
<td class="caption">airport</td>
<td class="bits"><span class="used" title="Random bits">XXXX</span> <span class="free">OOOO</span></td>
Expand Down
Binary file modified media/baseset/openttd.grf
Binary file not shown.
2 changes: 1 addition & 1 deletion media/baseset/openttd.grf.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4f03553f614a06d86dc06376db3353c7
8bc3926cb50e19747de498357417d973
2 changes: 2 additions & 0 deletions media/baseset/openttd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if(GRFCODEC_FOUND)
${CMAKE_CURRENT_SOURCE_DIR}/openttdgui.nfo
${CMAKE_CURRENT_SOURCE_DIR}/palette.nfo
${CMAKE_CURRENT_SOURCE_DIR}/roadstops.nfo
${CMAKE_CURRENT_SOURCE_DIR}/road_waypoints.nfo
${CMAKE_CURRENT_SOURCE_DIR}/signals.nfo
${CMAKE_CURRENT_SOURCE_DIR}/sloped_tracks.nfo
${CMAKE_CURRENT_SOURCE_DIR}/tramtracks.nfo
Expand All @@ -42,6 +43,7 @@ if(GRFCODEC_FOUND)
${CMAKE_CURRENT_SOURCE_DIR}/openttdgui_convert_tram.png
${CMAKE_CURRENT_SOURCE_DIR}/openttdgui_group_livery.png
${CMAKE_CURRENT_SOURCE_DIR}/roadstops.png
${CMAKE_CURRENT_SOURCE_DIR}/road_waypoints.png
${CMAKE_CURRENT_SOURCE_DIR}/signals.png
${CMAKE_CURRENT_SOURCE_DIR}/sloped_tracks.png
${CMAKE_CURRENT_SOURCE_DIR}/tramtracks.png
Expand Down
1 change: 1 addition & 0 deletions media/baseset/openttd/openttd.nfo
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,4 @@
#include "mono.nfo"
#include "tunnel_portals.nfo"
#include "palette.nfo"
#include "road_waypoints.nfo"
14 changes: 14 additions & 0 deletions media/baseset/openttd/road_waypoints.nfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//

-1 * 0 0C "Road waypoints"
//@@LINT OFF
-1 * 3 05 19 04
//@@LINT ON
-1 sprites/road_waypoints.png 8bpp 10 10 64 40 -5 -22 normal
-1 sprites/road_waypoints.png 8bpp 90 10 64 40 -31 -9 normal
-1 sprites/road_waypoints.png 8bpp 170 10 64 35 -31 -4 normal
-1 sprites/road_waypoints.png 8bpp 240 10 64 35 -57 -17 normal
Binary file added media/baseset/openttd/road_waypoints.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/command_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ enum Commands : uint16_t {
CMD_RENAME_WAYPOINT, ///< rename a waypoint
CMD_REMOVE_FROM_RAIL_WAYPOINT, ///< remove a (rectangle of) tiles from a rail waypoint

CMD_BUILD_ROAD_WAYPOINT, ///< build a road waypoint
CMD_REMOVE_FROM_ROAD_WAYPOINT, ///< remove a (rectangle of) tiles from a road waypoint

CMD_BUILD_ROAD_STOP, ///< build a road stop
CMD_REMOVE_ROAD_STOP, ///< remove a road stop
CMD_BUILD_LONG_ROAD, ///< build a complete road (not a "half" one)
Expand Down
6 changes: 6 additions & 0 deletions src/lang/english.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2876,6 +2876,8 @@ STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Build ro
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Build tramway section using the Autotram mode. Ctrl+Click to remove tramway section. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Build road vehicle depot (for buying and servicing vehicles). Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Build tram vehicle depot (for buying and servicing vehicles). Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD_TO_WAYPOINT :{BLACK}Build waypoint on road. Ctrl+Click to select another waypoint to join. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM_TO_WAYPOINT :{BLACK}Build waypoint on tramway. Ctrl+Click to select another waypoint to join. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Build bus station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Build passenger tram station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Build lorry station. Ctrl+Click to select another station to join. Also press Shift to show cost estimate only
Expand Down Expand Up @@ -5083,11 +5085,14 @@ STR_ERROR_WAYPOINT_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Adjoins
STR_ERROR_TOO_CLOSE_TO_ANOTHER_WAYPOINT :{WHITE}Too close to another waypoint

STR_ERROR_CAN_T_BUILD_TRAIN_WAYPOINT :{WHITE}Can't build train waypoint here...
STR_ERROR_CAN_T_BUILD_ROAD_WAYPOINT :{WHITE}Can't build road waypoint here...
STR_ERROR_CAN_T_POSITION_BUOY_HERE :{WHITE}Can't place buoy here...
STR_ERROR_CAN_T_CHANGE_WAYPOINT_NAME :{WHITE}Can't change waypoint name...

STR_ERROR_CAN_T_REMOVE_TRAIN_WAYPOINT :{WHITE}Can't remove train waypoint here...
STR_ERROR_CAN_T_REMOVE_ROAD_WAYPOINT :{WHITE}Can't remove road waypoint here...
STR_ERROR_MUST_REMOVE_RAILWAYPOINT_FIRST :{WHITE}Must remove rail waypoint first
STR_ERROR_MUST_REMOVE_ROADWAYPOINT_FIRST :{WHITE}Must remove road waypoint first
STR_ERROR_BUOY_IN_THE_WAY :{WHITE}... buoy in the way
STR_ERROR_BUOY_IS_IN_USE :{WHITE}... buoy is in use by another company!

Expand Down Expand Up @@ -5335,6 +5340,7 @@ STR_ERROR_NO_STOP_ARTICULATED_VEHICLE :{WHITE}There ar
STR_ERROR_AIRPORT_NO_PLANES :{WHITE}This plane cannot land at this heliport
STR_ERROR_AIRPORT_NO_HELICOPTERS :{WHITE}This helicopter cannot land at this airport
STR_ERROR_NO_RAIL_WAYPOINT :{WHITE}There is no railway waypoint
STR_ERROR_NO_ROAD_WAYPOINT :{WHITE}There is no road waypoint
STR_ERROR_NO_BUOY :{WHITE}There is no buoy

# Timetable related errors
Expand Down
3 changes: 2 additions & 1 deletion src/newgrf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4832,7 +4832,7 @@ static ChangeInfoResult RoadStopChangeInfo(uint id, int numinfo, int prop, ByteR
break;

case 0x12: // General flags
rs->flags = (uint8_t)buf->ReadDWord(); // Future-proofing, size this as 4 bytes, but we only need one byte's worth of flags at present
rs->flags = (uint16_t)buf->ReadDWord(); // Future-proofing, size this as 4 bytes, but we only need two byte's worth of flags at present
break;

case 0x15: // Cost multipliers
Expand Down Expand Up @@ -6365,6 +6365,7 @@ static constexpr auto _action5_types = std::to_array<Action5Type>({
/* 0x16 */ { A5BLOCK_ALLOW_OFFSET, SPR_AIRPORT_PREVIEW_BASE, 1, SPR_AIRPORT_PREVIEW_COUNT, "Airport preview graphics" },
/* 0x17 */ { A5BLOCK_ALLOW_OFFSET, SPR_RAILTYPE_TUNNEL_BASE, 1, RAILTYPE_TUNNEL_BASE_COUNT, "Railtype tunnel base" },
/* 0x18 */ { A5BLOCK_ALLOW_OFFSET, SPR_PALETTE_BASE, 1, PALETTE_SPRITE_COUNT, "Palette" },
/* 0x19 */ { A5BLOCK_ALLOW_OFFSET, SPR_ROAD_WAYPOINTS_BASE, 1, ROAD_WAYPOINTS_SPRITE_COUNT, "Road waypoints" },
});

/**
Expand Down
3 changes: 3 additions & 0 deletions src/newgrf_commons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,9 @@ uint32_t GetNearbyTileInformation(TileIndex tile, bool grf_version8)
/* Fake tile type for trees on shore */
if (IsTileType(tile, MP_TREES) && GetTreeGround(tile) == TREE_GROUND_SHORE) tile_type = MP_WATER;

/* Fake tile type for road waypoints */
if (IsRoadWaypointTile(tile)) tile_type = MP_ROAD;

auto [tileh, z] = GetTilePixelSlope(tile);
/* Return 0 if the tile is a land tile */
uint8_t terrain_type = (HasTileWaterClass(tile) ? (GetWaterClass(tile) + 1) & 3 : 0) << 5 | GetTerrainType(tile) << 2 | (tile_type == MP_WATER ? 1 : 0) << 1;
Expand Down
36 changes: 29 additions & 7 deletions src/newgrf_roadstop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ uint32_t RoadStopScopeResolver::GetVariable(uint8_t variable, [[maybe_unused]] u
/* Animation frame */
case 0x49: return this->tile == INVALID_TILE ? 0 : this->st->GetRoadStopAnimationFrame(this->tile);

/* Misc info */
case 0x50: {
uint32_t result = 0;
if (this->tile == INVALID_TILE) {
SetBit(result, 4);
}
return result;
}

/* Variables which use the parameter */
/* Variables 0x60 to 0x65 and 0x69 are handled separately below */

Expand All @@ -127,7 +136,7 @@ uint32_t RoadStopScopeResolver::GetVariable(uint8_t variable, [[maybe_unused]] u
if (this->tile == INVALID_TILE) return UINT_MAX;
TileIndex tile = this->tile;
if (parameter != 0) tile = GetNearbyTile(parameter, tile);
return (IsRoadStopTile(tile) && GetStationIndex(tile) == this->st->index) ? this->st->GetRoadStopAnimationFrame(tile) : UINT_MAX;
return (IsAnyRoadStopTile(tile) && GetStationIndex(tile) == this->st->index) ? this->st->GetRoadStopAnimationFrame(tile) : UINT_MAX;
}

/* Land info of nearby tile */
Expand All @@ -143,14 +152,15 @@ uint32_t RoadStopScopeResolver::GetVariable(uint8_t variable, [[maybe_unused]] u
if (this->tile == INVALID_TILE) return 0xFFFFFFFF;
TileIndex nearby_tile = GetNearbyTile(parameter, this->tile);

if (!IsRoadStopTile(nearby_tile)) return 0xFFFFFFFF;
if (!IsAnyRoadStopTile(nearby_tile)) return 0xFFFFFFFF;

uint32_t grfid = this->st->roadstop_speclist[GetCustomRoadStopSpecIndex(this->tile)].grfid;
bool same_orientation = GetStationGfx(this->tile) == GetStationGfx(nearby_tile);
bool same_station = GetStationIndex(nearby_tile) == this->st->index;
uint32_t res = GetStationGfx(nearby_tile) << 12 | !same_orientation << 11 | !!same_station << 10;
StationType type = GetStationType(nearby_tile);
if (type == STATION_TRUCK) res |= (1 << 16);
if (type == STATION_ROADWAYPOINT) res |= (2 << 16);
if (type == this->type) SetBit(res, 20);

if (IsCustomRoadStopSpecIndex(nearby_tile)) {
Expand All @@ -165,7 +175,7 @@ uint32_t RoadStopScopeResolver::GetVariable(uint8_t variable, [[maybe_unused]] u
if (this->tile == INVALID_TILE) return 0xFFFFFFFF;
TileIndex nearby_tile = GetNearbyTile(parameter, this->tile);

if (!IsRoadStopTile(nearby_tile)) return 0xFFFFFFFF;
if (!IsAnyRoadStopTile(nearby_tile)) return 0xFFFFFFFF;
if (!IsCustomRoadStopSpecIndex(nearby_tile)) return 0;

const auto &sm = BaseStation::GetByTile(nearby_tile)->roadstop_speclist[GetCustomRoadStopSpecIndex(nearby_tile)];
Expand All @@ -176,7 +186,7 @@ uint32_t RoadStopScopeResolver::GetVariable(uint8_t variable, [[maybe_unused]] u
case 0x6B: {
TileIndex nearby_tile = GetNearbyTile(parameter, this->tile);

if (!IsRoadStopTile(nearby_tile)) return 0xFFFFFFFF;
if (!IsAnyRoadStopTile(nearby_tile)) return 0xFFFFFFFF;
if (!IsCustomRoadStopSpecIndex(nearby_tile)) return 0xFFFE;

uint32_t grfid = this->st->roadstop_speclist[GetCustomRoadStopSpecIndex(this->tile)].grfid;
Expand Down Expand Up @@ -283,7 +293,19 @@ void DrawRoadStopTile(int x, int y, RoadType roadtype, const RoadStopSpec *spec,
SpriteID image = dts->ground.sprite;
PaletteID pal = dts->ground.pal;

if (GB(image, 0, SPRITE_WIDTH) != 0) {
RoadStopDrawMode draw_mode;
if (HasBit(spec->flags, RSF_DRAW_MODE_REGISTER)) {
draw_mode = (RoadStopDrawMode)GetRegister(0x100);
} else {
draw_mode = spec->draw_mode;
}

if (type == STATION_ROADWAYPOINT) {
DrawSprite(SPR_ROAD_PAVED_STRAIGHT_X, PAL_NONE, x, y);
if ((draw_mode & ROADSTOP_DRAW_MODE_WAYP_GROUND) && GB(image, 0, SPRITE_WIDTH) != 0) {
DrawSprite(image, GroundSpritePaletteTransform(image, pal, palette), x, y);
}
} else if (GB(image, 0, SPRITE_WIDTH) != 0) {
DrawSprite(image, GroundSpritePaletteTransform(image, pal, palette), x, y);
}

Expand All @@ -292,7 +314,7 @@ void DrawRoadStopTile(int x, int y, RoadType roadtype, const RoadStopSpec *spec,
uint sprite_offset = 5 - view;

/* Road underlay takes precedence over tram */
if (spec->draw_mode & ROADSTOP_DRAW_MODE_OVERLAY) {
if (type == STATION_ROADWAYPOINT || draw_mode & ROADSTOP_DRAW_MODE_OVERLAY) {
if (rti->UsesOverlay()) {
SpriteID ground = GetCustomRoadSprite(rti, INVALID_TILE, ROTSG_GROUND);
DrawSprite(ground + sprite_offset, PAL_NONE, x, y);
Expand All @@ -305,7 +327,7 @@ void DrawRoadStopTile(int x, int y, RoadType roadtype, const RoadStopSpec *spec,
}
} else {
/* Bay stop */
if ((spec->draw_mode & ROADSTOP_DRAW_MODE_ROAD) && rti->UsesOverlay()) {
if ((draw_mode & ROADSTOP_DRAW_MODE_ROAD) && rti->UsesOverlay()) {
SpriteID ground = GetCustomRoadSprite(rti, INVALID_TILE, ROTSG_ROADSTOP);
DrawSprite(ground + view, PAL_NONE, x, y);
}
Expand Down
4 changes: 3 additions & 1 deletion src/newgrf_roadstop.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ enum RoadStopDrawMode : uint8_t {
ROADSTOP_DRAW_MODE_NONE = 0,
ROADSTOP_DRAW_MODE_ROAD = 1 << 0, ///< Bay stops: Draw the road itself
ROADSTOP_DRAW_MODE_OVERLAY = 1 << 1, ///< Drive-through stops: Draw the road overlay, e.g. pavement
ROADSTOP_DRAW_MODE_WAYP_GROUND = 1 << 2, ///< Waypoints: Draw the sprite layout ground tile (on top of the road)
};
DECLARE_ENUM_AS_BIT_SET(RoadStopDrawMode)

Expand All @@ -69,6 +70,7 @@ enum RoadStopSpecFlags {
RSF_NO_AUTO_ROAD_CONNECTION = 4, ///< No auto road connection.
RSF_BUILD_MENU_ROAD_ONLY = 5, ///< Only show in the road build menu (not tram).
RSF_BUILD_MENU_TRAM_ONLY = 6, ///< Only show in the tram build menu (not road).
RSF_DRAW_MODE_REGISTER = 8, ///< Read draw mode from register 0x100.
};

/** Scope resolver for road stops. */
Expand Down Expand Up @@ -132,7 +134,7 @@ struct RoadStopSpec {
RoadStopAvailabilityType stop_type = ROADSTOPTYPE_ALL;
RoadStopDrawMode draw_mode = ROADSTOP_DRAW_MODE_ROAD | ROADSTOP_DRAW_MODE_OVERLAY;
uint8_t callback_mask = 0;
uint8_t flags = 0;
uint16_t flags = 0;

CargoTypes cargo_triggers = 0; ///< Bitmask of cargo types which cause trigger re-randomizing

Expand Down