summaryrefslogtreecommitdiff
path: root/src/vehicle_base.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-11-01 00:23:41 +0000
committerfrosch <frosch@openttd.org>2011-11-01 00:23:41 +0000
commitacc3c75951c4db0873db794b657697774f0ff9e9 (patch)
tree2b7e5f953286b09c3c07688c9e8c49ee953c5adb /src/vehicle_base.h
parent72cd855978bf45fd444eae72551a12e13a35b0c8 (diff)
downloadopenttd-acc3c75951c4db0873db794b657697774f0ff9e9.tar.xz
(svn r23075) -Codechange: Add GetGRF() and GetGRFID() methods to Engine and Vehicle to simplify code.
Diffstat (limited to 'src/vehicle_base.h')
-rw-r--r--src/vehicle_base.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vehicle_base.h b/src/vehicle_base.h
index 4bfe59323..e822a0b86 100644
--- a/src/vehicle_base.h
+++ b/src/vehicle_base.h
@@ -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