summaryrefslogtreecommitdiff
path: root/src/ship_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-22 10:37:51 +0000
committerrubidium <rubidium@openttd.org>2009-03-22 10:37:51 +0000
commitead0a6a6e52ff0b538ab5f345bd1ff6a11b30f8d (patch)
tree97ce1eba806af7cb41fc7a8a85b424c3b36f97d5 /src/ship_gui.cpp
parent8324f65b4bb7ed944cab921e2a065bf379fa8e6c (diff)
downloadopenttd-ead0a6a6e52ff0b538ab5f345bd1ff6a11b30f8d.tar.xz
(svn r15806) -Codechange: pass both left and right to the vehicle details drawing functions instead of only the left.
Diffstat (limited to 'src/ship_gui.cpp')
-rw-r--r--src/ship_gui.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/ship_gui.cpp b/src/ship_gui.cpp
index b9e24d9f1..63fa751c7 100644
--- a/src/ship_gui.cpp
+++ b/src/ship_gui.cpp
@@ -35,23 +35,24 @@ void CcBuildShip(bool success, TileIndex tile, uint32 p1, uint32 p2)
}
/**
- * Draw the details for the given vehicle at the position (x, y)
+ * Draw the details for the given vehicle at the given position
*
- * @param v current vehicle
- * @param x The x coordinate
- * @param y The y coordinate
+ * @param v current vehicle
+ * @param left The left most coordinate to draw
+ * @param right The right most coordinate to draw
+ * @param y The y coordinate
*/
-void DrawShipDetails(const Vehicle *v, int x, int y)
+void DrawShipDetails(const Vehicle *v, int left, int right, int y)
{
SetDParam(0, v->engine_type);
SetDParam(1, v->build_year);
SetDParam(2, v->value);
- DrawString(x, y, STR_9816_BUILT_VALUE, TC_FROMSTRING);
+ DrawString(left, right, y, STR_9816_BUILT_VALUE, TC_FROMSTRING);
SetDParam(0, v->cargo_type);
SetDParam(1, v->cargo_cap);
SetDParam(2, GetCargoSubtypeText(v));
- DrawString(x, y + 10, STR_9817_CAPACITY, TC_FROMSTRING);
+ DrawString(left, right, y + 10, STR_9817_CAPACITY, TC_FROMSTRING);
StringID str = STR_8812_EMPTY;
if (!v->cargo.Empty()) {
@@ -60,9 +61,9 @@ void DrawShipDetails(const Vehicle *v, int x, int y)
SetDParam(2, v->cargo.Source());
str = STR_8813_FROM;
}
- DrawString(x, y + 21, str, TC_FROMSTRING);
+ DrawString(left, right, y + 21, str, TC_FROMSTRING);
/* Draw Transfer credits text */
SetDParam(0, v->cargo.FeederShare());
- DrawString(x, y + 33, STR_FEEDER_CARGO_VALUE, TC_FROMSTRING);
+ DrawString(left, right, y + 33, STR_FEEDER_CARGO_VALUE, TC_FROMSTRING);
}