~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/vehicle_base.h

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Matthijs Kooijman
  • Date: 2009-06-09 21:46:28 UTC
  • mfrom: (1.1.7 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090609214628-6z5uodi6178z050l
[ Matthijs Kooijman ]
* New upstream release.
* Link against libicu to enable right-to-left language support. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: vehicle_base.h 15672 2009-03-11 17:26:58Z rubidium $ */
 
1
/* $Id: vehicle_base.h 16482 2009-05-31 12:22:53Z rubidium $ */
2
2
 
3
3
/** @file  vehicle_base.h Base class for all vehicles. */
4
4
 
400
400
        virtual SpriteID GetImage(Direction direction) const { return 0; }
401
401
 
402
402
        /**
 
403
         * Invalidates cached NewGRF variables
 
404
         * @see InvalidateNewGRFCacheOfChain
 
405
         */
 
406
        FORCEINLINE void InvalidateNewGRFCache()
 
407
        {
 
408
                this->cache_valid = 0;
 
409
        }
 
410
 
 
411
        /**
 
412
         * Invalidates cached NewGRF variables of all vehicles in the chain (after the current vehicle)
 
413
         * @see InvalidateNewGRFCache
 
414
         */
 
415
        FORCEINLINE void InvalidateNewGRFCacheOfChain()
 
416
        {
 
417
                for (Vehicle *u = this; u != NULL; u = u->Next()) {
 
418
                        u->InvalidateNewGRFCache();
 
419
                }
 
420
        }
 
421
 
 
422
        /**
403
423
         * Gets the speed in km-ish/h that can be sent into SetDParam for string processing.
404
424
         * @return the vehicle's speed
405
425
         */