summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-09-02 18:45:15 +0000
committerrubidium <rubidium@openttd.org>2008-09-02 18:45:15 +0000
commit9ca1972e010d38db34b1a117f55818c5b7dca897 (patch)
treec6bcdba91fc3571e2f542bbd9644b62991808118 /src/newgrf.cpp
parent97b1eb2c6fa4e1d6bc453abf02f211cbcb896902 (diff)
downloadopenttd-9ca1972e010d38db34b1a117f55818c5b7dca897.tar.xz
(svn r14229) -Feature: allow overriding the palette of the base GRFs. This way you can play with NewGRFs made for the Windows palette with the DOS palettes base GRFs (and vice versa). Note that for this to work correctly ALL NewGRFs must use the same palette; mix and match is not yet supported.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index a701b2f37..dea96f88c 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -3652,7 +3652,11 @@ bool GetGlobalVariable(byte param, uint32 *value)
}
case 0x0D: // TTD Version, 00=DOS, 01=Windows
- *value = _use_palette;
+ if (_palette_remap_grf[_file_index]) {
+ *value = !_use_palette;
+ } else {
+ *value = _use_palette;
+ }
return true;
case 0x0E: // Y-offset for train sprites