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

« back to all changes in this revision

Viewing changes to src/ship_gui.cpp

  • 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_gui.cpp 11828 2008-01-13 01:21:35Z rubidium $ */
 
1
/* $Id: ship_gui.cpp 15711 2009-03-14 18:16:29Z rubidium $ */
2
2
 
3
 
/** @file ship_gui.cpp */
 
3
/** @file ship_gui.cpp GUI for ships. */
4
4
 
5
5
#include "stdafx.h"
6
 
#include "openttd.h"
7
 
#include "debug.h"
8
 
#include "ship.h"
9
 
#include "gui.h"
 
6
#include "vehicle_base.h"
10
7
#include "window_gui.h"
11
 
#include "viewport_func.h"
12
8
#include "gfx_func.h"
13
 
#include "depot.h"
14
9
#include "vehicle_gui.h"
15
 
#include "newgrf_engine.h"
16
10
#include "strings_func.h"
17
11
#include "vehicle_func.h"
18
12
 
19
13
#include "table/strings.h"
20
 
#include "table/sprites.h"
21
14
 
22
15
void DrawShipImage(const Vehicle *v, int x, int y, VehicleID selection)
23
16
{
24
17
        DrawSprite(v->GetImage(DIR_W), GetVehiclePalette(v), x + 32, y + 10);
25
18
 
26
19
        if (v->index == selection) {
27
 
                DrawFrameRect(x - 5, y - 1, x + 67, y + 21, 15, FR_BORDERONLY);
 
20
                DrawFrameRect(x - 5, y - 1, x + 67, y + 21, COLOUR_WHITE, FR_BORDERONLY);
28
21
        }
29
22
}
30
23
 
42
35
}
43
36
 
44
37
/**
45
 
* Draw the details for the given vehicle at the position (x,y)
46
 
*
47
 
* @param v current vehicle
48
 
* @param x The x coordinate
49
 
* @param y The y coordinate
50
 
*/
 
38
 * Draw the details for the given vehicle at the position (x, y)
 
39
 *
 
40
 * @param v current vehicle
 
41
 * @param x The x coordinate
 
42
 * @param y The y coordinate
 
43
 */
51
44
void DrawShipDetails(const Vehicle *v, int x, int y)
52
45
{
53
46
        SetDParam(0, v->engine_type);
57
50
 
58
51
        SetDParam(0, v->cargo_type);
59
52
        SetDParam(1, v->cargo_cap);
 
53
        SetDParam(2, GetCargoSubtypeText(v));
60
54
        DrawString(x, y + 10, STR_9817_CAPACITY, TC_FROMSTRING);
61
55
 
62
56
        StringID str = STR_8812_EMPTY;