src/vehicle_base.h
branchnoai
changeset 9869 6404afe43575
parent 9837 c9ec4f82e0d0
child 10142 56ee7da4ad56
equal deleted inserted replaced
9868:3998f2e73dda 9869:6404afe43575
   221 
   221 
   222 	byte spritenum;          // currently displayed sprite index
   222 	byte spritenum;          // currently displayed sprite index
   223 	                         // 0xfd == custom sprite, 0xfe == custom second head sprite
   223 	                         // 0xfd == custom sprite, 0xfe == custom second head sprite
   224 	                         // 0xff == reserved for another custom sprite
   224 	                         // 0xff == reserved for another custom sprite
   225 	uint16 cur_image;        // sprite number for this vehicle
   225 	uint16 cur_image;        // sprite number for this vehicle
   226 	byte sprite_width;       // width of vehicle sprite
   226 	byte x_extent;           // x-extent of vehicle bounding box
   227 	byte sprite_height;      // height of vehicle sprite
   227 	byte y_extent;           // y-extent of vehicle bounding box
   228 	byte z_height;           // z-height of vehicle sprite
   228 	byte z_extent;           // z-extent of vehicle bounding box
   229 	int8 x_offs;             // x offset for vehicle sprite
   229 	int8 x_offs;             // x offset for vehicle sprite
   230 	int8 y_offs;             // y offset for vehicle sprite
   230 	int8 y_offs;             // y offset for vehicle sprite
   231 	EngineID engine_type;
   231 	EngineID engine_type;
   232 
   232 
   233 	TextEffectID fill_percent_te_id; // a text-effect id to a loading indicator object
   233 	TextEffectID fill_percent_te_id; // a text-effect id to a loading indicator object
   486 	 * @return true if there are other vehicles sharing the same order
   486 	 * @return true if there are other vehicles sharing the same order
   487 	 */
   487 	 */
   488 	inline bool IsOrderListShared() const { return this->next_shared != NULL || this->prev_shared != NULL; };
   488 	inline bool IsOrderListShared() const { return this->next_shared != NULL || this->prev_shared != NULL; };
   489 
   489 
   490 	bool NeedsAutorenewing(const Player *p) const;
   490 	bool NeedsAutorenewing(const Player *p) const;
       
   491 
       
   492 	/**
       
   493 	 * Determine the location for the station where the vehicle goes to next.
       
   494 	 * Things done for example are allocating slots in a road stop or exact
       
   495 	 * location of the platform is determined for ships.
       
   496 	 * @param station the station to make the next location of the vehicle.
       
   497 	 * @return the location (tile) to aim for.
       
   498 	 */
       
   499 	virtual TileIndex GetOrderStationLocation(StationID station) { return INVALID_TILE; }
   491 };
   500 };
   492 
   501 
   493 /**
   502 /**
   494  * This class 'wraps' Vehicle; you do not actually instantiate this class.
   503  * This class 'wraps' Vehicle; you do not actually instantiate this class.
   495  * You create a Vehicle using AllocateVehicle, so it is added to the pool
   504  * You create a Vehicle using AllocateVehicle, so it is added to the pool