forked from teamnwah/openmw-tes3coop
removed --report-focus which is now useless
This commit is contained in:
parent
4889902b98
commit
934caf7a2b
4 changed files with 0 additions and 62 deletions
|
@ -72,47 +72,6 @@ void OMW::Engine::executeLocalScripts()
|
||||||
localScripts.setIgnore (MWWorld::Ptr());
|
localScripts.setIgnore (MWWorld::Ptr());
|
||||||
}
|
}
|
||||||
|
|
||||||
void OMW::Engine::updateFocusReport (float duration)
|
|
||||||
{
|
|
||||||
|
|
||||||
if ((mFocusTDiff += duration)>0.25)
|
|
||||||
{
|
|
||||||
mFocusTDiff = 0;
|
|
||||||
|
|
||||||
std::string name;
|
|
||||||
|
|
||||||
std::string handle = mEnvironment.mWorld->getFacedHandle();
|
|
||||||
|
|
||||||
if (!handle.empty())
|
|
||||||
{
|
|
||||||
// the faced handle is not updated immediately, so on a cell change it might
|
|
||||||
// point to an object that doesn't exist anymore
|
|
||||||
// therefore, we are catching the "Unknown Ogre handle" exception that occurs in this case
|
|
||||||
try
|
|
||||||
{
|
|
||||||
MWWorld::Ptr ptr = mEnvironment.mWorld->getPtrViaHandle (handle);
|
|
||||||
|
|
||||||
if (!ptr.isEmpty()){
|
|
||||||
name = MWWorld::Class::get (ptr).getName (ptr);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (std::runtime_error& e)
|
|
||||||
{}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (name!=mFocusName)
|
|
||||||
{
|
|
||||||
mFocusName = name;
|
|
||||||
|
|
||||||
if (mFocusName.empty())
|
|
||||||
std::cout << "Unfocus" << std::endl;
|
|
||||||
else
|
|
||||||
std::cout << "Focus: " << name << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void OMW::Engine::setAnimationVerbose(bool animverbose){
|
void OMW::Engine::setAnimationVerbose(bool animverbose){
|
||||||
if(animverbose){
|
if(animverbose){
|
||||||
NifOgre::NIFLoader::getSingletonPtr()->setOutputAnimFiles(true);
|
NifOgre::NIFLoader::getSingletonPtr()->setOutputAnimFiles(true);
|
||||||
|
@ -170,10 +129,6 @@ bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt)
|
||||||
window->getBatchCount());
|
window->getBatchCount());
|
||||||
|
|
||||||
mEnvironment.mWindowManager->onFrame(mEnvironment.mFrameDuration);
|
mEnvironment.mWindowManager->onFrame(mEnvironment.mFrameDuration);
|
||||||
|
|
||||||
// report focus object (for debugging)
|
|
||||||
if (mReportFocus)
|
|
||||||
updateFocusReport (mEnvironment.mFrameDuration);
|
|
||||||
}
|
}
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
|
@ -191,7 +146,6 @@ OMW::Engine::Engine(Files::ConfigurationManager& configurationManager)
|
||||||
, mNewGame (false)
|
, mNewGame (false)
|
||||||
, mUseSound (true)
|
, mUseSound (true)
|
||||||
, mCompileAll (false)
|
, mCompileAll (false)
|
||||||
, mReportFocus (false)
|
|
||||||
, mFocusTDiff (0)
|
, mFocusTDiff (0)
|
||||||
, mScriptContext (0)
|
, mScriptContext (0)
|
||||||
, mFSStrict (false)
|
, mFSStrict (false)
|
||||||
|
@ -303,11 +257,6 @@ void OMW::Engine::setNewGame(bool newGame)
|
||||||
mNewGame = newGame;
|
mNewGame = newGame;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OMW::Engine::setReportFocus (bool report)
|
|
||||||
{
|
|
||||||
mReportFocus = report;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialise and enter main loop.
|
// Initialise and enter main loop.
|
||||||
|
|
||||||
void OMW::Engine::go()
|
void OMW::Engine::go()
|
||||||
|
|
|
@ -73,7 +73,6 @@ namespace OMW
|
||||||
bool mNewGame;
|
bool mNewGame;
|
||||||
bool mUseSound;
|
bool mUseSound;
|
||||||
bool mCompileAll;
|
bool mCompileAll;
|
||||||
bool mReportFocus;
|
|
||||||
float mFocusTDiff;
|
float mFocusTDiff;
|
||||||
std::string mFocusName;
|
std::string mFocusName;
|
||||||
std::map<std::string,std::string> mFallbackMap;
|
std::map<std::string,std::string> mFallbackMap;
|
||||||
|
@ -100,8 +99,6 @@ namespace OMW
|
||||||
|
|
||||||
void executeLocalScripts();
|
void executeLocalScripts();
|
||||||
|
|
||||||
void updateFocusReport (float duration);
|
|
||||||
|
|
||||||
virtual bool frameRenderingQueued (const Ogre::FrameEvent& evt);
|
virtual bool frameRenderingQueued (const Ogre::FrameEvent& evt);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -144,9 +141,6 @@ namespace OMW
|
||||||
/// Start as a new game.
|
/// Start as a new game.
|
||||||
void setNewGame(bool newGame);
|
void setNewGame(bool newGame);
|
||||||
|
|
||||||
/// Write name of focussed object to cout
|
|
||||||
void setReportFocus (bool report);
|
|
||||||
|
|
||||||
/// Initialise and enter main loop.
|
/// Initialise and enter main loop.
|
||||||
void go();
|
void go();
|
||||||
|
|
||||||
|
|
|
@ -155,9 +155,6 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
|
||||||
"\n\twin1251 - Cyrillic alphabet such as Russian, Bulgarian, Serbian Cyrillic and other languages\n"
|
"\n\twin1251 - Cyrillic alphabet such as Russian, Bulgarian, Serbian Cyrillic and other languages\n"
|
||||||
"\n\twin1252 - Western European (Latin) alphabet, used by default")
|
"\n\twin1252 - Western European (Latin) alphabet, used by default")
|
||||||
|
|
||||||
("report-focus", bpo::value<bool>()->implicit_value(true)
|
|
||||||
->default_value(false), "write name of focussed object to cout")
|
|
||||||
|
|
||||||
("fallback", bpo::value<FallbackMap>()->default_value(FallbackMap(), "")
|
("fallback", bpo::value<FallbackMap>()->default_value(FallbackMap(), "")
|
||||||
->multitoken()->composing(), "fallback values")
|
->multitoken()->composing(), "fallback values")
|
||||||
|
|
||||||
|
@ -265,7 +262,6 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
|
||||||
engine.setSoundUsage(!variables["nosound"].as<bool>());
|
engine.setSoundUsage(!variables["nosound"].as<bool>());
|
||||||
engine.setScriptsVerbosity(variables["script-verbose"].as<bool>());
|
engine.setScriptsVerbosity(variables["script-verbose"].as<bool>());
|
||||||
engine.setCompileAll(variables["script-all"].as<bool>());
|
engine.setCompileAll(variables["script-all"].as<bool>());
|
||||||
engine.setReportFocus(variables["report-focus"].as<bool>());
|
|
||||||
engine.setAnimationVerbose(variables["anim-verbose"].as<bool>());
|
engine.setAnimationVerbose(variables["anim-verbose"].as<bool>());
|
||||||
engine.setFallbackValues(variables["fallback"].as<FallbackMap>().mMap);
|
engine.setFallbackValues(variables["fallback"].as<FallbackMap>().mMap);
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,6 @@ Allowed options:
|
||||||
|
|
||||||
win1252 - Western European (Latin) alphabet,
|
win1252 - Western European (Latin) alphabet,
|
||||||
used by default
|
used by default
|
||||||
--report-focus [=arg(=1)] (=0) write name of focussed object to cout
|
|
||||||
--fallback arg fallback values
|
--fallback arg fallback values
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue