[Scummvm-cvs-logs] SF.net SVN: scummvm:[40987] scummvm/trunk/engines/cruise/font.cpp
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Fri May 29 14:04:14 CEST 2009
Revision: 40987
http://scummvm.svn.sourceforge.net/scummvm/?rev=40987&view=rev
Author: dreammaster
Date: 2009-05-29 12:04:13 +0000 (Fri, 29 May 2009)
Log Message:
-----------
Reduced the word spacing width by one pixel to precisely match the original game
Modified Paths:
--------------
scummvm/trunk/engines/cruise/font.cpp
Modified: scummvm/trunk/engines/cruise/font.cpp
===================================================================
--- scummvm/trunk/engines/cruise/font.cpp 2009-05-29 11:58:21 UTC (rev 40986)
+++ scummvm/trunk/engines/cruise/font.cpp 2009-05-29 12:04:13 UTC (rev 40987)
@@ -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 @@
} 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 @@
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 @@
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];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list