Index: src/settings.cpp =================================================================== --- src/settings.cpp (Revision 11137) +++ src/settings.cpp (Arbeitskopie) @@ -1438,6 +1438,8 @@ SDT_CONDVAR(Patches, town_growth_rate, SLE_UINT8, 54, SL_MAX_VERSION, 0, MS, 2, 0, 4, 0, STR_CONFIG_PATCHES_TOWN_GROWTH, NULL), SDT_CONDVAR(Patches, larger_towns, SLE_UINT8, 54, SL_MAX_VERSION, 0, D0, 4, 0, 255, 1, STR_CONFIG_PATCHES_LARGER_TOWNS, NULL), SDT_CONDVAR(Patches, initial_city_size, SLE_UINT8, 56, SL_MAX_VERSION, 0, 0, 2, 1, 10, 1, STR_CONFIG_PATCHES_CITY_SIZE_MULTIPLIER, NULL), + SDT_CONDBOOL(Patches, cleaner_town_growth, 76, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_CLEANER_TOWN_GROWTH, NULL), + SDT_CONDBOOL(Patches, mod_road_rebuild, 76, SL_MAX_VERSION, 0, 0, false, STR_CONFIG_MODIFIED_ROAD_REBUILD, NULL), /***************************************************************************/ /* AI section of the GUI-configure patches window */ Index: src/road.h =================================================================== --- src/road.h (Revision 11137) +++ src/road.h (Arbeitskopie) @@ -116,6 +116,36 @@ } /** + * Calculate the mirrored RoadBits + * + * Simply move the bits to their new position. + * + * @param r The given RoadBits value + * @return the mirrored + */ +static inline RoadBits MirrorRoadBits(RoadBits r) +{ + return (RoadBits)(GB(r, 0, 2) << 2 | GB(r,2,2)); +} + +/** + * Calculate rotated RoadBits + * + * Move the Roadbits clockwise til they are in their final position. + * + * @param r The given RoadBits value + * @param rot The given Rotation angle + * @return the rotated + */ +static inline RoadBits RotateRoadBits(RoadBits r, DiagDirDiff rot) +{ + for (; rot > (DiagDirDiff)0; rot--){ + r = (RoadBits)(GB(r,0,1) << 3 | GB(r,1,3)); + } + return r; +} + +/** * Create the road-part which belongs to the given DiagDirection * * This function returns a RoadBits value which belongs to @@ -130,6 +160,16 @@ } /** + * Return if the tile is a valid tile for a crossing. + * + * @note function is overloaded + * @param tile the curent tile + * @param ax the axis of the road over the rail + * @return true if it is a valid tile + */ +bool IsPossibleCrossing(const TileIndex tile, Axis ax); + +/** * Checks whether the trackdir means that we are reversing. * @param dir the trackdir to check * @return true if it is a reversing road trackdir @@ -150,6 +190,14 @@ } /** + * Clean up unneccesary RoadBits of a planed tile. + * @param tile current tile + * @param org_rb planed RoadBits + * @return optimised RoadBits + */ +RoadBits CleanUpRoadBits(const TileIndex tile, RoadBits org_rb); + +/** * Is it allowed to remove the given road bits from the given tile? * @param tile the tile to remove the road from * @param remove the roadbits that are going to be removed Index: src/lang/english.txt =================================================================== --- src/lang/english.txt (Revision 11137) +++ src/lang/english.txt (Arbeitskopie) @@ -1187,6 +1187,8 @@ STR_CONFIG_PATCHES_LARGER_TOWNS :{LTBLUE}Proportion of towns that will become cities: {ORANGE}1 in {STRING1} STR_CONFIG_PATCHES_LARGER_TOWNS_DISABLED :{LTBLUE}Proportion of towns that will become cities: {ORANGE}None STR_CONFIG_PATCHES_CITY_SIZE_MULTIPLIER :{LTBLUE}Initial city size multiplier: {ORANGE}{STRING1} +STR_CONFIG_CLEANER_TOWN_GROWTH :{LTBLUE}More intelligent town road layouts +STR_CONFIG_MODIFIED_ROAD_REBUILD :{LTBLUE}Remove absurd road-elements during the road construction STR_CONFIG_PATCHES_GUI :{BLACK}Interface STR_CONFIG_PATCHES_CONSTRUCTION :{BLACK}Construction Index: src/settings_gui.cpp =================================================================== --- src/settings_gui.cpp (Revision 11137) +++ src/settings_gui.cpp (Arbeitskopie) @@ -672,7 +672,6 @@ "drag_signals_density", "oil_refinery_limit", "semaphore_build_before", - "town_layout", }; static const char *_patches_stations[] = { @@ -700,6 +699,9 @@ "ending_year", "smooth_economy", "allow_shares", + "town_layout", + "cleaner_town_growth", + "mod_road_rebuild", "town_growth_rate", "larger_towns", "initial_city_size", Index: src/saveload.cpp =================================================================== --- src/saveload.cpp (Revision 11137) +++ src/saveload.cpp (Arbeitskopie) @@ -29,7 +29,7 @@ #include "strings.h" #include -extern const uint16 SAVEGAME_VERSION = 75; +extern const uint16 SAVEGAME_VERSION = 76; uint16 _sl_version; ///< the major savegame version identifier byte _sl_minor_version; ///< the minor savegame version, DO NOT USE! Index: src/town_cmd.cpp =================================================================== --- src/town_cmd.cpp (Revision 11137) +++ src/town_cmd.cpp (Arbeitskopie) @@ -133,18 +133,6 @@ } /** - * Move a TileIndex into a diagonal direction. - * - * @param tile The current tile - * @param dir The direction in which we want to step - * @return the moved tile - */ -static inline TileIndex AddDiagDirToTileIndex(TileIndex tile, DiagDirection dir) -{ - return TILE_ADD(tile, TileOffsByDiagDir(dir)); -} - -/** * House Tile drawing handler. * Part of the tile loop process * @param ti TileInfo of the tile to draw @@ -865,8 +853,8 @@ } /* Check the tiles E,N,W and S of the current tile. */ - for (DiagDirection i = DIAGDIR_BEGIN; i < DIAGDIR_END; i++) { - if (IsTileType(AddDiagDirToTileIndex(tile, i), MP_HOUSE)) { + for (DiagDirection dir = DIAGDIR_BEGIN; dir < DIAGDIR_END; dir++) { + if (IsTileType(TileAddDiagDir(tile, dir), MP_HOUSE)) { counter++; } @@ -879,6 +867,78 @@ } /** + * Grows the town with a road piece. + * + * @param t The current town + * @param tile The current tile + * @param rcmd The RoadBits we want to build on the tile + * @return true if the RoadBits have been added else false + */ +static bool GrowTownWithRoad(Town *t, TileIndex tile, RoadBits rcmd) { + if (CmdSucceeded(DoCommand(tile, rcmd, t->index, DC_EXEC | DC_AUTO | DC_NO_WATER, CMD_BUILD_ROAD))) { + _grow_town_result = -1; + return true; + } + return false; +} + +/** + * Grows the town with a bridge. + * At first we check if a bridge is reasonable. + * If so we check if we are able to build it. + * + * @param t The current town + * @param tile The current tile + * @param rcmd The RoadBits which are possible on this tile + * @return true if a bridge has been build else false + */ +static bool GrowTownWithBridge(Town *t, TileIndex tile, RoadBits rcmd) { + DiagDirection bridge_dir; ///< The direction of a bridge we maybe want to build + + /* Determine direction of slope, + * and build a road if not a special slope. */ + switch (GetTileSlope(tile, NULL)) { + case SLOPE_SW: bridge_dir = DIAGDIR_NE; break; + case SLOPE_SE: bridge_dir = DIAGDIR_NW; break; + case SLOPE_NW: bridge_dir = DIAGDIR_SE; break; + case SLOPE_NE: bridge_dir = DIAGDIR_SW; break; + + default: return false; + } + + /* Check if the bridge will be compatible to the RoadBits */ + if (!(rcmd & DiagDirToRoadBits(ReverseDiagDir(bridge_dir)))) return false; + + /* We are in the right direction */ + uint32 bridge_length = 0; ///< This value stores the length of the possible bridge + TileIndex dest_tile = tile; ///< Used to store the other waterside + + do { + if (bridge_length++ >= 11) { + /* Max 11 tile long bridges */ + return false; + } + dest_tile = TILE_MASK(dest_tile + TileOffsByDiagDir(bridge_dir)); + } while (IsClearWaterTile(dest_tile)); + + /* no water tiles in between? */ + if (bridge_length == 1) return false; + + for (uint8 times = 0; times <= 22; times++) { + byte bridge_type = RandomRange(MAX_BRIDGES - 1); + + /* Can we actually build the bridge? */ + if (CmdSucceeded(DoCommand(tile, dest_tile, bridge_type | ((0x80 | ROADTYPES_ROAD) << 8), DC_AUTO, CMD_BUILD_BRIDGE))) { + DoCommand(tile, dest_tile, bridge_type | ((0x80 | ROADTYPES_ROAD) << 8), DC_EXEC | DC_AUTO, CMD_BUILD_BRIDGE); + _grow_town_result--; + return true; + } + } + /* Quit if it selecting an appropiate bridge type fails a large number of times. */ + return false; +} + +/** * Grows the given town. * There are at the moment 3 possible way's for * the town expansion: @@ -899,7 +959,6 @@ static void GrowTownInTile(TileIndex* tile_ptr, RoadBits cur_rb, DiagDirection target_dir, Town* t1) { RoadBits rcmd = ROAD_NONE; ///< RoadBits for the road construction command - TileIndex tmptile; ///< Dummy tile for various things TileIndex tile = *tile_ptr; ///< The main tile on which we base our growth TILE_ASSERT(tile); @@ -936,14 +995,14 @@ do target_dir = RandomDiagDir(); while (target_dir == source_dir); } - if (!IsRoadAllowedHere(AddDiagDirToTileIndex(tile, target_dir), target_dir)) { + if (!IsRoadAllowedHere(TileAddDiagDir(tile, target_dir), target_dir)) { /* A road is not allowed to continue the randomized road, * return if the road we're trying to build is curved. */ if (target_dir != ReverseDiagDir(source_dir)) return; /* Return if neither side of the new road is a house */ - if (!IsTileType(AddDiagDirToTileIndex(tile, ChangeDiagDir(target_dir, DIAGDIRDIFF_90RIGHT)), MP_HOUSE) && - !IsTileType(AddDiagDirToTileIndex(tile, ChangeDiagDir(target_dir, DIAGDIRDIFF_90LEFT)), MP_HOUSE)) { + if (!IsTileType(TileAddDiagDir(tile, ChangeDiagDir(target_dir, DIAGDIRDIFF_90RIGHT)), MP_HOUSE) && + !IsTileType(TileAddDiagDir(tile, ChangeDiagDir(target_dir, DIAGDIRDIFF_90LEFT)), MP_HOUSE)) { return; } @@ -979,6 +1038,7 @@ } } else { bool allow_house = false; ///< Value which decides if we want to construct a house + TileIndex tmptile; ///< Dummy tile for various things TileIndex tmptile2; ///< Yet another dummy tile /* Reached a tunnel/bridge? Then continue at the other side of it. */ @@ -997,7 +1057,7 @@ if (cur_rb & DiagDirToRoadBits(target_dir)) return; /* This is the tile we will reach if we extend to this direction. */ - tmptile = AddDiagDirToTileIndex(tile, target_dir); + tmptile = TileAddDiagDir(tile, target_dir); /* Don't walk into water. */ if (IsClearWaterTile(tmptile)) return; @@ -1011,7 +1071,7 @@ case TL_3X3_GRID: /* Use 2x2 grid afterwards! */ /* Fill gap if house has enougth neighbors */ - tmptile2 = AddDiagDirToTileIndex(tmptile, target_dir); + tmptile2 = TileAddDiagDir(tmptile, target_dir); if (AreNeighborsHouseTiles(tmptile2) && BuildTownHouse(t1, tmptile2)) { _grow_town_result = -1; } @@ -1023,7 +1083,7 @@ case TL_BETTER_ROADS: /* Use original afterwards! */ /* Fill gap if house has enougth neighbors */ - tmptile2 = AddDiagDirToTileIndex(tmptile, target_dir); + tmptile2 = TileAddDiagDir(tmptile, target_dir); if (AreNeighborsHouseTiles(tmptile2) && BuildTownHouse(t1, tmptile2)) { _grow_town_result = -1; } @@ -1057,51 +1117,15 @@ /* Return if a water tile */ if (IsClearWaterTile(tile)) return; - DiagDirection bridge_dir; ///< The direction of a bridge we maybe want to build - /* Determine direction of slope, - * and build a road if not a special slope. */ - switch (GetTileSlope(tile, NULL)) { - case SLOPE_SW: bridge_dir = DIAGDIR_NE; break; - case SLOPE_SE: bridge_dir = DIAGDIR_NW; break; - case SLOPE_NW: bridge_dir = DIAGDIR_SE; break; - case SLOPE_NE: bridge_dir = DIAGDIR_SW; break; - - default: -build_road_and_exit: - if (CmdSucceeded(DoCommand(tile, rcmd, t1->index, DC_EXEC | DC_AUTO | DC_NO_WATER, CMD_BUILD_ROAD))) { - _grow_town_result = -1; - } - return; + if (_patches.cleaner_town_growth) { + /* Make the roads look nicer */ + rcmd = CleanUpRoadBits(tile, rcmd); + if (rcmd == ROAD_NONE) return; } - /* Check if the bridge is in the right direction */ - if (!(rcmd & DiagDirToRoadBits(bridge_dir))) goto build_road_and_exit; + if (GrowTownWithBridge(t1, tile, rcmd)) return; - /* We are in the right direction */ - uint32 bridge_length = 0; ///< This value stores the length of the possible bridge - tmptile = tile; ///< Now we use this dummy to store the other waterside - do { - if (bridge_length++ >= 11) { - /* Max 11 tile long bridges */ - goto build_road_and_exit; - } - tmptile = TILE_MASK(tmptile + TileOffsByDiagDir(bridge_dir)); - } while (IsClearWaterTile(tmptile)); - - /* no water tiles in between? */ - if (bridge_length == 1) goto build_road_and_exit; - - for (uint times = 0; times <= 22; times++) { - byte bridge_type = RandomRange(MAX_BRIDGES - 1); - - /* Can we actually build the bridge? */ - if (CmdSucceeded(DoCommand(tile, tmptile, bridge_type | ((0x80 | ROADTYPES_ROAD) << 8), DC_AUTO, CMD_BUILD_BRIDGE))) { - DoCommand(tile, tmptile, bridge_type | ((0x80 | ROADTYPES_ROAD) << 8), DC_EXEC | DC_AUTO, CMD_BUILD_BRIDGE); - _grow_town_result = -1; - return; - } - } - /* Quit if it selecting an appropiate bridge type fails a large number of times. */ + GrowTownWithRoad(t1, tile, rcmd); } /** Returns "growth" if a house was built, or no if the build failed. @@ -1151,7 +1175,7 @@ /* Select a random bit from the blockmask, walk a step * and continue the search from there. */ do target_dir = RandomDiagDir(); while (!(cur_rb & DiagDirToRoadBits(target_dir))); - tile = AddDiagDirToTileIndex(tile, target_dir); + tile = TileAddDiagDir(tile, target_dir); if (IsTileType(tile, MP_ROAD)) { /* Don't allow building over roads of other cities */ Index: src/map.h =================================================================== --- src/map.h (Revision 11137) +++ src/map.h (Arbeitskopie) @@ -390,6 +390,18 @@ } /** + * Adds a DiagDir to a tile. + * + * @param tile The current tile + * @param dir The direction in which we want to step + * @return the moved tile + */ +static inline TileIndex TileAddDiagDir(TileIndex tile, DiagDirection dir) +{ + return TILE_ADD(tile, TileOffsByDiagDir(dir)); +} + +/** * A callback function type for searching tiles. * * @param tile The tile to test Index: src/road_cmd.cpp =================================================================== --- src/road_cmd.cpp (Revision 11137) +++ src/road_cmd.cpp (Arbeitskopie) @@ -259,70 +259,121 @@ static const RoadBits _valid_tileh_slopes_road[][15] = { /* set of normal ones */ { - ROAD_ALL, ROAD_NONE, ROAD_NONE, - ROAD_X, ROAD_NONE, ROAD_NONE, // 3, 4, 5 - ROAD_Y, ROAD_NONE, ROAD_NONE, - ROAD_Y, ROAD_NONE, ROAD_NONE, // 9, 10, 11 - ROAD_X, ROAD_NONE, ROAD_NONE + ROAD_ALL, // SLOPE_FLAT + ROAD_NONE, // SLOPE_W + ROAD_NONE, // SLOPE_S + + ROAD_X, // SLOPE_SW + ROAD_NONE, // SLOPE_E + ROAD_NONE, // SLOPE_EW + + ROAD_Y, // SLOPE_SE + ROAD_NONE, // SLOPE_WSE + ROAD_NONE, // SLOPE_N + + ROAD_Y, // SLOPE_NW + ROAD_NONE, // SLOPE_NS + ROAD_NONE, // SLOPE_NE + + ROAD_X, // SLOPE_ENW + ROAD_NONE, // SLOPE_SEN + ROAD_NONE // SLOPE_ELEVATED }, /* allowed road for an evenly raised platform */ { - ROAD_NONE, - ROAD_SW | ROAD_NW, - ROAD_SW | ROAD_SE, - ROAD_Y | ROAD_SW, + ROAD_NONE, // SLOPE_FLAT + ROAD_SW | ROAD_NW, // SLOPE_W + ROAD_SW | ROAD_SE, // SLOPE_S - ROAD_SE | ROAD_NE, // 4 - ROAD_ALL, - ROAD_X | ROAD_SE, - ROAD_ALL, + ROAD_Y | ROAD_SW, // SLOPE_SW + ROAD_SE | ROAD_NE, // SLOPE_E + ROAD_ALL, // SLOPE_EW - ROAD_NW | ROAD_NE, // 8 - ROAD_X | ROAD_NW, - ROAD_ALL, - ROAD_ALL, + ROAD_X | ROAD_SE, // SLOPE_SE + ROAD_ALL, // SLOPE_WSE + ROAD_NW | ROAD_NE, // SLOPE_N - ROAD_Y | ROAD_NE, // 12 - ROAD_ALL, - ROAD_ALL + ROAD_X | ROAD_NW, // SLOPE_NW + ROAD_ALL, // SLOPE_NS + ROAD_ALL, // SLOPE_NE + + ROAD_Y | ROAD_NE, // SLOPE_ENW + ROAD_ALL, // SLOPE_SEN + ROAD_ALL // SLOPE_ELEVATED }, + /* Singe bits on slopes */ + { + ROAD_ALL, // SLOPE_FLAT + ROAD_NE | ROAD_SE, // SLOPE_W + ROAD_NE | ROAD_NW, // SLOPE_S + + ROAD_NE, // SLOPE_SW + ROAD_NW | ROAD_SW, // SLOPE_E + ROAD_ALL, // SLOPE_EW + + ROAD_ALL, // SLOPE_SE + ROAD_ALL, // SLOPE_WSE + ROAD_SE | ROAD_SW, // SLOPE_N + + ROAD_SE, // SLOPE_NW + ROAD_ALL, // SLOPE_NS + ROAD_SW, // SLOPE_NE + + ROAD_NW, // SLOPE_ENW + ROAD_ALL, // SLOPE_SEN + ROAD_ALL, // SLOPE_ELEVATED + }, }; - +/** + * Calculate the costs for roads on slopes + * Aside modify the RoadBits to fit on the slopes + * + * @note The RoadBits are modified too! + * @param tileh The current slope + * @param pieces The RoadBits we want to add + * @param existing The existent RoadBits + * @return The costs for these RoadBits on this slope + */ static CommandCost CheckRoadSlope(Slope tileh, RoadBits* pieces, RoadBits existing) { - RoadBits road_bits; - if (IsSteepSlope(tileh)) { - /* force full pieces. */ - *pieces |= (RoadBits)((*pieces & 0xC) >> 2); - *pieces |= (RoadBits)((*pieces & 0x3) << 2); + /* Force straight roads. */ + *pieces |= MirrorRoadBits(*pieces); - if (existing == 0 || existing == *pieces) { + if (existing == ROAD_NONE || existing == *pieces) { if (*pieces == ROAD_X || *pieces == ROAD_Y) return _price.terraform; } return CMD_ERROR; } - road_bits = *pieces | existing; + RoadBits road_bits = *pieces | existing; + + /* Single bits on slopes. + * We check for the roads that need at least 2 bits */ + if (_patches.build_on_slopes && !_is_old_ai_player && + (COUNTBITS(road_bits) + COUNTBITS(*pieces)) == 2 && + (_valid_tileh_slopes_road[2][tileh] & *pieces) == ROAD_NONE) { + return CommandCost(_price.terraform); + } + /* no special foundation */ - if ((~_valid_tileh_slopes_road[0][tileh] & road_bits) == 0) { + if ((~_valid_tileh_slopes_road[0][tileh] & road_bits) == ROAD_NONE) { /* force that all bits are set when we have slopes */ if (tileh != SLOPE_FLAT) *pieces |= _valid_tileh_slopes_road[0][tileh]; return CommandCost(); // no extra cost } /* foundation is used. Whole tile is leveled up */ - if ((~_valid_tileh_slopes_road[1][tileh] & road_bits) == 0) { - return CommandCost(existing != 0 ? 0 : _price.terraform); + if ((~_valid_tileh_slopes_road[1][tileh] & road_bits) == ROAD_NONE) { + return CommandCost(existing != ROAD_NONE ? 0 : _price.terraform); } - *pieces |= (RoadBits)((*pieces & 0xC) >> 2); - *pieces |= (RoadBits)((*pieces & 0x3) << 2); + /* Force straight roads. */ + *pieces |= MirrorRoadBits(*pieces); /* partly leveled up tile, only if there's no road on that tile */ - if ((existing == 0 || existing == *pieces) && (tileh == SLOPE_W || tileh == SLOPE_S || tileh == SLOPE_E || tileh == SLOPE_N)) { - /* force full pieces. */ + if ((existing == ROAD_NONE || existing == *pieces) && (tileh == SLOPE_W || tileh == SLOPE_S || tileh == SLOPE_E || tileh == SLOPE_N)) { if (*pieces == ROAD_X || *pieces == ROAD_Y) return _price.terraform; } return CMD_ERROR; @@ -1182,8 +1233,8 @@ if (GetRoadTileType(tile) == ROAD_TILE_DEPOT) return; + const Town* t = ClosestTownFromTile(tile, (uint)-1); if (!HasRoadWorks(tile)) { - const Town* t = ClosestTownFromTile(tile, (uint)-1); int grp = 0; if (t != NULL) { @@ -1192,8 +1243,8 @@ /* Show an animation to indicate road work */ if (t->road_build_months != 0 && (DistanceManhattan(t->xy, tile) < 8 || grp != 0) && - GetRoadTileType(tile) == ROAD_TILE_NORMAL && (GetAllRoadBits(tile) == ROAD_X || GetAllRoadBits(tile) == ROAD_Y)) { - if (GetTileSlope(tile, NULL) == SLOPE_FLAT && EnsureNoVehicleOnGround(tile) && CHANCE16(1, 20)) { + GetRoadTileType(tile) == ROAD_TILE_NORMAL && COUNTBITS(GetAllRoadBits(tile)) > 1 ) { + if (GetTileSlope(tile, NULL) == SLOPE_FLAT && EnsureNoVehicleOnGround(tile) && CHANCE16(1, 40)) { StartRoadWorks(tile); SndPlayTileFx(SND_21_JACKHAMMER, tile); @@ -1231,6 +1282,17 @@ } } else if (IncreaseRoadWorksCounter(tile)) { TerminateRoadWorks(tile); + + if (_patches.mod_road_rebuild) { + /* Generate a nicer town surface */ + const RoadBits old_rb = GetAnyRoadBits(tile, ROADTYPE_ROAD); + const RoadBits new_rb = CleanUpRoadBits(tile, old_rb); + + if (old_rb != new_rb) { + DoCommand(tile, (old_rb ^ new_rb), t->index, DC_EXEC | DC_AUTO | DC_NO_WATER, CMD_REMOVE_ROAD); + } + } + MarkTileDirtyByTile(tile); } } Index: src/variables.h =================================================================== --- src/variables.h (Revision 11137) +++ src/variables.h (Arbeitskopie) @@ -242,6 +242,9 @@ bool timetable_in_ticks; ///< Whether to show the timetable in ticks rather than days. bool autoslope; ///< Allow terraforming under things. + + bool cleaner_town_growth; ///< Allow more checkups before construction of town roads + bool mod_road_rebuild; ///< Roadworks remove unneccesary RoadBits }; VARDEF Patches _patches; Index: src/direction.h =================================================================== --- src/direction.h (Revision 11137) +++ src/direction.h (Arbeitskopie) @@ -165,6 +165,9 @@ DIAGDIRDIFF_90LEFT = 3 ///< 90 degrees left }; +/** Allow incrementing of DiagDirDiff variables */ +DECLARE_POSTFIX_INCREMENT(DiagDirDiff); + /** * Applies a difference on a DiagDirection * Index: projects/openttd.vcproj =================================================================== --- projects/openttd.vcproj (Revision 11137) +++ projects/openttd.vcproj (Arbeitskopie) @@ -327,6 +327,9 @@ RelativePath=".\..\src\rev.cpp"> + + + + Index: source.list =================================================================== --- source.list (Revision 11137) +++ source.list (Arbeitskopie) @@ -58,6 +58,7 @@ queue.cpp rail.cpp rev.cpp +road.cpp saveload.cpp screenshot.cpp #if SDL