1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-24 04:57:45 +00:00

Rename directories, update README

This commit is contained in:
Joshua Goins 2023-10-10 18:02:13 -04:00
parent d8a4178095
commit 0f2eaab936
21 changed files with 74 additions and 54 deletions

View file

@ -51,15 +51,15 @@ if(APPLE)
endif()
add_subdirectory(renderer)
add_subdirectory(exdviewer)
add_subdirectory(karuku)
add_subdirectory(armoury)
add_subdirectory(argcracker)
add_subdirectory(explorer)
add_subdirectory(sagasu)
#add_subdirectory(bonedecomp) # not yet ported to physis
add_subdirectory(parts)
add_subdirectory(common)
add_subdirectory(mdlviewer)
add_subdirectory(sdklauncher)
add_subdirectory(launcher)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)

View file

@ -11,12 +11,11 @@ any stable releases.
This repository contains many parts of Novus, such as:
* [Argcracker](argcracker), a program that can decrypt game arguments.
* [Armoury](armoury), a graphical gear and character viewer.
* [Bone Decompiler](bonedecomp), a tool to decompile Havok skeleton files into TexTools-compatible JSON.
* [EXD Viewer](exdviewer), a graphical program to view Excel (EXD) sheets from the game.
* [Explorer](explorer), a graphical interface to explore DAT files.
* [Model Viewer](mdlviewer), a graphical model viewer for MDL files.
* [Argcracker](argcracker), a program that can help decrypt game arguments.
* [Armoury](armoury), a graphical gear and character viewer. It also supports GLTF export.
* [Karuku](karuku), a graphical program to view Excel data sheets.
* [MDLViewer](mdlviewer), a graphical model viewer for MDL files.
* [Sagasu](sagasu), a graphical interface to explore FFXIV data archive files.
## Building

View file

@ -7,10 +7,11 @@
struct GameData;
class MainWindow : public QMainWindow {
class MainWindow : public QMainWindow
{
public:
MainWindow(GameData* data);
MainWindow(GameData *data);
private:
GameData* data = nullptr;
GameData *data = nullptr;
};

View file

@ -8,7 +8,8 @@
#include "mainwindow.h"
#include "settings.h"
int main(int argc, char* argv[]) {
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
customizeAboutData(QStringLiteral("karuku"), QStringLiteral("Karuku"), QStringLiteral("Program to view FFXIV Excel files."));

View file

@ -17,7 +17,9 @@
#include "exdpart.h"
MainWindow::MainWindow(GameData* data) : data(data) {
MainWindow::MainWindow(GameData *data)
: data(data)
{
setWindowTitle(QStringLiteral("Karuku"));
setMinimumSize(1280, 720);
@ -68,7 +70,7 @@ MainWindow::MainWindow(GameData* data) : data(data) {
auto exdPart = new EXDPart(data);
layout->addWidget(exdPart);
connect(listWidget, &QListWidget::itemClicked, this, [exdPart](QListWidgetItem* item) {
connect(listWidget, &QListWidget::itemClicked, this, [exdPart](QListWidgetItem *item) {
auto name = item->text().toStdString();
auto nameLowercase = item->text().toLower().toStdString();

View file

@ -5,7 +5,8 @@
#include <QMainWindow>
class MainWindow : public QMainWindow {
class MainWindow : public QMainWindow
{
public:
MainWindow();
};

View file

@ -10,7 +10,8 @@
#include "mainwindow.h"
int main(int argc, char* argv[]) {
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
KConfig config(QStringLiteral("novusrc"));

View file

@ -17,7 +17,8 @@ static QMap<QString, QString> applications = {{QStringLiteral("Armoury - View an
{QStringLiteral("Sagasu - Explore data archives"), QStringLiteral("novus-sagasu")},
{QStringLiteral("Model Viewer - Preview MDL files"), QStringLiteral("novus-mdlviewer")}};
MainWindow::MainWindow() {
MainWindow::MainWindow()
{
setWindowTitle(QStringLiteral("Novus SDK"));
auto appList = new QListWidget();
@ -28,7 +29,7 @@ MainWindow::MainWindow() {
appList->addItem(applicationHeader);
for(const auto& name : applications.keys()) {
for (const auto &name : applications.keys()) {
appList->addItem(name);
}

View file

@ -6,11 +6,12 @@
#include <QMdiSubWindow>
#include <physis.hpp>
class FilePropertiesWindow : public QWidget {
class FilePropertiesWindow : public QWidget
{
Q_OBJECT
public:
explicit FilePropertiesWindow(GameData* data, QString path, QWidget* parent = nullptr);
explicit FilePropertiesWindow(GameData *data, QString path, QWidget *parent = nullptr);
private:
GameData* data = nullptr;
GameData *data = nullptr;
};

View file

@ -11,24 +11,25 @@ struct PathPart {
QMap<QString, PathPart> children;
};
class FileTreeWindow : public QWidget {
class FileTreeWindow : public QWidget
{
Q_OBJECT
public:
explicit FileTreeWindow(GameData* data, QWidget *parent = nullptr);
explicit FileTreeWindow(GameData *data, QWidget *parent = nullptr);
private:
GameData* data = nullptr;
GameData *data = nullptr;
void addPath(QString path);
void addUnknownPath(QString knownDirectory, uint32_t crcHash);
void traversePart(QList<QString> tokens, PathPart& part, QString pathSoFar);
std::tuple<bool, QString> traverseUnknownPath(uint32_t crcHash, PathPart& part, QString pathSoFar);
void traversePart(QList<QString> tokens, PathPart &part, QString pathSoFar);
std::tuple<bool, QString> traverseUnknownPath(uint32_t crcHash, PathPart &part, QString pathSoFar);
QMap<QString, PathPart> rootParts;
void addPaths(QTreeWidget *pWidget);
QTreeWidgetItem* addPartAndChildren(const QString& qString, const PathPart& part, const QString& pathSoFar);
QTreeWidgetItem *addPartAndChildren(const QString &qString, const PathPart &part, const QString &pathSoFar);
Q_SIGNALS:
void openFileProperties(QString path);

View file

@ -10,14 +10,13 @@
struct GameData;
class MainWindow : public QMainWindow {
class MainWindow : public QMainWindow
{
public:
MainWindow(GameData* data);
MainWindow(GameData *data);
private:
QMdiArea *mdiArea = nullptr;
QMdiArea* mdiArea = nullptr;
GameData* data;
GameData *data;
};

View file

@ -9,8 +9,10 @@
#include "filepropertieswindow.h"
FilePropertiesWindow::FilePropertiesWindow(GameData* data, QString path, QWidget* parent)
: QWidget(parent), data(data) {
FilePropertiesWindow::FilePropertiesWindow(GameData *data, QString path, QWidget *parent)
: QWidget(parent)
, data(data)
{
setWindowTitle(QStringLiteral("Properties for ") + path);
auto layout = new QFormLayout();

View file

@ -8,7 +8,10 @@
#include "filetreewindow.h"
FileTreeWindow::FileTreeWindow(GameData* data, QWidget* parent) : QWidget(parent), data(data) {
FileTreeWindow::FileTreeWindow(GameData *data, QWidget *parent)
: QWidget(parent)
, data(data)
{
setWindowTitle(QStringLiteral("File Tree"));
auto layout = new QHBoxLayout();
@ -41,7 +44,7 @@ FileTreeWindow::FileTreeWindow(GameData* data, QWidget* parent) : QWidget(parent
}*/
treeWidget->setContextMenuPolicy(Qt::CustomContextMenu);
connect(treeWidget, &QTreeWidget::customContextMenuRequested, this, [this, treeWidget](const QPoint& pos) {
connect(treeWidget, &QTreeWidget::customContextMenuRequested, this, [this, treeWidget](const QPoint &pos) {
auto *item = treeWidget->itemAt(pos);
if (item != nullptr) {
@ -63,7 +66,8 @@ FileTreeWindow::FileTreeWindow(GameData* data, QWidget* parent) : QWidget(parent
addPaths(treeWidget);
}
void FileTreeWindow::addPath(QString path) {
void FileTreeWindow::addPath(QString path)
{
auto tokens = path.split(QStringLiteral("/"));
auto nextToken = tokens[0];
tokens.pop_front();
@ -71,8 +75,9 @@ void FileTreeWindow::addPath(QString path) {
traversePart(tokens, rootParts[nextToken], nextToken);
}
void FileTreeWindow::traversePart(QList<QString> tokens, PathPart& part, QString pathSoFar) {
if(tokens.empty())
void FileTreeWindow::traversePart(QList<QString> tokens, PathPart &part, QString pathSoFar)
{
if (tokens.empty())
return;
auto nextToken = tokens[0];
@ -84,21 +89,23 @@ void FileTreeWindow::traversePart(QList<QString> tokens, PathPart& part, QString
traversePart(tokens, part.children[nextToken], pathSoFar);
}
void FileTreeWindow::addPaths(QTreeWidget *pWidget) {
for(const auto& name : rootParts.keys()) {
void FileTreeWindow::addPaths(QTreeWidget *pWidget)
{
for (const auto &name : rootParts.keys()) {
auto item = addPartAndChildren(name, rootParts.value(name), QStringLiteral(""));
pWidget->addTopLevelItem(item);
}
}
QTreeWidgetItem* FileTreeWindow::addPartAndChildren(const QString& qString, const PathPart& part, const QString& pathSoFar) {
QTreeWidgetItem *FileTreeWindow::addPartAndChildren(const QString &qString, const PathPart &part, const QString &pathSoFar)
{
QString newPath = pathSoFar.isEmpty() ? qString : pathSoFar + QStringLiteral("/") + qString;
auto item = new QTreeWidgetItem();
item->setData(0, Qt::UserRole, newPath);
item->setText(0, qString);
for(const auto& name : part.children.keys()) {
for (const auto &name : part.children.keys()) {
auto childItem = addPartAndChildren(name, part.children.value(name), newPath);
item->addChild(childItem);
}
@ -106,27 +113,29 @@ QTreeWidgetItem* FileTreeWindow::addPartAndChildren(const QString& qString, cons
return item;
}
void FileTreeWindow::addUnknownPath(QString knownDirectory, uint32_t crcHash) {
void FileTreeWindow::addUnknownPath(QString knownDirectory, uint32_t crcHash)
{
auto [found, path] = traverseUnknownPath(crcHash, rootParts[knownDirectory], knownDirectory);
if(found)
if (found)
addPath(path);
else
addPath(knownDirectory + QStringLiteral("/Unknown File Hash ") + QString::number(crcHash));
}
std::tuple<bool, QString> FileTreeWindow::traverseUnknownPath(uint32_t crcHash, PathPart &part, QString pathSoFar) {
if(part.crcHash == crcHash)
std::tuple<bool, QString> FileTreeWindow::traverseUnknownPath(uint32_t crcHash, PathPart &part, QString pathSoFar)
{
if (part.crcHash == crcHash)
return {true, pathSoFar};
bool found = false;
QString childPath = pathSoFar;
for(auto path : part.children.keys()) {
for (auto path : part.children.keys()) {
if (path.contains(QStringLiteral("Unknown")))
continue;
auto [childFound, newPath] = traverseUnknownPath(crcHash, part.children[path], pathSoFar + QStringLiteral("/") + path);
found |= childFound;
if(childFound)
if (childFound)
childPath = newPath;
}

View file

@ -10,7 +10,8 @@
#include "mainwindow.h"
#include "settings.h"
int main(int argc, char* argv[]) {
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
customizeAboutData(QStringLiteral("sagasu"), QStringLiteral("Sagasu"), QStringLiteral("Program to explore FFXIV data archives."));

View file

@ -18,7 +18,9 @@
#include "filepropertieswindow.h"
#include "filetreewindow.h"
MainWindow::MainWindow(GameData* data) : data(data) {
MainWindow::MainWindow(GameData *data)
: data(data)
{
setWindowTitle(QStringLiteral("Sagasu"));
auto fileMenu = menuBar()->addMenu(QStringLiteral("File"));
@ -60,4 +62,3 @@ MainWindow::MainWindow(GameData* data) : data(data) {
mdiArea->addSubWindow(tree);
}