Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp

This commit is contained in:
Jonathan 2023-09-04 02:51:27 -04:00
commit ba532ac0ab
4 changed files with 10 additions and 3 deletions

1
.gitignore vendored
View File

@ -14,6 +14,7 @@ testmaps/*.bsp
testmaps/*.bsp.qbsplog
testmaps/*.log
testmaps/*.prt
testmaps/*.lit
testmaps/*.obj
testmaps/*.pts
testmaps/*.vis

View File

@ -79,7 +79,10 @@ struct texture_axis_t
qvec3d snapped_normal;
// use_new_axis = !qbsp_options.oldaxis.value()
constexpr texture_axis_t(const qplane3d &plane, bool use_new_axis = false)
constexpr texture_axis_t(const qplane3d &plane, bool use_new_axis = false) :
xv(), // gcc C++20 bug workaround
yv(),
snapped_normal()
{
constexpr qvec3d baseaxis[18] = {
{0, 0, 1}, {1, 0, 0}, {0, -1, 0}, // floor

View File

@ -1397,7 +1397,7 @@ void GLView::renderBSP(const QString &file, const mbsp_t &bsp, const bspxentries
double y = split[1].toDouble();
double z = split[2].toDouble();
points.emplace_back(qvec3f{(float)x, (float)y, (float)z});
points.push_back(simple_vertex_t{qvec3f{(float)x, (float)y, (float)z}});
num_leak_points++;
}
@ -1433,7 +1433,7 @@ void GLView::renderBSP(const QString &file, const mbsp_t &bsp, const bspxentries
for (auto &pt : portal.winding) {
indices.push_back(current_index++);
points.emplace_back(pt);
points.push_back(simple_vertex_t{qvec3f{pt}});
}
indices.push_back((GLuint)-1);

View File

@ -709,16 +709,19 @@ int MainWindow::compileMap(const QString &file, bool is_reload)
m_bspdata.loadversion->game->init_filesystem(file.toStdString(), settings);
}
} catch (const settings::parse_exception &p) {
// FIXME: threading error: don't call Qt widgets code from background thread
auto *textEdit = m_outputLogWidget->textEdit(m_activeLogTab);
textEdit->append(QString::fromUtf8(p.what()) + QString::fromLatin1("\n"));
m_activeLogTab = ETLogTab::TAB_LIGHTPREVIEW;
return 1;
} catch (const settings::quit_after_help_exception &p) {
// FIXME: threading error: don't call Qt widgets code from background thread
auto *textEdit = m_outputLogWidget->textEdit(m_activeLogTab);
textEdit->append(QString::fromUtf8(p.what()) + QString::fromLatin1("\n"));
m_activeLogTab = ETLogTab::TAB_LIGHTPREVIEW;
return 1;
} catch (const std::exception &other) {
// FIXME: threading error: don't call Qt widgets code from background thread
auto *textEdit = m_outputLogWidget->textEdit(m_activeLogTab);
textEdit->append(QString::fromUtf8(other.what()) + QString::fromLatin1("\n"));
m_activeLogTab = ETLogTab::TAB_LIGHTPREVIEW;