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
commitfc216aeeb86f5e84db06f51ad1e3172d6c343b3b (patch)
treec6bcdba91fc3571e2f542bbd9644b62991808118 /src/newgrf.cpp
parentc0cdfea97d298bf64f507e48e711888ef6681db6 (diff)
downloadopenttd-fc216aeeb86f5e84db06f51ad1e3172d6c343b3b.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