From 066aa2e60e28db24bdbe34fe23512cf8b326f711 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 9 Feb 2017 02:59:10 +0100 Subject: [PATCH] Always run preloadCommonAssets even when the menu is skipped Move to before the content files are loaded so we can do preloading in parallel with content file loading --- apps/openmw/engine.cpp | 2 -- apps/openmw/mwbase/world.hpp | 2 -- apps/openmw/mwworld/worldimp.cpp | 7 ++----- apps/openmw/mwworld/worldimp.hpp | 2 -- 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index e6511949f..f77130960 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -650,8 +650,6 @@ void OMW::Engine::go() } else if (!mSkipMenu) { - mEnvironment.getWorld()->preloadCommonAssets(); - // start in main menu mEnvironment.getWindowManager()->pushGuiMode (MWGui::GM_MainMenu); try diff --git a/apps/openmw/mwbase/world.hpp b/apps/openmw/mwbase/world.hpp index ee32bc956..bba473834 100644 --- a/apps/openmw/mwbase/world.hpp +++ b/apps/openmw/mwbase/world.hpp @@ -95,8 +95,6 @@ namespace MWBase virtual ~World() {} - virtual void preloadCommonAssets() = 0; - virtual void startNewGame (bool bypass) = 0; ///< \param bypass Bypass regular game start. diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index babe6baa1..f3d44db39 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -157,6 +157,8 @@ namespace MWWorld mRendering = new MWRender::RenderingManager(viewer, rootNode, resourceSystem, &mFallback, resourcePath); mProjectileManager.reset(new ProjectileManager(mRendering->getLightRoot(), resourceSystem, mRendering, mPhysics)); + mRendering->preloadCommonAssets(); + mEsm.resize(contentFiles.size()); Loading::Listener* listener = MWBase::Environment::get().getWindowManager()->getLoadingScreen(); listener->loadingOn(); @@ -3348,9 +3350,4 @@ namespace MWWorld return mPhysics->getHitDistance(weaponPos, target) - halfExtents.y(); } - void World::preloadCommonAssets() - { - mRendering->preloadCommonAssets(); - } - } diff --git a/apps/openmw/mwworld/worldimp.hpp b/apps/openmw/mwworld/worldimp.hpp index 1fd3ce787..4b86ec14f 100644 --- a/apps/openmw/mwworld/worldimp.hpp +++ b/apps/openmw/mwworld/worldimp.hpp @@ -191,8 +191,6 @@ namespace MWWorld virtual void startNewGame (bool bypass); ///< \param bypass Bypass regular game start. - virtual void preloadCommonAssets(); - virtual void clear(); virtual int countSavedGameRecords() const;