aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2/maketext.cpp
diff options
context:
space:
mode:
authorColin Snover2017-12-05 12:07:25 -0600
committerEugene Sandulenko2018-08-18 16:30:05 +0200
commit2f872168647e0dc4d87f449ed283b830716ad78e (patch)
tree03c52f38de39b9196f08905b2f196d197b8ce725 /engines/sword2/maketext.cpp
parent072a52a9d25dfcc59ba7d18049cc29cd17acaffa (diff)
downloadscummvm-rg350-2f872168647e0dc4d87f449ed283b830716ad78e.tar.gz
scummvm-rg350-2f872168647e0dc4d87f449ed283b830716ad78e.tar.bz2
scummvm-rg350-2f872168647e0dc4d87f449ed283b830716ad78e.zip
SWORD2: Replace use of strdup with Common::String
Diffstat (limited to 'engines/sword2/maketext.cpp')
-rw-r--r--engines/sword2/maketext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sword2/maketext.cpp b/engines/sword2/maketext.cpp
index e279284d76..765ff0eaeb 100644
--- a/engines/sword2/maketext.cpp
+++ b/engines/sword2/maketext.cpp
@@ -83,7 +83,7 @@ namespace Sword2 {
* error-signal character (chequered flag)
*/
-byte *FontRenderer::makeTextSprite(byte *sentence, uint16 maxWidth, uint8 pen, uint32 fontRes, uint8 border) {
+byte *FontRenderer::makeTextSprite(const byte *sentence, uint16 maxWidth, uint8 pen, uint32 fontRes, uint8 border) {
debug(5, "makeTextSprite(\"%s\", maxWidth=%u)", sentence, maxWidth);
_borderPen = border;
@@ -123,7 +123,7 @@ byte *FontRenderer::makeTextSprite(byte *sentence, uint16 maxWidth, uint8 pen, u
return textSprite;
}
-uint16 FontRenderer::analyzeSentence(byte *sentence, uint16 maxWidth, uint32 fontRes, LineInfo *line) {
+uint16 FontRenderer::analyzeSentence(const byte *sentence, uint16 maxWidth, uint32 fontRes, LineInfo *line) {
// joinWidth = how much extra space is needed to append a word to a
// line. NB. SPACE requires TWICE the '_charSpacing' to join a word
// to line
@@ -207,7 +207,7 @@ uint16 FontRenderer::analyzeSentence(byte *sentence, uint16 maxWidth, uint32 fon
* error-signal character (chequered flag)
*/
-byte *FontRenderer::buildTextSprite(byte *sentence, uint32 fontRes, uint8 pen, LineInfo *line, uint16 noOfLines) {
+byte *FontRenderer::buildTextSprite(const byte *sentence, uint32 fontRes, uint8 pen, LineInfo *line, uint16 noOfLines) {
uint16 i;
// Find the width of the widest line in the output text