[Scummvm-cvs-logs] scummvm master -> 6161d7906efc1a99c05aeef91e60bcc44aeb8ac4

dreammaster dreammaster at scummvm.org
Wed Dec 7 10:49:55 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6161d7906e TSAGE: Fix for displaying text correctly in Ringworld Spanish version.


Commit: 6161d7906efc1a99c05aeef91e60bcc44aeb8ac4
    https://github.com/scummvm/scummvm/commit/6161d7906efc1a99c05aeef91e60bcc44aeb8ac4
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2011-12-07T01:49:11-08:00

Commit Message:
TSAGE: Fix for displaying text correctly in Ringworld Spanish version.

Changed paths:
    engines/tsage/graphics.cpp



diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index f0a5973..171167c 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -1254,7 +1254,11 @@ void GfxFont::setFontNumber(uint32 fontNumber) {
 	if (!_fontData)
 		_fontData = g_resourceManager->getResource(RES_FONT, _fontNumber, 0);
 
-	_numChars = READ_LE_UINT16(_fontData + 4);
+	// Since some TsAGE game versions don't have a valid character count at offset 4, use the offset of the
+	// first charactre data to calculate the number of characters in the offset table preceeding it
+	_numChars = (READ_LE_UINT32(_fontData + 12) - 12) / 4;
+	assert(_numChars <= 256);
+
 	_fontSize.y = READ_LE_UINT16(_fontData + 6);
 	_fontSize.x = READ_LE_UINT16(_fontData + 8);
 	_bpp = READ_LE_UINT16(_fontData + 10);






More information about the Scummvm-git-logs mailing list