(svn r23075) -Codechange: Add GetGRF() and GetGRFID() methods to Engine and Vehicle to simplify code.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user