diff options
author | Paul Gilbert | 2009-05-29 11:47:32 +0000 |
---|---|---|
committer | Paul Gilbert | 2009-05-29 11:47:32 +0000 |
commit | 1b5a9504dcdca819bfe1ba0fee6c46af60ed0801 (patch) | |
tree | 0af1720327b36a7eff34fa855c89afed2425f748 /engines | |
parent | 648179f87d97edc80a6e2d8c8945537ac1048a71 (diff) | |
download | scummvm-rg350-1b5a9504dcdca819bfe1ba0fee6c46af60ed0801.tar.gz scummvm-rg350-1b5a9504dcdca819bfe1ba0fee6c46af60ed0801.tar.bz2 scummvm-rg350-1b5a9504dcdca819bfe1ba0fee6c46af60ed0801.zip |
Bugfix for rendering text that caused corruption when the width was an odd number and a line was completely filled
svn-id: r40985
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cruise/font.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/cruise/font.cpp b/engines/cruise/font.cpp index 196ff4fb01..990567147b 100644 --- a/engines/cruise/font.cpp +++ b/engines/cruise/font.cpp @@ -207,7 +207,7 @@ void renderWord(const uint8 *fontPtr_Data, uint8 *outBufferPtr, int xOffset, int int j; const uint8 *fontPtr_Data2 = fontPtr_Data + height * 2; - outBufferPtr += yOffset * width * 2 + xOffset; + outBufferPtr += yOffset * width + xOffset; for (i = 0; i < height; i++) { // y++ uint16 bitSet1 = READ_BE_UINT16(fontPtr_Data); @@ -223,7 +223,7 @@ void renderWord(const uint8 *fontPtr_Data, uint8 *outBufferPtr, int xOffset, int bitSet1 <<= 1; bitSet2 <<= 1; } - outBufferPtr += (width * 2) - charWidth; + outBufferPtr += width - charWidth; } } @@ -421,7 +421,7 @@ gfxEntryStruct *renderText(int inRightBorder_X, const char *string) { FROM_LE_16(fe.charHeight), FROM_LE_16(fe.v1), stringRenderBufferSize, - stringWidth / 2, + stringWidth, (int16)FROM_LE_16(fe.charWidth)); drawPosPixel_X += |