diff options
author | peter1138 <peter1138@openttd.org> | 2008-04-29 21:31:29 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-04-29 21:31:29 +0000 |
commit | a00371c8db9d3b944d901ea0468eb58fe51418a7 (patch) | |
tree | 82b8c0d69acb1c38843e4fcf0b11f46a057ef270 /src/ship_cmd.cpp | |
parent | 1d01390fa6d6ca83cd0cb148137d2a81749b380d (diff) | |
download | openttd-a00371c8db9d3b944d901ea0468eb58fe51418a7.tar.xz |
(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.
Diffstat (limited to 'src/ship_cmd.cpp')
-rw-r--r-- | src/ship_cmd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index 12881d1e0..7fe3418a2 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -14,6 +14,7 @@ #include "station_base.h" #include "news_func.h" #include "engine_func.h" +#include "engine_base.h" #include "player_func.h" #include "player_base.h" #include "npf.h" @@ -65,7 +66,7 @@ static SpriteID GetShipIcon(EngineID engine) SpriteID sprite = GetCustomVehicleIcon(engine, DIR_W); if (sprite != 0) return sprite; - spritenum = _orig_ship_vehicle_info[engine - SHIP_ENGINES_INDEX].image_index; + spritenum = GetEngine(engine)->image_index; } return 6 + _ship_sprites[spritenum]; @@ -97,7 +98,7 @@ SpriteID Ship::GetImage(Direction direction) const SpriteID sprite = GetCustomVehicleSprite(this, direction); if (sprite != 0) return sprite; - spritenum = _orig_ship_vehicle_info[this->engine_type - SHIP_ENGINES_INDEX].image_index; + spritenum = GetEngine(this->engine_type)->image_index; } return _ship_sprites[spritenum] + direction; |