1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-25 05:17:44 +00:00
novus/mdlviewer/include/mainwindow.h
Joshua Goins 275c1a9976 Overhaul race and lod combos in mdlviewer
The number of lods are now properly loaded from the model data, and race
is checked by checking for the existence of race-specific models (I
think this is the current best way?).

Also, magic_enum is added as a dependency for some enum magic involving
enumerating Race.
2022-04-17 20:02:06 -04:00

56 lines
No EOL
999 B
C++

#pragma once
#include <QMainWindow>
#include <unordered_map>
#include <QComboBox>
#include "renderer.hpp"
#include "types/slot.h"
#include "types/race.h"
struct ModelInfo {
int primaryID;
};
struct GearInfo {
std::string name;
Slot slot;
ModelInfo modelInfo;
};
class GameData;
class VulkanWindow;
class StandaloneWindow;
class MainWindow : public QMainWindow {
public:
MainWindow(GameData& data);
void exportModel(Model& model, QString fileName);
private:
void loadInitialGearInfo(GearInfo& info);
void reloadGearModel();
void reloadGearAppearance();
std::vector<GearInfo> gears;
struct LoadedGear {
GearInfo* gearInfo;
Model model;
RenderModel renderModel;
};
LoadedGear loadedGear;
QComboBox* raceCombo, *lodCombo;
Race currentRace = Race::HyurMidlanderMale;
int currentLod = 0;
GameData& data;
Renderer* renderer;
VulkanWindow* vkWindow;
StandaloneWindow* standaloneWindow;
};