mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-22 20:17:46 +00:00
More small code improvements/cleanup
This commit is contained in:
parent
34082479ed
commit
039b6e6d30
11 changed files with 9 additions and 21 deletions
|
@ -44,7 +44,7 @@ inline QString encryptGameArg(const QString &arg)
|
|||
return QStringLiteral("//**sqex0003%1%2**//").arg(base64, QLatin1String(&checksum, 1));
|
||||
}
|
||||
|
||||
inline QString decryptGameArg(uint32_t tickCount, QString sqexString)
|
||||
inline QString decryptGameArg(uint32_t tickCount, const QString &sqexString)
|
||||
{
|
||||
unsigned int ticks = tickCount & 0xFFFFFFFFu;
|
||||
unsigned int key = ticks & 0xFFFF0000u;
|
||||
|
|
|
@ -52,7 +52,7 @@ GearView::GearView(GameData *data, FileCache &cache, QWidget *parent)
|
|||
Q_UNUSED(QtConcurrent::run(QThreadPool::globalInstance(), [this] {
|
||||
updatePart();
|
||||
Q_EMIT loadingChanged(false);
|
||||
}));
|
||||
}))
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ Vector3Edit::Vector3Edit(glm::vec3 &vec, QWidget *parent)
|
|||
: QWidget(parent)
|
||||
, vec(vec)
|
||||
{
|
||||
QHBoxLayout *itemsLayout = new QHBoxLayout(this);
|
||||
auto itemsLayout = new QHBoxLayout(this);
|
||||
|
||||
spinBoxes.x = new QDoubleSpinBox();
|
||||
spinBoxes.y = new QDoubleSpinBox();
|
||||
|
|
|
@ -3,15 +3,11 @@
|
|||
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <KAboutApplicationDialog>
|
||||
#include <KAboutData>
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
#include <QDesktopServices>
|
||||
#include <QHBoxLayout>
|
||||
#include <QListWidget>
|
||||
#include <QMenuBar>
|
||||
#include <QTableWidget>
|
||||
#include <QUrl>
|
||||
#include <physis.hpp>
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <KAboutApplicationDialog>
|
||||
#include <KAboutData>
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
#include <QDesktopServices>
|
||||
|
@ -12,8 +10,6 @@
|
|||
#include <QHBoxLayout>
|
||||
#include <QListWidget>
|
||||
#include <QMenuBar>
|
||||
#include <QTableWidget>
|
||||
#include <QUrl>
|
||||
#include <physis.hpp>
|
||||
|
||||
#include "mdlpart.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include "exdpart.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QGroupBox>
|
||||
#include <QJsonArray>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include "exlpart.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
|
|
|
@ -44,7 +44,7 @@ bool VulkanWindow::event(QEvent *e)
|
|||
render();
|
||||
break;
|
||||
case QEvent::Resize: {
|
||||
QResizeEvent *resizeEvent = (QResizeEvent *)e;
|
||||
auto resizeEvent = (QResizeEvent *)e;
|
||||
auto surface = m_instance->surfaceForWindow(this);
|
||||
if (surface != nullptr) {
|
||||
m_renderer->resize(surface,
|
||||
|
@ -53,7 +53,7 @@ bool VulkanWindow::event(QEvent *e)
|
|||
}
|
||||
} break;
|
||||
case QEvent::PlatformSurface:
|
||||
if (static_cast<QPlatformSurfaceEvent *>(e)->surfaceEventType() == QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed && m_initialized) {
|
||||
if (dynamic_cast<QPlatformSurfaceEvent *>(e)->surfaceEventType() == QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed && m_initialized) {
|
||||
m_renderer->destroySwapchain();
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -74,7 +74,7 @@ public:
|
|||
void reloadModel(RenderModel &model, uint32_t lod);
|
||||
RenderTexture addTexture(uint32_t width, uint32_t height, const uint8_t *data, uint32_t data_size);
|
||||
|
||||
void render(std::vector<RenderModel> models);
|
||||
void render(const std::vector<RenderModel> &models);
|
||||
|
||||
VkInstance instance = VK_NULL_HANDLE;
|
||||
VkPhysicalDevice physicalDevice = VK_NULL_HANDLE;
|
||||
|
@ -114,9 +114,9 @@ public:
|
|||
|
||||
uint32_t findMemoryType(uint32_t typeFilter, VkMemoryPropertyFlags properties);
|
||||
|
||||
VkShaderModule createShaderModule(const uint32_t *code, const int length);
|
||||
VkShaderModule createShaderModule(const uint32_t *code, int length);
|
||||
|
||||
VkShaderModule loadShaderFromDisk(const std::string_view path);
|
||||
VkShaderModule loadShaderFromDisk(std::string_view path);
|
||||
|
||||
VkCommandBuffer beginSingleTimeCommands();
|
||||
|
||||
|
|
|
@ -434,7 +434,7 @@ void Renderer::destroySwapchain()
|
|||
}
|
||||
}
|
||||
|
||||
void Renderer::render(std::vector<RenderModel> models)
|
||||
void Renderer::render(const std::vector<RenderModel> &models)
|
||||
{
|
||||
vkWaitForFences(device, 1, &inFlightFences[currentFrame], VK_TRUE, std::numeric_limits<uint64_t>::max());
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFormLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QTreeWidget>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue