aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise/font.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2009-05-29 12:04:13 +0000
committerPaul Gilbert2009-05-29 12:04:13 +0000
commitb2751ff5069dd0fdbd94d51cdaec9c98d2eaef4f (patch)
tree310c409908016fc547a54a63d8a41e18e21d2b89 /engines/cruise/font.cpp
parent17b761d1e94466e1b7364334ea24a5340669e50f (diff)
downloadscummvm-rg350-b2751ff5069dd0fdbd94d51cdaec9c98d2eaef4f.tar.gz
scummvm-rg350-b2751ff5069dd0fdbd94d51cdaec9c98d2eaef4f.tar.bz2
scummvm-rg350-b2751ff5069dd0fdbd94d51cdaec9c98d2eaef4f.zip
Reduced the word spacing width by one pixel to precisely match the original game
svn-id: r40987
Diffstat (limited to 'engines/cruise/font.cpp')
-rw-r--r--engines/cruise/font.cpp10
1 files changed, 6 insertions, 4 deletions
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];