# Ship Struct Reference

All ships have this type. More...

`#include <ship.h>`

Inheritance diagram for Ship:

## Public Member Functions

| Ship ()
| We don't want GCC to zero our struct! It already is zeroed and has an index!
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
bool | Tick ()
void | OnNewDay ()
Trackdir | GetVehicleTrackdir () const
TileIndex | GetOrderStationLocation (StationID station)
bool | FindClosestDepot (TileIndex *location, DestinationID *destination, bool *reverse)

## Data Fields

TrackBitsByte | state

## Detailed Description

All ships have this type.

Definition at line 27 of file ship.h.

## Constructor & Destructor Documentation

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

We want to 'destruct' the right class.

Definition at line 33 of file ship.h.

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

- src/ship.h
- src/ship_cmd.cpp