diff --git a/CHANGES b/CHANGES index 721660b17..16c20e19e 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,7 @@ Misc: - FFmpeg: Add looping option for GIF/APNG - Qt: Renderer can be changed while a game is running - Qt: Add hex index to palette view + - Qt: Add transformation matrix info to sprite view 0.8.1: (2020-02-16) Emulation fixes: diff --git a/src/platform/qt/ObjView.cpp b/src/platform/qt/ObjView.cpp index b3623a799..3044f9259 100644 --- a/src/platform/qt/ObjView.cpp +++ b/src/platform/qt/ObjView.cpp @@ -44,6 +44,10 @@ ObjView::ObjView(std::shared_ptr controller, QWidget* parent) m_ui.priority->setFont(font); m_ui.palette->setFont(font); m_ui.transform->setFont(font); + m_ui.xformPA->setFont(font); + m_ui.xformPB->setFont(font); + m_ui.xformPC->setFont(font); + m_ui.xformPD->setFont(font); m_ui.mode->setFont(font); connect(m_ui.tiles, &TilePainter::indexPressed, this, &ObjView::translateIndex); @@ -157,9 +161,23 @@ void ObjView::updateTilesGBA(bool force) { m_ui.mosaic->setChecked(GBAObjAttributesAIsMosaic(obj->a)); if (GBAObjAttributesAIsTransformed(obj->a)) { - m_ui.transform->setText(QString::number(GBAObjAttributesBGetMatIndex(obj->b))); + int mtxId = GBAObjAttributesBGetMatIndex(obj->b); + struct GBAOAMMatrix mat; + LOAD_16LE(mat.a, 0, &gba->video.oam.mat[mtxId].a); + LOAD_16LE(mat.b, 0, &gba->video.oam.mat[mtxId].b); + LOAD_16LE(mat.c, 0, &gba->video.oam.mat[mtxId].c); + LOAD_16LE(mat.d, 0, &gba->video.oam.mat[mtxId].d); + m_ui.transform->setText(QString::number(mtxId)); + m_ui.xformPA->setText(QString("%0").arg(mat.a / 256., 5, 'f', 2)); + m_ui.xformPB->setText(QString("%0").arg(mat.b / 256., 5, 'f', 2)); + m_ui.xformPC->setText(QString("%0").arg(mat.c / 256., 5, 'f', 2)); + m_ui.xformPD->setText(QString("%0").arg(mat.d / 256., 5, 'f', 2)); } else { m_ui.transform->setText(tr("Off")); + m_ui.xformPA->setText(tr("---")); + m_ui.xformPB->setText(tr("---")); + m_ui.xformPC->setText(tr("---")); + m_ui.xformPD->setText(tr("---")); } switch (GBAObjAttributesAGetMode(obj->a)) { @@ -230,6 +248,10 @@ void ObjView::updateTilesGB(bool force) { m_ui.doubleSize->setChecked(false); m_ui.mosaic->setChecked(false); m_ui.transform->setText(tr("N/A")); + m_ui.xformPA->setText(tr("---")); + m_ui.xformPB->setText(tr("---")); + m_ui.xformPC->setText(tr("---")); + m_ui.xformPD->setText(tr("---")); m_ui.mode->setText(tr("N/A")); } #endif diff --git a/src/platform/qt/ObjView.ui b/src/platform/qt/ObjView.ui index 7584deff6..bac5eac66 100644 --- a/src/platform/qt/ObjView.ui +++ b/src/platform/qt/ObjView.ui @@ -13,7 +13,81 @@ Sprites - + + + + + QFrame::StyledPanel + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 8 + 8 + + + + + + + + + + + + + + 0 + 0 + + + + 127 + + + + + + + Address + + + + + + + 0x07000000 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse + + + + + @@ -21,13 +95,49 @@ + + + + + + + 0 + 0 + + + + × + + + 1 + + + 8 + + + + + + + Magnification + + + + + + + + 0 + 0 + + Geometry - - + + @@ -93,7 +203,14 @@ - + + + + Qt::Vertical + + + + @@ -159,50 +276,86 @@ - - - - - - - QFrame::StyledPanel - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 8 - 8 - - - + + + + + + +0.00 + + + + + + + +1.00 + + + + + + + Matrix + + + + + + + +1.00 + + + + + + + Qt::Horizontal + + + + 0 + 20 + + + + + + + + +0.00 + + + + - - - - Tile + + + + + 64 + 64 + + + + QListView::LeftToRight + + + QListView::Adjust + + + + 64 + 96 + + + + QListView::IconMode + + + true @@ -215,6 +368,12 @@ + + + 0 + 0 + + Attributes @@ -517,98 +676,10 @@ - - - - - - - 0 - 0 - - - - 127 - - - - - - - Address - - - - - - - 0x07000000 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - - - - - - - - - - 0 - 0 - - - - × - - - 1 - - - 8 - - - - - - - Magnification - - - - - - - - - - 64 - 64 - - - - QListView::LeftToRight - - - QListView::Adjust - - - - 64 - 96 - - - - QListView::IconMode - - - true + + + + Tile