diff options
author | Peter Nelson <peter1138@openttd.org> | 2018-07-23 00:05:23 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2018-07-26 13:27:40 +0100 |
commit | bf8d7df7367055dcfad6cc1c21fd9c762ffc2fe4 (patch) | |
tree | 8fe03509c7d1ef6ef092521632e2cc32a36e3287 /src/tunnelbridge_cmd.cpp | |
parent | 5db883fbe9b8ef6171bfafc145a80932c3920504 (diff) | |
download | openttd-bf8d7df7367055dcfad6cc1c21fd9c762ffc2fe4.tar.xz |
Change: Extend rail types to 64 (6 bit storage)
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r-- | src/tunnelbridge_cmd.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index 5f194a319..ce14188fd 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -232,7 +232,7 @@ CommandCost CheckBridgeAvailability(BridgeType bridge_type, uint bridge_len, DoC * @param p1 packed start tile coords (~ dx) * @param p2 various bitstuffed elements * - p2 = (bit 0- 7) - bridge type (hi bh) - * - p2 = (bit 8-11) - rail type or road types. + * - p2 = (bit 8-13) - rail type or road types. * - p2 = (bit 15-16) - transport type. * @param text unused * @return the cost of this operation or an error @@ -259,7 +259,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u break; case TRANSPORT_RAIL: - railtype = Extract<RailType, 8, 4>(p2); + railtype = Extract<RailType, 8, 6>(p2); if (!ValParamRailtype(railtype)) return CMD_ERROR; break; @@ -574,7 +574,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u * Build Tunnel. * @param start_tile start tile of tunnel * @param flags type of operation - * @param p1 bit 0-3 railtype or roadtypes + * @param p1 bit 0-5 railtype or roadtypes * bit 8-9 transport type * @param p2 unused * @param text unused @@ -591,7 +591,7 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1, _build_tunnel_endtile = 0; switch (transport_type) { case TRANSPORT_RAIL: - railtype = Extract<RailType, 0, 4>(p1); + railtype = Extract<RailType, 0, 6>(p1); if (!ValParamRailtype(railtype)) return CMD_ERROR; break; |