lightpreview: show bspx lump sizes
This commit is contained in:
parent
71aa8aaeea
commit
40e4c71407
|
|
@ -991,7 +991,7 @@ void MainWindow::compileThreadExited()
|
|||
lightstyles->addWidget(style);
|
||||
}
|
||||
|
||||
stats_panel->updateWithBSP(&bsp);
|
||||
stats_panel->updateWithBSP(&bsp, m_bspdata.bspx.entries);
|
||||
}
|
||||
|
||||
void MainWindow::loadFileInternal(const QString &file, bool is_reload)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ void StatsPanel::addStat(const QString &str, int value)
|
|||
m_table->setItem(currentRow, 1, valueItem);
|
||||
}
|
||||
|
||||
void StatsPanel::updateWithBSP(const mbsp_t *bsp)
|
||||
void StatsPanel::updateWithBSP(const mbsp_t *bsp, const bspxentries_t &entries)
|
||||
{
|
||||
m_table->setRowCount(0);
|
||||
|
||||
|
|
@ -79,4 +79,9 @@ void StatsPanel::updateWithBSP(const mbsp_t *bsp)
|
|||
addStat(QStringLiteral("visdata bytes"), bsp->dvis.bits.size());
|
||||
addStat(QStringLiteral("lightdata bytes"), bsp->dlightdata.size());
|
||||
addStat(QStringLiteral("entdata bytes"), bsp->dentdata.size());
|
||||
|
||||
// bspx lumps
|
||||
for (const auto &[lumpname, data] : entries) {
|
||||
addStat(QStringLiteral("%1 bytes").arg(lumpname.c_str()), data.size());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include <common/bspfile.hh>
|
||||
|
||||
struct mbsp_t;
|
||||
class QTableWidget;
|
||||
|
|
@ -16,5 +17,5 @@ private:
|
|||
void addStat(const QString &str, int value);
|
||||
|
||||
public:
|
||||
void updateWithBSP(const mbsp_t *bsp);
|
||||
void updateWithBSP(const mbsp_t *bsp, const bspxentries_t &entries);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue