diff options
Diffstat (limited to 'lyt/textbox.cpp')
-rw-r--r-- | lyt/textbox.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lyt/textbox.cpp b/lyt/textbox.cpp index e943963..c845618 100644 --- a/lyt/textbox.cpp +++ b/lyt/textbox.cpp @@ -39,7 +39,7 @@ void LYTTextBox::dumpToDebug(bool showHeading) const { qDebug() << "- Text:" << text; qDebug() << "- Buffer Length:" << bufferLength; qDebug() << "- Material:" << materialName << "- Font:" << fontName; - qDebug() << "- Alignment:" << alignment << "- Alignment Override:" << alignmentOverride; + //qDebug() << "- Alignment:" << alignment << "- Alignment Override:" << alignmentOverride; qDebug() << "- Colours:" << colour1 << "--" << colour2; qDebug() << "- Font Size:" << fontSizeX << "x" << fontSizeY; qDebug() << "- Char Space:" << charSpace << "- Line Space:" << lineSpace; @@ -61,8 +61,8 @@ void LYTTextBox::writeToDataStream(QDataStream &out) const { out << (quint16)materialNum; out << (quint16)fontNum; - out << (quint8)alignment; - out << (quint8)alignmentOverride; + out << (quint8)(((int)textHorzPos) + (((int)textVertPos) * 3)); + out << (quint8)alignment; WritePadding(2, out); @@ -110,8 +110,11 @@ void LYTTextBox::readFromDataStream(QDataStream &in) { materialName = m_layout.materials.getNameOfIndex(materialNum); fontName = m_layout.m_fontRefs.at(fontNum); - in >> (quint8&)alignment; - in >> (quint8&)alignmentOverride; + quint8 whatpos; + in >> (quint8&)whatpos; + textHorzPos = (OriginType)(whatpos % 3); + textVertPos = (OriginType)(whatpos / 3); + in >> (quint8&)alignment; in.skipRawData(2); // padding |