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

« back to all changes in this revision

Viewing changes to src/ship.h

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Matthijs Kooijman, Jordi Mallach
  • Date: 2009-04-15 18:22:10 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090415182210-22ktb8kdbp2tf3bm
[ Matthijs Kooijman ]
* New upstream release.
* Remove Debian specific desktop file, upstream provides one now. 
* Add debian/watch file.

[ Jordi Mallach ]
* Bump Standards-Version to 3.8.1, with no changes required.
* Move to debhelper compat 7. Bump Build-Depends accordingly.
* Use dh_prep.
* Add "set -e" to config script.
* Remove a few extra doc files that get installed by upstream Makefile.
* Add more complete copyright information.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: ship.h 12037 2008-02-01 22:02:14Z glx $ */
 
1
/* $Id: ship.h 15308 2009-02-01 17:14:39Z frosch $ */
2
2
 
3
 
/** @file ship.h */
 
3
/** @file ship.h Base for ships. */
4
4
 
5
5
#ifndef SHIP_H
6
6
#define SHIP_H
7
7
 
8
8
#include "vehicle_base.h"
9
 
#include "engine.h"
 
9
#include "engine_func.h"
 
10
#include "engine_base.h"
10
11
#include "economy_func.h"
11
12
 
12
13
void CcBuildShip(bool success, TileIndex tile, uint32 p1, uint32 p2);
32
33
        void MarkDirty();
33
34
        void UpdateDeltaXY(Direction direction);
34
35
        ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_SHIP_INC : EXPENSES_SHIP_RUN; }
35
 
        WindowClass GetVehicleListWindowClass() const { return WC_SHIPS_LIST; }
36
36
        void PlayLeaveStationSound() const;
37
37
        bool IsPrimaryVehicle() const { return true; }
38
 
        int GetImage(Direction direction) const;
39
 
        int GetDisplaySpeed() const { return this->cur_speed * 10 / 32; }
40
 
        int GetDisplayMaxSpeed() const { return this->max_speed * 10 / 32; }
41
 
        Money GetRunningCost() const { return ShipVehInfo(this->engine_type)->running_cost * _price.ship_running; }
42
 
        bool IsInDepot() const { return this->u.ship.state == 0x80; }
 
38
        SpriteID GetImage(Direction direction) const;
 
39
        int GetDisplaySpeed() const { return this->cur_speed / 2; }
 
40
        int GetDisplayMaxSpeed() const { return this->max_speed / 2; }
 
41
        Money GetRunningCost() const;
 
42
        bool IsInDepot() const { return this->u.ship.state == TRACK_BIT_DEPOT; }
43
43
        void Tick();
44
44
        void OnNewDay();
 
45
        TileIndex GetOrderStationLocation(StationID station);
 
46
        bool FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse);
45
47
};
46
48
 
47
49
#endif /* SHIP_H */