(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:
peter1138
2008-04-29 21:31:29 +00:00
parent 6056d1fb31
commit 45034bc522
49 changed files with 654 additions and 435 deletions

View File

@@ -168,7 +168,7 @@ SpriteID Aircraft::GetImage(Direction direction) const
SpriteID sprite = GetCustomVehicleSprite(this, direction);
if (sprite != 0) return sprite;
spritenum = _orig_aircraft_vehicle_info[this->engine_type - AIRCRAFT_ENGINES_INDEX].image_index;
spritenum = GetEngine(this->engine_type)->image_index;
}
return direction + _aircraft_sprite[spritenum];
@@ -196,7 +196,7 @@ static SpriteID GetAircraftIcon(EngineID engine)
SpriteID sprite = GetCustomVehicleIcon(engine, DIR_W);
if (sprite != 0) return sprite;
spritenum = _orig_aircraft_vehicle_info[engine - AIRCRAFT_ENGINES_INDEX].image_index;
spritenum = GetEngine(engine)->image_index;
}
return 6 + _aircraft_sprite[spritenum];