From 3189ca5efc5826405bf2e9c7d9949ad5ea9a8a10 Mon Sep 17 00:00:00 2001 From: Treeki Date: Wed, 12 Sep 2012 14:57:44 +0200 Subject: initial un-exporter version --- lyt/textbox.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'lyt/textbox.cpp') 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 -- cgit v1.2.3