From b2751ff5069dd0fdbd94d51cdaec9c98d2eaef4f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 29 May 2009 12:04:13 +0000 Subject: Reduced the word spacing width by one pixel to precisely match the original game svn-id: r40987 --- engines/cruise/font.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'engines/cruise/font.cpp') diff --git a/engines/cruise/font.cpp b/engines/cruise/font.cpp index 990567147b..79994aebad 100644 --- a/engines/cruise/font.cpp +++ b/engines/cruise/font.cpp @@ -33,6 +33,8 @@ namespace Cruise { +const int SPACE_WIDTH = 4; + /** * Determines the line size by finding the highest character in the given font set */ @@ -74,7 +76,7 @@ int32 getTextLineCount(int32 rightBorder_X, int16 wordSpacingWidth, } else if (charData >= 0) { lineLength += wordSpacingWidth + (int16)FROM_LE_16(fontData[charData].charWidth); } else if (ch == ' ') { - lineLength += wordSpacingWidth + 5; + lineLength += wordSpacingWidth + SPACE_WIDTH; localString = tempPtr; } @@ -246,11 +248,11 @@ int32 prepareWordRender(int32 inRightBorder_X, int16 wordSpacingWidth, temp_cc = counter; temp_pc = pixelCount; - if (pixelCount + wordSpacingWidth + 5 >= + if (pixelCount + wordSpacingWidth + SPACE_WIDTH >= inRightBorder_X) { finish = 1; } else { - pixelCount += wordSpacingWidth + 5; + pixelCount += wordSpacingWidth + SPACE_WIDTH; } } else { if (character == '|' || !character) { @@ -407,7 +409,7 @@ gfxEntryStruct *renderText(int inRightBorder_X, const char *string) { if (character) { if (character == ' ' || character == 0x7C) { - drawPosPixel_X += wordSpacingWidth + 5; // if char = "space" adjust word starting postion (don't render space though); + drawPosPixel_X += wordSpacingWidth + SPACE_WIDTH; // if char = "space" adjust word starting postion (don't render space though); } else { if (charData >= 0) { const FontEntry &fe = fontPtr_Desc[charData]; -- cgit v1.2.3