diff options
author | peter1138 <peter1138@openttd.org> | 2008-06-12 09:25:04 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-06-12 09:25:04 +0000 |
commit | 1c79b92989d9381f52e8a4de95b18ed4f4ff1f4e (patch) | |
tree | 5271f6c24830aa1d0efd64d5316ce3687bd2f902 /src | |
parent | ea4c46da990280256d9ad8aa911b3bdb0d3a3967 (diff) | |
download | openttd-1c79b92989d9381f52e8a4de95b18ed4f4ff1f4e.tar.xz |
(svn r13482) -Codechange: Use "extended bytes" in Actions 3 and 4 for vehicles
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 353034423..1ce7a2832 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -2948,7 +2948,7 @@ static void VehicleMapSpriteGroup(byte *buf, byte feature, uint8 idcount) EngineID *engines = AllocaM(EngineID, idcount); for (uint i = 0; i < idcount; i++) { - engines[i] = GetNewEngine(_cur_grffile, (VehicleType)feature, grf_load_byte(&buf))->index; + engines[i] = GetNewEngine(_cur_grffile, (VehicleType)feature, grf_load_extended(&buf))->index; if (!wagover) last_engines[i] = engines[i]; } @@ -3281,7 +3281,14 @@ static void FeatureNewName(byte *buf, size_t len) uint8 lang = grf_load_byte(&buf); uint8 num = grf_load_byte(&buf); bool generic = HasBit(lang, 7); - uint16 id = generic ? grf_load_word(&buf) : grf_load_byte(&buf); + uint16 id; + if (generic) { + id = grf_load_word(&buf); + } else if (feature <= GSF_AIRCRAFT) { + id = grf_load_extended(&buf); + } else { + id = grf_load_byte(&buf); + } ClrBit(lang, 7); |