277 lines
11 KiB
Diff
277 lines
11 KiB
Diff
diff --git a/src/external/blizzard-archive-library b/src/external/blizzard-archive-library
|
|
--- a/src/external/blizzard-archive-library
|
|
+++ b/src/external/blizzard-archive-library
|
|
@@ -1 +1 @@
|
|
-Subproject commit 6cac3304b272ee6688e88573057e94e085d35caf
|
|
+Subproject commit 6cac3304b272ee6688e88573057e94e085d35caf-dirty
|
|
diff --git a/src/noggit/MapView.cpp b/src/noggit/MapView.cpp
|
|
index d2556dc..0066dd0 100644
|
|
--- a/src/noggit/MapView.cpp
|
|
+++ b/src/noggit/MapView.cpp
|
|
@@ -803,7 +803,7 @@ void MapView::activeTool(editing_mode newTool)
|
|
}
|
|
}
|
|
|
|
- throw std::exception{ std::format("Tried to call MapView::activeTool with invalid editing_mode `{}`!", static_cast<int>(newTool)).c_str() };
|
|
+ throw std::runtime_error{ std::format("Tried to call MapView::activeTool with invalid editing_mode `{}`!", static_cast<int>(newTool)) };
|
|
}
|
|
|
|
Noggit::Ui::Tools::ViewToolbar::Ui::ViewToolbar* MapView::getLeftSecondaryViewToolbar()
|
|
diff --git a/src/noggit/Model.cpp b/src/noggit/Model.cpp
|
|
index 3d414bd..b56ea7c 100755
|
|
--- a/src/noggit/Model.cpp
|
|
+++ b/src/noggit/Model.cpp
|
|
@@ -275,7 +275,7 @@ bool Model::isAnimated(const BlizzardArchive::ClientFile& f, ModelHeader& header
|
|
}
|
|
|
|
|
|
-inline glm::vec3 fixCoordSystem(glm::vec3 v)
|
|
+glm::vec3 fixCoordSystem(glm::vec3 v)
|
|
{
|
|
return glm::vec3(v.x, v.z, -v.y);
|
|
}
|
|
diff --git a/src/noggit/Model.h b/src/noggit/Model.h
|
|
index fccf03f..79b41e8 100755
|
|
--- a/src/noggit/Model.h
|
|
+++ b/src/noggit/Model.h
|
|
@@ -56,7 +56,7 @@ enum M2GlobalFlags
|
|
// TODO : MOP +
|
|
};
|
|
|
|
-inline glm::vec3 fixCoordSystem(glm::vec3 v);
|
|
+glm::vec3 fixCoordSystem(glm::vec3 v);
|
|
|
|
class Bone {
|
|
Animation::M2Value<glm::vec3> trans;
|
|
diff --git a/src/noggit/Tool.cpp b/src/noggit/Tool.cpp
|
|
index 7f661b4..bcc4011 100644
|
|
--- a/src/noggit/Tool.cpp
|
|
+++ b/src/noggit/Tool.cpp
|
|
@@ -150,7 +150,7 @@ namespace Noggit
|
|
// If you get here and you're sure the name you're using isn't already used by this tool,
|
|
// then you may have run into a hash collision and we need to re-evaluate the hashing algorithm.
|
|
// Or, just change the name and move on...
|
|
- throw std::exception{ "There's already a hotkey with this name!" };
|
|
+ throw std::runtime_error{ "There's already a hotkey with this name!" };
|
|
}
|
|
|
|
_hotkeys[name] = hotkey;
|
|
diff --git a/src/noggit/WMOInstance.cpp b/src/noggit/WMOInstance.cpp
|
|
index bc1fd53..c7af4b0 100755
|
|
--- a/src/noggit/WMOInstance.cpp
|
|
+++ b/src/noggit/WMOInstance.cpp
|
|
@@ -120,8 +120,8 @@ WMOInstance& WMOInstance::operator= (WMOInstance&& other) noexcept
|
|
}
|
|
|
|
void WMOInstance::draw ( OpenGL::Scoped::use_program& wmo_shader
|
|
- , const glm::mat4x4 const& model_view
|
|
- , const glm::mat4x4 const& projection
|
|
+ , const glm::mat4x4& model_view
|
|
+ , const glm::mat4x4& projection
|
|
, math::frustum const& frustum
|
|
, const float& cull_distance
|
|
, const glm::vec3& camera
|
|
diff --git a/src/noggit/WMOInstance.h b/src/noggit/WMOInstance.h
|
|
index 3a7ae34..10c4284 100755
|
|
--- a/src/noggit/WMOInstance.h
|
|
+++ b/src/noggit/WMOInstance.h
|
|
@@ -58,8 +58,8 @@ public:
|
|
|
|
|
|
void draw ( OpenGL::Scoped::use_program& wmo_shader
|
|
- , const glm::mat4x4 const& model_view
|
|
- , const glm::mat4x4 const& projection
|
|
+ , const glm::mat4x4& model_view
|
|
+ , const glm::mat4x4& projection
|
|
, math::frustum const& frustum
|
|
, const float& cull_distance
|
|
, const glm::vec3& camera
|
|
diff --git a/src/noggit/area_trigger.cpp b/src/noggit/area_trigger.cpp
|
|
index 7e2877d..51881d7 100644
|
|
--- a/src/noggit/area_trigger.cpp
|
|
+++ b/src/noggit/area_trigger.cpp
|
|
@@ -24,7 +24,7 @@ namespace Noggit
|
|
}
|
|
}
|
|
|
|
- throw std::exception{ std::format("There is no area trigger with id {}", id).c_str() };
|
|
+ throw std::runtime_error{ std::format("There is no area trigger with id {}", id) };
|
|
}
|
|
|
|
area_trigger::area_trigger(DBCFile::Record& record)
|
|
@@ -73,7 +73,7 @@ namespace Noggit
|
|
}
|
|
else
|
|
{
|
|
- throw std::exception("Unknown area trigger type encountered!");
|
|
+ throw std::runtime_error("Unknown area trigger type encountered!");
|
|
}
|
|
}, trigger);
|
|
}
|
|
@@ -93,7 +93,7 @@ namespace Noggit
|
|
}
|
|
else
|
|
{
|
|
- throw std::exception("Unknown area trigger type encountered!");
|
|
+ throw std::runtime_error("Unknown area trigger type encountered!");
|
|
}
|
|
}, trigger);
|
|
}
|
|
@@ -113,7 +113,7 @@ namespace Noggit
|
|
}
|
|
else
|
|
{
|
|
- throw std::exception("Unknown area trigger type encountered!");
|
|
+ throw std::runtime_error("Unknown area trigger type encountered!");
|
|
}
|
|
}, trigger);
|
|
}
|
|
diff --git a/src/noggit/ui/GroundEffectsTool.cpp b/src/noggit/ui/GroundEffectsTool.cpp
|
|
index ef05d6b..2d86984 100644
|
|
--- a/src/noggit/ui/GroundEffectsTool.cpp
|
|
+++ b/src/noggit/ui/GroundEffectsTool.cpp
|
|
@@ -547,7 +547,7 @@ namespace Noggit
|
|
for (auto& effect : _loaded_effects)
|
|
{
|
|
// Same formula as in the shader.
|
|
- float partr, partg, partb;
|
|
+ double partr, partg, partb;
|
|
// TODO : Can use id instead of count?
|
|
float r = modf(sin(glm::dot(glm::vec2(color_count), glm::vec2(12.9898, 78.233))) * 43758.5453, &partr);
|
|
float g = modf(sin(glm::dot(glm::vec2(color_count), glm::vec2(11.5591, 70.233))) * 43569.5451, &partg);
|
|
diff --git a/src/noggit/ui/ZoneIDBrowser.cpp b/src/noggit/ui/ZoneIDBrowser.cpp
|
|
index b2c355b..56ea02c 100755
|
|
--- a/src/noggit/ui/ZoneIDBrowser.cpp
|
|
+++ b/src/noggit/ui/ZoneIDBrowser.cpp
|
|
@@ -1,3 +1,4 @@
|
|
+#include <cmath>
|
|
// This file is part of Noggit3, licensed under GNU General Public License (version 3).
|
|
|
|
#include <noggit/application/NoggitApplication.hpp>
|
|
@@ -12,16 +13,16 @@
|
|
|
|
#include <QDialog>
|
|
#include <QMessageBox>
|
|
-#include <QtWidgets/QCheckBox.h>
|
|
-#include <QtWidgets/QComboBox.h>
|
|
+#include <QtWidgets/QCheckBox>
|
|
+#include <QtWidgets/QComboBox>
|
|
#include <QtWidgets/QDoubleSpinBox>
|
|
#include <QtWidgets/QFormLayout>
|
|
#include <QtWidgets/qgroupbox.h>
|
|
-#include <QtWidgets/QLabel.h>
|
|
+#include <QtWidgets/QLabel>
|
|
#include <QtWidgets/qlineedit.h>
|
|
#include <QtWidgets/QPushButton>
|
|
#include <QtWidgets/QSlider>
|
|
-#include <QtWidgets/QSpinBox.h>
|
|
+#include <QtWidgets/QSpinBox>
|
|
#include <QtWidgets/QTreeWidget>
|
|
#include <QtWidgets/QVBoxLayout>
|
|
|
|
diff --git a/src/noggit/ui/tools/AreaTriggerEditor/AreaTriggerEditor.cpp b/src/noggit/ui/tools/AreaTriggerEditor/AreaTriggerEditor.cpp
|
|
index 5e2dd64..97fce8a 100644
|
|
--- a/src/noggit/ui/tools/AreaTriggerEditor/AreaTriggerEditor.cpp
|
|
+++ b/src/noggit/ui/tools/AreaTriggerEditor/AreaTriggerEditor.cpp
|
|
@@ -176,7 +176,7 @@ namespace Noggit::Ui::Tools
|
|
std::ofstream file{ file_path, std::ios_base::out };
|
|
if (!file)
|
|
{
|
|
- throw std::exception{ std::format("Could not open file {}!", file_path).c_str() };
|
|
+ throw std::runtime_error{ std::format("Could not open file {}!", file_path) };
|
|
}
|
|
|
|
file << "ID,Zone Name,Sub Category,Trigger Name,IsBuiltIn,\n";
|
|
@@ -198,14 +198,14 @@ namespace Noggit::Ui::Tools
|
|
QFile file{ QString::fromStdString(file_path) };
|
|
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
|
|
{
|
|
- throw std::exception{ std::format("Could not open file {}!", file_path).c_str() };
|
|
+ throw std::runtime_error{ std::format("Could not open file {}!", file_path) };
|
|
}
|
|
|
|
QTextStream stream{ &file };
|
|
if (auto header = stream.readLine(); header != expeceted_header)
|
|
{
|
|
auto foo = header.toStdString();
|
|
- throw std::exception{ std::format("File {} uses invalid header `{}`!", file_path, header.toStdString()).c_str() };
|
|
+ throw std::runtime_error{ std::format("File {} uses invalid header `{}`!", file_path, header.toStdString()) };
|
|
}
|
|
|
|
int line = 1;
|
|
diff --git a/src/noggit/ui/tools/PresetEditor/ModelView.cpp b/src/noggit/ui/tools/PresetEditor/ModelView.cpp
|
|
index 6f0d667..e90e1cc 100755
|
|
--- a/src/noggit/ui/tools/PresetEditor/ModelView.cpp
|
|
+++ b/src/noggit/ui/tools/PresetEditor/ModelView.cpp
|
|
@@ -3,7 +3,7 @@
|
|
#include <noggit/MinimapRenderSettings.hpp>
|
|
#include <noggit/World.h>
|
|
|
|
-#include <external/QtImGui/QtImGui.h>
|
|
+#include <external/qtimgui/QtImGui.h>
|
|
|
|
#include <QMouseEvent>
|
|
#include <QSettings>
|
|
diff --git a/src/noggit/ui/windows/EditorWindows/SoundEntryPickerWindow.cpp b/src/noggit/ui/windows/EditorWindows/SoundEntryPickerWindow.cpp
|
|
index 8565757..ce0098d 100644
|
|
--- a/src/noggit/ui/windows/EditorWindows/SoundEntryPickerWindow.cpp
|
|
+++ b/src/noggit/ui/windows/EditorWindows/SoundEntryPickerWindow.cpp
|
|
@@ -9,8 +9,8 @@
|
|
#include <QtWidgets/qgroupbox.h>
|
|
#include <QtWidgets/QPushButton>
|
|
#include <QtWidgets/QLabel>
|
|
-#include <QtWidgets/QCheckBox.h>
|
|
-#include <QtWidgets/QComboBox.h>
|
|
+#include <QtWidgets/QCheckBox>
|
|
+#include <QtWidgets/QComboBox>
|
|
#include <QtWidgets/qlineedit.h>
|
|
#include <QSpinBox>
|
|
#include <QListWidget>
|
|
diff --git a/src/noggit/ui/windows/SoundPlayer/SoundEntryPlayer.cpp b/src/noggit/ui/windows/SoundPlayer/SoundEntryPlayer.cpp
|
|
index 6b9817a..a8abe1b 100644
|
|
--- a/src/noggit/ui/windows/SoundPlayer/SoundEntryPlayer.cpp
|
|
+++ b/src/noggit/ui/windows/SoundPlayer/SoundEntryPlayer.cpp
|
|
@@ -11,7 +11,7 @@
|
|
#include <QListWidget>
|
|
#include <QMediaPlayer>
|
|
#include <QMessageBox>
|
|
-#include <qtemporaryfile>
|
|
+#include <QTemporaryFile>
|
|
#include <QToolButton>
|
|
#include <QtWidgets/QLabel>
|
|
#include <QtWidgets/QSlider>
|
|
diff --git a/src/noggit/ui/windows/noggitWindow/NoggitWindow.cpp b/src/noggit/ui/windows/noggitWindow/NoggitWindow.cpp
|
|
index 5adf63b..1101b7f 100755
|
|
--- a/src/noggit/ui/windows/noggitWindow/NoggitWindow.cpp
|
|
+++ b/src/noggit/ui/windows/noggitWindow/NoggitWindow.cpp
|
|
@@ -847,3 +847,5 @@ namespace Noggit::Ui::Windows
|
|
}
|
|
}
|
|
}
|
|
+
|
|
+Noggit::Ui::Windows::NoggitWindow::~NoggitWindow() = default;
|
|
diff --git a/src/noggit/ui/windows/noggitWindow/NoggitWindow.hpp b/src/noggit/ui/windows/noggitWindow/NoggitWindow.hpp
|
|
index da8a563..4141c21 100755
|
|
--- a/src/noggit/ui/windows/noggitWindow/NoggitWindow.hpp
|
|
+++ b/src/noggit/ui/windows/noggitWindow/NoggitWindow.hpp
|
|
@@ -60,6 +60,7 @@ namespace Noggit::Ui::Windows
|
|
friend class Noggit::Ui::Component::BuildMapListComponent;
|
|
|
|
public:
|
|
+ ~NoggitWindow() override;
|
|
NoggitWindow(std::shared_ptr<Noggit::Application::NoggitApplicationConfiguration> application,
|
|
std::shared_ptr<Noggit::Project::NoggitProject> project);
|
|
|
|
diff --git a/src/noggit/ui/windows/projectSelection/NoggitProjectSelectionWindow.cpp b/src/noggit/ui/windows/projectSelection/NoggitProjectSelectionWindow.cpp
|
|
index 03e399b..b843d41 100755
|
|
--- a/src/noggit/ui/windows/projectSelection/NoggitProjectSelectionWindow.cpp
|
|
+++ b/src/noggit/ui/windows/projectSelection/NoggitProjectSelectionWindow.cpp
|
|
@@ -5,6 +5,7 @@
|
|
#include <noggit/project/CurrentProject.hpp>
|
|
#include <noggit/ui/FontAwesome.hpp>
|
|
#include <noggit/ui/windows/noggitWindow/NoggitWindow.hpp>
|
|
+#include <noggit/ui/windows/noggitWindow/components/BuildMapListComponent.hpp>
|
|
#include <noggit/ui/windows/projectCreation/NoggitProjectCreationDialog.h>
|
|
#include <noggit/ui/windows/projectSelection/components/CreateProjectComponent.hpp>
|
|
#include <noggit/ui/windows/projectSelection/components/LoadProjectComponent.hpp>
|