1+ #include " CResourceNameDatabase.hpp"
2+
13#include < string>
24#include < string_view>
35#include < numeric>
@@ -167,6 +169,7 @@ struct Application {
167169 FileStoreManager& m_fileMgr;
168170 CVarManager& m_cvarManager;
169171 CVarCommons& m_cvarCommons;
172+ CResourceNameDatabase& m_nameDatabase;
170173 ImGuiConsole m_imGuiConsole;
171174
172175 std::string m_deferredProject;
@@ -187,12 +190,14 @@ struct Application {
187190 // is built, i.e during initialization
188191
189192public:
190- Application (int argc, char ** argv, FileStoreManager& fileMgr, CVarManager& cvarMgr, CVarCommons& cvarCmns)
193+ Application (int argc, char ** argv, FileStoreManager& fileMgr, CVarManager& cvarMgr, CVarCommons& cvarCmns,
194+ CResourceNameDatabase& nameDatabase)
191195 : m_argc(argc)
192196 , m_argv(argv)
193197 , m_fileMgr(fileMgr)
194198 , m_cvarManager(cvarMgr)
195199 , m_cvarCommons(cvarCmns)
200+ , m_nameDatabase(nameDatabase)
196201 , m_imGuiConsole(cvarMgr, cvarCmns) {}
197202
198203 void onAppLaunched (const AuroraInfo& info) noexcept {
@@ -284,7 +289,7 @@ struct Application {
284289 const auto targetFrameTime = getTargetFrameTime ();
285290 bool skipRetrace = false ;
286291 if (g_ResFactory != nullptr ) {
287- // OPTICK_EVENT("Async Load Resources");
292+ // OPTICK_EVENT("Async Load Resources");
288293 const auto idleTime = m_limiter.SleepTime (targetFrameTime);
289294 skipRetrace = g_ResFactory->AsyncIdle (idleTime);
290295 }
@@ -295,12 +300,12 @@ struct Application {
295300 } else {
296301 // No more to load, and we're under frame time
297302 {
298- // OPTICK_EVENT("Sleep");
303+ // OPTICK_EVENT("Sleep");
299304 m_limiter.Sleep (targetFrameTime);
300305 }
301306 }
302307
303- // OPTICK_FRAME("MainThread");
308+ // OPTICK_FRAME("MainThread");
304309
305310 // Check if fullscreen has been toggled, if so set the fullscreen cvar accordingly
306311 if (m_fullscreenToggleRequested) {
@@ -364,7 +369,7 @@ struct Application {
364369 }
365370
366371 void onAppDraw () noexcept {
367- // OPTICK_EVENT("Draw");
372+ // OPTICK_EVENT("Draw");
368373 if (g_Renderer != nullptr ) {
369374 g_Renderer->BeginScene ();
370375 if (g_mainMP1) {
@@ -376,7 +381,7 @@ struct Application {
376381 }
377382
378383 void onAppPostDraw () noexcept {
379- // OPTICK_EVENT("PostDraw");
384+ // OPTICK_EVENT("PostDraw");
380385// if (m_voiceEngine) {
381386// m_voiceEngine->pumpAndMixVoices();
382387// }
@@ -545,6 +550,8 @@ int main(int argc, char** argv) {
545550 do {
546551 metaforce::CVarManager cvarMgr{fileMgr};
547552 metaforce::CVarCommons cvarCmns{cvarMgr};
553+ metaforce::CResourceNameDatabase nameDatabase{fileMgr};
554+
548555 cvarMgr.parseCommandLine (args);
549556 if (!restart) {
550557 // TODO add clear loggers func to logvisor so we can recreate loggers on restart
@@ -569,7 +576,7 @@ int main(int argc, char** argv) {
569576 }
570577 }
571578
572- g_app = std::make_unique<metaforce::Application>(argc, argv, fileMgr, cvarMgr, cvarCmns);
579+ g_app = std::make_unique<metaforce::Application>(argc, argv, fileMgr, cvarMgr, cvarCmns, nameDatabase );
573580 std::string configPath{fileMgr.getStoreRoot ()};
574581
575582 const AuroraConfig config{
0 commit comments