| | 1 | Index: docs/landscape.html
|
---|
| | 2 | ===================================================================
|
---|
| | 3 | --- docs/landscape.html (revision 27198)
|
---|
| | 4 | +++ docs/landscape.html (working copy)
|
---|
| | 5 | @@ -975,7 +975,7 @@
|
---|
| | 6 | </li>
|
---|
| | 7 | <li>m6 bits 5..3: the station type (rail, airport, truck, bus, oilrig, dock, buoy, waypoint)</li>
|
---|
| | 8 | <li>m6 bit 2: pbs reservation state for railway stations/waypoints</li>
|
---|
| | 9 | -
|
---|
| | 10 | + <li>m6 bit 0: river restoration flag for whenever a canal is removed</li>
|
---|
| | 11 | <li>m7 bits 4..0: <a href="#OwnershipInfo">owner</a> of road (road stops)</li>
|
---|
| | 12 | <li>m7 bits 7..6: present road types (road stops)</li>
|
---|
| | 13 | <li>m7: animation frame (railway stations/waypoints, airports)</li>
|
---|
| | 14 | @@ -1088,6 +1088,7 @@
|
---|
| | 15 | </tr>
|
---|
| | 16 | </table>
|
---|
| | 17 | </li>
|
---|
| | 18 | + <li>m6 bit 0: river restoration flag for whenever a canal is removed</li>
|
---|
| | 19 | </ul>
|
---|
| | 20 | </td>
|
---|
| | 21 | </tr>
|
---|
| | 22 | @@ -1429,6 +1430,7 @@
|
---|
| | 23 | </li>
|
---|
| | 24 | <li>m6 bits 5..3: random triggers (NewGRF)</li>
|
---|
| | 25 | <li>m6 bit 2: bit 8 of type (see m5)</li>
|
---|
| | 26 | + <li>m6 bit 0: river restoration flag for whenever a canal is removed</li>
|
---|
| | 27 | <li>m7: animation frame</li>
|
---|
| | 28 | </ul>
|
---|
| | 29 | </td>
|
---|
| | 30 | @@ -1599,6 +1601,7 @@
|
---|
| | 31 | <li>m2: index into the array of objects, bits 0 to 15 (upper bits in m5)</li>
|
---|
| | 32 | <li>m3: random bits</li>
|
---|
| | 33 | <li>m5: index into the array of objects, bits 16 to 23 (lower bits in m2)</li>
|
---|
| | 34 | + <li>m6 bit 0: river restoration flag for whenever a canal is removed</li>
|
---|
| | 35 | <li>m7: animation counter</li>
|
---|
| | 36 | </ul>
|
---|
| | 37 | </td>
|
---|
| | 38 | Index: docs/landscape_grid.html
|
---|
| | 39 | ===================================================================
|
---|
| | 40 | --- docs/landscape_grid.html (revision 27198)
|
---|
| | 41 | +++ docs/landscape_grid.html (working copy)
|
---|
| | 42 | @@ -236,7 +236,7 @@
|
---|
| | 43 | <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 44 | <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 45 | <td class="bits"><span class="option">~~~~ ~</span>XXX</td>
|
---|
| | 46 | - <td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td>
|
---|
| | 47 | + <td class="bits"><span class="free">OO</span>XX X<span class="free">OO</span>X</td>
|
---|
| | 48 | <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 49 | </tr>
|
---|
| | 50 | <tr>
|
---|
| | 51 | @@ -260,7 +260,7 @@
|
---|
| | 52 | <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 53 | <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 54 | <td class="bits"><span class="option">~~~~ ~~~~</span></td>
|
---|
| | 55 | - <td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td>
|
---|
| | 56 | + <td class="bits"><span class="free">OO</span>XX X<span class="free">OO</span>X</td>
|
---|
| | 57 | <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 58 | </tr>
|
---|
| | 59 | <tr>
|
---|
| | 60 | @@ -272,7 +272,7 @@
|
---|
| | 61 | <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 62 | <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 63 | <td class="bits"><span class="option">~~~~ ~~~~</span></td>
|
---|
| | 64 | - <td class="bits"><span class="free">OO</span>XX X<span class="free">OOO</span></td>
|
---|
| | 65 | + <td class="bits"><span class="free">OO</span>XX X<span class="free">OO</span>X</td>
|
---|
| | 66 | <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 67 | </tr>
|
---|
| | 68 | <tr>
|
---|
| | 69 | @@ -297,8 +297,8 @@
|
---|
| | 70 | <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 71 | <td class="bits">XXXX XXXX</td>
|
---|
| | 72 | <td class="bits">-inherit-</td>
|
---|
| | 73 | + <td class="bits"><span class="free">OOOO OOO</span>X</td>
|
---|
| | 74 | <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 75 | - <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 76 | </tr>
|
---|
| | 77 | <tr>
|
---|
| | 78 | <td class="caption">shipdepot</td>
|
---|
| | 79 | @@ -309,8 +309,8 @@
|
---|
| | 80 | <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 81 | <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 82 | <td class="bits">-inherit-</td>
|
---|
| | 83 | + <td class="bits"><span class="free">OOOO OOO</span>X</td>
|
---|
| | 84 | <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 85 | - <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 86 | </tr>
|
---|
| | 87 | <tr>
|
---|
| | 88 | <td>8</td>
|
---|
| | 89 | @@ -322,7 +322,7 @@
|
---|
| | 90 | <td class="bits">XXXX XXXX</td>
|
---|
| | 91 | <td class="bits">XXXX XXXX</td>
|
---|
| | 92 | <td class="bits">XXXX XXXX</td>
|
---|
| | 93 | - <td class="bits"><span class="free">OO</span>XX XX<span class="free">OO</span></td>
|
---|
| | 94 | + <td class="bits"><span class="free">OO</span>XX XX<span class="free">O</span>X</td>
|
---|
| | 95 | <td class="bits">XXXX XXXX</td>
|
---|
| | 96 | </tr>
|
---|
| | 97 | <tr>
|
---|
| | 98 | @@ -360,7 +360,7 @@
|
---|
| | 99 | <td class="bits">XXXX XXXX</td>
|
---|
| | 100 | <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 101 | <td class="bits">XXXX XXXX</td>
|
---|
| | 102 | - <td class="bits"><span class="free">OOOO OOOO</span></td>
|
---|
| | 103 | + <td class="bits"><span class="free">OOOO OOO</span>X</td>
|
---|
| | 104 | <td class="bits">XXXX XXXX</td>
|
---|
| | 105 | </tr>
|
---|
| | 106 | </tbody>
|
---|
| | 107 | Index: src/industry_cmd.cpp
|
---|
| | 108 | ===================================================================
|
---|
| | 109 | --- src/industry_cmd.cpp (revision 27198)
|
---|
| | 110 | +++ src/industry_cmd.cpp (working copy)
|
---|
| | 111 | @@ -1755,9 +1755,9 @@
|
---|
| | 112 | i->location.Add(cur_tile);
|
---|
| | 113 |
|
---|
| | 114 | WaterClass wc = (IsWaterTile(cur_tile) ? GetWaterClass(cur_tile) : WATER_CLASS_INVALID);
|
---|
| | 115 | -
|
---|
| | 116 | + bool river = HasBit(_me[cur_tile].m6, 0);
|
---|
| | 117 | DoCommand(cur_tile, 0, 0, DC_EXEC | DC_NO_TEST_TOWN_RATING | DC_NO_MODIFY_TOWN_RATING, CMD_LANDSCAPE_CLEAR);
|
---|
| | 118 | -
|
---|
| | 119 | + if (river) SB(_me[cur_tile].m6, 0, 1, 1);
|
---|
| | 120 | MakeIndustry(cur_tile, i->index, it->gfx, Random(), wc);
|
---|
| | 121 |
|
---|
| | 122 | if (_generating_world) {
|
---|
| | 123 | Index: src/station_cmd.cpp
|
---|
| | 124 | ===================================================================
|
---|
| | 125 | --- src/station_cmd.cpp (revision 27198)
|
---|
| | 126 | +++ src/station_cmd.cpp (working copy)
|
---|
| | 127 | @@ -2511,7 +2511,7 @@
|
---|
| | 128 |
|
---|
| | 129 | /* Get the water class of the water tile before it is cleared.*/
|
---|
| | 130 | WaterClass wc = GetWaterClass(tile_cur);
|
---|
| | 131 | -
|
---|
| | 132 | + bool river = HasBit(_me[tile_cur].m6, 0);
|
---|
| | 133 | ret = DoCommand(tile_cur, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
|
---|
| | 134 | if (ret.Failed()) return ret;
|
---|
| | 135 |
|
---|
| | 136 | @@ -2551,7 +2551,7 @@
|
---|
| | 137 | DirtyCompanyInfrastructureWindows(st->owner);
|
---|
| | 138 |
|
---|
| | 139 | MakeDock(tile, st->owner, st->index, direction, wc);
|
---|
| | 140 | -
|
---|
| | 141 | + if (river) SB(_me[tile + TileOffsByDiagDir(direction)].m6, 0, 1, 1);
|
---|
| | 142 | st->UpdateVirtCoord();
|
---|
| | 143 | UpdateStationAcceptance(st, false);
|
---|
| | 144 | st->RecomputeIndustriesNear();
|
---|
52 | @@ -264,7 +271,7 @@
| 52 | -
|
---|
53 |
| 53 | + bool river = HasBit(_me[tile].m6, 0);
|
---|
54 | /* lower tile */
| 54 | /* Zero map array and terminate animation */
|
---|
55 | WaterClass wc_lower = IsWaterTile(tile - delta) ? GetWaterClass(tile - delta) : WATER_CLASS_CANAL;
| 55 | DoClearSquare(tile);
|
---|
56 | -
| 56 |
|
---|
57 | +
| 57 | @@ -199,7 +202,9 @@
|
---|
58 | if (!IsWaterTile(tile - delta)) {
| 58 | /* Maybe change to water */
|
---|
59 | ret = DoCommand(tile - delta, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
| 59 | switch (wc) {
|
---|
60 | if (ret.Failed()) return ret;
| 60 | case WATER_CLASS_SEA: MakeSea(tile); break;
|
---|
61 | @@ -277,7 +284,7 @@
| 61 | - case WATER_CLASS_CANAL: MakeCanal(tile, o, Random()); break;
|
---|
62 |
| 62 | + case WATER_CLASS_CANAL: MakeCanal(tile, o, Random());
|
---|
63 | /* upper tile */
| 63 | + if (river) SB(_me[tile].m6, 0, 1, 1);
|
---|
64 | WaterClass wc_upper = IsWaterTile(tile + delta) ? GetWaterClass(tile + delta) : WATER_CLASS_CANAL;
| 64 | + break;
|
---|
65 | -
| 65 | case WATER_CLASS_RIVER: MakeRiver(tile, Random()); break;
|
---|
66 | +
| 66 | default: break;
|
---|
67 | if (!IsWaterTile(tile + delta)) {
| 67 | }
|
---|
68 | ret = DoCommand(tile + delta, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
| 68 | @@ -291,7 +296,8 @@
|
---|
69 | if (ret.Failed()) return ret;
| | |
---|
70 | @@ -291,7 +298,8 @@
| | |
---|