Ship Struct Reference

This class 'wraps' Vehicle; you do not actually instantiate this class. More...

#include <ship.h>

Inheritance diagram for Ship:

PoolItem< T, Tid, Tpool >

Public Member Functions

 Ship ()
 Initializes the Vehicle to a ship.
virtual ~Ship ()
 We want to 'destruct' the right class.
const char * GetTypeString () const
void MarkDirty ()
void UpdateDeltaXY (Direction direction)
ExpensesType GetExpenseType (bool income) const
void PlayLeaveStationSound () const
bool IsPrimaryVehicle () const
SpriteID GetImage (Direction direction) const
int GetDisplaySpeed () const
int GetDisplayMaxSpeed () const
Money GetRunningCost () const
bool IsInDepot () const
void Tick ()
void OnNewDay ()
TileIndex GetOrderStationLocation (StationID station)
bool FindClosestDepot (TileIndex *location, DestinationID *destination, bool *reverse)

Detailed Description

This class 'wraps' Vehicle; you do not actually instantiate this class.

You create a Vehicle using AllocateVehicle, so it is added to the pool and you reinitialize that to a Train using: v = new (v) Ship();

As side-effect the vehicle type is set correctly.

Definition at line 25 of file ship.h.


Constructor & Destructor Documentation

virtual Ship::~Ship (  )  [inline, virtual]

We want to 'destruct' the right class.

Definition at line 30 of file ship.h.


The documentation for this struct was generated from the following files:

Generated on Sun Nov 15 15:40:40 2009 for OpenTTD by  doxygen 1.5.6