Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QtFRED campaign editor #3392

Merged
merged 87 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from 70 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
52427a7
Add initial CampaignEditorDialog
the-maddin Apr 19, 2021
3768473
Add more slots
the-maddin Apr 23, 2021
04c136f
add model with initial functionality
the-maddin Apr 23, 2021
7acd4c6
sync changes to model (initial)
the-maddin Apr 23, 2021
c4f84ea
alternative layout
the-maddin Apr 23, 2021
53e30ba
Connect some more signals/slots
the-maddin Apr 25, 2021
ca23d30
File ops UI logic, cleanup
the-maddin Apr 27, 2021
30237c8
initial updateUI, explicit model modification
the-maddin Apr 29, 2021
da83c3a
Tie campaignmodel to campaign file, use QStrings in
the-maddin Apr 30, 2021
e2b9a5a
Initial campaign loading & trivial uiUpdate
the-maddin May 2, 2021
5cbe64c
Implement initial ships/weapons lists, intialize
the-maddin May 4, 2021
f2cfac1
Fix compile issue, correct reload behaviour
the-maddin May 5, 2021
fc65df0
Register initial... lists changes
the-maddin May 5, 2021
232eb2a
Allow full-length paths for campaign files
the-maddin May 9, 2021
54a64cb
Deal with windows filenames in CFile
the-maddin May 13, 2021
881f476
Use CheckedDataListModel improvements
the-maddin May 25, 2021
20fc9d6
Create available mission list
the-maddin May 24, 2021
ca982fa
Immutable campaignType, file load & menu changes
the-maddin May 26, 2021
80fc7a5
gcc11: add missing include
the-maddin May 17, 2021
9241c49
Warn before dropping unloadable missionDropped
the-maddin May 27, 2021
6e2723a
Update widgets on mission selection change
the-maddin May 28, 2021
3349c99
Clean up data entry widget signalling
the-maddin May 29, 2021
1a81682
Show player number of multi campaigns
the-maddin May 30, 2021
144ae46
model initialisation cleanup
the-maddin May 30, 2021
f7ecb85
CampaignMissionData: load cmission, display
the-maddin May 30, 2021
61fb9c5
CMission Data: use combo boxes where possible
the-maddin May 30, 2021
c2e8ba9
Use campaign branch sexp_tree and load formulas
the-maddin Jun 13, 2021
b21d380
Handle branch tree selection
the-maddin Jun 15, 2021
3fd825b
SaveAs shortcut
the-maddin Jun 16, 2021
9011319
Use new CheckedDataListModel
the-maddin Jun 17, 2021
b64bd78
Some more clang fixes
the-maddin Jun 18, 2021
33b63e5
Implement FRED-Mission button
the-maddin Jun 19, 2021
f405496
Clang-tidy fixes
the-maddin Jun 19, 2021
c95fe1c
clang
the-maddin Jun 20, 2021
b193990
load and display loop data
the-maddin Jun 20, 2021
93a1f3e
Use finer UI update control instead of modelChanged
the-maddin Jun 26, 2021
a7badba
cleanup
the-maddin Jun 26, 2021
b97129d
Cleanup mission list loading, drop mission object
the-maddin Jun 27, 2021
dd2c5a2
Comboboxes for loop brief & anim
the-maddin Jun 28, 2021
856726d
pick pulled model changes
the-maddin Jun 28, 2021
16a5b1c
Improve mission list robustness
the-maddin Jun 28, 2021
ec84c71
comboBox tweak
the-maddin Jun 29, 2021
8db39a6
WIP note
the-maddin Jun 29, 2021
ae9b604
Merge branch 'master' into qt-campaign-editor
the-maddin Jun 29, 2021
5e57094
Merge branch 'master' into qt-campaign-editor
the-maddin Sep 19, 2021
41d6563
validate and use current branch index
the-maddin Jul 1, 2021
2f36134
Parse eligible & campaign missions for event names
the-maddin Jul 11, 2021
458d2f5
custom mission selection & linking context menu
the-maddin Jul 18, 2021
439f633
Add branches & conditions in model
the-maddin Aug 1, 2021
eec2ce1
Model structure and TextEdit cleanup
the-maddin Aug 4, 2021
2989034
Dialog cleanup
the-maddin Aug 12, 2021
30b484b
Use AssociatedPlainTextDocument
the-maddin Aug 12, 2021
b08109c
Fix branch sexptree popup menu part 1
the-maddin Aug 19, 2021
c41e5c9
Always replace corrupted model after load attempt
the-maddin Aug 22, 2021
19817f4
reorder model impl and lazy init some constants
the-maddin Aug 22, 2021
e209927
Fix branch sexptree popup menu part 2
the-maddin Aug 27, 2021
e37ca8f
Model data access fix
the-maddin Aug 27, 2021
e41bde6
Fix branch sexptree popup menu part 3
the-maddin Aug 31, 2021
413842c
Branch moving & branch UI misc
the-maddin Sep 19, 2021
15752d1
Integrate branch buttons into context menu
the-maddin Sep 24, 2021
5eb4c35
clang msvc
the-maddin Sep 28, 2021
a8483c5
Saving part 1: Output Campaign to file
the-maddin Oct 15, 2021
636f693
Ensure correct flags and loop state
the-maddin Nov 8, 2021
4857f32
Saving part 2: Campaign Specs to Campaign
the-maddin Jan 6, 2022
0d82ca5
clang stuff
the-maddin Jan 8, 2022
566d15d
Add first mission selection, always keep valid
the-maddin Jan 8, 2022
84cb7fd
Export campaign model to Campaign struct
the-maddin Mar 20, 2022
8bf51ff
fix CheckedDataListModel pointer issue
the-maddin Mar 24, 2022
48f99e3
Merge branch 'master' into qt-campaign-editor
the-maddin Mar 24, 2022
f142780
clang
the-maddin Mar 24, 2022
ccf8629
incorporate feedback
the-maddin Mar 28, 2022
e3a153e
Clarify abbreviations
the-maddin Apr 11, 2022
e5f80a1
incorporate feedback
the-maddin Apr 20, 2022
0a7ff1b
changes jg18 v3
the-maddin Apr 28, 2022
d9a9cb5
changes z64555 v1.1
the-maddin May 8, 2022
ec3ad17
changes z64555 v1.2
the-maddin May 8, 2022
9336d72
changes z64555 v1.3
the-maddin May 15, 2022
401a266
changes z64555 v1.4
the-maddin May 22, 2022
2eb6410
Merge branch 'master' into qt-campaign-editor
the-maddin May 22, 2022
5d0fadb
doxy
the-maddin May 23, 2022
3d5ae71
Merge remote-tracking branch 'refs/remotes/upstream/master' into qt-c…
the-maddin Jun 4, 2022
2c5f52a
Integrated error checking
the-maddin Jun 6, 2022
a1fc090
unified warning message handling
the-maddin Jun 12, 2022
db68e30
fix qvector error
the-maddin Jun 13, 2022
ddeb40a
checks fix
the-maddin Jun 24, 2022
439c22b
Merge branch 'master' into qt-campaign-editor
the-maddin Feb 20, 2023
4e9309a
Comment branch types
the-maddin Feb 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/menuui/readyroom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ void sim_room_close()
//
void sim_room_do_frame(float /*frametime*/)
{
char buf[256];
char buf[CF_MAX_PATHNAME_LENGTH + 4];
jg18 marked this conversation as resolved.
Show resolved Hide resolved
the-maddin marked this conversation as resolved.
Show resolved Hide resolved
int i, k, y, line;
int font_height = gr_get_font_height();
int select_tease_line = -1; // line mouse is down on, but won't be selected until button released
Expand Down
2 changes: 1 addition & 1 deletion code/mission/missioncampaign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ int mission_campaign_load(const char* filename, player* pl, int load_savefile, b

// copy filename to campaign structure minus the extension
auto len = strlen(filename) - 4;
Assert(len < MAX_FILENAME_LEN);
Assert(len < CF_MAX_PATHNAME_LENGTH);
jg18 marked this conversation as resolved.
Show resolved Hide resolved
strncpy(Campaign.filename, filename, len);
Campaign.filename[len] = '\0';

Expand Down
3 changes: 2 additions & 1 deletion code/mission/missioncampaign.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "stats/scoring.h"
#include "parse/sexp.h"
#include "cfile/cfile.h"
#include "parse/sexp_container.h"

struct sexp_variable;
Expand Down Expand Up @@ -109,7 +110,7 @@ class campaign
{
public:
char name[NAME_LENGTH]; // name of the campaign
char filename[MAX_FILENAME_LEN]; // filename the campaign info is in
char filename[CF_MAX_PATHNAME_LENGTH]; // filename the campaign info is in
the-maddin marked this conversation as resolved.
Show resolved Hide resolved
char *desc; // description of campaign
int type; // type of campaign
int flags; // flags - Goober5000
Expand Down
5 changes: 5 additions & 0 deletions qtfred/source_groups.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ add_file_folder("Source/Mission/Dialogs"
src/mission/dialogs/AbstractDialogModel.h
src/mission/dialogs/AsteroidEditorDialogModel.cpp
src/mission/dialogs/AsteroidEditorDialogModel.h
src/mission/dialogs/CampaignEditorDialogModel.cpp
src/mission/dialogs/CampaignEditorDialogModel.h
src/mission/dialogs/CommandBriefingDialogModel.cpp
src/mission/dialogs/CommandBriefingDialogModel.h
src/mission/dialogs/CustomWingNamesDialogModel.cpp
Expand Down Expand Up @@ -92,6 +94,8 @@ add_file_folder("Source/UI/Dialogs"
src/ui/dialogs/BackgroundEditorDialog.cpp
src/ui/dialogs/BriefingEditorDialog.cpp
src/ui/dialogs/BriefingEditorDialog.h
src/ui/dialogs/CampaignEditorDialog.h
src/ui/dialogs/CampaignEditorDialog.cpp
src/ui/dialogs/CommandBriefingDialog.cpp
src/ui/dialogs/CommandBriefingDialog.h
src/ui/dialogs/CustomWingNamesDialog.cpp
Expand Down Expand Up @@ -155,6 +159,7 @@ add_file_folder("UI"
ui/AsteroidEditorDialog.ui
ui/BackgroundEditor.ui
ui/BriefingEditorDialog.ui
ui/CampaignEditorDialog.ui
ui/CommandBriefingDialog.ui
ui/CustomWingNamesDialog.ui
ui/EventEditorDialog.ui
Expand Down
111 changes: 86 additions & 25 deletions qtfred/src/CheckedDataListModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class CheckedDataListModel : public QAbstractListModel
RowData& operator=(RowData&& move) = delete;

inline U& internalData() {return _internalData;}
inline const U& internalData() const {return _internalData;}
the-maddin marked this conversation as resolved.
Show resolved Hide resolved
};

template<class U>
Expand All @@ -51,6 +52,7 @@ class CheckedDataListModel : public QAbstractListModel
RowData& operator=(RowData&& move) = delete;

inline U& internalData() {return *_internalData;}
inline const U& internalData() const {return *_internalData;}
};

public:
Expand Down Expand Up @@ -86,11 +88,11 @@ class CheckedDataListModel : public QAbstractListModel

QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override {
if (!index.isValid())
return QVariant();
return {};
the-maddin marked this conversation as resolved.
Show resolved Hide resolved

auto srow = static_cast<size_t>(index.row());
if (srow >= items.size())
return QVariant();
return {};

if (role == Qt::DisplayRole)
return items[srow]._text;
Expand All @@ -99,15 +101,20 @@ class CheckedDataListModel : public QAbstractListModel
else if (items[srow]._color != Qt::color0 && role == Qt::ForegroundRole)
return QBrush(items[srow]._color);
else
return QVariant();
return {};
}

inline T& internalData(const QModelIndex &index) {
return items[static_cast<size_t>(index.row())].internalData();
inline const T* internalData(const QModelIndex &index) const {
if (! index.isValid()) return nullptr;
the-maddin marked this conversation as resolved.
Show resolved Hide resolved
the-maddin marked this conversation as resolved.
Show resolved Hide resolved
size_t row{static_cast<size_t>(index.row())};
the-maddin marked this conversation as resolved.
Show resolved Hide resolved
if (row >= items.size()) return nullptr;
return &items[row].internalData();
}

inline const T& internalDataConst(const QModelIndex &index) const {
return items[static_cast<size_t>(index.row())].internalData();
inline T* internalData(const QModelIndex &index) {
return const_cast<T*>(
the-maddin marked this conversation as resolved.
Show resolved Hide resolved
const_cast<const CheckedDataListModel<T>*>(this)
->internalData(index));
}

bool setData(const QModelIndex &index, const QVariant &value,
Expand All @@ -119,14 +126,7 @@ class CheckedDataListModel : public QAbstractListModel
return false;

if (data(index, role) != value) {
items[srow]._checked = value == Qt::Checked;
if (items[srow]._checked) {
checkeds.insert(&items[srow].internalData());
checkedsConst.insert(&items[srow].internalData());
} else {
checkeds.erase(&items[srow].internalData());
checkedsConst.erase(&items[srow].internalData());
}
items[srow]._checked = (value == Qt::Checked);
dataChanged(index, index, QVector<int>() << role);
return true;
} else
Expand All @@ -141,21 +141,84 @@ class CheckedDataListModel : public QAbstractListModel
return defaultFlags;
}

inline const SCP_unordered_set<T*>& getCheckedData() {
return checkeds;
private:
the-maddin marked this conversation as resolved.
Show resolved Hide resolved
template<typename V>
the-maddin marked this conversation as resolved.
Show resolved Hide resolved
inline void getCheckedData2(SCP_unordered_set<V*> &set) {
the-maddin marked this conversation as resolved.
Show resolved Hide resolved
for (auto& it : items)
the-maddin marked this conversation as resolved.
Show resolved Hide resolved
if (it._checked)
set.insert(&it.internalData());
}

inline const SCP_unordered_set<const T*>& getCheckedDataConst() const {
return checkedsConst;
public:
inline SCP_unordered_set<T*> getCheckedData() {
SCP_unordered_set<T*> ret{items.size() / 2};
z64555 marked this conversation as resolved.
Show resolved Hide resolved
getCheckedData2(ret);
return ret;
}

inline SCP_unordered_set<const T*> getCheckedData() const {
z64555 marked this conversation as resolved.
Show resolved Hide resolved
SCP_unordered_set<const T*> ret{items.size() / 2};
const_cast<CheckedDataListModel<T>*>(this)->getCheckedData2(ret);
return ret;
}

struct Iterator
jg18 marked this conversation as resolved.
Show resolved Hide resolved
{
using iterator_delegate = typename SCP_vector<RowData<T>>::iterator;
z64555 marked this conversation as resolved.
Show resolved Hide resolved

using iterator_category = std::forward_iterator_tag;
using difference_type = typename SCP_vector<RowData<T>>::iterator::difference_type;
using value_type = std::pair<T, bool>;
using pointer = std::pair<const T*, bool>;
using reference = std::pair<T&, bool>;

Iterator(iterator_delegate it) : _it(it) {}

reference operator*() const { return reference(_it->internalData(), _it->_checked); }
pointer operator->() { return pointer(&_it->internalData(), _it->_checked); }
Iterator& operator++() { _it++; return *this; }
Iterator operator++(int) { Iterator tmp = *this; ++(*this); return tmp; }
z64555 marked this conversation as resolved.
Show resolved Hide resolved
friend bool operator== (const Iterator &a, const Iterator &b) { return a._it == b._it;}
friend bool operator!= (const Iterator &a, const Iterator &b) { return a._it != b._it;}
the-maddin marked this conversation as resolved.
Show resolved Hide resolved

private:
iterator_delegate _it;
};

inline Iterator begin() { return Iterator(items.begin()); }
inline Iterator end() { return Iterator(items.end()); }

struct ConstIterator
{
using iterator_delegate = typename SCP_vector<RowData<T>>::const_iterator;
z64555 marked this conversation as resolved.
Show resolved Hide resolved

using iterator_category = std::forward_iterator_tag;
using difference_type = typename SCP_vector<RowData<T>>::iterator::difference_type;
using value_type = std::pair<T, bool>;
using pointer = std::pair<const T*, bool>;
using reference = std::pair<const T&, bool>;

ConstIterator(iterator_delegate it) : _it(it) {}

reference operator*() const { return reference(_it->internalData(), _it->_checked); }
pointer operator->() { return pointer(&_it->internalData(), _it->_checked); }
ConstIterator& operator++() { _it++; return *this; }
ConstIterator operator++(int) { ConstIterator tmp = *this; ++(*this); return tmp; }
friend bool operator== (const ConstIterator &a, const ConstIterator &b) { return a._it == b._it;}
the-maddin marked this conversation as resolved.
Show resolved Hide resolved
friend bool operator!= (const ConstIterator &a, const ConstIterator &b) { return a._it != b._it;}

private:
iterator_delegate _it;
};

inline ConstIterator begin() const { return ConstIterator(items.cbegin()); }
inline ConstIterator end() const { return ConstIterator(items.cend()); }
inline ConstIterator cbegin() const { return begin(); }
inline ConstIterator cend() const { return end(); }

template<class... Args>
inline void initRow(Args&&... args) {
items.emplace_back(std::forward<Args>(args)...);
if (items.back()._checked) {
checkeds.insert(&items.back().internalData());
checkedsConst.insert(&items.back().internalData());
}
}

template<class... Args>
Expand All @@ -173,8 +236,6 @@ class CheckedDataListModel : public QAbstractListModel

private:
SCP_vector<RowData<T>> items;
SCP_unordered_set<T*> checkeds;
SCP_unordered_set<const T*> checkedsConst;
};
}
}
Expand Down
89 changes: 46 additions & 43 deletions qtfred/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ int main(int argc, char* argv[]) {
// Expect that the platform library is in the same directory
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath());

QGuiApplication::setApplicationDisplayName(app.tr("qtFRED v%1").arg(FS_VERSION_FULL));
QGuiApplication::setApplicationDisplayName(QApplication::tr("qtFRED v%1").arg(FS_VERSION_FULL));
the-maddin marked this conversation as resolved.
Show resolved Hide resolved

#ifndef NDEBUG
QLoggingCategory::defaultCategory()->setEnabled(QtDebugMsg, true);
Expand All @@ -122,47 +122,50 @@ int main(int argc, char* argv[]) {
auto baseDir = QDir::toNativeSeparators(QDir::current().absolutePath());

typedef std::unordered_map<SubSystem, QString> SubsystemMap;
SubsystemMap initializers = {{ SubSystem::OS, app.tr("Initializing OS interface") },
{ SubSystem::CommandLine, app.tr("Parsing command line") },
{ SubSystem::Timer, app.tr("Initializing Timer") },
{ SubSystem::CFile, app.tr("Initializing CFile") },
{ SubSystem::Locale, app.tr("Initializing locale") },
{ SubSystem::Sound, app.tr("Initializing sound") },
{ SubSystem::Graphics, app.tr("Initializing graphics") },
{ SubSystem::Scripting, app.tr("Initializing scripting") },
{ SubSystem::Fonts, app.tr("Initializing Fonts") },
{ SubSystem::Keyboard, app.tr("Initializing keyboard") },
{ SubSystem::Mouse, app.tr("Initializing mouse") },
{ SubSystem::Particles, app.tr("Initializing particles") },
{ SubSystem::Iff, app.tr("Initializing IFF") },
{ SubSystem::Objects, app.tr("Initializing objects") },
{ SubSystem::Models, app.tr("Initializing model system") },
{ SubSystem::Species, app.tr("Initializing species") },
{ SubSystem::BriefingIcons, app.tr("Initializing briefing icons") },
{ SubSystem::HudCommOrders, app.tr("Initializing HUD comm orders") },
{ SubSystem::AlphaColors, app.tr("Initializing alpha colors") },
{ SubSystem::GameSound, app.tr("Initializing briefing icons") },
{ SubSystem::MissionBrief, app.tr("Initializing briefings") },
{ SubSystem::AI, app.tr("Initializing AI") },
{ SubSystem::AIProfiles, app.tr("Initializing AI profiles") },
{ SubSystem::Armor, app.tr("Initializing armors") },
{ SubSystem::Weapon, app.tr("Initializing weaponry") },
{ SubSystem::Medals, app.tr("Initializing medals") },
{ SubSystem::Glowpoints, app.tr("Initializing glow points") },
{ SubSystem::Ships, app.tr("Initializing ships") },
{ SubSystem::Parse, app.tr("Initializing parser") },
{ SubSystem::TechroomIntel, app.tr("Initializing techroom intel") },
{ SubSystem::Nebulas, app.tr("Initializing nebulas") },
{ SubSystem::Stars, app.tr("Initializing stars") },
{ SubSystem::Ssm, app.tr("Initializing SSMs") },
{ SubSystem::EventMusic, app.tr("Initializing event music") },
{ SubSystem::FictionViewer, app.tr("Initializing fiction viewer") },
{ SubSystem::CommandBriefing, app.tr("Initializing command briefing") },
{ SubSystem::Campaign, app.tr("Initializing campaign system") },
{ SubSystem::NebulaLightning, app.tr("Initializing nebula lightning") },
{ SubSystem::FFmpeg, app.tr("Initializing FFmpeg") },
{ SubSystem::DynamicSEXPs, app.tr("Initializing dynamic SEXP system") },
{ SubSystem::ScriptingInitHook, app.tr("Running game init scripting hook") },
SubsystemMap initializers = {{ SubSystem::OS, QApplication::tr("Initializing OS interface") },
{ SubSystem::CommandLine, QApplication::tr("Parsing command line") },
{ SubSystem::Timer, QApplication::tr("Initializing Timer") },
{ SubSystem::CFile, QApplication::tr("Initializing CFile") },
{ SubSystem::Locale, QApplication::tr("Initializing locale") },
{ SubSystem::Sound, QApplication::tr("Initializing sound") },
{ SubSystem::Graphics, QApplication::tr("Initializing graphics") },
{ SubSystem::Scripting, QApplication::tr("Initializing scripting") },
{ SubSystem::Fonts, QApplication::tr("Initializing Fonts") },
{ SubSystem::Keyboard, QApplication::tr("Initializing keyboard") },
{ SubSystem::Mouse, QApplication::tr("Initializing mouse") },
{ SubSystem::Particles, QApplication::tr("Initializing particles") },
{ SubSystem::Iff, QApplication::tr("Initializing IFF") },
{ SubSystem::Objects, QApplication::tr("Initializing objects") },
{ SubSystem::Models, QApplication::tr("Initializing model system") },
{ SubSystem::Species, QApplication::tr("Initializing species") },
{ SubSystem::BriefingIcons, QApplication::tr("Initializing briefing icons") },
{ SubSystem::HudCommOrders, QApplication::tr("Initializing HUD comm orders") },
{ SubSystem::AlphaColors, QApplication::tr("Initializing alpha colors") },
{ SubSystem::GameSound, QApplication::tr("Initializing briefing icons") },
{ SubSystem::MissionBrief, QApplication::tr("Initializing briefings") },
{ SubSystem::AI, QApplication::tr("Initializing AI") },
{ SubSystem::AIProfiles, QApplication::tr("Initializing AI profiles") },
{ SubSystem::Armor, QApplication::tr("Initializing armors") },
{ SubSystem::Weapon, QApplication::tr("Initializing weaponry") },
{ SubSystem::Medals, QApplication::tr("Initializing medals") },
{ SubSystem::Glowpoints, QApplication::tr("Initializing glow points") },
{ SubSystem::Ships, QApplication::tr("Initializing ships") },
{ SubSystem::Parse, QApplication::tr("Initializing parser") },
{ SubSystem::TechroomIntel, QApplication::tr("Initializing techroom intel") },
{ SubSystem::Nebulas, QApplication::tr("Initializing nebulas") },
{ SubSystem::Stars, QApplication::tr("Initializing stars") },
{ SubSystem::Ssm, QApplication::tr("Initializing SSMs") },
{ SubSystem::EventMusic, QApplication::tr("Initializing event music") },
{ SubSystem::FictionViewer, QApplication::tr("Initializing fiction viewer") },
{ SubSystem::CommandBriefing, QApplication::tr("Initializing command briefing") },
{ SubSystem::Cutscenes, QApplication::tr("Initializing cutscenes")},
{ SubSystem::Mainhalls, QApplication::tr("Initializing mainhalls")},
{ SubSystem::Ranks, QApplication::tr("Initializing ranks")},
{ SubSystem::Campaign, QApplication::tr("Initializing campaign system") },
{ SubSystem::NebulaLightning, QApplication::tr("Initializing nebula lightning") },
{ SubSystem::FFmpeg, QApplication::tr("Initializing FFmpeg") },
{ SubSystem::DynamicSEXPs, QApplication::tr("Initializing dynamic SEXP system") },
{ SubSystem::ScriptingInitHook, QApplication::tr("Running game init scripting hook") },
};

auto initSuccess = fso::fred::initialize(baseDir.toStdString(), argc, argv, fred.get(), [&](const SubSystem& which) {
Expand All @@ -176,7 +179,7 @@ int main(int argc, char* argv[]) {
return -1;
}

splash.showMessage(app.tr("Showing editor window"), Qt::AlignHCenter | Qt::AlignBottom, Qt::white);
splash.showMessage(QApplication::tr("Showing editor window"), Qt::AlignHCenter | Qt::AlignBottom, Qt::white);
splash.finish(qApp->activeWindow());

// Use this to keep the app responsive
Expand Down
Loading