(svn r23075) -Codechange: Add GetGRF() and GetGRFID() methods to Engine and Vehicle to simplify code.

This commit is contained in:
frosch
2011-11-01 00:23:41 +00:00
parent 72cd855978
commit acc3c75951
17 changed files with 84 additions and 64 deletions

View File

@@ -118,6 +118,8 @@ struct LoadgameState;
extern bool LoadOldVehicle(LoadgameState *ls, int num);
extern void FixOldVehicles();
struct GRFFile;
/** %Vehicle data structure. */
struct Vehicle : VehiclePool::PoolItem<&_vehicle_pool>, BaseVehicle {
private:
@@ -347,6 +349,9 @@ public:
*/
virtual SpriteID GetImage(Direction direction) const { return 0; }
const GRFFile *GetGRF() const;
uint32 GetGRFID() const;
/**
* Invalidates cached NewGRF variables
* @see InvalidateNewGRFCacheOfChain