summaryrefslogtreecommitdiff
path: root/src/gfx.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-21 20:12:12 +0000
committerrubidium <rubidium@openttd.org>2009-03-21 20:12:12 +0000
commit45f189fdcaedd5f95dcbb3ce9a60f746603859e1 (patch)
tree963e15fde656667f8ede17763a536b8ec0282ff9 /src/gfx.cpp
parent9fcff01850c4c18543c60cf477926b793052f1fd (diff)
downloadopenttd-45f189fdcaedd5f95dcbb3ce9a60f746603859e1.tar.xz
(svn r15785) -Codechange: remove the *Truncated part of the old text drawing API.
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r--src/gfx.cpp78
1 files changed, 0 insertions, 78 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index 9ad178501..a65b30131 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -484,20 +484,6 @@ int DrawString(int left, int right, int top, StringID str, TextColour colour, St
}
/**
- * Draw string, possibly truncated to make it fit in its allocated space
- *
- * @param x X position to start drawing
- * @param y Y position to start drawing
- * @param str String to draw
- * @param colour Colour used for drawing the string, see DoDrawString() for details
- * @param maxw Maximal width of the string
- */
-int DrawStringTruncated(int x, int y, StringID str, TextColour colour, uint maxw)
-{
- return DrawString(x, x + maxw, y, str, colour, SA_LEFT, false);
-}
-
-/**
* Draw string right-aligned.
*
* @param x Right-most x position of the string
@@ -511,20 +497,6 @@ int DrawStringRightAligned(int x, int y, StringID str, TextColour colour)
}
/**
- * Draw string right-aligned, possibly truncated to make it fit in its allocated space
- *
- * @param x Right-most x position to start drawing
- * @param y Y position to start drawing
- * @param str String to draw
- * @param colour Colour used for drawing the string, see DoDrawString() for details
- * @param maxw Maximal width of the string
- */
-int DrawStringRightAlignedTruncated(int x, int y, StringID str, TextColour colour, uint maxw)
-{
- return DrawString(x - maxw, x, y, str, colour, SA_RIGHT, false);
-}
-
-/**
* Draw string right-aligned with a line underneath it.
*
* @param x Right-most x position of the string
@@ -554,22 +526,6 @@ int DrawStringCentered(int x, int y, StringID str, TextColour colour)
}
/**
- * Draw string centered, possibly truncated to fit in the assigned space.
- *
- * @param xl Left-most x position
- * @param xr Right-most x position
- * @param y Y position of the string
- * @param str String to draw
- * @param colour Colour used for drawing the string, see DoDrawString() for details
- *
- * @return Width of the drawn string in pixels
- */
-int DrawStringCenteredTruncated(int xl, int xr, int y, StringID str, TextColour colour)
-{
- return DrawString(xl, xr, y, str, colour, SA_CENTER, false);
-}
-
-/**
* Draw string centered.
*
* @param x X position of center of the string
@@ -603,20 +559,6 @@ int DrawStringCenterUnderline(int x, int y, StringID str, TextColour colour)
}
/**
- * Draw string centered possibly truncated, with additional line underneath it
- *
- * @param xl Left x position of the string
- * @param xr Right x position of the string
- * @param y Y position of center of the string
- * @param str String to draw
- * @param colour Colour used for drawing the string, see DoDrawString() for details
- */
-int DrawStringCenterUnderlineTruncated(int xl, int xr, int y, StringID str, TextColour colour)
-{
- return DrawString(xl, xr, y, str, colour, SA_CENTER, true);
-}
-
-/**
* 'Correct' a string to a maximum length. Longer strings will be cut into
* additional lines at whitespace characters if possible. The string parameter
* is modified with terminating characters mid-string which are the
@@ -1008,26 +950,6 @@ skip_cont:;
}
/**
- * Draw the string of the character buffer, starting at position (x,y) with a given maximal width.
- * String is truncated if it is too long.
- *
- * @param str Character buffer containing the string
- * @param x Left-most x coordinate to start drawing
- * @param y Y coordinate to draw the string
- * @param colour Colour to use, see DoDrawString() for details.
- * @param maxw Maximal width in pixels that may be used for drawing
- *
- * @return Right-most x position after drawing the (possibly truncated) string
- */
-int DoDrawStringTruncated(const char *str, int x, int y, TextColour colour, uint maxw)
-{
- char buffer[DRAW_STRING_BUFFER];
- strecpy(buffer, str, lastof(buffer));
- TruncateString(buffer, maxw);
- return DoDrawString(buffer, x, y, colour);
-}
-
-/**
* Draw a sprite.
* @param img Image number to draw
* @param pal Palette to use.