(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.

This commit is contained in:
2008-04-29 21:31:29 +00:00
parent 1d01390fa6
commit a00371c8db
49 changed files with 654 additions and 435 deletions

View File

@@ -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;