(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).

- CodeChange: changed the airport gui airport-type checking. Added function GetValidAirports() that returns bitmasked availibility, is also used for checking.
- CodeChange: to check tree-planting, 2 const arrays have been moved to table/tree_land.h (type and count)
- CodeChange: added IsTownIndex() in following of IsStationIndex(), etc.
- Fix (regression): road tunnels did not work anymore, forgot that their type was 0x200 (documented now)
This commit is contained in:
Darkvater
2005-05-09 22:33:00 +00:00
parent 4ad80ae872
commit ab954a934a
12 changed files with 260 additions and 215 deletions

View File

@@ -533,7 +533,7 @@ static int32 DoBuildTunnel(int x, int y, int x2, int y2, uint32 flags, uint exc_
/** Build Tunnel.
* @param x,y start tile coord of tunnel
* @param p1 railtype
* @param p1 railtype, 0x200 for road tunnel
* @param p2 unused (XXX - ptr to uint that recieves end tile; wtf?????)
*/
int32 CmdBuildTunnel(int x, int y, uint32 flags, uint32 p1, uint32 p2)
@@ -547,7 +547,7 @@ int32 CmdBuildTunnel(int x, int y, uint32 flags, uint32 p1, uint32 p2)
SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
if (!ValParamRailtype(p1)) return CMD_ERROR;
if (p1 != 0x200 && !ValParamRailtype(p1)) return CMD_ERROR;
_build_tunnel_railtype = (byte)(p1 & 0xFF);
_build_tunnel_bh = (byte)(p1 >> 8);