diff --git a/bin/data/openttd.grf b/bin/data/openttd.grf
index c790c4a648..fe769b52a9 100644
Binary files a/bin/data/openttd.grf and b/bin/data/openttd.grf differ
diff --git a/bin/data/orig_dos.obg b/bin/data/orig_dos.obg
index afc8b12e82..4c5fa6fc3a 100644
--- a/bin/data/orig_dos.obg
+++ b/bin/data/orig_dos.obg
@@ -55,7 +55,7 @@ TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6
-OPENTTD.GRF = f99b8f65d32a8883a2b0979eb2f6729f
+OPENTTD.GRF = 245e2125cecfe7e0b6c5e85d32459f86
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
diff --git a/bin/data/orig_dos_de.obg b/bin/data/orig_dos_de.obg
index fadf4be88a..00d1191b87 100644
--- a/bin/data/orig_dos_de.obg
+++ b/bin/data/orig_dos_de.obg
@@ -55,7 +55,7 @@ TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = fcde1d7e8a74197d72a62695884b909e
-OPENTTD.GRF = f99b8f65d32a8883a2b0979eb2f6729f
+OPENTTD.GRF = 245e2125cecfe7e0b6c5e85d32459f86
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
diff --git a/bin/data/orig_win.obg b/bin/data/orig_win.obg
index 2cd8d685ca..543788879b 100644
--- a/bin/data/orig_win.obg
+++ b/bin/data/orig_win.obg
@@ -55,7 +55,7 @@ TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32
TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b
TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1
TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8
-OPENTTD.GRF = f99b8f65d32a8883a2b0979eb2f6729f
+OPENTTD.GRF = 245e2125cecfe7e0b6c5e85d32459f86
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.
diff --git a/media/extra_grf/aqueduct.nfo b/media/extra_grf/aqueduct.nfo
index 1393bccfdd..d7f10a8afd 100644
--- a/media/extra_grf/aqueduct.nfo
+++ b/media/extra_grf/aqueduct.nfo
@@ -6,13 +6,26 @@
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
//
- -1 * 0 0C "Aqueduct graphics by Jonathan G. Rennison"
+ -1 * 0 0C "Aqueduct graphics by Jonathan G. Rennison / PaulC"
+// temperate aqueduct
+ -1 * 6 07 83 01 \7! 00 09
-1 * 3 05 12 08
- -1 sprites/aqueduct.png 34 8 09 33 64 -34 -10
- -1 sprites/aqueduct.png 114 8 09 33 66 -37 -9
- -1 sprites/aqueduct.png 194 8 09 33 64 -34 -10
- -1 sprites/aqueduct.png 274 8 09 33 66 -37 -9
- -1 sprites/aqueduct.png 354 8 09 33 64 -34 -5
- -1 sprites/aqueduct.png 434 8 09 33 66 -37 -4
- -1 sprites/aqueduct.png 514 8 09 23 33 -31 0
- -1 sprites/aqueduct.png 562 8 09 23 33 0 1
+ -1 sprites/aqueduct.png 34 8 09 32 61 -30 -9
+ -1 sprites/aqueduct.png 114 8 09 31 62 -29 -9
+ -1 sprites/aqueduct.png 194 8 09 32 61 -30 -9
+ -1 sprites/aqueduct.png 274 8 09 31 62 -29 -9
+ -1 sprites/aqueduct.png 354 8 09 32 61 -30 -4
+ -1 sprites/aqueduct.png 434 8 09 31 62 -29 -4
+ -1 sprites/aqueduct.png 514 8 09 23 33 -31 0
+ -1 sprites/aqueduct.png 562 8 09 23 33 0 1
+// non-temperate aqueduct
+ -1 * 6 07 83 01 \7= 00 09
+ -1 * 3 05 12 08
+ -1 sprites/aqueduct.png 34 48 09 32 61 -30 -9
+ -1 sprites/aqueduct.png 114 48 09 31 62 -29 -9
+ -1 sprites/aqueduct.png 194 48 09 32 61 -30 -9
+ -1 sprites/aqueduct.png 274 48 09 31 62 -29 -9
+ -1 sprites/aqueduct.png 354 48 09 32 61 -30 -4
+ -1 sprites/aqueduct.png 434 48 09 31 62 -29 -4
+ -1 sprites/aqueduct.png 514 48 09 23 33 -31 0
+ -1 sprites/aqueduct.png 562 48 09 23 33 0 1
diff --git a/media/extra_grf/aqueduct.png b/media/extra_grf/aqueduct.png
index f895431d16..6d55f0aa46 100644
Binary files a/media/extra_grf/aqueduct.png and b/media/extra_grf/aqueduct.png differ
diff --git a/media/extra_grf/canal_locks.png b/media/extra_grf/canal_locks.png
new file mode 100644
index 0000000000..7337bf10e0
Binary files /dev/null and b/media/extra_grf/canal_locks.png differ
diff --git a/media/extra_grf/canals.nfo b/media/extra_grf/canals.nfo
index 981ce5d1b2..c774d0b53d 100644
--- a/media/extra_grf/canals.nfo
+++ b/media/extra_grf/canals.nfo
@@ -6,70 +6,166 @@
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
//
- -1 * 0 0C "Canal graphics by George"
+ -1 * 0 0C "Canal graphics by George / PaulC"
-1 * 3 05 08 41
- -1 sprites/canals.png 66 8 09 23 64 -31 0
- -1 sprites/canals.png 146 8 09 39 64 -31 -8
- -1 sprites/canals.png 226 8 09 23 64 -31 0
- -1 sprites/canals.png 306 8 09 39 64 -31 -8
- -1 sprites/canals.png 386 8 09 59 64 -31 -36
- -1 sprites/canals.png 466 8 09 65 64 -31 -34
- -1 sprites/canals.png 546 8 09 59 64 -31 -36
- -1 sprites/canals.png 626 8 09 59 64 -31 -28
- -1 sprites/canals.png 706 8 09 62 64 -1 -51
- -1 sprites/canals.png 2 88 09 62 64 -61 -43
- -1 sprites/canals.png 82 88 09 62 64 -61 -51
- -1 sprites/canals.png 162 88 09 62 64 -1 -43
- -1 sprites/canals.png 242 88 09 59 64 -31 -28
- -1 sprites/canals.png 322 88 09 65 66 -33 -34
- -1 sprites/canals.png 402 88 09 59 64 -31 -28
- -1 sprites/canals.png 482 88 09 59 64 -31 -28
- -1 sprites/canals.png 562 88 09 62 64 -1 -43
- -1 sprites/canals.png 642 88 09 60 64 -61 -43
- -1 sprites/canals.png 722 88 09 62 66 -61 -43
- -1 sprites/canals.png 2 168 09 60 64 -1 -43
- -1 sprites/canals.png 82 168 09 59 64 -31 -28
- -1 sprites/canals.png 162 168 09 59 64 -31 -28
- -1 sprites/canals.png 242 168 09 59 64 -31 -28
- -1 sprites/canals.png 322 168 09 59 64 -31 -28
- -1 sprites/canals.png 402 168 09 60 64 -1 -43
- -1 sprites/canals.png 482 168 09 62 68 -61 -43
- -1 sprites/canals.png 562 168 09 60 64 -61 -43
- -1 sprites/canals.png 642 168 09 62 64 -1 -43
- -1 sprites/canals.png 722 168 09 59 64 -31 -36
- -1 sprites/canals.png 2 248 09 65 64 -31 -34
- -1 sprites/canals.png 82 248 09 59 64 -31 -36
- -1 sprites/canals.png 162 248 09 59 64 -31 -28
- -1 sprites/canals.png 242 248 09 62 64 -1 -51
- -1 sprites/canals.png 322 248 09 62 64 -61 -43
- -1 sprites/canals.png 402 248 09 62 64 -61 -51
- -1 sprites/canals.png 482 248 09 62 64 -1 -43
- -1 sprites/canals.png 562 248 09 59 64 -31 -28
- -1 sprites/canals.png 642 248 09 65 66 -33 -34
- -1 sprites/canals.png 722 248 09 59 64 -31 -28
- -1 sprites/canals.png 2 328 09 59 64 -31 -28
- -1 sprites/canals.png 82 328 09 62 64 -1 -43
- -1 sprites/canals.png 162 328 09 60 64 -61 -43
- -1 sprites/canals.png 242 328 09 62 66 -61 -43
- -1 sprites/canals.png 322 328 09 60 64 -1 -43
- -1 sprites/canals.png 402 328 09 59 64 -31 -28
- -1 sprites/canals.png 482 328 09 59 64 -31 -28
- -1 sprites/canals.png 562 328 09 59 64 -31 -28
- -1 sprites/canals.png 642 328 09 59 64 -31 -28
- -1 sprites/canals.png 722 328 09 60 64 -1 -43
- -1 sprites/canals.png 2 408 09 62 68 -61 -43
- -1 sprites/canals.png 82 408 09 60 64 -61 -43
- -1 sprites/canals.png 162 408 09 62 64 -1 -43
- -1 sprites/canals.png 242 408 09 37 70 -31 -6
- -1 sprites/canals.png 322 408 09 37 70 -31 0
- -1 sprites/canals.png 402 408 09 37 70 -37 0
- -1 sprites/canals.png 482 408 09 37 70 -37 -6
- -1 sprites/canals.png 562 408 09 31 64 -31 0
- -1 sprites/canals.png 642 408 09 31 64 -31 0
- -1 sprites/canals.png 722 408 09 31 64 -31 0
- -1 sprites/canals.png 2 488 09 37 64 -31 -6
- -1 sprites/canals.png 82 488 09 31 64 -31 0
- -1 sprites/canals.png 162 488 09 31 64 -31 0
- -1 sprites/canals.png 242 488 09 31 64 -31 0
- -1 sprites/canals.png 322 488 09 37 64 -31 -6
- -1 sprites/canals.png 402 488 09 20 20 0 0
+// Canal slopes
+ -1 sprites/canal_locks.png 66 8 09 23 64 -31 0
+ -1 sprites/canal_locks.png 146 8 09 39 64 -31 -8
+ -1 sprites/canal_locks.png 226 8 09 23 64 -31 0
+ -1 sprites/canal_locks.png 306 8 09 39 64 -31 -8
+// Lock sides
+ -1 sprites/canal_locks.png 386 8 09 59 64 -31 -36
+ -1 sprites/canal_locks.png 466 8 09 65 64 -31 -34
+ -1 sprites/canal_locks.png 546 8 09 59 64 -31 -36
+ -1 sprites/canal_locks.png 626 8 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 706 8 09 62 64 -1 -51
+ -1 sprites/canal_locks.png 2 88 09 62 64 -61 -43
+ -1 sprites/canal_locks.png 82 88 09 62 64 -61 -51
+ -1 sprites/canal_locks.png 162 88 09 62 64 -1 -43
+ -1 sprites/canal_locks.png 242 88 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 322 88 09 65 66 -33 -34
+ -1 sprites/canal_locks.png 402 88 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 482 88 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 562 88 09 62 64 -1 -43
+ -1 sprites/canal_locks.png 642 88 09 60 64 -61 -43
+ -1 sprites/canal_locks.png 722 88 09 62 66 -61 -43
+ -1 sprites/canal_locks.png 2 168 09 60 64 -1 -43
+ -1 sprites/canal_locks.png 82 168 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 162 168 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 242 168 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 322 168 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 402 168 09 60 64 -1 -43
+ -1 sprites/canal_locks.png 482 168 09 62 68 -61 -43
+ -1 sprites/canal_locks.png 562 168 09 60 64 -61 -43
+ -1 sprites/canal_locks.png 642 168 09 62 64 -1 -43
+ -1 sprites/canal_locks.png 722 168 09 59 64 -31 -36
+ -1 sprites/canal_locks.png 2 248 09 65 64 -31 -34
+ -1 sprites/canal_locks.png 82 248 09 59 64 -31 -36
+ -1 sprites/canal_locks.png 162 248 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 242 248 09 62 64 -1 -51
+ -1 sprites/canal_locks.png 322 248 09 62 64 -61 -43
+ -1 sprites/canal_locks.png 402 248 09 62 64 -61 -51
+ -1 sprites/canal_locks.png 482 248 09 62 64 -1 -43
+ -1 sprites/canal_locks.png 562 248 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 642 248 09 65 66 -33 -34
+ -1 sprites/canal_locks.png 722 248 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 2 328 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 82 328 09 62 64 -1 -43
+ -1 sprites/canal_locks.png 162 328 09 60 64 -61 -43
+ -1 sprites/canal_locks.png 242 328 09 62 66 -61 -43
+ -1 sprites/canal_locks.png 322 328 09 60 64 -1 -43
+ -1 sprites/canal_locks.png 402 328 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 482 328 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 562 328 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 642 328 09 59 64 -31 -28
+ -1 sprites/canal_locks.png 722 328 09 60 64 -1 -43
+ -1 sprites/canal_locks.png 2 408 09 62 68 -61 -43
+ -1 sprites/canal_locks.png 82 408 09 60 64 -61 -43
+ -1 sprites/canal_locks.png 162 408 09 62 64 -1 -43
+// Canal edges (temperate)
+ -1 sprites/canals.png 30 10 09 22 45 -11 -1
+ -1 sprites/canals.png 94 10 09 21 41 -8 10
+ -1 sprites/canals.png 142 10 09 21 42 -31 10
+ -1 sprites/canals.png 190 10 09 22 43 -31 -1
+ -1 sprites/canals.png 238 10 09 22 22 11 4
+ -1 sprites/canals.png 270 10 09 16 24 -11 15
+ -1 sprites/canals.png 302 10 09 23 23 -31 4
+ -1 sprites/canals.png 334 10 09 18 24 -11 -1
+ -1 sprites/canals.png 366 10 09 11 12 21 10
+ -1 sprites/canals.png 398 10 09 10 19 -8 21
+ -1 sprites/canals.png 430 10 09 10 11 -31 10
+ -1 sprites/canals.png 446 10 09 16 24 -11 -6
+// Canal icon
+ -1 sprites/canal_locks.png 242 408 09 20 20 0 0
+
+// Differentiation for the climates starts here
+
+// Canal edges (arctic snowy)
+ -1 * 4 01 05 01 \b12
+ -1 sprites/canals.png 30 40 09 22 45 -11 -1
+ -1 sprites/canals.png 94 40 09 21 41 -8 10
+ -1 sprites/canals.png 142 40 09 21 42 -31 10
+ -1 sprites/canals.png 190 40 09 22 43 -31 -1
+ -1 sprites/canals.png 238 40 09 22 22 11 4
+ -1 sprites/canals.png 270 40 09 16 24 -11 15
+ -1 sprites/canals.png 302 40 09 23 23 -31 4
+ -1 sprites/canals.png 334 40 09 18 24 -11 -1
+ -1 sprites/canals.png 366 40 09 11 12 21 10
+ -1 sprites/canals.png 398 40 09 10 19 -8 21
+ -1 sprites/canals.png 430 40 09 10 11 -31 10
+ -1 sprites/canals.png 446 40 09 16 24 -11 -6
+ -1 * 7 02 05 10 01 00 00 00
+
+// Canal edges (arctic normal)
+ -1 * 4 01 05 01 \b12
+ -1 sprites/canals.png 30 70 09 22 45 -11 -1
+ -1 sprites/canals.png 94 70 09 21 41 -8 10
+ -1 sprites/canals.png 142 70 09 21 42 -31 10
+ -1 sprites/canals.png 190 70 09 22 43 -31 -1
+ -1 sprites/canals.png 238 70 09 22 22 11 4
+ -1 sprites/canals.png 270 70 09 16 24 -11 15
+ -1 sprites/canals.png 302 70 09 23 23 -31 4
+ -1 sprites/canals.png 334 70 09 18 24 -11 -1
+ -1 sprites/canals.png 366 70 09 11 12 21 10
+ -1 sprites/canals.png 398 70 09 10 19 -8 21
+ -1 sprites/canals.png 430 70 09 10 11 -31 10
+ -1 sprites/canals.png 446 70 09 16 24 -11 -6
+ -1 * 7 02 05 11 01 00 00 00
+// Choose the right arctic canal edges
+ -1 * 14 02 05 12 81 81 00 FF 01 10 00 04 04 11 00
+ -1 * 6 07 83 01 \7! 01 01
+ -1 * 7 03 05 01 02 00 12 00
+
+// Canal edges (tropic desert)
+ -1 * 4 01 05 01 \b12
+ -1 sprites/canals.png 30 100 09 22 45 -11 -1
+ -1 sprites/canals.png 94 100 09 21 41 -8 10
+ -1 sprites/canals.png 142 100 09 21 42 -31 10
+ -1 sprites/canals.png 190 100 09 22 43 -31 -1
+ -1 sprites/canals.png 238 100 09 22 22 11 4
+ -1 sprites/canals.png 270 100 09 16 24 -11 15
+ -1 sprites/canals.png 302 100 09 23 23 -31 4
+ -1 sprites/canals.png 334 100 09 18 24 -11 -1
+ -1 sprites/canals.png 366 100 09 11 12 21 10
+ -1 sprites/canals.png 398 100 09 10 19 -8 21
+ -1 sprites/canals.png 430 100 09 10 11 -31 10
+ -1 sprites/canals.png 446 100 09 16 24 -11 -6
+ -1 * 7 02 05 13 01 00 00 00
+
+// Canal edges (tropic rainforest)
+ -1 * 4 01 05 01 \b12
+ -1 sprites/canals.png 30 130 09 22 45 -11 -1
+ -1 sprites/canals.png 94 130 09 21 41 -8 10
+ -1 sprites/canals.png 142 130 09 21 42 -31 10
+ -1 sprites/canals.png 190 130 09 22 43 -31 -1
+ -1 sprites/canals.png 238 130 09 22 22 11 4
+ -1 sprites/canals.png 270 130 09 16 24 -11 15
+ -1 sprites/canals.png 302 130 09 23 23 -31 4
+ -1 sprites/canals.png 334 130 09 18 24 -11 -1
+ -1 sprites/canals.png 366 130 09 11 12 21 10
+ -1 sprites/canals.png 398 130 09 10 19 -8 21
+ -1 sprites/canals.png 430 130 09 10 11 -31 10
+ -1 sprites/canals.png 446 130 09 16 24 -11 -6
+ -1 * 7 02 05 14 01 00 00 00
+// Choose the right tropic canal edges
+ -1 * 14 02 05 15 81 81 00 FF 01 13 00 01 01 14 00
+ -1 * 6 07 83 01 \7! 02 01
+ -1 * 7 03 05 01 02 00 15 00
+
+// Canal edges (toyland)
+ -1 * 4 01 05 01 \b12
+ -1 sprites/canals.png 30 160 09 22 45 -11 -1
+ -1 sprites/canals.png 94 160 09 21 41 -8 10
+ -1 sprites/canals.png 142 160 09 21 42 -31 10
+ -1 sprites/canals.png 190 160 09 22 43 -31 -1
+ -1 sprites/canals.png 238 160 09 22 22 11 4
+ -1 sprites/canals.png 270 160 09 16 24 -11 15
+ -1 sprites/canals.png 302 160 09 23 23 -31 4
+ -1 sprites/canals.png 334 160 09 18 24 -11 -1
+ -1 sprites/canals.png 366 160 09 11 12 21 10
+ -1 sprites/canals.png 398 160 09 10 19 -8 21
+ -1 sprites/canals.png 430 160 09 10 11 -31 10
+ -1 sprites/canals.png 446 160 09 16 24 -11 -6
+ -1 * 7 02 05 16 01 00 00 00
+ -1 * 6 07 83 01 \7! 03 01
+ -1 * 7 03 05 01 02 00 16 00
diff --git a/media/extra_grf/canals.png b/media/extra_grf/canals.png
index 47fdc3c0b2..f9f6da6f9f 100644
Binary files a/media/extra_grf/canals.png and b/media/extra_grf/canals.png differ
diff --git a/media/extra_grf/fix_graphics.nfo b/media/extra_grf/fix_graphics.nfo
index 6b76f4eca7..bc91f4e679 100644
--- a/media/extra_grf/fix_graphics.nfo
+++ b/media/extra_grf/fix_graphics.nfo
@@ -6,8 +6,8 @@
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
//
- -1 * 0 0C "Fixing (alignment) bugs in the orignal graphics. By Addi."
- -1 * 6 07 83 01 \7= 03 69
+ -1 * 0 0C "Fixing (alignment) bugs in the original graphics. By Addi and PaulC."
+ -1 * 6 07 83 01 \7= 03 7D
// Different graphics for same wood truck
-1 * 14 0A 04 01 87 0C 01 89 0C 01 07 0E 01 09 0E
-1 sprites/fix_graphics.png 82 8 09 16 22 -6 -7
@@ -79,6 +79,11 @@
-1 sprites/fix_graphics.png 370 72 09 35 48 -23 -7
-1 sprites/fix_graphics.png 434 72 09 35 48 -23 -7
-1 sprites/fix_graphics.png 498 72 09 21 49 -24 3
+// Misaligned maglev bridge heads
+ -1 * 8 0A 02 01 12 11 02 14 11
+ -1 sprites/fix_graphics.png 322 486 09 35 48 -23 -7
+ -1 sprites/fix_graphics.png 386 486 09 35 48 -23 -7
+ -1 sprites/fix_graphics.png 450 486 09 21 49 -24 3
// Improperly cut cinema
-1 * 5 0A 01 02 34 11
-1 sprites/fix_graphics.png 578 72 09 31 64 -31 0
@@ -198,3 +203,132 @@
// GUI sprite
-1 * 5 0A 01 01 \w2600
-1 sprites/fix_graphics.png 433 298 09 15 40 0 5
+// Make level crossings in tropical climate look normal
+ -1 * 6 07 83 01 \7! 02 19
+ -1 * 14 0A 04 04 5A 05 08 62 05 08 6E 05 04 7A 05
+ -1 sprites/fix_graphics.png 2 390 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 82 390 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 162 390 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 242 390 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 322 390 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 402 390 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 482 390 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 562 390 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 642 390 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 722 390 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 2 438 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 82 438 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 162 438 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 242 438 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 322 438 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 402 438 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 482 438 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 562 438 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 642 438 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 722 438 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 2 486 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 82 486 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 162 486 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 242 486 09 31 64 -31 0
+// Fix transparency of steel mill
+ -1 * 6 07 83 01 \7! 00 0A
+ -1 * 5 0A 01 04 4D 08
+ -1 sprites/fix_graphics.png 610 486 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 690 486 09 61 59 -31 -33
+ -1 sprites/fix_graphics.png 2 566 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 82 566 09 50 51 -25 -21
+ -1 * 5 0A 01 04 58 08
+ -1 sprites/fix_graphics.png 162 566 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 242 566 09 52 59 -31 -24
+ -1 sprites/fix_graphics.png 306 566 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 386 566 09 44 51 -25 -15
+// Fix transparency of oil well
+ -1 * 6 07 83 01 \7= 03 10
+ -1 * 5 0A 01 06 7E 08
+ -1 sprites/fix_graphics.png 482 566 09 50 31 -11 -28
+ -1 sprites/fix_graphics.png 530 566 09 47 31 -11 -25
+ -1 sprites/fix_graphics.png 578 566 09 47 31 -11 -25
+ -1 sprites/fix_graphics.png 626 566 09 47 31 -11 -25
+ -1 sprites/fix_graphics.png 674 566 09 49 31 -11 -27
+ -1 sprites/fix_graphics.png 722 566 09 52 31 -11 -30
+ -1 * 6 07 83 01 \7! 00 02
+ -1 * 5 0A 01 01 7D 08
+ -1 sprites/fix_graphics.png 2 630 09 31 64 -31 0
+ -1 * 6 07 83 01 \7! 01 02
+ -1 * 5 0A 01 01 7D 08
+ -1 sprites/fix_graphics.png 114 630 09 31 64 -31 0
+ -1 * 6 07 83 01 \7! 02 02
+ -1 * 5 0A 01 01 7D 08
+ -1 sprites/fix_graphics.png 226 630 09 31 64 -31 0
+ -1 * 6 07 83 01 \7! 03 0F
+ -1 * 5 0A 01 06 91 04
+// Fix toyland overlay for PBS on maglev
+ -1 sprites/fix_graphics.png 338 630 09 16 30 -14 8
+ -1 sprites/fix_graphics.png 386 630 09 16 30 -14 8
+ -1 sprites/fix_graphics.png 434 630 01 7 40 -19 4
+ -1 sprites/fix_graphics.png 482 630 01 7 40 -19 20
+ -1 sprites/fix_graphics.png 530 630 01 19 12 11 6
+ -1 sprites/fix_graphics.png 562 630 01 19 12 -21 6
+// Fix toyland monorail bridge alignment
+ -1 * 8 0A 02 01 EA 10 02 EC 10
+ -1 sprites/fix_graphics.png 610 630 09 35 48 -23 -7
+ -1 sprites/fix_graphics.png 674 630 09 35 48 -23 -7
+ -1 sprites/fix_graphics.png 738 630 09 21 49 -24 3
+// Fix toyland maglev bridge alignment
+ -1 * 8 0A 02 01 12 11 02 14 11
+ -1 sprites/fix_graphics.png 18 678 09 35 48 -23 -7
+ -1 sprites/fix_graphics.png 82 678 09 35 48 -23 -7
+ -1 sprites/fix_graphics.png 146 678 09 21 49 -24 3
+// Fix city airport's grass for temperate
+ -1 * 6 07 83 01 \7! 00 0A
+ -1 * 5 0A 01 09 4C 0A
+ -1 sprites/fix_graphics.png 242 678 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 322 678 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 402 678 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 482 678 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 562 678 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 642 678 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 722 678 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 2 726 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 82 726 09 31 64 -31 0
+// Fix city airport's grass for arctic
+ -1 * 6 07 83 01 \7! 01 0A
+ -1 * 5 0A 01 09 4C 0A
+ -1 sprites/fix_graphics.png 194 726 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 274 726 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 354 726 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 434 726 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 514 726 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 594 726 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 674 726 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 2 774 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 82 774 09 31 64 -31 0
+// Fix city airport's grass for tropical
+ -1 * 6 07 83 01 \7! 02 0A
+ -1 * 5 0A 01 09 4C 0A
+ -1 sprites/fix_graphics.png 194 774 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 274 774 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 354 774 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 434 774 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 514 774 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 594 774 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 674 774 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 2 822 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 82 822 09 31 64 -31 0
+// Fix city airport's grass for toyland
+ -1 * 6 07 83 01 \7! 03 0A
+ -1 * 5 0A 01 09 4C 0A
+ -1 sprites/fix_graphics.png 194 822 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 274 822 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 354 822 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 434 822 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 514 822 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 594 822 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 674 822 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 2 870 09 31 64 -31 0
+ -1 sprites/fix_graphics.png 82 870 09 31 64 -31 0
+// Fix buoy in-game; don't show black outline
+ -1 * 4 01 05 01 \b1
+ -1 sprites/fix_graphics.png 575 490 09 11 7 7 4
+ -1 * 7 02 05 17 01 00 00 00
+ -1 * 7 03 05 01 08 00 17 00
diff --git a/media/extra_grf/fix_graphics.png b/media/extra_grf/fix_graphics.png
index ec95b6e346..57c9aac890 100644
Binary files a/media/extra_grf/fix_graphics.png and b/media/extra_grf/fix_graphics.png differ
diff --git a/src/ai/api/ai_changelog.hpp b/src/ai/api/ai_changelog.hpp
index 40a687f508..be70739ad9 100644
--- a/src/ai/api/ai_changelog.hpp
+++ b/src/ai/api/ai_changelog.hpp
@@ -15,6 +15,11 @@
* functions may still be available if you return an older API version
* in GetAPIVersion() in info.nut.
*
+ * \b 1.1.4
+ *
+ * API additions:
+ * \li AIVehicle::ERR_VEHICLE_TOO_LONG in case vehicle length limit is reached.
+ *
* \b 1.1.3
*
* No changes
diff --git a/src/ai/api/ai_object.hpp b/src/ai/api/ai_object.hpp
index 06d0f9edb2..02311745ff 100644
--- a/src/ai/api/ai_object.hpp
+++ b/src/ai/api/ai_object.hpp
@@ -37,6 +37,7 @@ typedef bool (AIModeProc)();
class AIObject : public SimpleCountedObject {
friend void CcAI(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2);
friend class AIInstance;
+friend class AIController;
protected:
/**
* Executes a raw DoCommand for the AI.
diff --git a/src/ai/api/ai_vehicle.hpp b/src/ai/api/ai_vehicle.hpp
index 9477e879e3..dbce04811f 100644
--- a/src/ai/api/ai_vehicle.hpp
+++ b/src/ai/api/ai_vehicle.hpp
@@ -65,6 +65,8 @@ public:
/** Vehicle is without power */
ERR_VEHICLE_NO_POWER, // [STR_ERROR_TRAIN_START_NO_CATENARY]
+ /** Vehicle would get too long during construction. */
+ ERR_VEHICLE_TOO_LONG, // [STR_ERROR_TRAIN_TOO_LONG]
};
/**
diff --git a/src/ai/api/ai_vehicle.hpp.sq b/src/ai/api/ai_vehicle.hpp.sq
index 98fedbf332..e6caa5ae2c 100644
--- a/src/ai/api/ai_vehicle.hpp.sq
+++ b/src/ai/api/ai_vehicle.hpp.sq
@@ -47,6 +47,7 @@ void SQAIVehicle_Register(Squirrel *engine)
SQAIVehicle.DefSQConst(engine, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT, "ERR_VEHICLE_NOT_IN_DEPOT");
SQAIVehicle.DefSQConst(engine, AIVehicle::ERR_VEHICLE_IN_FLIGHT, "ERR_VEHICLE_IN_FLIGHT");
SQAIVehicle.DefSQConst(engine, AIVehicle::ERR_VEHICLE_NO_POWER, "ERR_VEHICLE_NO_POWER");
+ SQAIVehicle.DefSQConst(engine, AIVehicle::ERR_VEHICLE_TOO_LONG, "ERR_VEHICLE_TOO_LONG");
SQAIVehicle.DefSQConst(engine, AIVehicle::VT_RAIL, "VT_RAIL");
SQAIVehicle.DefSQConst(engine, AIVehicle::VT_ROAD, "VT_ROAD");
SQAIVehicle.DefSQConst(engine, AIVehicle::VT_WATER, "VT_WATER");
@@ -95,6 +96,7 @@ void SQAIVehicle_Register(Squirrel *engine)
AIError::RegisterErrorMap(STR_ERROR_SHIP_MUST_BE_STOPPED_INSIDE_DEPOT, AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
AIError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT, AIVehicle::ERR_VEHICLE_IN_FLIGHT);
AIError::RegisterErrorMap(STR_ERROR_TRAIN_START_NO_CATENARY, AIVehicle::ERR_VEHICLE_NO_POWER);
+ AIError::RegisterErrorMap(STR_ERROR_TRAIN_TOO_LONG, AIVehicle::ERR_VEHICLE_TOO_LONG);
AIError::RegisterErrorMapString(AIVehicle::ERR_VEHICLE_TOO_MANY, "ERR_VEHICLE_TOO_MANY");
AIError::RegisterErrorMapString(AIVehicle::ERR_VEHICLE_NOT_AVAILABLE, "ERR_VEHICLE_NOT_AVAILABLE");
@@ -108,6 +110,7 @@ void SQAIVehicle_Register(Squirrel *engine)
AIError::RegisterErrorMapString(AIVehicle::ERR_VEHICLE_NOT_IN_DEPOT, "ERR_VEHICLE_NOT_IN_DEPOT");
AIError::RegisterErrorMapString(AIVehicle::ERR_VEHICLE_IN_FLIGHT, "ERR_VEHICLE_IN_FLIGHT");
AIError::RegisterErrorMapString(AIVehicle::ERR_VEHICLE_NO_POWER, "ERR_VEHICLE_NO_POWER");
+ AIError::RegisterErrorMapString(AIVehicle::ERR_VEHICLE_TOO_LONG, "ERR_VEHICLE_TOO_LONG");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::IsValidVehicle, "IsValidVehicle", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetNumWagons, "GetNumWagons", 2, ".i");
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index d89752e085..25830d4bef 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -4713,15 +4713,15 @@ static void FeatureNewName(ByteReader *buf)
if (!generic) {
Engine *e = GetNewEngine(_cur_grffile, (VehicleType)feature, id, HasBit(_cur_grfconfig->flags, GCF_STATIC));
if (e == NULL) break;
- StringID string = AddGRFString(_cur_grffile->grfid, e->index, lang, new_scheme, name, e->info.string_id);
+ StringID string = AddGRFString(_cur_grffile->grfid, e->index, lang, false, new_scheme, name, e->info.string_id);
e->info.string_id = string;
} else {
- AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED);
+ AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, true, name, STR_UNDEFINED);
}
break;
case GSF_INDUSTRIES: {
- AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED);
+ AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, true, name, STR_UNDEFINED);
break;
}
@@ -4733,7 +4733,7 @@ static void FeatureNewName(ByteReader *buf)
grfmsg(1, "FeatureNewName: Attempt to name undefined station 0x%X, ignoring", GB(id, 0, 8));
} else {
StationClassID cls_id = _cur_grffile->stations[GB(id, 0, 8)]->cls_id;
- StationClass::SetName(cls_id, AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED));
+ StationClass::SetName(cls_id, AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, false, name, STR_UNDEFINED));
}
break;
@@ -4741,7 +4741,7 @@ static void FeatureNewName(ByteReader *buf)
if (_cur_grffile->stations == NULL || _cur_grffile->stations[GB(id, 0, 8)] == NULL) {
grfmsg(1, "FeatureNewName: Attempt to name undefined station 0x%X, ignoring", GB(id, 0, 8));
} else {
- _cur_grffile->stations[GB(id, 0, 8)]->name = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED);
+ _cur_grffile->stations[GB(id, 0, 8)]->name = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, false, name, STR_UNDEFINED);
}
break;
@@ -4749,7 +4749,7 @@ static void FeatureNewName(ByteReader *buf)
if (_cur_grffile->airtspec == NULL || _cur_grffile->airtspec[GB(id, 0, 8)] == NULL) {
grfmsg(1, "FeatureNewName: Attempt to name undefined airport tile 0x%X, ignoring", GB(id, 0, 8));
} else {
- _cur_grffile->airtspec[GB(id, 0, 8)]->name = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED);
+ _cur_grffile->airtspec[GB(id, 0, 8)]->name = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, false, name, STR_UNDEFINED);
}
break;
@@ -4757,7 +4757,7 @@ static void FeatureNewName(ByteReader *buf)
if (_cur_grffile->housespec == NULL || _cur_grffile->housespec[GB(id, 0, 8)] == NULL) {
grfmsg(1, "FeatureNewName: Attempt to name undefined house 0x%X, ignoring.", GB(id, 0, 8));
} else {
- _cur_grffile->housespec[GB(id, 0, 8)]->building_name = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED);
+ _cur_grffile->housespec[GB(id, 0, 8)]->building_name = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, false, name, STR_UNDEFINED);
}
break;
@@ -4766,7 +4766,7 @@ static void FeatureNewName(ByteReader *buf)
case 0xD2:
case 0xD3:
case 0xDC:
- AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_UNDEFINED);
+ AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, true, name, STR_UNDEFINED);
break;
default:
@@ -5436,11 +5436,11 @@ static void ScanInfo(ByteReader *buf)
/* GRF IDs starting with 0xFF are reserved for internal TTDPatch use */
if (GB(grfid, 24, 8) == 0xFF) SetBit(_cur_grfconfig->flags, GCF_SYSTEM);
- AddGRFTextToList(&_cur_grfconfig->name->text, 0x7F, grfid, name);
+ AddGRFTextToList(&_cur_grfconfig->name->text, 0x7F, grfid, false, name);
if (buf->HasData()) {
const char *info = buf->ReadString();
- AddGRFTextToList(&_cur_grfconfig->info->text, 0x7F, grfid, info);
+ AddGRFTextToList(&_cur_grfconfig->info->text, 0x7F, grfid, true, info);
}
/* GLS_INFOSCAN only looks for the action 8, so we can skip the rest of the file */
@@ -5607,7 +5607,7 @@ static void GRFLoadError(ByteReader *buf)
if (buf->HasData()) {
const char *message = buf->ReadString();
- error->custom_message = TranslateTTDPatchCodes(_cur_grffile->grfid, lang, message);
+ error->custom_message = TranslateTTDPatchCodes(_cur_grffile->grfid, lang, true, message);
} else {
grfmsg(7, "GRFLoadError: No custom message supplied.");
error->custom_message = strdup("");
@@ -5619,7 +5619,7 @@ static void GRFLoadError(ByteReader *buf)
if (buf->HasData()) {
const char *data = buf->ReadString();
- error->data = TranslateTTDPatchCodes(_cur_grffile->grfid, lang, data);
+ error->data = TranslateTTDPatchCodes(_cur_grffile->grfid, lang, true, data);
} else {
grfmsg(7, "GRFLoadError: No message data supplied.");
error->data = strdup("");
@@ -6157,11 +6157,11 @@ static void FeatureTownName(ByteReader *buf)
const char *name = buf->ReadString();
- char *lang_name = TranslateTTDPatchCodes(grfid, lang, name);
+ char *lang_name = TranslateTTDPatchCodes(grfid, lang, false, name);
grfmsg(6, "FeatureTownName: lang 0x%X -> '%s'", lang, lang_name);
free(lang_name);
- townname->name[nb_gen] = AddGRFString(grfid, id, lang, new_scheme, name, STR_UNDEFINED);
+ townname->name[nb_gen] = AddGRFString(grfid, id, lang, new_scheme, false, name, STR_UNDEFINED);
lang = buf->ReadByte();
} while (lang != 0);
@@ -6201,7 +6201,7 @@ static void FeatureTownName(ByteReader *buf)
townname->partlist[id][i].parts[j].data.id = ref_id;
} else {
const char *text = buf->ReadString();
- townname->partlist[id][i].parts[j].data.text = TranslateTTDPatchCodes(grfid, 0, text);
+ townname->partlist[id][i].parts[j].data.text = TranslateTTDPatchCodes(grfid, 0, false, text);
grfmsg(6, "FeatureTownName: part %d, text %d, '%s' (with probability %d)", i, j, townname->partlist[id][i].parts[j].data.text, prob);
}
townname->partlist[id][i].parts[j].prob = prob;
@@ -6498,21 +6498,21 @@ static void TranslateGRFStrings(ByteReader *buf)
* new_scheme has to be true as well. A language id of 0x7F will be
* overridden by a non-generic id, so this will not change anything if
* a string has been provided specifically for this language. */
- AddGRFString(grfid, first_id + i, 0x7F, true, string, STR_UNDEFINED);
+ AddGRFString(grfid, first_id + i, 0x7F, true, true, string, STR_UNDEFINED);
}
}
/** Callback function for 'INFO'->'NAME' to add a translation to the newgrf name. */
static bool ChangeGRFName(byte langid, const char *str)
{
- AddGRFTextToList(&_cur_grfconfig->name->text, langid, _cur_grfconfig->ident.grfid, str);
+ AddGRFTextToList(&_cur_grfconfig->name->text, langid, _cur_grfconfig->ident.grfid, false, str);
return true;
}
/** Callback function for 'INFO'->'DESC' to add a translation to the newgrf description. */
static bool ChangeGRFDescription(byte langid, const char *str)
{
- AddGRFTextToList(&_cur_grfconfig->info->text, langid, _cur_grfconfig->ident.grfid, str);
+ AddGRFTextToList(&_cur_grfconfig->info->text, langid, _cur_grfconfig->ident.grfid, true, str);
return true;
}
@@ -6592,14 +6592,14 @@ static GRFParameterInfo *_cur_parameter; ///< The parameter which info is curren
/** Callback function for 'INFO'->'PARAM'->param_num->'NAME' to set the name of a parameter. */
static bool ChangeGRFParamName(byte langid, const char *str)
{
- AddGRFTextToList(&_cur_parameter->name, langid, _cur_grfconfig->ident.grfid, str);
+ AddGRFTextToList(&_cur_parameter->name, langid, _cur_grfconfig->ident.grfid, false, str);
return true;
}
/** Callback function for 'INFO'->'PARAM'->param_num->'DESC' to set the description of a parameter. */
static bool ChangeGRFParamDescription(byte langid, const char *str)
{
- AddGRFTextToList(&_cur_parameter->desc, langid, _cur_grfconfig->ident.grfid, str);
+ AddGRFTextToList(&_cur_parameter->desc, langid, _cur_grfconfig->ident.grfid, true, str);
return true;
}
@@ -6779,10 +6779,10 @@ static bool ChangeGRFParamValueNames(ByteReader *buf)
SmallPair *val_name = _cur_parameter->value_names.Find(id);
if (val_name != _cur_parameter->value_names.End()) {
- AddGRFTextToList(&val_name->second, langid, _cur_grfconfig->ident.grfid, name_string);
+ AddGRFTextToList(&val_name->second, langid, _cur_grfconfig->ident.grfid, false, name_string);
} else {
GRFText *list = NULL;
- AddGRFTextToList(&list, langid, _cur_grfconfig->ident.grfid, name_string);
+ AddGRFTextToList(&list, langid, _cur_grfconfig->ident.grfid, false, name_string);
_cur_parameter->value_names.Insert(id, list);
}
diff --git a/src/newgrf.h b/src/newgrf.h
index 82430f6884..5d90b6a64b 100644
--- a/src/newgrf.h
+++ b/src/newgrf.h
@@ -27,6 +27,8 @@ enum CanalFeature {
CF_DOCKS,
CF_RIVER_SLOPE,
CF_RIVER_EDGE,
+ CF_RIVER_GUI,
+ CF_BUOY,
CF_END,
};
diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp
index a4de993998..043c12b1aa 100644
--- a/src/newgrf_text.cpp
+++ b/src/newgrf_text.cpp
@@ -385,13 +385,14 @@ struct UnmappedChoiceList : ZeroedMemoryAllocator {
/**
* Translate TTDPatch string codes into something OpenTTD can handle (better).
- * @param grfid The (NewGRF) ID associated with this string
- * @param language_id The (NewGRF) language ID associated with this string.
- * @param str The string to translate.
- * @param [out] olen The length of the final string.
+ * @param grfid The (NewGRF) ID associated with this string
+ * @param language_id The (NewGRF) language ID associated with this string.
+ * @param allow_newlines Whether newlines are allowed in the string or not.
+ * @param str The string to translate.
+ * @param [out] olen The length of the final string.
* @return The translated string.
*/
-char *TranslateTTDPatchCodes(uint32 grfid, uint8 language_id, const char *str, int *olen)
+char *TranslateTTDPatchCodes(uint32 grfid, uint8 language_id, bool allow_newlines, const char *str, int *olen)
{
char *tmp = MallocT(strlen(str) * 10 + 1); // Allocate space to allow for expansion
char *d = tmp;
@@ -430,7 +431,13 @@ char *TranslateTTDPatchCodes(uint32 grfid, uint8 language_id, const char *str, i
*d++ = *str++;
break;
case 0x0A: break;
- case 0x0D: *d++ = 0x0A; break;
+ case 0x0D:
+ if (allow_newlines) {
+ *d++ = 0x0A;
+ } else {
+ grfmsg(1, "Detected newline in string that does not allow one");
+ }
+ break;
case 0x0E: d += Utf8Encode(d, SCC_TINYFONT); break;
case 0x0F: d += Utf8Encode(d, SCC_BIGFONT); break;
case 0x1F:
@@ -639,13 +646,14 @@ void AddGRFTextToList(GRFText **list, GRFText *text_to_add)
* @param list The list where the text should be added to.
* @param langid The language of the new text.
* @param grfid The grfid where this string is defined.
+ * @param allow_newlines Whether newlines are allowed in this string.
* @param text_to_add The text to add to the list.
* @note All text-codes will be translated.
*/
-void AddGRFTextToList(struct GRFText **list, byte langid, uint32 grfid, const char *text_to_add)
+void AddGRFTextToList(struct GRFText **list, byte langid, uint32 grfid, bool allow_newlines, const char *text_to_add)
{
int len;
- char *translatedtext = TranslateTTDPatchCodes(grfid, langid, text_to_add, &len);
+ char *translatedtext = TranslateTTDPatchCodes(grfid, langid, allow_newlines, text_to_add, &len);
GRFText *newtext = GRFText::New(langid, translatedtext, len);
free(translatedtext);
@@ -682,7 +690,7 @@ GRFText *DuplicateGRFText(GRFText *orig)
/**
* Add the new read string into our structure.
*/
-StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid_to_add, bool new_scheme, const char *text_to_add, StringID def_string)
+StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid_to_add, bool new_scheme, bool allow_newlines, const char *text_to_add, StringID def_string)
{
char *translatedtext;
uint id;
@@ -698,9 +706,9 @@ StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid_to_add, bool ne
langid_to_add = GRFLX_ENGLISH;
} else {
StringID ret = STR_EMPTY;
- if (langid_to_add & GRFLB_GERMAN) ret = AddGRFString(grfid, stringid, GRFLX_GERMAN, true, text_to_add, def_string);
- if (langid_to_add & GRFLB_FRENCH) ret = AddGRFString(grfid, stringid, GRFLX_FRENCH, true, text_to_add, def_string);
- if (langid_to_add & GRFLB_SPANISH) ret = AddGRFString(grfid, stringid, GRFLX_SPANISH, true, text_to_add, def_string);
+ if (langid_to_add & GRFLB_GERMAN) ret = AddGRFString(grfid, stringid, GRFLX_GERMAN, true, allow_newlines, text_to_add, def_string);
+ if (langid_to_add & GRFLB_FRENCH) ret = AddGRFString(grfid, stringid, GRFLX_FRENCH, true, allow_newlines, text_to_add, def_string);
+ if (langid_to_add & GRFLB_SPANISH) ret = AddGRFString(grfid, stringid, GRFLX_SPANISH, true, allow_newlines, text_to_add, def_string);
return ret;
}
}
@@ -715,7 +723,7 @@ StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid_to_add, bool ne
if (id == lengthof(_grf_text)) return STR_EMPTY;
int len;
- translatedtext = TranslateTTDPatchCodes(grfid, langid_to_add, text_to_add, &len);
+ translatedtext = TranslateTTDPatchCodes(grfid, langid_to_add, allow_newlines, text_to_add, &len);
GRFText *newtext = GRFText::New(langid_to_add, translatedtext, len);
diff --git a/src/newgrf_text.h b/src/newgrf_text.h
index 3531f5b94d..4a9d96af16 100644
--- a/src/newgrf_text.h
+++ b/src/newgrf_text.h
@@ -19,16 +19,16 @@
/** This character, the thorn ('รพ'), indicates a unicode string to NFO. */
static const WChar NFO_UTF8_IDENTIFIER = 0x00DE;
-StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, const char *text_to_add, StringID def_string);
+StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, bool allow_newlines, const char *text_to_add, StringID def_string);
StringID GetGRFStringID(uint32 grfid, uint16 stringid);
const char *GetGRFStringFromGRFText(const struct GRFText *text);
const char *GetGRFStringPtr(uint16 stringid);
void CleanUpStrings();
void SetCurrentGrfLangID(byte language_id);
-char *TranslateTTDPatchCodes(uint32 grfid, uint8 language_id, const char *str, int *olen = NULL);
+char *TranslateTTDPatchCodes(uint32 grfid, uint8 language_id, bool allow_newlines, const char *str, int *olen = NULL);
struct GRFText *DuplicateGRFText(struct GRFText *orig);
void AddGRFTextToList(struct GRFText **list, struct GRFText *text_to_add);
-void AddGRFTextToList(struct GRFText **list, byte langid, uint32 grfid, const char *text_to_add);
+void AddGRFTextToList(struct GRFText **list, byte langid, uint32 grfid, bool allow_newlines, const char *text_to_add);
void AddGRFTextToList(struct GRFText **list, const char *text_to_add);
void CleanUpGRFText(struct GRFText *grftext);
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 6dafe74b4c..4d482b65c3 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -23,6 +23,7 @@
#include "newgrf_cargo.h"
#include "newgrf_debug.h"
#include "newgrf_station.h"
+#include "newgrf_canal.h" /* For the buoy */
#include "pathfinder/yapf/yapf_cache.h"
#include "road_internal.h" /* For drawing catenary/checking road removal */
#include "autoslope.h"
@@ -2641,7 +2642,11 @@ draw_default_foundation:
}
}
- if (IsBuoy(ti->tile) || IsDock(ti->tile) || (IsOilRig(ti->tile) && IsTileOnWater(ti->tile))) {
+ if (IsBuoy(ti->tile)) {
+ DrawWaterClassGround(ti);
+ SpriteID sprite = GetCanalSprite(CF_BUOY, ti->tile);
+ if (sprite != 0) total_offset = sprite - SPR_IMG_BUOY;
+ } else if (IsDock(ti->tile) || (IsOilRig(ti->tile) && IsTileOnWater(ti->tile))) {
if (ti->tileh == SLOPE_FLAT) {
DrawWaterClassGround(ti);
} else {