HDB: Add debug output for font data

This commit is contained in:
Nipun Garg 2019-06-23 20:08:23 +05:30 committed by Eugene Sandulenko
parent a23fbd7b6b
commit d973d258dd

View File

@ -438,6 +438,13 @@ bool DrawMan::loadFont(const char *string) {
_fontHeader.kerning = stream->readUint16LE(); _fontHeader.kerning = stream->readUint16LE();
_fontHeader.leading = stream->readUint16LE(); _fontHeader.leading = stream->readUint16LE();
debug(3, "Loaded _fontHeader with following data");
debug(3, "type: %d", _fontHeader.type);
debug(3, "numChars: %d", _fontHeader.numChars);
debug(3, "height: %d", _fontHeader.height);
debug(3, "kerning: %d", _fontHeader.kerning);
debug(3, "leading: %d", _fontHeader.leading);
// Loading _charInfoBlocks & creating character surfaces // Loading _charInfoBlocks & creating character surfaces
CharInfo *cInfo; CharInfo *cInfo;
int startPos = stream->pos(); // Position after _fontHeader int startPos = stream->pos(); // Position after _fontHeader
@ -447,6 +454,9 @@ bool DrawMan::loadFont(const char *string) {
cInfo = new CharInfo; cInfo = new CharInfo;
cInfo->width = stream->readUint16LE(); cInfo->width = stream->readUint16LE();
cInfo->offset = stream->readUint16LE(); cInfo->offset = stream->readUint16LE();
debug(3, "Loaded _charInfoBlocks[%d]: width: %d, offset: %d", i, cInfo->width, cInfo->offset);
curPos = stream->pos(); curPos = stream->pos();
_fontSurfaces[i].create(cInfo->width, _fontHeader.height, g_hdb->_format); _fontSurfaces[i].create(cInfo->width, _fontHeader.height, g_hdb->_format);