Play company logo movie

actorid
scrawl 11 years ago
parent 5906d795c0
commit f2cd37edd0

@ -362,14 +362,9 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
// Create sound system
mEnvironment.setSoundManager (new MWSound::SoundManager(mUseSound));
// TODO: play pre-load intro videos. Need to find a way to have them receive input.
// Make videoplayer a MyGUI widget?
/*
{
MWRender::VideoPlayer player(mOgre->getScene(), mOgre->getWindow());
player.playVideo("mw_logo.bik", 1);
}
*/
std::string logo = mFallbackMap["Movies_Company_Logo"];
if (!logo.empty())
window->playVideo(logo, 1);
// Create the world
mEnvironment.setWorld( new MWWorld::World (*mOgre, mFileCollections, mContentFiles,
@ -453,10 +448,9 @@ void OMW::Engine::go()
// Is there an ini setting for this filename or something?
MWBase::Environment::get().getSoundManager()->streamMusic("Special/morrowind title.mp3");
// TODO: there are other intro videos, too. They need to be imported from Morrowind.ini.
// Unfortunately those must play BEFORE any loading is done, which will currently not work.
// The videoplayer is created by World, so all content files must be loaded first...
MWBase::Environment::get().getWindowManager()->playVideo("mw_logo.bik", true);
std::string logo = mFallbackMap["Movies_Morrowind_Logo"];
if (!logo.empty())
MWBase::Environment::get().getWindowManager()->playVideo(logo, true);
}
catch (...) {}
}

@ -25,7 +25,7 @@ namespace MWBase
virtual ~InputManager() {}
virtual void update(float dt, bool loading) = 0;
virtual void update(float dt, bool disableControls, bool disableEvents=false) = 0;
virtual void changeInputMode(bool guiMode) = 0;

@ -226,7 +226,7 @@ namespace MWGui
}
mSceneMgr->setSpecialCaseRenderQueueMode(Ogre::SceneManager::SCRQM_EXCLUDE);
MWBase::Environment::get().getInputManager()->update(0, true);
MWBase::Environment::get().getInputManager()->update(0, true, true);
// First, swap buffers from last draw, then, queue an update of the
// window contents, but don't swap buffers (which would have

@ -1437,7 +1437,7 @@ namespace MWGui
while (mVideoWidget->update())
{
MWBase::Environment::get().getInputManager()->update(0, false);
MWBase::Environment::get().getInputManager()->update(0, true, false);
mRendering->getWindow()->update();
}

@ -96,12 +96,12 @@ namespace MWInput
: mOgre(ogre)
, mPlayer(NULL)
, mEngine(engine)
, mMouseLookEnabled(true)
, mMouseLookEnabled(false)
, mMouseX(ogre.getWindow()->getWidth ()/2.f)
, mMouseY(ogre.getWindow()->getHeight ()/2.f)
, mMouseWheel(0)
, mDragDrop(false)
, mGuiCursorEnabled(false)
, mGuiCursorEnabled(true)
, mUserFile(userFile)
, mUserFileExists(userFileExists)
, mInvertY (Settings::Manager::getBool("invert y axis", "Input"))
@ -256,18 +256,21 @@ namespace MWInput
}
}
void InputManager::update(float dt, bool loading)
void InputManager::update(float dt, bool disableControls, bool disableEvents)
{
mInputManager->setMouseVisible(MWBase::Environment::get().getWindowManager()->getCursorVisible());
mInputManager->capture(loading);
mInputManager->capture(disableEvents);
// inject some fake mouse movement to force updating MyGUI's widget states
MyGUI::InputManager::getInstance().injectMouseMove( int(mMouseX), int(mMouseY), mMouseWheel);
// update values of channels (as a result of pressed keys)
if (!loading)
if (!disableControls)
mInputBinder->update(dt);
if (disableControls)
return;
bool grab = !MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_MainMenu)
&& MWBase::Environment::get().getWindowManager()->getMode() != MWGui::GM_Console;
@ -288,9 +291,6 @@ namespace MWInput
mInputManager->warpMouse(mMouseX, mMouseY);
}
if (loading)
return;
// Disable movement in Gui mode
if (MWBase::Environment::get().getWindowManager()->isGuiMode()
|| MWBase::Environment::get().getStateManager()->getState() != MWBase::StateManager::State_Running)

@ -68,7 +68,7 @@ namespace MWInput
/// Clear all savegame-specific data
virtual void clear();
virtual void update(float dt, bool loading);
virtual void update(float dt, bool disableControls, bool disableEvents=false);
void setPlayer (MWWorld::Player* player) { mPlayer = player; }

@ -9,6 +9,6 @@
<Layer name="Popup" overlapped="true" peek="true"/>
<Layer name="DragAndDrop" overlapped="false" peek="false"/>
<Layer name="LoadingScreen" overlapped="false" peek="true"/>
<Layer name="Overlay" overlapped="false" peek="false"/>
<Layer name="Overlay" overlapped="false" peek="true"/>
<Layer name="Pointer" overlapped="false" peek="false"/>
</MyGUI>

Loading…
Cancel
Save