mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-05 13:57:01 +00:00
(svn r14326) -Fix: some wrong comments (Yexo)
This commit is contained in:
parent
cc16809f71
commit
497ded7e40
@ -275,17 +275,17 @@ static const WindowDesc _build_bridge_desc = {
|
|||||||
* @parma start The start tile of the bridge
|
* @parma start The start tile of the bridge
|
||||||
* @param end The end tile of the bridge
|
* @param end The end tile of the bridge
|
||||||
* @param transport_type The transport type
|
* @param transport_type The transport type
|
||||||
* @param bridge_type The bridge type
|
* @param road_rail_type The road/rail type
|
||||||
*/
|
*/
|
||||||
void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transport_type, byte bridge_type)
|
void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transport_type, byte road_rail_type)
|
||||||
{
|
{
|
||||||
DeleteWindowById(WC_BUILD_BRIDGE, 0);
|
DeleteWindowById(WC_BUILD_BRIDGE, 0);
|
||||||
|
|
||||||
/* Data type for the bridge.
|
/* Data type for the bridge.
|
||||||
* Bit 16,15 = transport type,
|
* Bit 16,15 = transport type,
|
||||||
* 14..8 = road/rail pieces,
|
* 14..8 = road/rail types,
|
||||||
* 7..0 = type of bridge */
|
* 7..0 = type of bridge */
|
||||||
uint32 type = (transport_type << 15) | (bridge_type << 8);
|
uint32 type = (transport_type << 15) | (road_rail_type << 8);
|
||||||
|
|
||||||
/* only query bridge building possibility once, result is the same for all bridges!
|
/* only query bridge building possibility once, result is the same for all bridges!
|
||||||
* returns CMD_ERROR on failure, and price on success */
|
* returns CMD_ERROR on failure, and price on success */
|
||||||
|
@ -183,8 +183,8 @@ bool CheckBridge_Stuff(BridgeType bridge_type, uint bridge_len, uint32 flags)
|
|||||||
* @param p1 packed start tile coords (~ dx)
|
* @param p1 packed start tile coords (~ dx)
|
||||||
* @param p2 various bitstuffed elements
|
* @param p2 various bitstuffed elements
|
||||||
* - p2 = (bit 0- 7) - bridge type (hi bh)
|
* - p2 = (bit 0- 7) - bridge type (hi bh)
|
||||||
* - p2 = (bit 8-..) - rail type or road types.
|
* - p2 = (bit 8-14) - rail type or road types.
|
||||||
* - p2 = (bit 15 ) - set means road bridge.
|
* - p2 = (bit 15-16) - transport type.
|
||||||
*/
|
*/
|
||||||
CommandCost CmdBuildBridge(TileIndex end_tile, uint32 flags, uint32 p1, uint32 p2)
|
CommandCost CmdBuildBridge(TileIndex end_tile, uint32 flags, uint32 p1, uint32 p2)
|
||||||
{
|
{
|
||||||
@ -226,7 +226,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, uint32 flags, uint32 p1, uint32 p
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case TRANSPORT_RAIL:
|
case TRANSPORT_RAIL:
|
||||||
railtype = (RailType)GB(p2, 8, 8);
|
railtype = (RailType)GB(p2, 8, 7);
|
||||||
if (!ValParamRailtype(railtype)) return CMD_ERROR;
|
if (!ValParamRailtype(railtype)) return CMD_ERROR;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user