mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
OpenMW compiles and runs w/o render window
This commit is contained in:
parent
12f27123f2
commit
4e69e7cc0f
55 changed files with 534 additions and 1286 deletions
|
@ -328,9 +328,6 @@ endif (APPLE)
|
||||||
configure_file(${OpenMW_SOURCE_DIR}/files/settings-default.cfg
|
configure_file(${OpenMW_SOURCE_DIR}/files/settings-default.cfg
|
||||||
"${OpenMW_BINARY_DIR}/settings-default.cfg")
|
"${OpenMW_BINARY_DIR}/settings-default.cfg")
|
||||||
|
|
||||||
configure_file(${OpenMW_SOURCE_DIR}/files/transparency-overrides.cfg
|
|
||||||
"${OpenMW_BINARY_DIR}/transparency-overrides.cfg")
|
|
||||||
|
|
||||||
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local
|
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local
|
||||||
"${OpenMW_BINARY_DIR}/openmw.cfg")
|
"${OpenMW_BINARY_DIR}/openmw.cfg")
|
||||||
|
|
||||||
|
@ -433,7 +430,6 @@ IF(NOT WIN32 AND NOT APPLE)
|
||||||
|
|
||||||
# Install global configuration files
|
# Install global configuration files
|
||||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/settings-default.cfg" DESTINATION "${SYSCONFDIR}" COMPONENT "openmw")
|
INSTALL(FILES "${OpenMW_BINARY_DIR}/settings-default.cfg" DESTINATION "${SYSCONFDIR}" COMPONENT "openmw")
|
||||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/transparency-overrides.cfg" DESTINATION "${SYSCONFDIR}" COMPONENT "openmw")
|
|
||||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION "${SYSCONFDIR}" RENAME "openmw.cfg" COMPONENT "openmw")
|
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION "${SYSCONFDIR}" RENAME "openmw.cfg" COMPONENT "openmw")
|
||||||
INSTALL(FILES "${OpenMW_BINARY_DIR}/gamecontrollerdb.txt" DESTINATION "${SYSCONFDIR}" COMPONENT "openmw")
|
INSTALL(FILES "${OpenMW_BINARY_DIR}/gamecontrollerdb.txt" DESTINATION "${SYSCONFDIR}" COMPONENT "openmw")
|
||||||
|
|
||||||
|
@ -456,7 +452,6 @@ if(WIN32)
|
||||||
"${OpenMW_SOURCE_DIR}/Docs/license/GPL3.txt"
|
"${OpenMW_SOURCE_DIR}/Docs/license/GPL3.txt"
|
||||||
"${OpenMW_SOURCE_DIR}/Docs/license/DejaVu Font License.txt"
|
"${OpenMW_SOURCE_DIR}/Docs/license/DejaVu Font License.txt"
|
||||||
"${OpenMW_BINARY_DIR}/settings-default.cfg"
|
"${OpenMW_BINARY_DIR}/settings-default.cfg"
|
||||||
"${OpenMW_BINARY_DIR}/transparency-overrides.cfg"
|
|
||||||
"${OpenMW_BINARY_DIR}/gamecontrollerdb.txt"
|
"${OpenMW_BINARY_DIR}/gamecontrollerdb.txt"
|
||||||
"${OpenMW_BINARY_DIR}/Release/openmw.exe"
|
"${OpenMW_BINARY_DIR}/Release/openmw.exe"
|
||||||
DESTINATION ".")
|
DESTINATION ".")
|
||||||
|
@ -549,7 +544,7 @@ add_subdirectory(libs/openengine)
|
||||||
# Extern
|
# Extern
|
||||||
#add_subdirectory (extern/shiny)
|
#add_subdirectory (extern/shiny)
|
||||||
#add_subdirectory (extern/ogre-ffmpeg-videoplayer)
|
#add_subdirectory (extern/ogre-ffmpeg-videoplayer)
|
||||||
#add_subdirectory (extern/oics)
|
add_subdirectory (extern/oics)
|
||||||
#add_subdirectory (extern/sdl4ogre)
|
#add_subdirectory (extern/sdl4ogre)
|
||||||
|
|
||||||
# Components
|
# Components
|
||||||
|
@ -714,7 +709,6 @@ if (APPLE)
|
||||||
install(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" RENAME "openmw.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
install(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" RENAME "openmw.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
||||||
install(FILES "${OpenMW_BINARY_DIR}/settings-default.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
install(FILES "${OpenMW_BINARY_DIR}/settings-default.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
||||||
install(FILES "${OpenMW_BINARY_DIR}/gamecontrollerdb.txt" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
install(FILES "${OpenMW_BINARY_DIR}/gamecontrollerdb.txt" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
||||||
install(FILES "${OpenMW_BINARY_DIR}/transparency-overrides.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
|
||||||
install(FILES "${OpenMW_BINARY_DIR}/opencs.ini" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
install(FILES "${OpenMW_BINARY_DIR}/opencs.ini" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
||||||
|
|
||||||
set(CPACK_GENERATOR "DragNDrop")
|
set(CPACK_GENERATOR "DragNDrop")
|
||||||
|
|
|
@ -20,15 +20,16 @@ set(GAME_HEADER
|
||||||
source_group(game FILES ${GAME} ${GAME_HEADER})
|
source_group(game FILES ${GAME} ${GAME_HEADER})
|
||||||
|
|
||||||
add_openmw_dir (mwrender
|
add_openmw_dir (mwrender
|
||||||
renderingmanager debugging sky camera animation npcanimation creatureanimation activatoranimation
|
actors objects
|
||||||
actors objects renderinginterface localmap occlusionquery water shadows
|
# renderingmanager debugging sky camera animation npcanimation creatureanimation activatoranimation
|
||||||
characterpreview globalmap ripplesimulation refraction
|
# renderinginterface localmap occlusionquery water shadows
|
||||||
terrainstorage renderconst effectmanager weaponanimation
|
# characterpreview globalmap ripplesimulation refraction
|
||||||
|
# terrainstorage renderconst effectmanager weaponanimation
|
||||||
)
|
)
|
||||||
|
|
||||||
add_openmw_dir (mwinput
|
#add_openmw_dir (mwinput
|
||||||
inputmanagerimp
|
# inputmanagerimp
|
||||||
)
|
# )
|
||||||
|
|
||||||
add_openmw_dir (mwgui
|
add_openmw_dir (mwgui
|
||||||
textinput widgets race class birth review windowmanagerimp console dialogue
|
textinput widgets race class birth review windowmanagerimp console dialogue
|
||||||
|
@ -57,16 +58,18 @@ add_openmw_dir (mwscript
|
||||||
)
|
)
|
||||||
|
|
||||||
add_openmw_dir (mwsound
|
add_openmw_dir (mwsound
|
||||||
soundmanagerimp openal_output ffmpeg_decoder sound sound_decoder sound_output loudness libavwrapper movieaudiofactory
|
soundmanagerimp openal_output ffmpeg_decoder sound sound_decoder sound_output loudness libavwrapper
|
||||||
|
# movieaudiofactory
|
||||||
)
|
)
|
||||||
|
|
||||||
add_openmw_dir (mwworld
|
add_openmw_dir (mwworld
|
||||||
refdata worldimp physicssystem scene globals class action nullaction actionteleport
|
refdata worldimp scene globals class action nullaction actionteleport
|
||||||
containerstore actiontalk actiontake manualref player cellfunctors failedaction
|
containerstore actiontalk actiontake manualref player cellfunctors failedaction
|
||||||
cells localscripts customdata weather inventorystore ptr actionopen actionread
|
cells localscripts customdata inventorystore ptr actionopen actionread
|
||||||
actionequip timestamp actionalchemy cellstore actionapply actioneat
|
actionequip timestamp actionalchemy cellstore actionapply actioneat
|
||||||
esmstore store recordcmp fallback actionrepair actionsoulgem livecellref actiondoor
|
esmstore store recordcmp fallback actionrepair actionsoulgem livecellref actiondoor
|
||||||
contentloader esmloader actiontrap cellreflist projectilemanager cellref
|
contentloader esmloader actiontrap cellreflist cellref physicssystem
|
||||||
|
# weather projectilemanager
|
||||||
)
|
)
|
||||||
|
|
||||||
add_openmw_dir (mwclass
|
add_openmw_dir (mwclass
|
||||||
|
@ -75,10 +78,11 @@ add_openmw_dir (mwclass
|
||||||
)
|
)
|
||||||
|
|
||||||
add_openmw_dir (mwmechanics
|
add_openmw_dir (mwmechanics
|
||||||
mechanicsmanagerimp stat character creaturestats magiceffects movement actors objects
|
mechanicsmanagerimp stat creaturestats magiceffects movement
|
||||||
drawstate spells activespells npcstats aipackage aisequence aipursue alchemy aiwander aitravel aifollow aiavoiddoor
|
drawstate spells activespells npcstats aipackage aisequence aipursue alchemy aiwander aitravel aifollow aiavoiddoor
|
||||||
aiescort aiactivate aicombat repair enchanting pathfinding pathgrid security spellsuccess spellcasting
|
aiescort aiactivate aicombat repair enchanting pathfinding pathgrid security spellsuccess spellcasting
|
||||||
disease pickpocket levelledlist combat steering obstacle autocalcspell difficultyscaling aicombataction actor summoning
|
disease pickpocket levelledlist combat steering obstacle autocalcspell difficultyscaling aicombataction actor summoning
|
||||||
|
# character actors objects
|
||||||
)
|
)
|
||||||
|
|
||||||
add_openmw_dir (mwstate
|
add_openmw_dir (mwstate
|
||||||
|
@ -133,9 +137,7 @@ target_link_libraries(openmw
|
||||||
${MYGUI_LIBRARIES}
|
${MYGUI_LIBRARIES}
|
||||||
${SDL2_LIBRARY}
|
${SDL2_LIBRARY}
|
||||||
${MYGUI_PLATFORM_LIBRARIES}
|
${MYGUI_PLATFORM_LIBRARIES}
|
||||||
"ogre-ffmpeg-videoplayer"
|
|
||||||
"oics"
|
"oics"
|
||||||
"sdl4ogre"
|
|
||||||
components
|
components
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -14,17 +14,14 @@
|
||||||
|
|
||||||
#include <components/compiler/extensions0.hpp>
|
#include <components/compiler/extensions0.hpp>
|
||||||
|
|
||||||
#include <components/bsa/resources.hpp>
|
|
||||||
#include <components/files/configurationmanager.hpp>
|
#include <components/files/configurationmanager.hpp>
|
||||||
#include <components/translation/translation.hpp>
|
#include <components/translation/translation.hpp>
|
||||||
#include <components/nifoverrides/nifoverrides.hpp>
|
|
||||||
|
|
||||||
#include <components/nifbullet/bulletnifloader.hpp>
|
#include <components/nifbullet/bulletnifloader.hpp>
|
||||||
#include <components/nifogre/ogrenifloader.hpp>
|
|
||||||
|
|
||||||
#include <components/esm/loadcell.hpp>
|
#include <components/esm/loadcell.hpp>
|
||||||
|
|
||||||
#include "mwinput/inputmanagerimp.hpp"
|
//#include "mwinput/inputmanagerimp.hpp"
|
||||||
|
|
||||||
#include "mwgui/windowmanagerimp.hpp"
|
#include "mwgui/windowmanagerimp.hpp"
|
||||||
|
|
||||||
|
@ -86,12 +83,12 @@ bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt)
|
||||||
mEnvironment.setFrameDuration (frametime);
|
mEnvironment.setFrameDuration (frametime);
|
||||||
|
|
||||||
// update input
|
// update input
|
||||||
MWBase::Environment::get().getInputManager()->update(frametime, false);
|
//MWBase::Environment::get().getInputManager()->update(frametime, false);
|
||||||
|
|
||||||
// When the window is minimized, pause everything. Currently this *has* to be here to work around a MyGUI bug.
|
// When the window is minimized, pause everything. Currently this *has* to be here to work around a MyGUI bug.
|
||||||
// If we are not currently rendering, then RenderItems will not be reused resulting in a memory leak upon changing widget textures.
|
// If we are not currently rendering, then RenderItems will not be reused resulting in a memory leak upon changing widget textures.
|
||||||
if (!mOgre->getWindow()->isActive() || !mOgre->getWindow()->isVisible())
|
//if (!mOgre->getWindow()->isActive() || !mOgre->getWindow()->isVisible())
|
||||||
return true;
|
// return true;
|
||||||
|
|
||||||
// sound
|
// sound
|
||||||
if (mUseSound)
|
if (mUseSound)
|
||||||
|
@ -157,11 +154,12 @@ bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt)
|
||||||
if (MWBase::Environment::get().getStateManager()->getState()!=
|
if (MWBase::Environment::get().getStateManager()->getState()!=
|
||||||
MWBase::StateManager::State_NoGame)
|
MWBase::StateManager::State_NoGame)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
Ogre::RenderWindow* window = mOgre->getWindow();
|
Ogre::RenderWindow* window = mOgre->getWindow();
|
||||||
unsigned int tri, batch;
|
unsigned int tri, batch;
|
||||||
MWBase::Environment::get().getWorld()->getTriangleBatchCount(tri, batch);
|
MWBase::Environment::get().getWorld()->getTriangleBatchCount(tri, batch);
|
||||||
MWBase::Environment::get().getWindowManager()->wmUpdateFps(window->getLastFPS(), tri, batch);
|
MWBase::Environment::get().getWindowManager()->wmUpdateFps(window->getLastFPS(), tri, batch);
|
||||||
|
#endif
|
||||||
MWBase::Environment::get().getWindowManager()->update();
|
MWBase::Environment::get().getWindowManager()->update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -210,11 +208,8 @@ OMW::Engine::Engine(Files::ConfigurationManager& configurationManager)
|
||||||
|
|
||||||
OMW::Engine::~Engine()
|
OMW::Engine::~Engine()
|
||||||
{
|
{
|
||||||
if (mOgre)
|
|
||||||
mOgre->restoreWindowGammaRamp();
|
|
||||||
mEnvironment.cleanup();
|
mEnvironment.cleanup();
|
||||||
delete mScriptContext;
|
delete mScriptContext;
|
||||||
delete mOgre;
|
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,14 +218,10 @@ OMW::Engine::~Engine()
|
||||||
|
|
||||||
void OMW::Engine::addResourcesDirectory (const boost::filesystem::path& path)
|
void OMW::Engine::addResourcesDirectory (const boost::filesystem::path& path)
|
||||||
{
|
{
|
||||||
mOgre->getRoot()->addResourceLocation (path.string(), "FileSystem",
|
|
||||||
Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OMW::Engine::addZipResource (const boost::filesystem::path& path)
|
void OMW::Engine::addZipResource (const boost::filesystem::path& path)
|
||||||
{
|
{
|
||||||
mOgre->getRoot()->addResourceLocation (path.string(), "Zip",
|
|
||||||
Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OMW::Engine::enableFSStrict(bool fsStrict)
|
void OMW::Engine::enableFSStrict(bool fsStrict)
|
||||||
|
@ -299,19 +290,6 @@ std::string OMW::Engine::loadSettings (Settings::Manager & settings)
|
||||||
if (boost::filesystem::exists(settingspath))
|
if (boost::filesystem::exists(settingspath))
|
||||||
settings.loadUser(settingspath);
|
settings.loadUser(settingspath);
|
||||||
|
|
||||||
// load nif overrides
|
|
||||||
NifOverrides::Overrides nifOverrides;
|
|
||||||
std::string transparencyOverrides = "/transparency-overrides.cfg";
|
|
||||||
std::string materialOverrides = "/material-overrides.cfg";
|
|
||||||
if (boost::filesystem::exists(mCfgMgr.getLocalPath().string() + transparencyOverrides))
|
|
||||||
nifOverrides.loadTransparencyOverrides(mCfgMgr.getLocalPath().string() + transparencyOverrides);
|
|
||||||
else if (boost::filesystem::exists(mCfgMgr.getGlobalPath().string() + transparencyOverrides))
|
|
||||||
nifOverrides.loadTransparencyOverrides(mCfgMgr.getGlobalPath().string() + transparencyOverrides);
|
|
||||||
if (boost::filesystem::exists(mCfgMgr.getLocalPath().string() + materialOverrides))
|
|
||||||
nifOverrides.loadMaterialOverrides(mCfgMgr.getLocalPath().string() + materialOverrides);
|
|
||||||
else if (boost::filesystem::exists(mCfgMgr.getGlobalPath().string() + materialOverrides))
|
|
||||||
nifOverrides.loadMaterialOverrides(mCfgMgr.getGlobalPath().string() + materialOverrides);
|
|
||||||
|
|
||||||
return settingspath;
|
return settingspath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,13 +308,6 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
mOgre = new OEngine::Render::OgreRenderer;
|
|
||||||
|
|
||||||
mOgre->configure(
|
|
||||||
mCfgMgr.getLogPath().string(),
|
|
||||||
renderSystem,
|
|
||||||
Settings::Manager::getString("opengl rtt mode", "Video"));
|
|
||||||
|
|
||||||
// This has to be added BEFORE MyGUI is initialized, as it needs
|
// This has to be added BEFORE MyGUI is initialized, as it needs
|
||||||
// to find core.xml here.
|
// to find core.xml here.
|
||||||
|
|
||||||
|
@ -361,9 +332,7 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
|
||||||
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS,
|
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS,
|
||||||
settings.getBool("minimize on focus loss", "Video") ? "1" : "0");
|
settings.getBool("minimize on focus loss", "Video") ? "1" : "0");
|
||||||
|
|
||||||
mOgre->createWindow("OpenMW", windowSettings);
|
//Bsa::registerResources (mFileCollections, mArchives, true, mFSStrict);
|
||||||
|
|
||||||
Bsa::registerResources (mFileCollections, mArchives, true, mFSStrict);
|
|
||||||
|
|
||||||
// Create input and UI first to set up a bootstrapping environment for
|
// Create input and UI first to set up a bootstrapping environment for
|
||||||
// showing a loading screen and keeping the window responsive while doing so
|
// showing a loading screen and keeping the window responsive while doing so
|
||||||
|
@ -390,19 +359,17 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
|
||||||
else
|
else
|
||||||
gameControllerdb = ""; //if it doesn't exist, pass in an empty string
|
gameControllerdb = ""; //if it doesn't exist, pass in an empty string
|
||||||
|
|
||||||
MWInput::InputManager* input = new MWInput::InputManager (*mOgre, *this, keybinderUser, keybinderUserExists, gameControllerdb, mGrab);
|
//MWInput::InputManager* input = new MWInput::InputManager (*mOgre, *this, keybinderUser, keybinderUserExists, gameControllerdb, mGrab);
|
||||||
mEnvironment.setInputManager (input);
|
//mEnvironment.setInputManager (input);
|
||||||
|
|
||||||
MWGui::WindowManager* window = new MWGui::WindowManager(
|
MWGui::WindowManager* window = new MWGui::WindowManager(
|
||||||
mExtensions, mOgre, mCfgMgr.getLogPath().string() + std::string("/"),
|
mExtensions, NULL, mCfgMgr.getLogPath().string() + std::string("/"),
|
||||||
mCfgMgr.getCachePath ().string(), mScriptConsoleMode, mTranslationDataStorage, mEncoding, mExportFonts, mFallbackMap);
|
mCfgMgr.getCachePath ().string(), mScriptConsoleMode, mTranslationDataStorage, mEncoding, mExportFonts, mFallbackMap);
|
||||||
mEnvironment.setWindowManager (window);
|
mEnvironment.setWindowManager (window);
|
||||||
|
|
||||||
// Create sound system
|
// Create sound system
|
||||||
mEnvironment.setSoundManager (new MWSound::SoundManager(mUseSound));
|
mEnvironment.setSoundManager (new MWSound::SoundManager(mUseSound));
|
||||||
|
|
||||||
mOgre->setWindowGammaContrast(Settings::Manager::getFloat("gamma", "General"), Settings::Manager::getFloat("contrast", "General"));
|
|
||||||
|
|
||||||
if (!mSkipMenu)
|
if (!mSkipMenu)
|
||||||
{
|
{
|
||||||
std::string logo = mFallbackMap["Movies_Company_Logo"];
|
std::string logo = mFallbackMap["Movies_Company_Logo"];
|
||||||
|
@ -411,11 +378,11 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the world
|
// Create the world
|
||||||
mEnvironment.setWorld( new MWWorld::World (*mOgre, mFileCollections, mContentFiles,
|
mEnvironment.setWorld( new MWWorld::World (mFileCollections, mContentFiles,
|
||||||
mResDir, mCfgMgr.getCachePath(), mEncoder, mFallbackMap,
|
mResDir, mCfgMgr.getCachePath(), mEncoder, mFallbackMap,
|
||||||
mActivationDistanceOverride, mCellName, mStartupScript));
|
mActivationDistanceOverride, mCellName, mStartupScript));
|
||||||
MWBase::Environment::get().getWorld()->setupPlayer();
|
MWBase::Environment::get().getWorld()->setupPlayer();
|
||||||
input->setPlayer(&mEnvironment.getWorld()->getPlayer());
|
//input->setPlayer(&mEnvironment.getWorld()->getPlayer());
|
||||||
|
|
||||||
window->initUI();
|
window->initUI();
|
||||||
window->renderWorldMap();
|
window->renderWorldMap();
|
||||||
|
@ -443,7 +410,7 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
|
||||||
mEnvironment.setJournal (new MWDialogue::Journal);
|
mEnvironment.setJournal (new MWDialogue::Journal);
|
||||||
mEnvironment.setDialogueManager (new MWDialogue::DialogueManager (mExtensions, mVerboseScripts, mTranslationDataStorage));
|
mEnvironment.setDialogueManager (new MWDialogue::DialogueManager (mExtensions, mVerboseScripts, mTranslationDataStorage));
|
||||||
|
|
||||||
mOgre->getRoot()->addFrameListener (this);
|
//mOgre->getRoot()->addFrameListener (this);
|
||||||
|
|
||||||
// scripts
|
// scripts
|
||||||
if (mCompileAll)
|
if (mCompileAll)
|
||||||
|
@ -473,7 +440,7 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
|
||||||
void OMW::Engine::go()
|
void OMW::Engine::go()
|
||||||
{
|
{
|
||||||
assert (!mContentFiles.empty());
|
assert (!mContentFiles.empty());
|
||||||
assert (!mOgre);
|
//assert (!mOgre);
|
||||||
|
|
||||||
Settings::Manager settings;
|
Settings::Manager settings;
|
||||||
std::string settingspath;
|
std::string settingspath;
|
||||||
|
@ -514,6 +481,7 @@ void OMW::Engine::go()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start the main rendering loop
|
// Start the main rendering loop
|
||||||
|
/*
|
||||||
Ogre::Timer timer;
|
Ogre::Timer timer;
|
||||||
while (!MWBase::Environment::get().getStateManager()->hasQuitRequest())
|
while (!MWBase::Environment::get().getStateManager()->hasQuitRequest())
|
||||||
{
|
{
|
||||||
|
@ -523,6 +491,8 @@ void OMW::Engine::go()
|
||||||
timer.reset();
|
timer.reset();
|
||||||
Ogre::Root::getSingleton().renderOneFrame(dt);
|
Ogre::Root::getSingleton().renderOneFrame(dt);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Save user settings
|
// Save user settings
|
||||||
settings.saveUser(settingspath);
|
settings.saveUser(settingspath);
|
||||||
|
|
||||||
|
@ -577,7 +547,7 @@ void OMW::Engine::screenshot()
|
||||||
|
|
||||||
} while (boost::filesystem::exists(stream.str()));
|
} while (boost::filesystem::exists(stream.str()));
|
||||||
|
|
||||||
mOgre->screenshot(stream.str(), format);
|
//mOgre->screenshot(stream.str(), format);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OMW::Engine::setCompileAll (bool all)
|
void OMW::Engine::setCompileAll (bool all)
|
||||||
|
|
|
@ -98,7 +98,7 @@ namespace OMW
|
||||||
bool mScriptBlacklistUse;
|
bool mScriptBlacklistUse;
|
||||||
bool mNewGame;
|
bool mNewGame;
|
||||||
|
|
||||||
Nif::Cache mNifCache;
|
//Nif::Cache mNifCache;
|
||||||
|
|
||||||
// not implemented
|
// not implemented
|
||||||
Engine (const Engine&);
|
Engine (const Engine&);
|
||||||
|
|
|
@ -163,17 +163,17 @@ namespace MWClass
|
||||||
|
|
||||||
void Creature::insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const
|
void Creature::insertObjectRendering (const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Creature> *ref = ptr.get<ESM::Creature>();
|
//MWWorld::LiveCellRef<ESM::Creature> *ref = ptr.get<ESM::Creature>();
|
||||||
|
|
||||||
MWRender::Actors& actors = renderingInterface.getActors();
|
//MWRender::Actors& actors = renderingInterface.getActors();
|
||||||
actors.insertCreature(ptr, model, (ref->mBase->mFlags & ESM::Creature::Weapon) != 0);
|
//actors.insertCreature(ptr, model, (ref->mBase->mFlags & ESM::Creature::Weapon) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Creature::insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWWorld::PhysicsSystem& physics) const
|
void Creature::insertObject(const MWWorld::Ptr& ptr, const std::string& model, MWWorld::PhysicsSystem& physics) const
|
||||||
{
|
{
|
||||||
if(!model.empty())
|
if(!model.empty())
|
||||||
{
|
{
|
||||||
physics.addActor(ptr, model);
|
//physics.addActor(ptr, model);
|
||||||
if (getCreatureStats(ptr).isDead())
|
if (getCreatureStats(ptr).isDead())
|
||||||
MWBase::Environment::get().getWorld()->enableActorCollision(ptr, false);
|
MWBase::Environment::get().getWorld()->enableActorCollision(ptr, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <OgreSceneNode.h>
|
|
||||||
|
|
||||||
#include <openengine/misc/rng.hpp>
|
#include <openengine/misc/rng.hpp>
|
||||||
|
|
||||||
#include <components/esm/loadmgef.hpp>
|
#include <components/esm/loadmgef.hpp>
|
||||||
|
@ -1151,9 +1149,9 @@ namespace MWClass
|
||||||
if (ptr.getClass().getNpcStats(ptr).isWerewolf()
|
if (ptr.getClass().getNpcStats(ptr).isWerewolf()
|
||||||
&& ptr.getClass().getCreatureStats(ptr).getStance(MWMechanics::CreatureStats::Stance_Run))
|
&& ptr.getClass().getCreatureStats(ptr).getStance(MWMechanics::CreatureStats::Stance_Run))
|
||||||
{
|
{
|
||||||
MWMechanics::WeaponType weaponType = MWMechanics::WeapType_None;
|
//MWMechanics::WeaponType weaponType = MWMechanics::WeapType_None;
|
||||||
MWMechanics::getActiveWeapon(ptr.getClass().getCreatureStats(ptr), ptr.getClass().getInventoryStore(ptr), &weaponType);
|
//MWMechanics::getActiveWeapon(ptr.getClass().getCreatureStats(ptr), ptr.getClass().getInventoryStore(ptr), &weaponType);
|
||||||
if (weaponType == MWMechanics::WeapType_None)
|
//if (weaponType == MWMechanics::WeapType_None)
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -183,7 +183,7 @@ namespace MWGui
|
||||||
const ESM::BirthSign *birth =
|
const ESM::BirthSign *birth =
|
||||||
store.get<ESM::BirthSign>().find(mCurrentBirthId);
|
store.get<ESM::BirthSign>().find(mCurrentBirthId);
|
||||||
|
|
||||||
mBirthImage->setImageTexture(Misc::ResourceHelpers::correctTexturePath(birth->mTexture));
|
//mBirthImage->setImageTexture(Misc::ResourceHelpers::correctTexturePath(birth->mTexture));
|
||||||
|
|
||||||
std::vector<std::string> abilities, powers, spells;
|
std::vector<std::string> abilities, powers, spells;
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
#include <MyGUI_RotatingSkin.h>
|
#include <MyGUI_RotatingSkin.h>
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
|
|
||||||
#include <OgreMath.h>
|
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
#include "formatting.hpp"
|
#include "formatting.hpp"
|
||||||
|
|
||||||
#include <OgreUTFString.h>
|
|
||||||
#include <OgreResourceGroupManager.h>
|
|
||||||
|
|
||||||
#include <MyGUI_EditText.h>
|
#include <MyGUI_EditText.h>
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
#include <MyGUI_EditBox.h>
|
#include <MyGUI_EditBox.h>
|
||||||
|
@ -466,7 +463,7 @@ namespace MWGui
|
||||||
MyGUI::IntCoord(left, pag.getCurrentTop(), width, mImageHeight), MyGUI::Align::Left | MyGUI::Align::Top,
|
MyGUI::IntCoord(left, pag.getCurrentTop(), width, mImageHeight), MyGUI::Align::Left | MyGUI::Align::Top,
|
||||||
parent->getName() + MyGUI::utility::toString(parent->getChildCount()));
|
parent->getName() + MyGUI::utility::toString(parent->getChildCount()));
|
||||||
|
|
||||||
std::string image = Misc::ResourceHelpers::correctBookartPath(src, width, mImageHeight);
|
std::string image;// = Misc::ResourceHelpers::correctBookartPath(src, width, mImageHeight);
|
||||||
mImageBox->setImageTexture(image);
|
mImageBox->setImageTexture(image);
|
||||||
mImageBox->setProperty("NeedMouse", "false");
|
mImageBox->setProperty("NeedMouse", "false");
|
||||||
}
|
}
|
||||||
|
|
|
@ -448,7 +448,7 @@ namespace MWGui
|
||||||
std::string icon = effect->mIcon;
|
std::string icon = effect->mIcon;
|
||||||
int slashPos = icon.rfind('\\');
|
int slashPos = icon.rfind('\\');
|
||||||
icon.insert(slashPos+1, "b_");
|
icon.insert(slashPos+1, "b_");
|
||||||
icon = Misc::ResourceHelpers::correctIconPath(icon);
|
//icon = Misc::ResourceHelpers::correctIconPath(icon);
|
||||||
|
|
||||||
mSpellImage->setItem(MWWorld::Ptr());
|
mSpellImage->setItem(MWWorld::Ptr());
|
||||||
mSpellImage->setIcon(icon);
|
mSpellImage->setIcon(icon);
|
||||||
|
|
|
@ -53,7 +53,9 @@ namespace MWGui
|
||||||
, mTrading(false)
|
, mTrading(false)
|
||||||
, mLastXSize(0)
|
, mLastXSize(0)
|
||||||
, mLastYSize(0)
|
, mLastYSize(0)
|
||||||
|
#if 0
|
||||||
, mPreview(new MWRender::InventoryPreview(MWBase::Environment::get().getWorld ()->getPlayerPtr()))
|
, mPreview(new MWRender::InventoryPreview(MWBase::Environment::get().getWorld ()->getPlayerPtr()))
|
||||||
|
#endif
|
||||||
, mPreviewDirty(true)
|
, mPreviewDirty(true)
|
||||||
, mPreviewResize(true)
|
, mPreviewResize(true)
|
||||||
, mDragAndDrop(dragAndDrop)
|
, mDragAndDrop(dragAndDrop)
|
||||||
|
@ -118,10 +120,10 @@ namespace MWGui
|
||||||
MyGUI::ITexture* tex = MyGUI::RenderManager::getInstance().getTexture("CharacterPreview");
|
MyGUI::ITexture* tex = MyGUI::RenderManager::getInstance().getTexture("CharacterPreview");
|
||||||
if (tex)
|
if (tex)
|
||||||
MyGUI::RenderManager::getInstance().destroyTexture(tex);
|
MyGUI::RenderManager::getInstance().destroyTexture(tex);
|
||||||
|
#if 0
|
||||||
mPreview.reset(new MWRender::InventoryPreview(mPtr));
|
mPreview.reset(new MWRender::InventoryPreview(mPtr));
|
||||||
mPreview->setup();
|
mPreview->setup();
|
||||||
|
#endif
|
||||||
mPreviewDirty = true;
|
mPreviewDirty = true;
|
||||||
mPreviewResize = true;
|
mPreviewResize = true;
|
||||||
}
|
}
|
||||||
|
@ -481,6 +483,8 @@ namespace MWGui
|
||||||
|
|
||||||
MWWorld::Ptr InventoryWindow::getAvatarSelectedItem(int x, int y)
|
MWWorld::Ptr InventoryWindow::getAvatarSelectedItem(int x, int y)
|
||||||
{
|
{
|
||||||
|
return MWWorld::Ptr();
|
||||||
|
#if 0
|
||||||
int slot = mPreview->getSlotSelected (x, y);
|
int slot = mPreview->getSlotSelected (x, y);
|
||||||
|
|
||||||
if (slot == -1)
|
if (slot == -1)
|
||||||
|
@ -499,6 +503,7 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
|
|
||||||
return MWWorld::Ptr();
|
return MWWorld::Ptr();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryWindow::updateEncumbranceBar()
|
void InventoryWindow::updateEncumbranceBar()
|
||||||
|
@ -526,6 +531,7 @@ namespace MWGui
|
||||||
|
|
||||||
void InventoryWindow::doRenderUpdate ()
|
void InventoryWindow::doRenderUpdate ()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
mPreview->onFrame();
|
mPreview->onFrame();
|
||||||
|
|
||||||
if (mPreviewResize || mPreviewDirty)
|
if (mPreviewResize || mPreviewDirty)
|
||||||
|
@ -552,6 +558,7 @@ namespace MWGui
|
||||||
|
|
||||||
mAvatarImage->setImageTexture("CharacterPreview");
|
mAvatarImage->setImageTexture("CharacterPreview");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryWindow::notifyContentChanged()
|
void InventoryWindow::notifyContentChanged()
|
||||||
|
@ -668,6 +675,8 @@ namespace MWGui
|
||||||
|
|
||||||
void InventoryWindow::rebuildAvatar()
|
void InventoryWindow::rebuildAvatar()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
mPreview->rebuild();
|
mPreview->rebuild();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ namespace MWGui
|
||||||
|
|
||||||
void ItemWidget::setIcon(const MWWorld::Ptr &ptr)
|
void ItemWidget::setIcon(const MWWorld::Ptr &ptr)
|
||||||
{
|
{
|
||||||
setIcon(Misc::ResourceHelpers::correctIconPath(ptr.getClass().getInventoryIcon(ptr)));
|
//setIcon(Misc::ResourceHelpers::correctIconPath(ptr.getClass().getInventoryIcon(ptr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -212,6 +212,7 @@ namespace MWGui
|
||||||
|
|
||||||
void LocalMapBase::applyFogOfWar()
|
void LocalMapBase::applyFogOfWar()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
for (int mx=0; mx<3; ++mx)
|
for (int mx=0; mx<3; ++mx)
|
||||||
{
|
{
|
||||||
for (int my=0; my<3; ++my)
|
for (int my=0; my<3; ++my)
|
||||||
|
@ -225,6 +226,7 @@ namespace MWGui
|
||||||
: "");
|
: "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
redraw();
|
redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,6 +340,7 @@ namespace MWGui
|
||||||
mDoorMarkerWidgets.clear();
|
mDoorMarkerWidgets.clear();
|
||||||
|
|
||||||
// Update the map textures
|
// Update the map textures
|
||||||
|
#if 0
|
||||||
for (int mx=0; mx<3; ++mx)
|
for (int mx=0; mx<3; ++mx)
|
||||||
{
|
{
|
||||||
for (int my=0; my<3; ++my)
|
for (int my=0; my<3; ++my)
|
||||||
|
@ -354,7 +357,7 @@ namespace MWGui
|
||||||
box->setImageTexture("black.png");
|
box->setImageTexture("black.png");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
MWBase::World* world = MWBase::Environment::get().getWorld();
|
MWBase::World* world = MWBase::Environment::get().getWorld();
|
||||||
|
|
||||||
// Retrieve the door markers we want to show
|
// Retrieve the door markers we want to show
|
||||||
|
@ -558,7 +561,7 @@ namespace MWGui
|
||||||
, LocalMapBase(customMarkers)
|
, LocalMapBase(customMarkers)
|
||||||
, mGlobal(false)
|
, mGlobal(false)
|
||||||
, mGlobalMap(0)
|
, mGlobalMap(0)
|
||||||
, mGlobalMapRender(0)
|
//, mGlobalMapRender(0)
|
||||||
, mEditNoteDialog()
|
, mEditNoteDialog()
|
||||||
, mEventBoxGlobal(NULL)
|
, mEventBoxGlobal(NULL)
|
||||||
, mEventBoxLocal(NULL)
|
, mEventBoxLocal(NULL)
|
||||||
|
@ -705,18 +708,19 @@ namespace MWGui
|
||||||
|
|
||||||
void MapWindow::renderGlobalMap(Loading::Listener* loadingListener)
|
void MapWindow::renderGlobalMap(Loading::Listener* loadingListener)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
mGlobalMapRender = new MWRender::GlobalMap("");
|
mGlobalMapRender = new MWRender::GlobalMap("");
|
||||||
mGlobalMapRender->render(loadingListener);
|
mGlobalMapRender->render(loadingListener);
|
||||||
mGlobalMap->setCanvasSize (mGlobalMapRender->getWidth(), mGlobalMapRender->getHeight());
|
mGlobalMap->setCanvasSize (mGlobalMapRender->getWidth(), mGlobalMapRender->getHeight());
|
||||||
mGlobalMapImage->setSize(mGlobalMapRender->getWidth(), mGlobalMapRender->getHeight());
|
mGlobalMapImage->setSize(mGlobalMapRender->getWidth(), mGlobalMapRender->getHeight());
|
||||||
|
|
||||||
mGlobalMapImage->setImageTexture("GlobalMap.png");
|
mGlobalMapImage->setImageTexture("GlobalMap.png");
|
||||||
mGlobalMapOverlay->setImageTexture("GlobalMapOverlay");
|
mGlobalMapOverlay->setImageTexture("GlobalMapOverlay");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
MapWindow::~MapWindow()
|
MapWindow::~MapWindow()
|
||||||
{
|
{
|
||||||
delete mGlobalMapRender;
|
//delete mGlobalMapRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapWindow::setCellName(const std::string& cellName)
|
void MapWindow::setCellName(const std::string& cellName)
|
||||||
|
@ -726,6 +730,7 @@ namespace MWGui
|
||||||
|
|
||||||
void MapWindow::addVisitedLocation(const std::string& name, int x, int y)
|
void MapWindow::addVisitedLocation(const std::string& name, int x, int y)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
CellId cell;
|
CellId cell;
|
||||||
cell.first = x;
|
cell.first = x;
|
||||||
cell.second = y;
|
cell.second = y;
|
||||||
|
@ -752,6 +757,7 @@ namespace MWGui
|
||||||
markerWidget->eventMouseDrag += MyGUI::newDelegate(this, &MapWindow::onMouseDrag);
|
markerWidget->eventMouseDrag += MyGUI::newDelegate(this, &MapWindow::onMouseDrag);
|
||||||
markerWidget->eventMouseButtonPressed += MyGUI::newDelegate(this, &MapWindow::onDragStart);
|
markerWidget->eventMouseButtonPressed += MyGUI::newDelegate(this, &MapWindow::onDragStart);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapWindow::cellExplored(int x, int y)
|
void MapWindow::cellExplored(int x, int y)
|
||||||
|
@ -763,10 +769,12 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
LocalMapBase::onFrame(dt);
|
LocalMapBase::onFrame(dt);
|
||||||
|
|
||||||
|
#if 0
|
||||||
for (std::vector<CellId>::iterator it = mQueuedToExplore.begin(); it != mQueuedToExplore.end(); ++it)
|
for (std::vector<CellId>::iterator it = mQueuedToExplore.begin(); it != mQueuedToExplore.end(); ++it)
|
||||||
{
|
{
|
||||||
mGlobalMapRender->exploreCell(it->first, it->second);
|
mGlobalMapRender->exploreCell(it->first, it->second);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
mQueuedToExplore.clear();
|
mQueuedToExplore.clear();
|
||||||
|
|
||||||
NoDrop::onFrame(dt);
|
NoDrop::onFrame(dt);
|
||||||
|
@ -823,12 +831,14 @@ namespace MWGui
|
||||||
|
|
||||||
void MapWindow::globalMapUpdatePlayer ()
|
void MapWindow::globalMapUpdatePlayer ()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
// For interiors, position is set by WindowManager via setGlobalMapPlayerPosition
|
// For interiors, position is set by WindowManager via setGlobalMapPlayerPosition
|
||||||
if (MWBase::Environment::get().getWorld ()->isCellExterior ())
|
if (MWBase::Environment::get().getWorld ()->isCellExterior ())
|
||||||
{
|
{
|
||||||
Ogre::Vector3 pos = MWBase::Environment::get().getWorld ()->getPlayerPtr().getRefData ().getBaseNode ()->_getDerivedPosition ();
|
Ogre::Vector3 pos = MWBase::Environment::get().getWorld ()->getPlayerPtr().getRefData ().getBaseNode ()->_getDerivedPosition ();
|
||||||
setGlobalMapPlayerPosition(pos.x, pos.y);
|
setGlobalMapPlayerPosition(pos.x, pos.y);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapWindow::notifyPlayerUpdate ()
|
void MapWindow::notifyPlayerUpdate ()
|
||||||
|
@ -838,6 +848,7 @@ namespace MWGui
|
||||||
|
|
||||||
void MapWindow::setGlobalMapPlayerPosition(float worldX, float worldY)
|
void MapWindow::setGlobalMapPlayerPosition(float worldX, float worldY)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
float x, y;
|
float x, y;
|
||||||
mGlobalMapRender->worldPosToImageSpace (worldX, worldY, x, y);
|
mGlobalMapRender->worldPosToImageSpace (worldX, worldY, x, y);
|
||||||
x *= mGlobalMapRender->getWidth();
|
x *= mGlobalMapRender->getWidth();
|
||||||
|
@ -849,6 +860,7 @@ namespace MWGui
|
||||||
MyGUI::IntSize viewsize = mGlobalMap->getSize();
|
MyGUI::IntSize viewsize = mGlobalMap->getSize();
|
||||||
MyGUI::IntPoint viewoffs(static_cast<int>(viewsize.width * 0.5f - x), static_cast<int>(viewsize.height *0.5 - y));
|
MyGUI::IntPoint viewoffs(static_cast<int>(viewsize.width * 0.5f - x), static_cast<int>(viewsize.height *0.5 - y));
|
||||||
mGlobalMap->setViewOffset(viewoffs);
|
mGlobalMap->setViewOffset(viewoffs);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapWindow::setGlobalMapPlayerDir(const float x, const float y)
|
void MapWindow::setGlobalMapPlayerDir(const float x, const float y)
|
||||||
|
@ -863,7 +875,8 @@ namespace MWGui
|
||||||
void MapWindow::clear()
|
void MapWindow::clear()
|
||||||
{
|
{
|
||||||
mMarkers.clear();
|
mMarkers.clear();
|
||||||
mGlobalMapRender->clear();
|
|
||||||
|
//mGlobalMapRender->clear();
|
||||||
mChanged = true;
|
mChanged = true;
|
||||||
|
|
||||||
while (mEventBoxGlobal->getChildCount())
|
while (mEventBoxGlobal->getChildCount())
|
||||||
|
@ -872,6 +885,7 @@ namespace MWGui
|
||||||
|
|
||||||
void MapWindow::write(ESM::ESMWriter &writer, Loading::Listener& progress)
|
void MapWindow::write(ESM::ESMWriter &writer, Loading::Listener& progress)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
ESM::GlobalMap map;
|
ESM::GlobalMap map;
|
||||||
mGlobalMapRender->write(map);
|
mGlobalMapRender->write(map);
|
||||||
|
|
||||||
|
@ -880,10 +894,12 @@ namespace MWGui
|
||||||
writer.startRecord(ESM::REC_GMAP);
|
writer.startRecord(ESM::REC_GMAP);
|
||||||
map.save(writer);
|
map.save(writer);
|
||||||
writer.endRecord(ESM::REC_GMAP);
|
writer.endRecord(ESM::REC_GMAP);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapWindow::readRecord(ESM::ESMReader &reader, uint32_t type)
|
void MapWindow::readRecord(ESM::ESMReader &reader, uint32_t type)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
if (type == ESM::REC_GMAP)
|
if (type == ESM::REC_GMAP)
|
||||||
{
|
{
|
||||||
ESM::GlobalMap map;
|
ESM::GlobalMap map;
|
||||||
|
@ -898,6 +914,7 @@ namespace MWGui
|
||||||
addVisitedLocation(cell->mName, it->first, it->second);
|
addVisitedLocation(cell->mName, it->first, it->second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapWindow::setAlpha(float alpha)
|
void MapWindow::setAlpha(float alpha)
|
||||||
|
|
|
@ -216,7 +216,7 @@ namespace MWGui
|
||||||
MyGUI::Button* mEventBoxGlobal;
|
MyGUI::Button* mEventBoxGlobal;
|
||||||
MyGUI::Button* mEventBoxLocal;
|
MyGUI::Button* mEventBoxLocal;
|
||||||
|
|
||||||
MWRender::GlobalMap* mGlobalMapRender;
|
//MWRender::GlobalMap* mGlobalMapRender;
|
||||||
|
|
||||||
EditNoteDialog mEditNoteDialog;
|
EditNoteDialog mEditNoteDialog;
|
||||||
ESM::CustomMarker mEditingMarker;
|
ESM::CustomMarker mEditingMarker;
|
||||||
|
|
|
@ -245,7 +245,7 @@ namespace MWGui
|
||||||
std::string path = effect->mIcon;
|
std::string path = effect->mIcon;
|
||||||
int slashPos = path.rfind('\\');
|
int slashPos = path.rfind('\\');
|
||||||
path.insert(slashPos+1, "b_");
|
path.insert(slashPos+1, "b_");
|
||||||
path = Misc::ResourceHelpers::correctIconPath(path);
|
//path = Misc::ResourceHelpers::correctIconPath(path);
|
||||||
|
|
||||||
button->setFrame("textures\\menu_icon_select_magic.dds", MyGUI::IntCoord(2, 2, 40, 40));
|
button->setFrame("textures\\menu_icon_select_magic.dds", MyGUI::IntCoord(2, 2, 40, 40));
|
||||||
button->setIcon(path);
|
button->setIcon(path);
|
||||||
|
|
|
@ -125,18 +125,19 @@ namespace MWGui
|
||||||
updateSkills();
|
updateSkills();
|
||||||
updateSpellPowers();
|
updateSpellPowers();
|
||||||
|
|
||||||
mPreview.reset(NULL);
|
//mPreview.reset(NULL);
|
||||||
|
|
||||||
mPreviewImage->setImageTexture("");
|
mPreviewImage->setImageTexture("");
|
||||||
|
|
||||||
const std::string textureName = "CharacterHeadPreview";
|
const std::string textureName = "CharacterHeadPreview";
|
||||||
MyGUI::RenderManager::getInstance().destroyTexture(MyGUI::RenderManager::getInstance().getTexture(textureName));
|
MyGUI::RenderManager::getInstance().destroyTexture(MyGUI::RenderManager::getInstance().getTexture(textureName));
|
||||||
|
|
||||||
mPreview.reset(new MWRender::RaceSelectionPreview());
|
//mPreview.reset(new MWRender::RaceSelectionPreview());
|
||||||
mPreview->setup();
|
//mPreview->setup();
|
||||||
mPreview->update (mCurrentAngle);
|
//mPreview->update (mCurrentAngle);
|
||||||
|
|
||||||
const ESM::NPC proto = mPreview->getPrototype();
|
//const ESM::NPC& proto = mPreview->getPrototype();
|
||||||
|
ESM::NPC proto;
|
||||||
setRaceId(proto.mRace);
|
setRaceId(proto.mRace);
|
||||||
recountParts();
|
recountParts();
|
||||||
|
|
||||||
|
@ -184,7 +185,7 @@ namespace MWGui
|
||||||
mPreviewImage->setImageTexture("");
|
mPreviewImage->setImageTexture("");
|
||||||
const std::string textureName = "CharacterHeadPreview";
|
const std::string textureName = "CharacterHeadPreview";
|
||||||
MyGUI::RenderManager::getInstance().destroyTexture(MyGUI::RenderManager::getInstance().getTexture(textureName));
|
MyGUI::RenderManager::getInstance().destroyTexture(MyGUI::RenderManager::getInstance().getTexture(textureName));
|
||||||
mPreview.reset(NULL);
|
//mPreview.reset(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// widget controls
|
// widget controls
|
||||||
|
@ -204,7 +205,7 @@ namespace MWGui
|
||||||
void RaceDialog::onHeadRotate(MyGUI::ScrollBar* scroll, size_t _position)
|
void RaceDialog::onHeadRotate(MyGUI::ScrollBar* scroll, size_t _position)
|
||||||
{
|
{
|
||||||
float angle = (float(_position) / (scroll->getScrollRange()-1) - 0.5f) * 3.14f * 2;
|
float angle = (float(_position) / (scroll->getScrollRange()-1) - 0.5f) * 3.14f * 2;
|
||||||
mPreview->update (angle);
|
//mPreview->update (angle);
|
||||||
mPreviewDirty = true;
|
mPreviewDirty = true;
|
||||||
mCurrentAngle = angle;
|
mCurrentAngle = angle;
|
||||||
}
|
}
|
||||||
|
@ -316,7 +317,7 @@ namespace MWGui
|
||||||
|
|
||||||
void RaceDialog::updatePreview()
|
void RaceDialog::updatePreview()
|
||||||
{
|
{
|
||||||
ESM::NPC record = mPreview->getPrototype();
|
ESM::NPC record;// = mPreview->getPrototype();
|
||||||
record.mRace = mCurrentRaceId;
|
record.mRace = mCurrentRaceId;
|
||||||
record.setIsMale(mGenderIndex == 0);
|
record.setIsMale(mGenderIndex == 0);
|
||||||
|
|
||||||
|
@ -325,7 +326,7 @@ namespace MWGui
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
mPreview->setPrototype(record);
|
//mPreview->setPrototype(record);
|
||||||
}
|
}
|
||||||
catch (std::exception& e)
|
catch (std::exception& e)
|
||||||
{
|
{
|
||||||
|
@ -337,13 +338,13 @@ namespace MWGui
|
||||||
|
|
||||||
void RaceDialog::doRenderUpdate()
|
void RaceDialog::doRenderUpdate()
|
||||||
{
|
{
|
||||||
if (!mPreview.get())
|
//if (!mPreview.get())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mPreview->onFrame();
|
//mPreview->onFrame();
|
||||||
if (mPreviewDirty)
|
if (mPreviewDirty)
|
||||||
{
|
{
|
||||||
mPreview->render();
|
//mPreview->render();
|
||||||
mPreviewDirty = false;
|
mPreviewDirty = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -450,6 +451,8 @@ namespace MWGui
|
||||||
|
|
||||||
const ESM::NPC& RaceDialog::getResult() const
|
const ESM::NPC& RaceDialog::getResult() const
|
||||||
{
|
{
|
||||||
return mPreview->getPrototype();
|
static ESM::NPC result;
|
||||||
|
return result;
|
||||||
|
//return mPreview->getPrototype();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ namespace MWGui
|
||||||
|
|
||||||
float mCurrentAngle;
|
float mCurrentAngle;
|
||||||
|
|
||||||
std::auto_ptr<MWRender::RaceSelectionPreview> mPreview;
|
//std::auto_ptr<MWRender::RaceSelectionPreview> mPreview;
|
||||||
|
|
||||||
bool mPreviewDirty;
|
bool mPreviewDirty;
|
||||||
};
|
};
|
||||||
|
|
|
@ -358,7 +358,7 @@ namespace MWGui
|
||||||
<< " " << hour << " " << (pm ? "#{sSaveMenuHelp05}" : "#{sSaveMenuHelp04}");
|
<< " " << hour << " " << (pm ? "#{sSaveMenuHelp05}" : "#{sSaveMenuHelp04}");
|
||||||
|
|
||||||
mInfoText->setCaptionWithReplacing(text.str());
|
mInfoText->setCaptionWithReplacing(text.str());
|
||||||
|
#if 0
|
||||||
// Decode screenshot
|
// Decode screenshot
|
||||||
std::vector<char> data = mCurrentSlot->mProfile.mScreenshot; // MemoryDataStream doesn't work with const data :(
|
std::vector<char> data = mCurrentSlot->mProfile.mScreenshot; // MemoryDataStream doesn't work with const data :(
|
||||||
Ogre::DataStreamPtr stream(new Ogre::MemoryDataStream(&data[0], data.size()));
|
Ogre::DataStreamPtr stream(new Ogre::MemoryDataStream(&data[0], data.size()));
|
||||||
|
@ -382,5 +382,6 @@ namespace MWGui
|
||||||
texture->loadImage(image);
|
texture->loadImage(image);
|
||||||
|
|
||||||
mScreenshot->setImageTexture(textureName);
|
mScreenshot->setImageTexture(textureName);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,7 +180,7 @@ namespace MWGui
|
||||||
|
|
||||||
void EditEffectDialog::setMagicEffect (const ESM::MagicEffect *effect)
|
void EditEffectDialog::setMagicEffect (const ESM::MagicEffect *effect)
|
||||||
{
|
{
|
||||||
mEffectImage->setImageTexture(Misc::ResourceHelpers::correctIconPath(effect->mIcon));
|
//mEffectImage->setImageTexture(Misc::ResourceHelpers::correctIconPath(effect->mIcon));
|
||||||
|
|
||||||
mEffectName->setCaptionWithReplacing("#{"+ESM::MagicEffect::effectIdToString (effect->mIndex)+"}");
|
mEffectName->setCaptionWithReplacing("#{"+ESM::MagicEffect::effectIdToString (effect->mIndex)+"}");
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ namespace MWGui
|
||||||
("ImageBox", MyGUI::IntCoord(w,2,16,16), MyGUI::Align::Default);
|
("ImageBox", MyGUI::IntCoord(w,2,16,16), MyGUI::Align::Default);
|
||||||
mWidgetMap[it->first] = image;
|
mWidgetMap[it->first] = image;
|
||||||
|
|
||||||
image->setImageTexture(Misc::ResourceHelpers::correctIconPath(effect->mIcon));
|
//image->setImageTexture(Misc::ResourceHelpers::correctIconPath(effect->mIcon));
|
||||||
|
|
||||||
std::string name = ESM::MagicEffect::effectIdToString (it->first);
|
std::string name = ESM::MagicEffect::effectIdToString (it->first);
|
||||||
|
|
||||||
|
|
|
@ -388,7 +388,7 @@ namespace MWGui
|
||||||
const int imageCaptionHPadding = (caption != "" ? 8 : 0);
|
const int imageCaptionHPadding = (caption != "" ? 8 : 0);
|
||||||
const int imageCaptionVPadding = (caption != "" ? 4 : 0);
|
const int imageCaptionVPadding = (caption != "" ? 4 : 0);
|
||||||
|
|
||||||
std::string realImage = Misc::ResourceHelpers::correctIconPath(image);
|
std::string realImage;// = Misc::ResourceHelpers::correctIconPath(image);
|
||||||
|
|
||||||
MyGUI::EditBox* captionWidget = mDynamicToolTipBox->createWidget<MyGUI::EditBox>("NormalText", MyGUI::IntCoord(0, 0, 300, 300), MyGUI::Align::Left | MyGUI::Align::Top, "ToolTipCaption");
|
MyGUI::EditBox* captionWidget = mDynamicToolTipBox->createWidget<MyGUI::EditBox>("NormalText", MyGUI::IntCoord(0, 0, 300, 300), MyGUI::Align::Left | MyGUI::Align::Top, "ToolTipCaption");
|
||||||
captionWidget->setProperty("Static", "true");
|
captionWidget->setProperty("Static", "true");
|
||||||
|
@ -686,7 +686,7 @@ namespace MWGui
|
||||||
|
|
||||||
widget->setUserString("ToolTipType", "Layout");
|
widget->setUserString("ToolTipType", "Layout");
|
||||||
widget->setUserString("ToolTipLayout", "BirthSignToolTip");
|
widget->setUserString("ToolTipLayout", "BirthSignToolTip");
|
||||||
widget->setUserString("ImageTexture_BirthSignImage", Misc::ResourceHelpers::correctTexturePath(sign->mTexture));
|
widget->setUserString("ImageTexture_BirthSignImage", "");//Misc::ResourceHelpers::correctTexturePath(sign->mTexture));
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
text += sign->mName;
|
text += sign->mName;
|
||||||
|
@ -781,7 +781,7 @@ namespace MWGui
|
||||||
std::string icon = effect->mIcon;
|
std::string icon = effect->mIcon;
|
||||||
int slashPos = icon.rfind('\\');
|
int slashPos = icon.rfind('\\');
|
||||||
icon.insert(slashPos+1, "b_");
|
icon.insert(slashPos+1, "b_");
|
||||||
icon = Misc::ResourceHelpers::correctIconPath(icon);
|
//icon = Misc::ResourceHelpers::correctIconPath(icon);
|
||||||
|
|
||||||
widget->setUserString("ToolTipType", "Layout");
|
widget->setUserString("ToolTipType", "Layout");
|
||||||
widget->setUserString("ToolTipLayout", "MagicEffectToolTip");
|
widget->setUserString("ToolTipLayout", "MagicEffectToolTip");
|
||||||
|
|
|
@ -1,51 +1,51 @@
|
||||||
#include "videowidget.hpp"
|
#include "videowidget.hpp"
|
||||||
|
|
||||||
#include <extern/ogre-ffmpeg-videoplayer/videoplayer.hpp>
|
//#include <extern/ogre-ffmpeg-videoplayer/videoplayer.hpp>
|
||||||
|
|
||||||
#include <MyGUI_RenderManager.h>
|
#include <MyGUI_RenderManager.h>
|
||||||
|
|
||||||
#include "../mwsound/movieaudiofactory.hpp"
|
//#include "../mwsound/movieaudiofactory.hpp"
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
VideoWidget::VideoWidget()
|
VideoWidget::VideoWidget()
|
||||||
{
|
{
|
||||||
mPlayer.reset(new Video::VideoPlayer());
|
//mPlayer.reset(new Video::VideoPlayer());
|
||||||
setNeedKeyFocus(true);
|
setNeedKeyFocus(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoWidget::playVideo(const std::string &video)
|
void VideoWidget::playVideo(const std::string &video)
|
||||||
{
|
{
|
||||||
mPlayer->setAudioFactory(new MWSound::MovieAudioFactory());
|
//mPlayer->setAudioFactory(new MWSound::MovieAudioFactory());
|
||||||
mPlayer->playVideo(video);
|
//mPlayer->playVideo(video);
|
||||||
|
|
||||||
setImageTexture(mPlayer->getTextureName());
|
//setImageTexture(mPlayer->getTextureName());
|
||||||
}
|
}
|
||||||
|
|
||||||
int VideoWidget::getVideoWidth()
|
int VideoWidget::getVideoWidth()
|
||||||
{
|
{
|
||||||
return mPlayer->getVideoWidth();
|
return 0;//mPlayer->getVideoWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
int VideoWidget::getVideoHeight()
|
int VideoWidget::getVideoHeight()
|
||||||
{
|
{
|
||||||
return mPlayer->getVideoHeight();
|
return 0;//mPlayer->getVideoHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VideoWidget::update()
|
bool VideoWidget::update()
|
||||||
{
|
{
|
||||||
return mPlayer->update();
|
return 0;//mPlayer->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoWidget::stop()
|
void VideoWidget::stop()
|
||||||
{
|
{
|
||||||
mPlayer->close();
|
//mPlayer->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VideoWidget::hasAudioStream()
|
bool VideoWidget::hasAudioStream()
|
||||||
{
|
{
|
||||||
return mPlayer->hasAudioStream();
|
return 0;//mPlayer->hasAudioStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoWidget::autoResize(bool stretch)
|
void VideoWidget::autoResize(bool stretch)
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace MWGui
|
||||||
void autoResize (bool stretch);
|
void autoResize (bool stretch);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<Video::VideoPlayer> mPlayer;
|
//std::auto_ptr<Video::VideoPlayer> mPlayer;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -474,7 +474,7 @@ namespace MWGui
|
||||||
mTextWidget->setCaptionWithReplacing(spellLine);
|
mTextWidget->setCaptionWithReplacing(spellLine);
|
||||||
mRequestedWidth = mTextWidget->getTextSize().width + 24;
|
mRequestedWidth = mTextWidget->getTextSize().width + 24;
|
||||||
|
|
||||||
mImageWidget->setImageTexture(Misc::ResourceHelpers::correctIconPath(magicEffect->mIcon));
|
//mImageWidget->setImageTexture(Misc::ResourceHelpers::correctIconPath(magicEffect->mIcon));
|
||||||
}
|
}
|
||||||
|
|
||||||
MWSpellEffect::~MWSpellEffect()
|
MWSpellEffect::~MWSpellEffect()
|
||||||
|
|
|
@ -19,11 +19,12 @@
|
||||||
#include <MyGUI_ClipboardManager.h>
|
#include <MyGUI_ClipboardManager.h>
|
||||||
#include <MyGUI_RenderManager.h>
|
#include <MyGUI_RenderManager.h>
|
||||||
|
|
||||||
|
#include <MyGUI_DummyPlatform.h>
|
||||||
|
|
||||||
#include <SDL_keyboard.h>
|
#include <SDL_keyboard.h>
|
||||||
#include <SDL_clipboard.h>
|
#include <SDL_clipboard.h>
|
||||||
|
|
||||||
#include <openengine/ogre/renderer.hpp>
|
#include <openengine/ogre/renderer.hpp>
|
||||||
#include <openengine/gui/manager.hpp>
|
|
||||||
|
|
||||||
#include <extern/sdl4ogre/sdlcursormanager.hpp>
|
#include <extern/sdl4ogre/sdlcursormanager.hpp>
|
||||||
|
|
||||||
|
@ -102,7 +103,7 @@ namespace MWGui
|
||||||
const std::string& logpath, const std::string& cacheDir, bool consoleOnlyScripts,
|
const std::string& logpath, const std::string& cacheDir, bool consoleOnlyScripts,
|
||||||
Translation::Storage& translationDataStorage, ToUTF8::FromType encoding, bool exportFonts, const std::map<std::string, std::string>& fallbackMap)
|
Translation::Storage& translationDataStorage, ToUTF8::FromType encoding, bool exportFonts, const std::map<std::string, std::string>& fallbackMap)
|
||||||
: mConsoleOnlyScripts(consoleOnlyScripts)
|
: mConsoleOnlyScripts(consoleOnlyScripts)
|
||||||
, mGuiManager(NULL)
|
//, mGuiManager(NULL)
|
||||||
, mRendering(ogre)
|
, mRendering(ogre)
|
||||||
, mHud(NULL)
|
, mHud(NULL)
|
||||||
, mMap(NULL)
|
, mMap(NULL)
|
||||||
|
@ -177,7 +178,13 @@ namespace MWGui
|
||||||
, mFallbackMap(fallbackMap)
|
, mFallbackMap(fallbackMap)
|
||||||
{
|
{
|
||||||
// Set up the GUI system
|
// Set up the GUI system
|
||||||
mGuiManager = new OEngine::GUI::MyGUIManager(mRendering->getWindow(), mRendering->getScene(), false, logpath);
|
//mGuiManager = new OEngine::GUI::MyGUIManager(mRendering->getWindow(), mRendering->getScene(), false, logpath);
|
||||||
|
|
||||||
|
MyGUI::DummyPlatform* platform = new MyGUI::DummyPlatform;
|
||||||
|
platform->initialise(logpath);
|
||||||
|
|
||||||
|
MyGUI::Gui* gui = new MyGUI::Gui;
|
||||||
|
gui->initialise("");
|
||||||
|
|
||||||
MyGUI::LanguageManager::getInstance().eventRequestTag = MyGUI::newDelegate(this, &WindowManager::onRetrieveTag);
|
MyGUI::LanguageManager::getInstance().eventRequestTag = MyGUI::newDelegate(this, &WindowManager::onRetrieveTag);
|
||||||
|
|
||||||
|
@ -207,11 +214,11 @@ namespace MWGui
|
||||||
|
|
||||||
MyGUI::FactoryManager::getInstance().registerFactory<ResourceImageSetPointerFix>("Resource", "ResourceImageSetPointer");
|
MyGUI::FactoryManager::getInstance().registerFactory<ResourceImageSetPointerFix>("Resource", "ResourceImageSetPointer");
|
||||||
MyGUI::ResourceManager::getInstance().load("core.xml");
|
MyGUI::ResourceManager::getInstance().load("core.xml");
|
||||||
|
#if 0
|
||||||
mLoadingScreen = new LoadingScreen(mRendering->getScene (), mRendering->getWindow ());
|
mLoadingScreen = new LoadingScreen(mRendering->getScene (), mRendering->getWindow ());
|
||||||
|
#endif
|
||||||
//set up the hardware cursor manager
|
//set up the hardware cursor manager
|
||||||
mCursorManager = new SFO::SDLCursorManager();
|
//mCursorManager = new SFO::SDLCursorManager();
|
||||||
|
|
||||||
MyGUI::PointerManager::getInstance().eventChangeMousePointer += MyGUI::newDelegate(this, &WindowManager::onCursorChange);
|
MyGUI::PointerManager::getInstance().eventChangeMousePointer += MyGUI::newDelegate(this, &WindowManager::onCursorChange);
|
||||||
|
|
||||||
|
@ -219,7 +226,7 @@ namespace MWGui
|
||||||
|
|
||||||
onCursorChange(MyGUI::PointerManager::getInstance().getDefaultPointer());
|
onCursorChange(MyGUI::PointerManager::getInstance().getDefaultPointer());
|
||||||
|
|
||||||
mCursorManager->setEnabled(true);
|
//mCursorManager->setEnabled(true);
|
||||||
|
|
||||||
// hide mygui's pointer
|
// hide mygui's pointer
|
||||||
MyGUI::PointerManager::getInstance().setVisible(false);
|
MyGUI::PointerManager::getInstance().setVisible(false);
|
||||||
|
@ -245,6 +252,7 @@ namespace MWGui
|
||||||
|
|
||||||
void WindowManager::initUI()
|
void WindowManager::initUI()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
// Get size info from the Gui object
|
// Get size info from the Gui object
|
||||||
int w = MyGUI::RenderManager::getInstance().getViewSize().width;
|
int w = MyGUI::RenderManager::getInstance().getViewSize().width;
|
||||||
int h = MyGUI::RenderManager::getInstance().getViewSize().height;
|
int h = MyGUI::RenderManager::getInstance().getViewSize().height;
|
||||||
|
@ -328,6 +336,7 @@ namespace MWGui
|
||||||
updateVisible();
|
updateVisible();
|
||||||
|
|
||||||
MWBase::Environment::get().getInputManager()->changeInputMode(false);
|
MWBase::Environment::get().getInputManager()->changeInputMode(false);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::renderWorldMap()
|
void WindowManager::renderWorldMap()
|
||||||
|
@ -408,11 +417,11 @@ namespace MWGui
|
||||||
delete mDebugWindow;
|
delete mDebugWindow;
|
||||||
delete mJailScreen;
|
delete mJailScreen;
|
||||||
|
|
||||||
delete mCursorManager;
|
//delete mCursorManager;
|
||||||
|
|
||||||
cleanupGarbage();
|
cleanupGarbage();
|
||||||
|
|
||||||
delete mGuiManager;
|
//delete mGuiManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::cleanupGarbage()
|
void WindowManager::cleanupGarbage()
|
||||||
|
@ -923,6 +932,7 @@ namespace MWGui
|
||||||
|
|
||||||
void WindowManager::changeCell(MWWorld::CellStore* cell)
|
void WindowManager::changeCell(MWWorld::CellStore* cell)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
std::string name = MWBase::Environment::get().getWorld()->getCellName (cell);
|
std::string name = MWBase::Environment::get().getWorld()->getCellName (cell);
|
||||||
|
|
||||||
mMap->setCellName( name );
|
mMap->setCellName( name );
|
||||||
|
@ -947,10 +957,12 @@ namespace MWGui
|
||||||
MWBase::Environment::get().getWorld()->getPlayer().setLastKnownExteriorPosition(worldPos);
|
MWBase::Environment::get().getWorld()->getPlayer().setLastKnownExteriorPosition(worldPos);
|
||||||
mMap->setGlobalMapPlayerPosition(worldPos.x, worldPos.y);
|
mMap->setGlobalMapPlayerPosition(worldPos.x, worldPos.y);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::setActiveMap(int x, int y, bool interior)
|
void WindowManager::setActiveMap(int x, int y, bool interior)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if (!interior)
|
if (!interior)
|
||||||
{
|
{
|
||||||
mMap->setCellPrefix("Cell");
|
mMap->setCellPrefix("Cell");
|
||||||
|
@ -959,19 +971,22 @@ namespace MWGui
|
||||||
|
|
||||||
mMap->setActiveCell(x,y, interior);
|
mMap->setActiveCell(x,y, interior);
|
||||||
mHud->setActiveCell(x,y, interior);
|
mHud->setActiveCell(x,y, interior);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::setPlayerPos(int cellX, int cellY, const float x, const float y)
|
void WindowManager::setPlayerPos(int cellX, int cellY, const float x, const float y)
|
||||||
{
|
{
|
||||||
mMap->setPlayerPos(cellX, cellY, x, y);
|
//mMap->setPlayerPos(cellX, cellY, x, y);
|
||||||
mHud->setPlayerPos(cellX, cellY, x, y);
|
//mHud->setPlayerPos(cellX, cellY, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::setPlayerDir(const float x, const float y)
|
void WindowManager::setPlayerDir(const float x, const float y)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
mMap->setPlayerDir(x,y);
|
mMap->setPlayerDir(x,y);
|
||||||
mMap->setGlobalMapPlayerDir(x, y);
|
mMap->setGlobalMapPlayerDir(x, y);
|
||||||
mHud->setPlayerDir(x,y);
|
mHud->setPlayerDir(x,y);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::setDrowningBarVisibility(bool visible)
|
void WindowManager::setDrowningBarVisibility(bool visible)
|
||||||
|
@ -1087,7 +1102,7 @@ namespace MWGui
|
||||||
void WindowManager::windowResized(int x, int y)
|
void WindowManager::windowResized(int x, int y)
|
||||||
{
|
{
|
||||||
sizeVideo(x, y);
|
sizeVideo(x, y);
|
||||||
mGuiManager->windowResized();
|
//mGuiManager->windowResized();
|
||||||
if (!mHud)
|
if (!mHud)
|
||||||
return; // UI not initialized yet
|
return; // UI not initialized yet
|
||||||
|
|
||||||
|
@ -1133,6 +1148,7 @@ namespace MWGui
|
||||||
|
|
||||||
void WindowManager::onCursorChange(const std::string &name)
|
void WindowManager::onCursorChange(const std::string &name)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if(!mCursorManager->cursorChanged(name))
|
if(!mCursorManager->cursorChanged(name))
|
||||||
return; //the cursor manager doesn't want any more info about this cursor
|
return; //the cursor manager doesn't want any more info about this cursor
|
||||||
//See if we can get the information we need out of the cursor resource
|
//See if we can get the information we need out of the cursor resource
|
||||||
|
@ -1157,6 +1173,7 @@ namespace MWGui
|
||||||
mCursorManager->receiveCursorInfo(name, rotation, tex, size_x, size_y, hotspot_x, hotspot_y);
|
mCursorManager->receiveCursorInfo(name, rotation, tex, size_x, size_y, hotspot_x, hotspot_y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::popGuiMode()
|
void WindowManager::popGuiMode()
|
||||||
|
@ -1266,7 +1283,7 @@ namespace MWGui
|
||||||
|
|
||||||
void WindowManager::executeInConsole (const std::string& path)
|
void WindowManager::executeInConsole (const std::string& path)
|
||||||
{
|
{
|
||||||
mConsole->executeFile (path);
|
//mConsole->executeFile (path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::wmUpdateFps(float fps, unsigned int triangleCount, unsigned int batchCount)
|
void WindowManager::wmUpdateFps(float fps, unsigned int triangleCount, unsigned int batchCount)
|
||||||
|
@ -1507,7 +1524,7 @@ namespace MWGui
|
||||||
|
|
||||||
void WindowManager::updatePlayer()
|
void WindowManager::updatePlayer()
|
||||||
{
|
{
|
||||||
mInventoryWindow->updatePlayer();
|
//mInventoryWindow->updatePlayer();
|
||||||
|
|
||||||
const MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
const MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||||
if (player.getClass().getNpcStats(player).isWerewolf())
|
if (player.getClass().getNpcStats(player).isWerewolf())
|
||||||
|
@ -1540,9 +1557,22 @@ namespace MWGui
|
||||||
mHud->setEnemy(enemy);
|
mHud->setEnemy(enemy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class DummyListener : public Loading::Listener
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void setLabel (const std::string& label){}
|
||||||
|
virtual void loadingOn(){}
|
||||||
|
virtual void loadingOff(){}
|
||||||
|
virtual void indicateProgress (){}
|
||||||
|
virtual void setProgressRange (size_t range){}
|
||||||
|
virtual void setProgress (size_t value){}
|
||||||
|
virtual void increaseProgress (size_t increase = 1){}
|
||||||
|
};
|
||||||
|
|
||||||
Loading::Listener* WindowManager::getLoadingScreen()
|
Loading::Listener* WindowManager::getLoadingScreen()
|
||||||
{
|
{
|
||||||
return mLoadingScreen;
|
static DummyListener listener;
|
||||||
|
return &listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::startRecharge(MWWorld::Ptr soulgem)
|
void WindowManager::startRecharge(MWWorld::Ptr soulgem)
|
||||||
|
@ -1779,23 +1809,29 @@ namespace MWGui
|
||||||
|
|
||||||
void WindowManager::fadeScreenIn(const float time, bool clearQueue)
|
void WindowManager::fadeScreenIn(const float time, bool clearQueue)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if (clearQueue)
|
if (clearQueue)
|
||||||
mScreenFader->clearQueue();
|
mScreenFader->clearQueue();
|
||||||
mScreenFader->fadeOut(time);
|
mScreenFader->fadeOut(time);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::fadeScreenOut(const float time, bool clearQueue)
|
void WindowManager::fadeScreenOut(const float time, bool clearQueue)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if (clearQueue)
|
if (clearQueue)
|
||||||
mScreenFader->clearQueue();
|
mScreenFader->clearQueue();
|
||||||
mScreenFader->fadeIn(time);
|
mScreenFader->fadeIn(time);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::fadeScreenTo(const int percent, const float time, bool clearQueue)
|
void WindowManager::fadeScreenTo(const int percent, const float time, bool clearQueue)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if (clearQueue)
|
if (clearQueue)
|
||||||
mScreenFader->clearQueue();
|
mScreenFader->clearQueue();
|
||||||
mScreenFader->fadeTo(percent, time);
|
mScreenFader->fadeTo(percent, time);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::setBlindness(const int percent)
|
void WindowManager::setBlindness(const int percent)
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
#include "actor.hpp"
|
#include "actor.hpp"
|
||||||
|
|
||||||
#include "character.hpp"
|
//#include "character.hpp"
|
||||||
|
|
||||||
namespace MWMechanics
|
namespace MWMechanics
|
||||||
{
|
{
|
||||||
|
|
||||||
Actor::Actor(const MWWorld::Ptr &ptr, MWRender::Animation *animation)
|
Actor::Actor(const MWWorld::Ptr &ptr, MWRender::Animation *animation)
|
||||||
{
|
{
|
||||||
mCharacterController.reset(new CharacterController(ptr, animation));
|
//mCharacterController.reset(new CharacterController(ptr, animation));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Actor::updatePtr(const MWWorld::Ptr &newPtr)
|
void Actor::updatePtr(const MWWorld::Ptr &newPtr)
|
||||||
{
|
{
|
||||||
mCharacterController->updatePtr(newPtr);
|
//mCharacterController->updatePtr(newPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
CharacterController* Actor::getCharacterController()
|
CharacterController* Actor::getCharacterController()
|
||||||
{
|
{
|
||||||
return mCharacterController.get();
|
return 0;//mCharacterController.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
AiState& Actor::getAiState()
|
AiState& Actor::getAiState()
|
||||||
|
|
|
@ -16,13 +16,13 @@
|
||||||
#include "../mwbase/mechanicsmanager.hpp"
|
#include "../mwbase/mechanicsmanager.hpp"
|
||||||
#include "../mwbase/dialoguemanager.hpp"
|
#include "../mwbase/dialoguemanager.hpp"
|
||||||
|
|
||||||
#include "../mwrender/animation.hpp"
|
//#include "../mwrender/animation.hpp"
|
||||||
|
|
||||||
|
|
||||||
#include "creaturestats.hpp"
|
#include "creaturestats.hpp"
|
||||||
#include "steering.hpp"
|
#include "steering.hpp"
|
||||||
#include "movement.hpp"
|
#include "movement.hpp"
|
||||||
#include "character.hpp" // fixme: for getActiveWeapon
|
//#include "character.hpp" // fixme: for getActiveWeapon
|
||||||
|
|
||||||
#include "aicombataction.hpp"
|
#include "aicombataction.hpp"
|
||||||
#include "combat.hpp"
|
#include "combat.hpp"
|
||||||
|
@ -188,6 +188,7 @@ namespace MWMechanics
|
||||||
*/
|
*/
|
||||||
bool AiCombat::execute (const MWWorld::Ptr& actor, AiState& state, float duration)
|
bool AiCombat::execute (const MWWorld::Ptr& actor, AiState& state, float duration)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
// get or create temporary storage
|
// get or create temporary storage
|
||||||
AiCombatStorage& storage = state.get<AiCombatStorage>();
|
AiCombatStorage& storage = state.get<AiCombatStorage>();
|
||||||
|
|
||||||
|
@ -673,7 +674,7 @@ namespace MWMechanics
|
||||||
// FIXME: can fool actors to stay behind doors, etc.
|
// FIXME: can fool actors to stay behind doors, etc.
|
||||||
// Related to Bug#1102 and to some degree #1155 as well
|
// Related to Bug#1102 and to some degree #1155 as well
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -811,6 +812,7 @@ ESM::Weapon::AttackType chooseBestAttack(const ESM::Weapon* weapon, MWMechanics:
|
||||||
return attackType;
|
return attackType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
void getMinMaxAttackDuration(const MWWorld::Ptr& actor, float (*fMinMaxDurations)[2])
|
void getMinMaxAttackDuration(const MWWorld::Ptr& actor, float (*fMinMaxDurations)[2])
|
||||||
{
|
{
|
||||||
if (!actor.getClass().hasInventoryStore(actor)) // creatures
|
if (!actor.getClass().hasInventoryStore(actor)) // creatures
|
||||||
|
@ -873,8 +875,8 @@ void getMinMaxAttackDuration(const MWWorld::Ptr& actor, float (*fMinMaxDurations
|
||||||
|
|
||||||
fMinMaxDurations[i][1] = fMinMaxDurations[i][0] + (start1 - start2) / weapSpeed;
|
fMinMaxDurations[i][1] = fMinMaxDurations[i][0] + (start1 - start2) / weapSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
Ogre::Vector3 AimDirToMovingTarget(const MWWorld::Ptr& actor, const MWWorld::Ptr& target, const Ogre::Vector3& vLastTargetPos,
|
Ogre::Vector3 AimDirToMovingTarget(const MWWorld::Ptr& actor, const MWWorld::Ptr& target, const Ogre::Vector3& vLastTargetPos,
|
||||||
float duration, int weapType, float strength)
|
float duration, int weapType, float strength)
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
|
@ -269,7 +269,7 @@ namespace MWMechanics
|
||||||
creatureStats.getSpells().add(*it);
|
creatureStats.getSpells().add(*it);
|
||||||
|
|
||||||
// forced update and current value adjustments
|
// forced update and current value adjustments
|
||||||
mActors.updateActor (ptr, 0);
|
//mActors.updateActor (ptr, 0);
|
||||||
|
|
||||||
for (int i=0; i<3; ++i)
|
for (int i=0; i<3; ++i)
|
||||||
{
|
{
|
||||||
|
@ -294,22 +294,27 @@ namespace MWMechanics
|
||||||
|
|
||||||
void MechanicsManager::add(const MWWorld::Ptr& ptr)
|
void MechanicsManager::add(const MWWorld::Ptr& ptr)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if(ptr.getClass().isActor())
|
if(ptr.getClass().isActor())
|
||||||
mActors.addActor(ptr);
|
mActors.addActor(ptr);
|
||||||
else
|
else
|
||||||
mObjects.addObject(ptr);
|
mObjects.addObject(ptr);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void MechanicsManager::remove(const MWWorld::Ptr& ptr)
|
void MechanicsManager::remove(const MWWorld::Ptr& ptr)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if(ptr == mWatched)
|
if(ptr == mWatched)
|
||||||
mWatched = MWWorld::Ptr();
|
mWatched = MWWorld::Ptr();
|
||||||
mActors.removeActor(ptr);
|
mActors.removeActor(ptr);
|
||||||
mObjects.removeObject(ptr);
|
mObjects.removeObject(ptr);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void MechanicsManager::updateCell(const MWWorld::Ptr &old, const MWWorld::Ptr &ptr)
|
void MechanicsManager::updateCell(const MWWorld::Ptr &old, const MWWorld::Ptr &ptr)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if(old == mWatched)
|
if(old == mWatched)
|
||||||
mWatched = ptr;
|
mWatched = ptr;
|
||||||
|
|
||||||
|
@ -317,13 +322,16 @@ namespace MWMechanics
|
||||||
mActors.updateActor(old, ptr);
|
mActors.updateActor(old, ptr);
|
||||||
else
|
else
|
||||||
mObjects.updateObject(old, ptr);
|
mObjects.updateObject(old, ptr);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MechanicsManager::drop(const MWWorld::CellStore *cellStore)
|
void MechanicsManager::drop(const MWWorld::CellStore *cellStore)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
mActors.dropActors(cellStore, mWatched);
|
mActors.dropActors(cellStore, mWatched);
|
||||||
mObjects.dropObjects(cellStore);
|
mObjects.dropObjects(cellStore);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -464,24 +472,24 @@ namespace MWMechanics
|
||||||
|
|
||||||
// HACK? The player has been changed, so a new Animation object may
|
// HACK? The player has been changed, so a new Animation object may
|
||||||
// have been made for them. Make sure they're properly updated.
|
// have been made for them. Make sure they're properly updated.
|
||||||
MWWorld::Ptr ptr = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
//MWWorld::Ptr ptr = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||||
mActors.removeActor(ptr);
|
//mActors.removeActor(ptr);
|
||||||
mActors.addActor(ptr, true);
|
//mActors.addActor(ptr, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
mActors.update(duration, paused);
|
//mActors.update(duration, paused);
|
||||||
mObjects.update(duration, paused);
|
//mObjects.update(duration, paused);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MechanicsManager::rest(bool sleep)
|
void MechanicsManager::rest(bool sleep)
|
||||||
{
|
{
|
||||||
mActors.restoreDynamicStats (sleep);
|
//mActors.restoreDynamicStats (sleep);
|
||||||
mActors.fastForwardAi();
|
//mActors.fastForwardAi();
|
||||||
}
|
}
|
||||||
|
|
||||||
int MechanicsManager::getHoursToRest() const
|
int MechanicsManager::getHoursToRest() const
|
||||||
{
|
{
|
||||||
return mActors.getHoursToRest(mWatched);
|
return 0;//mActors.getHoursToRest(mWatched);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MechanicsManager::setPlayerName (const std::string& name)
|
void MechanicsManager::setPlayerName (const std::string& name)
|
||||||
|
@ -671,7 +679,7 @@ namespace MWMechanics
|
||||||
|
|
||||||
int MechanicsManager::countDeaths (const std::string& id) const
|
int MechanicsManager::countDeaths (const std::string& id) const
|
||||||
{
|
{
|
||||||
return mActors.countDeaths (id);
|
return 0;//mActors.countDeaths (id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MechanicsManager::getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type,
|
void MechanicsManager::getPersuasionDispositionChange (const MWWorld::Ptr& npc, PersuasionType type,
|
||||||
|
@ -827,35 +835,39 @@ namespace MWMechanics
|
||||||
|
|
||||||
void MechanicsManager::forceStateUpdate(const MWWorld::Ptr &ptr)
|
void MechanicsManager::forceStateUpdate(const MWWorld::Ptr &ptr)
|
||||||
{
|
{
|
||||||
if(ptr.getClass().isActor())
|
//if(ptr.getClass().isActor())
|
||||||
mActors.forceStateUpdate(ptr);
|
//mActors.forceStateUpdate(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MechanicsManager::playAnimationGroup(const MWWorld::Ptr& ptr, const std::string& groupName, int mode, int number)
|
void MechanicsManager::playAnimationGroup(const MWWorld::Ptr& ptr, const std::string& groupName, int mode, int number)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if(ptr.getClass().isActor())
|
if(ptr.getClass().isActor())
|
||||||
mActors.playAnimationGroup(ptr, groupName, mode, number);
|
mActors.playAnimationGroup(ptr, groupName, mode, number);
|
||||||
else
|
else
|
||||||
mObjects.playAnimationGroup(ptr, groupName, mode, number);
|
mObjects.playAnimationGroup(ptr, groupName, mode, number);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
void MechanicsManager::skipAnimation(const MWWorld::Ptr& ptr)
|
void MechanicsManager::skipAnimation(const MWWorld::Ptr& ptr)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if(ptr.getClass().isActor())
|
if(ptr.getClass().isActor())
|
||||||
mActors.skipAnimation(ptr);
|
mActors.skipAnimation(ptr);
|
||||||
else
|
else
|
||||||
mObjects.skipAnimation(ptr);
|
mObjects.skipAnimation(ptr);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
bool MechanicsManager::checkAnimationPlaying(const MWWorld::Ptr& ptr, const std::string &groupName)
|
bool MechanicsManager::checkAnimationPlaying(const MWWorld::Ptr& ptr, const std::string &groupName)
|
||||||
{
|
{
|
||||||
if(ptr.getClass().isActor())
|
//if(ptr.getClass().isActor())
|
||||||
return mActors.checkAnimationPlaying(ptr, groupName);
|
// return mActors.checkAnimationPlaying(ptr, groupName);
|
||||||
else
|
//else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MechanicsManager::updateMagicEffects(const MWWorld::Ptr &ptr)
|
void MechanicsManager::updateMagicEffects(const MWWorld::Ptr &ptr)
|
||||||
{
|
{
|
||||||
mActors.updateMagicEffects(ptr);
|
//mActors.updateMagicEffects(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MechanicsManager::toggleAI()
|
bool MechanicsManager::toggleAI()
|
||||||
|
@ -1050,7 +1062,7 @@ namespace MWMechanics
|
||||||
const MWWorld::ESMStore& esmStore = MWBase::Environment::get().getWorld()->getStore();
|
const MWWorld::ESMStore& esmStore = MWBase::Environment::get().getWorld()->getStore();
|
||||||
float radius = esmStore.get<ESM::GameSetting>().find("fAlarmRadius")->getFloat();
|
float radius = esmStore.get<ESM::GameSetting>().find("fAlarmRadius")->getFloat();
|
||||||
|
|
||||||
mActors.getObjectsInRange(from, radius, neighbors);
|
//mActors.getObjectsInRange(from, radius, neighbors);
|
||||||
|
|
||||||
// victim should be considered even beyond alarm radius
|
// victim should be considered even beyond alarm radius
|
||||||
if (!victim.isEmpty() && from.squaredDistance(Ogre::Vector3(victim.getRefData().getPosition().pos)) > radius*radius)
|
if (!victim.isEmpty() && from.squaredDistance(Ogre::Vector3(victim.getRefData().getPosition().pos)) > radius*radius)
|
||||||
|
@ -1139,7 +1151,7 @@ namespace MWMechanics
|
||||||
Ogre::Vector3 from = Ogre::Vector3(player.getRefData().getPosition().pos);
|
Ogre::Vector3 from = Ogre::Vector3(player.getRefData().getPosition().pos);
|
||||||
float radius = esmStore.get<ESM::GameSetting>().find("fAlarmRadius")->getFloat();
|
float radius = esmStore.get<ESM::GameSetting>().find("fAlarmRadius")->getFloat();
|
||||||
|
|
||||||
mActors.getObjectsInRange(from, radius, neighbors);
|
//mActors.getObjectsInRange(from, radius, neighbors);
|
||||||
|
|
||||||
// victim should be considered even beyond alarm radius
|
// victim should be considered even beyond alarm radius
|
||||||
if (!victim.isEmpty() && from.squaredDistance(Ogre::Vector3(victim.getRefData().getPosition().pos)) > radius*radius)
|
if (!victim.isEmpty() && from.squaredDistance(Ogre::Vector3(victim.getRefData().getPosition().pos)) > radius*radius)
|
||||||
|
@ -1394,6 +1406,7 @@ namespace MWMechanics
|
||||||
// if guard starts combat with player, guards pursuing player should do the same
|
// if guard starts combat with player, guards pursuing player should do the same
|
||||||
if (ptr.getClass().isClass(ptr, "Guard"))
|
if (ptr.getClass().isClass(ptr, "Guard"))
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
for (Actors::PtrActorMap::const_iterator iter = mActors.begin(); iter != mActors.end(); ++iter)
|
for (Actors::PtrActorMap::const_iterator iter = mActors.begin(); iter != mActors.end(); ++iter)
|
||||||
{
|
{
|
||||||
if (iter->first.getClass().isClass(iter->first, "Guard"))
|
if (iter->first.getClass().isClass(iter->first, "Guard"))
|
||||||
|
@ -1406,6 +1419,7 @@ namespace MWMechanics
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1416,27 +1430,27 @@ namespace MWMechanics
|
||||||
|
|
||||||
void MechanicsManager::getObjectsInRange(const Ogre::Vector3 &position, float radius, std::vector<MWWorld::Ptr> &objects)
|
void MechanicsManager::getObjectsInRange(const Ogre::Vector3 &position, float radius, std::vector<MWWorld::Ptr> &objects)
|
||||||
{
|
{
|
||||||
mActors.getObjectsInRange(position, radius, objects);
|
//mActors.getObjectsInRange(position, radius, objects);
|
||||||
mObjects.getObjectsInRange(position, radius, objects);
|
//mObjects.getObjectsInRange(position, radius, objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MechanicsManager::getActorsInRange(const Ogre::Vector3 &position, float radius, std::vector<MWWorld::Ptr> &objects)
|
void MechanicsManager::getActorsInRange(const Ogre::Vector3 &position, float radius, std::vector<MWWorld::Ptr> &objects)
|
||||||
{
|
{
|
||||||
mActors.getObjectsInRange(position, radius, objects);
|
//mActors.getObjectsInRange(position, radius, objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::list<MWWorld::Ptr> MechanicsManager::getActorsFollowing(const MWWorld::Ptr& actor)
|
std::list<MWWorld::Ptr> MechanicsManager::getActorsFollowing(const MWWorld::Ptr& actor)
|
||||||
{
|
{
|
||||||
return mActors.getActorsFollowing(actor);
|
return std::list<MWWorld::Ptr>();//mActors.getActorsFollowing(actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::list<int> MechanicsManager::getActorsFollowingIndices(const MWWorld::Ptr& actor)
|
std::list<int> MechanicsManager::getActorsFollowingIndices(const MWWorld::Ptr& actor)
|
||||||
{
|
{
|
||||||
return mActors.getActorsFollowingIndices(actor);
|
return std::list<int>(); //mActors.getActorsFollowingIndices(actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::list<MWWorld::Ptr> MechanicsManager::getActorsFighting(const MWWorld::Ptr& actor) {
|
std::list<MWWorld::Ptr> MechanicsManager::getActorsFighting(const MWWorld::Ptr& actor) {
|
||||||
return mActors.getActorsFighting(actor);
|
return std::list<MWWorld::Ptr>();// mActors.getActorsFighting(actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
int MechanicsManager::countSavedGameRecords() const
|
int MechanicsManager::countSavedGameRecords() const
|
||||||
|
@ -1447,7 +1461,7 @@ namespace MWMechanics
|
||||||
|
|
||||||
void MechanicsManager::write(ESM::ESMWriter &writer, Loading::Listener &listener) const
|
void MechanicsManager::write(ESM::ESMWriter &writer, Loading::Listener &listener) const
|
||||||
{
|
{
|
||||||
mActors.write(writer, listener);
|
//mActors.write(writer, listener);
|
||||||
|
|
||||||
ESM::StolenItems items;
|
ESM::StolenItems items;
|
||||||
items.mStolenItems = mStolenItems;
|
items.mStolenItems = mStolenItems;
|
||||||
|
@ -1464,13 +1478,13 @@ namespace MWMechanics
|
||||||
items.load(reader);
|
items.load(reader);
|
||||||
mStolenItems = items.mStolenItems;
|
mStolenItems = items.mStolenItems;
|
||||||
}
|
}
|
||||||
else
|
//else
|
||||||
mActors.readRecord(reader, type);
|
//mActors.readRecord(reader, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MechanicsManager::clear()
|
void MechanicsManager::clear()
|
||||||
{
|
{
|
||||||
mActors.clear();
|
//mActors.clear();
|
||||||
mStolenItems.clear();
|
mStolenItems.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1516,6 +1530,6 @@ namespace MWMechanics
|
||||||
|
|
||||||
bool MechanicsManager::isReadyToBlock(const MWWorld::Ptr &ptr) const
|
bool MechanicsManager::isReadyToBlock(const MWWorld::Ptr &ptr) const
|
||||||
{
|
{
|
||||||
return mActors.isReadyToBlock(ptr);
|
return 0;//mActors.isReadyToBlock(ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
|
|
||||||
#include "creaturestats.hpp"
|
#include "creaturestats.hpp"
|
||||||
#include "npcstats.hpp"
|
#include "npcstats.hpp"
|
||||||
#include "objects.hpp"
|
//#include "objects.hpp"
|
||||||
#include "actors.hpp"
|
//#include "actors.hpp"
|
||||||
|
|
||||||
namespace Ogre
|
namespace Ogre
|
||||||
{
|
{
|
||||||
|
@ -32,8 +32,8 @@ namespace MWMechanics
|
||||||
bool mRaceSelected;
|
bool mRaceSelected;
|
||||||
bool mAI;///< is AI active?
|
bool mAI;///< is AI active?
|
||||||
|
|
||||||
Objects mObjects;
|
//Objects mObjects;
|
||||||
Actors mActors;
|
//Actors mActors;
|
||||||
|
|
||||||
typedef std::pair<std::string, bool> Owner; // < Owner id, bool isFaction >
|
typedef std::pair<std::string, bool> Owner; // < Owner id, bool isFaction >
|
||||||
typedef std::map<Owner, int> OwnerMap; // < Owner, number of stolen items with this id from this owner >
|
typedef std::map<Owner, int> OwnerMap; // < Owner, number of stolen items with this id from this owner >
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "../mwworld/cellstore.hpp"
|
#include "../mwworld/cellstore.hpp"
|
||||||
#include "../mwworld/esmstore.hpp"
|
#include "../mwworld/esmstore.hpp"
|
||||||
|
|
||||||
#include "../mwrender/animation.hpp"
|
//#include "../mwrender/animation.hpp"
|
||||||
|
|
||||||
#include "magiceffects.hpp"
|
#include "magiceffects.hpp"
|
||||||
#include "npcstats.hpp"
|
#include "npcstats.hpp"
|
||||||
|
@ -419,8 +419,8 @@ namespace MWMechanics
|
||||||
if (absorbed)
|
if (absorbed)
|
||||||
{
|
{
|
||||||
const ESM::Static* absorbStatic = MWBase::Environment::get().getWorld()->getStore().get<ESM::Static>().find ("VFX_Absorb");
|
const ESM::Static* absorbStatic = MWBase::Environment::get().getWorld()->getStore().get<ESM::Static>().find ("VFX_Absorb");
|
||||||
MWBase::Environment::get().getWorld()->getAnimation(target)->addEffect(
|
//MWBase::Environment::get().getWorld()->getAnimation(target)->addEffect(
|
||||||
"meshes\\" + absorbStatic->mModel, ESM::MagicEffect::SpellAbsorption, false, "");
|
// "meshes\\" + absorbStatic->mModel, ESM::MagicEffect::SpellAbsorption, false, "");
|
||||||
// Magicka is increased by cost of spell
|
// Magicka is increased by cost of spell
|
||||||
DynamicStat<float> magicka = target.getClass().getCreatureStats(target).getMagicka();
|
DynamicStat<float> magicka = target.getClass().getCreatureStats(target).getMagicka();
|
||||||
magicka.setCurrent(magicka.getCurrent() + spell->mData.mCost);
|
magicka.setCurrent(magicka.getCurrent() + spell->mData.mCost);
|
||||||
|
@ -467,8 +467,8 @@ namespace MWMechanics
|
||||||
if (isReflected)
|
if (isReflected)
|
||||||
{
|
{
|
||||||
const ESM::Static* reflectStatic = MWBase::Environment::get().getWorld()->getStore().get<ESM::Static>().find ("VFX_Reflect");
|
const ESM::Static* reflectStatic = MWBase::Environment::get().getWorld()->getStore().get<ESM::Static>().find ("VFX_Reflect");
|
||||||
MWBase::Environment::get().getWorld()->getAnimation(target)->addEffect(
|
//MWBase::Environment::get().getWorld()->getAnimation(target)->addEffect(
|
||||||
"meshes\\" + reflectStatic->mModel, ESM::MagicEffect::Reflect, false, "");
|
// "meshes\\" + reflectStatic->mModel, ESM::MagicEffect::Reflect, false, "");
|
||||||
reflectedEffects.mList.push_back(*effectIt);
|
reflectedEffects.mList.push_back(*effectIt);
|
||||||
magnitudeMult = 0;
|
magnitudeMult = 0;
|
||||||
}
|
}
|
||||||
|
@ -574,9 +574,9 @@ namespace MWMechanics
|
||||||
// TODO: VFX are no longer active after saving/reloading the game
|
// TODO: VFX are no longer active after saving/reloading the game
|
||||||
bool loop = (magicEffect->mData.mFlags & ESM::MagicEffect::ContinuousVfx) != 0;
|
bool loop = (magicEffect->mData.mFlags & ESM::MagicEffect::ContinuousVfx) != 0;
|
||||||
// Note: in case of non actor, a free effect should be fine as well
|
// Note: in case of non actor, a free effect should be fine as well
|
||||||
MWRender::Animation* anim = MWBase::Environment::get().getWorld()->getAnimation(target);
|
//MWRender::Animation* anim = MWBase::Environment::get().getWorld()->getAnimation(target);
|
||||||
if (anim)
|
//if (anim)
|
||||||
anim->addEffect("meshes\\" + castStatic->mModel, magicEffect->mIndex, loop, "");
|
// anim->addEffect("meshes\\" + castStatic->mModel, magicEffect->mIndex, loop, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include "../mwworld/manualref.hpp"
|
#include "../mwworld/manualref.hpp"
|
||||||
#include "../mwworld/inventorystore.hpp"
|
#include "../mwworld/inventorystore.hpp"
|
||||||
|
|
||||||
#include "../mwrender/animation.hpp"
|
//#include "../mwrender/animation.hpp"
|
||||||
|
|
||||||
#include "creaturestats.hpp"
|
#include "creaturestats.hpp"
|
||||||
#include "aifollow.hpp"
|
#include "aifollow.hpp"
|
||||||
|
@ -143,8 +143,9 @@ namespace MWMechanics
|
||||||
summonedCreatureStats.getAiSequence().stack(package, ref.getPtr());
|
summonedCreatureStats.getAiSequence().stack(package, ref.getPtr());
|
||||||
int creatureActorId = summonedCreatureStats.getActorId();
|
int creatureActorId = summonedCreatureStats.getActorId();
|
||||||
|
|
||||||
MWWorld::Ptr placed = MWBase::Environment::get().getWorld()->safePlaceObject(ref.getPtr(),store,ipos);
|
/*MWWorld::Ptr placed = */MWBase::Environment::get().getWorld()->safePlaceObject(ref.getPtr(),store,ipos);
|
||||||
|
|
||||||
|
/*
|
||||||
MWRender::Animation* anim = MWBase::Environment::get().getWorld()->getAnimation(placed);
|
MWRender::Animation* anim = MWBase::Environment::get().getWorld()->getAnimation(placed);
|
||||||
if (anim)
|
if (anim)
|
||||||
{
|
{
|
||||||
|
@ -153,6 +154,7 @@ namespace MWMechanics
|
||||||
if (fx)
|
if (fx)
|
||||||
anim->addEffect("meshes\\" + fx->mModel, -1, false);
|
anim->addEffect("meshes\\" + fx->mModel, -1, false);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
creatureMap.insert(std::make_pair(*it, creatureActorId));
|
creatureMap.insert(std::make_pair(*it, creatureActorId));
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,13 +6,14 @@
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
#include "../mwworld/class.hpp"
|
#include "../mwworld/class.hpp"
|
||||||
|
|
||||||
#include "../mwrender/renderingmanager.hpp"
|
//#include "../mwrender/renderingmanager.hpp"
|
||||||
|
|
||||||
|
/*
|
||||||
#include "animation.hpp"
|
#include "animation.hpp"
|
||||||
#include "activatoranimation.hpp"
|
#include "activatoranimation.hpp"
|
||||||
#include "creatureanimation.hpp"
|
#include "creatureanimation.hpp"
|
||||||
#include "npcanimation.hpp"
|
#include "npcanimation.hpp"
|
||||||
|
*/
|
||||||
#include "renderconst.hpp"
|
#include "renderconst.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,19 +23,22 @@ using namespace Ogre;
|
||||||
|
|
||||||
Actors::~Actors()
|
Actors::~Actors()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
PtrAnimationMap::iterator it = mAllActors.begin();
|
PtrAnimationMap::iterator it = mAllActors.begin();
|
||||||
for(;it != mAllActors.end();++it)
|
for(;it != mAllActors.end();++it)
|
||||||
{
|
{
|
||||||
delete it->second;
|
delete it->second;
|
||||||
it->second = NULL;
|
it->second = NULL;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void Actors::setRootNode(Ogre::SceneNode* root)
|
//void Actors::setRootNode(Ogre::SceneNode* root)
|
||||||
{ mRootNode = root; }
|
//{ mRootNode = root; }
|
||||||
|
|
||||||
void Actors::insertBegin(const MWWorld::Ptr &ptr)
|
void Actors::insertBegin(const MWWorld::Ptr &ptr)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
Ogre::SceneNode* cellnode;
|
Ogre::SceneNode* cellnode;
|
||||||
CellSceneNodeMap::const_iterator celliter = mCellSceneNodes.find(ptr.getCell());
|
CellSceneNodeMap::const_iterator celliter = mCellSceneNodes.find(ptr.getCell());
|
||||||
if(celliter != mCellSceneNodes.end())
|
if(celliter != mCellSceneNodes.end())
|
||||||
|
@ -61,18 +65,22 @@ void Actors::insertBegin(const MWWorld::Ptr &ptr)
|
||||||
|
|
||||||
insert->setOrientation(zr);
|
insert->setOrientation(zr);
|
||||||
ptr.getRefData().setBaseNode(insert);
|
ptr.getRefData().setBaseNode(insert);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void Actors::insertNPC(const MWWorld::Ptr& ptr)
|
void Actors::insertNPC(const MWWorld::Ptr& ptr)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
insertBegin(ptr);
|
insertBegin(ptr);
|
||||||
NpcAnimation* anim = new NpcAnimation(ptr, ptr.getRefData().getBaseNode(), RV_Actors);
|
NpcAnimation* anim = new NpcAnimation(ptr, ptr.getRefData().getBaseNode(), RV_Actors);
|
||||||
delete mAllActors[ptr];
|
delete mAllActors[ptr];
|
||||||
mAllActors[ptr] = anim;
|
mAllActors[ptr] = anim;
|
||||||
mRendering->addWaterRippleEmitter (ptr);
|
mRendering->addWaterRippleEmitter (ptr);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
void Actors::insertCreature (const MWWorld::Ptr& ptr, const std::string &model, bool weaponsShields)
|
void Actors::insertCreature (const MWWorld::Ptr& ptr, const std::string &model, bool weaponsShields)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
insertBegin(ptr);
|
insertBegin(ptr);
|
||||||
Animation* anim = NULL;
|
Animation* anim = NULL;
|
||||||
if (weaponsShields)
|
if (weaponsShields)
|
||||||
|
@ -82,9 +90,11 @@ void Actors::insertCreature (const MWWorld::Ptr& ptr, const std::string &model,
|
||||||
delete mAllActors[ptr];
|
delete mAllActors[ptr];
|
||||||
mAllActors[ptr] = anim;
|
mAllActors[ptr] = anim;
|
||||||
mRendering->addWaterRippleEmitter (ptr);
|
mRendering->addWaterRippleEmitter (ptr);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
void Actors::insertActivator (const MWWorld::Ptr& ptr, const std::string &model, bool addLight)
|
void Actors::insertActivator (const MWWorld::Ptr& ptr, const std::string &model, bool addLight)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
insertBegin(ptr);
|
insertBegin(ptr);
|
||||||
ActivatorAnimation* anim = new ActivatorAnimation(ptr, model);
|
ActivatorAnimation* anim = new ActivatorAnimation(ptr, model);
|
||||||
|
|
||||||
|
@ -98,10 +108,12 @@ void Actors::insertActivator (const MWWorld::Ptr& ptr, const std::string &model,
|
||||||
|
|
||||||
delete mAllActors[ptr];
|
delete mAllActors[ptr];
|
||||||
mAllActors[ptr] = anim;
|
mAllActors[ptr] = anim;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Actors::deleteObject (const MWWorld::Ptr& ptr)
|
bool Actors::deleteObject (const MWWorld::Ptr& ptr)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if (mAllActors.find(ptr) == mAllActors.end())
|
if (mAllActors.find(ptr) == mAllActors.end())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -127,12 +139,13 @@ bool Actors::deleteObject (const MWWorld::Ptr& ptr)
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Actors::removeCell(MWWorld::CellStore* store)
|
void Actors::removeCell(MWWorld::CellStore* store)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
for(PtrAnimationMap::iterator iter = mAllActors.begin();iter != mAllActors.end();)
|
for(PtrAnimationMap::iterator iter = mAllActors.begin();iter != mAllActors.end();)
|
||||||
{
|
{
|
||||||
if(iter->first.getCell() == store)
|
if(iter->first.getCell() == store)
|
||||||
|
@ -153,26 +166,22 @@ void Actors::removeCell(MWWorld::CellStore* store)
|
||||||
|
|
||||||
mCellSceneNodes.erase(celliter);
|
mCellSceneNodes.erase(celliter);
|
||||||
}
|
}
|
||||||
}
|
*/
|
||||||
|
|
||||||
void Actors::update (Ogre::Camera* camera)
|
|
||||||
{
|
|
||||||
for(PtrAnimationMap::iterator iter = mAllActors.begin();iter != mAllActors.end(); ++iter)
|
|
||||||
{
|
|
||||||
iter->second->preRender(camera);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Animation* Actors::getAnimation(const MWWorld::Ptr &ptr)
|
Animation* Actors::getAnimation(const MWWorld::Ptr &ptr)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
PtrAnimationMap::const_iterator iter = mAllActors.find(ptr);
|
PtrAnimationMap::const_iterator iter = mAllActors.find(ptr);
|
||||||
if(iter != mAllActors.end())
|
if(iter != mAllActors.end())
|
||||||
return iter->second;
|
return iter->second;
|
||||||
|
*/
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Actors::updateObjectCell(const MWWorld::Ptr &old, const MWWorld::Ptr &cur)
|
void Actors::updateObjectCell(const MWWorld::Ptr &old, const MWWorld::Ptr &cur)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
Ogre::SceneNode *node;
|
Ogre::SceneNode *node;
|
||||||
MWWorld::CellStore *newCell = cur.getCell();
|
MWWorld::CellStore *newCell = cur.getCell();
|
||||||
|
|
||||||
|
@ -196,20 +205,7 @@ void Actors::updateObjectCell(const MWWorld::Ptr &old, const MWWorld::Ptr &cur)
|
||||||
}
|
}
|
||||||
|
|
||||||
mRendering->updateWaterRippleEmitterPtr (old, cur);
|
mRendering->updateWaterRippleEmitterPtr (old, cur);
|
||||||
}
|
*/
|
||||||
|
|
||||||
void Actors::enableLights()
|
|
||||||
{
|
|
||||||
PtrAnimationMap::const_iterator it = mAllActors.begin();
|
|
||||||
for(;it != mAllActors.end();++it)
|
|
||||||
it->second->enableLights(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Actors::disableLights()
|
|
||||||
{
|
|
||||||
PtrAnimationMap::const_iterator it = mAllActors.begin();
|
|
||||||
for(;it != mAllActors.end();++it)
|
|
||||||
it->second->enableLights(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,17 @@
|
||||||
#ifndef GAME_RENDER_ACTORS_H
|
#ifndef GAME_RENDER_ACTORS_H
|
||||||
#define GAME_RENDER_ACTORS_H
|
#define GAME_RENDER_ACTORS_H
|
||||||
|
|
||||||
#include <openengine/ogre/renderer.hpp>
|
//#include <openengine/ogre/renderer.hpp>
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace OEngine
|
||||||
|
{
|
||||||
|
namespace Render
|
||||||
|
{
|
||||||
|
class OgreRenderer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
namespace MWWorld
|
namespace MWWorld
|
||||||
{
|
{
|
||||||
|
@ -17,15 +27,15 @@ namespace MWRender
|
||||||
|
|
||||||
class Actors
|
class Actors
|
||||||
{
|
{
|
||||||
typedef std::map<MWWorld::CellStore*,Ogre::SceneNode*> CellSceneNodeMap;
|
//typedef std::map<MWWorld::CellStore*,Ogre::SceneNode*> CellSceneNodeMap;
|
||||||
typedef std::map<MWWorld::Ptr,Animation*> PtrAnimationMap;
|
//typedef std::map<MWWorld::Ptr,Animation*> PtrAnimationMap;
|
||||||
|
|
||||||
OEngine::Render::OgreRenderer &mRend;
|
OEngine::Render::OgreRenderer &mRend;
|
||||||
MWRender::RenderingManager* mRendering;
|
MWRender::RenderingManager* mRendering;
|
||||||
Ogre::SceneNode* mRootNode;
|
//Ogre::SceneNode* mRootNode;
|
||||||
|
|
||||||
CellSceneNodeMap mCellSceneNodes;
|
//CellSceneNodeMap mCellSceneNodes;
|
||||||
PtrAnimationMap mAllActors;
|
//PtrAnimationMap mAllActors;
|
||||||
|
|
||||||
void insertBegin(const MWWorld::Ptr &ptr);
|
void insertBegin(const MWWorld::Ptr &ptr);
|
||||||
|
|
||||||
|
@ -33,11 +43,11 @@ namespace MWRender
|
||||||
Actors(OEngine::Render::OgreRenderer& _rend, MWRender::RenderingManager* rendering)
|
Actors(OEngine::Render::OgreRenderer& _rend, MWRender::RenderingManager* rendering)
|
||||||
: mRend(_rend)
|
: mRend(_rend)
|
||||||
, mRendering(rendering)
|
, mRendering(rendering)
|
||||||
, mRootNode(NULL)
|
//, mRootNode(NULL)
|
||||||
{}
|
{}
|
||||||
~Actors();
|
~Actors();
|
||||||
|
|
||||||
void setRootNode(Ogre::SceneNode* root);
|
//void setRootNode(Ogre::SceneNode* root);
|
||||||
|
|
||||||
void insertNPC(const MWWorld::Ptr& ptr);
|
void insertNPC(const MWWorld::Ptr& ptr);
|
||||||
void insertCreature (const MWWorld::Ptr& ptr, const std::string& model, bool weaponsShields);
|
void insertCreature (const MWWorld::Ptr& ptr, const std::string& model, bool weaponsShields);
|
||||||
|
@ -45,13 +55,8 @@ namespace MWRender
|
||||||
bool deleteObject (const MWWorld::Ptr& ptr);
|
bool deleteObject (const MWWorld::Ptr& ptr);
|
||||||
///< \return found?
|
///< \return found?
|
||||||
|
|
||||||
void enableLights();
|
|
||||||
void disableLights();
|
|
||||||
|
|
||||||
void removeCell(MWWorld::CellStore* store);
|
void removeCell(MWWorld::CellStore* store);
|
||||||
|
|
||||||
void update (Ogre::Camera* camera);
|
|
||||||
|
|
||||||
/// Updates containing cell for object rendering data
|
/// Updates containing cell for object rendering data
|
||||||
void updateObjectCell(const MWWorld::Ptr &old, const MWWorld::Ptr &cur);
|
void updateObjectCell(const MWWorld::Ptr &old, const MWWorld::Ptr &cur);
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include <components/esm/loadligh.hpp>
|
#include <components/esm/loadligh.hpp>
|
||||||
#include <components/esm/loadstat.hpp>
|
#include <components/esm/loadstat.hpp>
|
||||||
|
|
||||||
#include <components/nifogre/ogrenifloader.hpp>
|
//#include <components/nifogre/ogrenifloader.hpp>
|
||||||
#include <components/settings/settings.hpp>
|
#include <components/settings/settings.hpp>
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
#include "../mwworld/cellstore.hpp"
|
#include "../mwworld/cellstore.hpp"
|
||||||
|
|
||||||
#include "renderconst.hpp"
|
#include "renderconst.hpp"
|
||||||
#include "animation.hpp"
|
//#include "animation.hpp"
|
||||||
|
|
||||||
using namespace MWRender;
|
using namespace MWRender;
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ void Objects::insertBegin(const MWWorld::Ptr& ptr)
|
||||||
void Objects::insertModel(const MWWorld::Ptr &ptr, const std::string &mesh, bool batch)
|
void Objects::insertModel(const MWWorld::Ptr &ptr, const std::string &mesh, bool batch)
|
||||||
{
|
{
|
||||||
insertBegin(ptr);
|
insertBegin(ptr);
|
||||||
|
/*
|
||||||
std::auto_ptr<ObjectAnimation> anim(new ObjectAnimation(ptr, mesh));
|
std::auto_ptr<ObjectAnimation> anim(new ObjectAnimation(ptr, mesh));
|
||||||
|
|
||||||
if (!mesh.empty())
|
if (!mesh.empty())
|
||||||
|
@ -96,70 +96,16 @@ void Objects::insertModel(const MWWorld::Ptr &ptr, const std::string &mesh, bool
|
||||||
mBounds[ptr.getCell()] = Ogre::AxisAlignedBox::BOX_NULL;
|
mBounds[ptr.getCell()] = Ogre::AxisAlignedBox::BOX_NULL;
|
||||||
mBounds[ptr.getCell()].merge(bounds);
|
mBounds[ptr.getCell()].merge(bounds);
|
||||||
|
|
||||||
if(batch &&
|
|
||||||
Settings::Manager::getBool("use static geometry", "Objects") &&
|
|
||||||
anim->canBatch())
|
|
||||||
{
|
|
||||||
Ogre::StaticGeometry* sg = 0;
|
|
||||||
|
|
||||||
if (small)
|
|
||||||
{
|
|
||||||
if(mStaticGeometrySmall.find(ptr.getCell()) == mStaticGeometrySmall.end())
|
|
||||||
{
|
|
||||||
uniqueID = uniqueID+1;
|
|
||||||
sg = mRenderer.getScene()->createStaticGeometry("sg" + Ogre::StringConverter::toString(uniqueID));
|
|
||||||
sg->setOrigin(ptr.getRefData().getBaseNode()->getPosition());
|
|
||||||
mStaticGeometrySmall[ptr.getCell()] = sg;
|
|
||||||
|
|
||||||
sg->setRenderingDistance(static_cast<Ogre::Real>(Settings::Manager::getInt("small object distance", "Viewing distance")));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
sg = mStaticGeometrySmall[ptr.getCell()];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(mStaticGeometry.find(ptr.getCell()) == mStaticGeometry.end())
|
|
||||||
{
|
|
||||||
uniqueID = uniqueID+1;
|
|
||||||
sg = mRenderer.getScene()->createStaticGeometry("sg" + Ogre::StringConverter::toString(uniqueID));
|
|
||||||
sg->setOrigin(ptr.getRefData().getBaseNode()->getPosition());
|
|
||||||
mStaticGeometry[ptr.getCell()] = sg;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
sg = mStaticGeometry[ptr.getCell()];
|
|
||||||
}
|
|
||||||
|
|
||||||
// This specifies the size of a single batch region.
|
|
||||||
// If it is set too high:
|
|
||||||
// - there will be problems choosing the correct lights
|
|
||||||
// - the culling will be more inefficient
|
|
||||||
// If it is set too low:
|
|
||||||
// - there will be too many batches.
|
|
||||||
if(ptr.getCell()->isExterior())
|
|
||||||
sg->setRegionDimensions(Ogre::Vector3(2048,2048,2048));
|
|
||||||
else
|
|
||||||
sg->setRegionDimensions(Ogre::Vector3(1024,1024,1024));
|
|
||||||
|
|
||||||
sg->setVisibilityFlags(small ? RV_StaticsSmall : RV_Statics);
|
|
||||||
|
|
||||||
sg->setCastShadows(true);
|
|
||||||
|
|
||||||
sg->setRenderQueueGroup(RQG_Main);
|
|
||||||
|
|
||||||
anim->fillBatch(sg);
|
|
||||||
/* TODO: We could hold on to this and just detach it from the scene graph, so if the Ptr
|
|
||||||
* ever needs to modify we can reattach it and rebuild the StaticGeometry object without
|
|
||||||
* it. Would require associating the Ptr with the StaticGeometry. */
|
|
||||||
anim.reset();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(anim.get() != NULL)
|
if(anim.get() != NULL)
|
||||||
mObjects.insert(std::make_pair(ptr, anim.release()));
|
mObjects.insert(std::make_pair(ptr, anim.release()));
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Objects::deleteObject (const MWWorld::Ptr& ptr)
|
bool Objects::deleteObject (const MWWorld::Ptr& ptr)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
if(!ptr.getRefData().getBaseNode())
|
if(!ptr.getRefData().getBaseNode())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -173,13 +119,14 @@ bool Objects::deleteObject (const MWWorld::Ptr& ptr)
|
||||||
ptr.getRefData().setBaseNode(0);
|
ptr.getRefData().setBaseNode(0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Objects::removeCell(MWWorld::CellStore* store)
|
void Objects::removeCell(MWWorld::CellStore* store)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
for(PtrAnimationMap::iterator iter = mObjects.begin();iter != mObjects.end();)
|
for(PtrAnimationMap::iterator iter = mObjects.begin();iter != mObjects.end();)
|
||||||
{
|
{
|
||||||
if(iter->first.getCell() == store)
|
if(iter->first.getCell() == store)
|
||||||
|
@ -216,20 +163,7 @@ void Objects::removeCell(MWWorld::CellStore* store)
|
||||||
mRenderer.getScene()->destroySceneNode(cell->second);
|
mRenderer.getScene()->destroySceneNode(cell->second);
|
||||||
mCellSceneNodes.erase(cell);
|
mCellSceneNodes.erase(cell);
|
||||||
}
|
}
|
||||||
}
|
*/
|
||||||
|
|
||||||
void Objects::buildStaticGeometry(MWWorld::CellStore& cell)
|
|
||||||
{
|
|
||||||
if(mStaticGeometry.find(&cell) != mStaticGeometry.end())
|
|
||||||
{
|
|
||||||
Ogre::StaticGeometry* sg = mStaticGeometry[&cell];
|
|
||||||
sg->build();
|
|
||||||
}
|
|
||||||
if(mStaticGeometrySmall.find(&cell) != mStaticGeometrySmall.end())
|
|
||||||
{
|
|
||||||
Ogre::StaticGeometry* sg = mStaticGeometrySmall[&cell];
|
|
||||||
sg->build();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Ogre::AxisAlignedBox Objects::getDimensions(MWWorld::CellStore* cell)
|
Ogre::AxisAlignedBox Objects::getDimensions(MWWorld::CellStore* cell)
|
||||||
|
@ -239,33 +173,16 @@ Ogre::AxisAlignedBox Objects::getDimensions(MWWorld::CellStore* cell)
|
||||||
|
|
||||||
void Objects::update(float dt, Ogre::Camera* camera)
|
void Objects::update(float dt, Ogre::Camera* camera)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
PtrAnimationMap::const_iterator it = mObjects.begin();
|
PtrAnimationMap::const_iterator it = mObjects.begin();
|
||||||
for(;it != mObjects.end();++it)
|
for(;it != mObjects.end();++it)
|
||||||
it->second->runAnimation(dt);
|
it->second->runAnimation(dt);
|
||||||
|
*/
|
||||||
it = mObjects.begin();
|
|
||||||
for(;it != mObjects.end();++it)
|
|
||||||
it->second->preRender(camera);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void Objects::rebuildStaticGeometry()
|
|
||||||
{
|
|
||||||
for (std::map<MWWorld::CellStore *, Ogre::StaticGeometry*>::iterator it = mStaticGeometry.begin(); it != mStaticGeometry.end(); ++it)
|
|
||||||
{
|
|
||||||
it->second->destroy();
|
|
||||||
it->second->build();
|
|
||||||
}
|
|
||||||
|
|
||||||
for (std::map<MWWorld::CellStore *, Ogre::StaticGeometry*>::iterator it = mStaticGeometrySmall.begin(); it != mStaticGeometrySmall.end(); ++it)
|
|
||||||
{
|
|
||||||
it->second->destroy();
|
|
||||||
it->second->build();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Objects::updateObjectCell(const MWWorld::Ptr &old, const MWWorld::Ptr &cur)
|
void Objects::updateObjectCell(const MWWorld::Ptr &old, const MWWorld::Ptr &cur)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
Ogre::SceneNode *node;
|
Ogre::SceneNode *node;
|
||||||
MWWorld::CellStore *newCell = cur.getCell();
|
MWWorld::CellStore *newCell = cur.getCell();
|
||||||
|
|
||||||
|
@ -286,13 +203,16 @@ void Objects::updateObjectCell(const MWWorld::Ptr &old, const MWWorld::Ptr &cur)
|
||||||
anim->updatePtr(cur);
|
anim->updatePtr(cur);
|
||||||
mObjects[cur] = anim;
|
mObjects[cur] = anim;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectAnimation* Objects::getAnimation(const MWWorld::Ptr &ptr)
|
ObjectAnimation* Objects::getAnimation(const MWWorld::Ptr &ptr)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
PtrAnimationMap::const_iterator iter = mObjects.find(ptr);
|
PtrAnimationMap::const_iterator iter = mObjects.find(ptr);
|
||||||
if(iter != mObjects.end())
|
if(iter != mObjects.end())
|
||||||
return iter->second;
|
return iter->second;
|
||||||
|
*/
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,6 @@ public:
|
||||||
///< \return found?
|
///< \return found?
|
||||||
|
|
||||||
void removeCell(MWWorld::CellStore* store);
|
void removeCell(MWWorld::CellStore* store);
|
||||||
void buildStaticGeometry(MWWorld::CellStore &cell);
|
|
||||||
void setRootNode(Ogre::SceneNode* root);
|
void setRootNode(Ogre::SceneNode* root);
|
||||||
|
|
||||||
void rebuildStaticGeometry();
|
void rebuildStaticGeometry();
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
|
|
||||||
#include "../mwbase/world.hpp" // these includes can be removed once the static-hack is gone
|
#include "../mwbase/world.hpp" // these includes can be removed once the static-hack is gone
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/inputmanager.hpp" // FIXME
|
|
||||||
#include "../mwbase/windowmanager.hpp" // FIXME
|
#include "../mwbase/windowmanager.hpp" // FIXME
|
||||||
#include "../mwbase/statemanager.hpp"
|
#include "../mwbase/statemanager.hpp"
|
||||||
|
|
||||||
|
@ -40,7 +39,6 @@
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
|
||||||
#include "shadows.hpp"
|
|
||||||
#include "localmap.hpp"
|
#include "localmap.hpp"
|
||||||
#include "water.hpp"
|
#include "water.hpp"
|
||||||
#include "npcanimation.hpp"
|
#include "npcanimation.hpp"
|
||||||
|
@ -59,7 +57,6 @@ RenderingManager::RenderingManager(OEngine::Render::OgreRenderer& _rend, const b
|
||||||
: mRendering(_rend)
|
: mRendering(_rend)
|
||||||
, mFallback(fallback)
|
, mFallback(fallback)
|
||||||
, mPlayerAnimation(NULL)
|
, mPlayerAnimation(NULL)
|
||||||
, mAmbientMode(0)
|
|
||||||
, mSunEnabled(0)
|
, mSunEnabled(0)
|
||||||
, mPhysicsEngine(engine)
|
, mPhysicsEngine(engine)
|
||||||
, mTerrain(NULL)
|
, mTerrain(NULL)
|
||||||
|
@ -162,15 +159,12 @@ RenderingManager::RenderingManager(OEngine::Render::OgreRenderer& _rend, const b
|
||||||
|
|
||||||
mCamera = new MWRender::Camera(mRendering.getCamera());
|
mCamera = new MWRender::Camera(mRendering.getCamera());
|
||||||
|
|
||||||
mShadows = new Shadows(&mRendering);
|
|
||||||
|
|
||||||
mSkyManager = new SkyManager(mRootNode, mRendering.getCamera());
|
mSkyManager = new SkyManager(mRootNode, mRendering.getCamera());
|
||||||
|
|
||||||
mOcclusionQuery = new OcclusionQuery(&mRendering, mSkyManager->getSunNode());
|
mOcclusionQuery = new OcclusionQuery(&mRendering, mSkyManager->getSunNode());
|
||||||
|
|
||||||
mSun = 0;
|
mSun = 0;
|
||||||
|
|
||||||
mDebugging = new Debugging(mRootNode, engine);
|
|
||||||
mLocalMap = new MWRender::LocalMap(&mRendering, this);
|
mLocalMap = new MWRender::LocalMap(&mRendering, this);
|
||||||
|
|
||||||
mWater = new MWRender::Water(mRendering.getCamera(), this, mFallback);
|
mWater = new MWRender::Water(mRendering.getCamera(), this, mFallback);
|
||||||
|
@ -185,8 +179,6 @@ RenderingManager::~RenderingManager ()
|
||||||
delete mPlayerAnimation;
|
delete mPlayerAnimation;
|
||||||
delete mCamera;
|
delete mCamera;
|
||||||
delete mSkyManager;
|
delete mSkyManager;
|
||||||
delete mDebugging;
|
|
||||||
delete mShadows;
|
|
||||||
delete mTerrain;
|
delete mTerrain;
|
||||||
delete mLocalMap;
|
delete mLocalMap;
|
||||||
delete mOcclusionQuery;
|
delete mOcclusionQuery;
|
||||||
|
@ -222,7 +214,6 @@ void RenderingManager::removeCell (MWWorld::CellStore *store)
|
||||||
mLocalMap->saveFogOfWar(store);
|
mLocalMap->saveFogOfWar(store);
|
||||||
mObjects->removeCell(store);
|
mObjects->removeCell(store);
|
||||||
mActors->removeCell(store);
|
mActors->removeCell(store);
|
||||||
mDebugging->cellRemoved(store);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderingManager::removeWater ()
|
void RenderingManager::removeWater ()
|
||||||
|
@ -251,7 +242,6 @@ void RenderingManager::cellAdded (MWWorld::CellStore *store)
|
||||||
|
|
||||||
mObjects->buildStaticGeometry (*store);
|
mObjects->buildStaticGeometry (*store);
|
||||||
sh::Factory::getInstance().unloadUnreferencedMaterials();
|
sh::Factory::getInstance().unloadUnreferencedMaterials();
|
||||||
mDebugging->cellAdded(store);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderingManager::addObject (const MWWorld::Ptr& ptr, const std::string& model){
|
void RenderingManager::addObject (const MWWorld::Ptr& ptr, const std::string& model){
|
||||||
|
@ -477,9 +467,10 @@ void RenderingManager::skySetMoonColour (bool red){
|
||||||
|
|
||||||
bool RenderingManager::toggleRenderMode(int mode)
|
bool RenderingManager::toggleRenderMode(int mode)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
if (mode == MWBase::World::Render_CollisionDebug || mode == MWBase::World::Render_Pathgrid)
|
if (mode == MWBase::World::Render_CollisionDebug || mode == MWBase::World::Render_Pathgrid)
|
||||||
return mDebugging->toggleRenderMode(mode);
|
return mDebugging->toggleRenderMode(mode);
|
||||||
else if (mode == MWBase::World::Render_Wireframe)
|
if (mode == MWBase::World::Render_Wireframe)
|
||||||
{
|
{
|
||||||
if (mRendering.getCamera()->getPolygonMode() == PM_SOLID)
|
if (mRendering.getCamera()->getPolygonMode() == PM_SOLID)
|
||||||
{
|
{
|
||||||
|
@ -498,6 +489,8 @@ bool RenderingManager::toggleRenderMode(int mode)
|
||||||
mRendering.getScene()->showBoundingBoxes(show);
|
mRendering.getScene()->showBoundingBoxes(show);
|
||||||
return show;
|
return show;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderingManager::configureFog(const MWWorld::CellStore &mCell)
|
void RenderingManager::configureFog(const MWWorld::CellStore &mCell)
|
||||||
|
@ -547,20 +540,7 @@ void RenderingManager::applyFog (bool underwater)
|
||||||
|
|
||||||
void RenderingManager::setAmbientMode()
|
void RenderingManager::setAmbientMode()
|
||||||
{
|
{
|
||||||
switch (mAmbientMode)
|
setAmbientColour(mAmbientColor);
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
setAmbientColour(mAmbientColor);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
setAmbientColour(0.7f*mAmbientColor + 0.3f*ColourValue(1,1,1));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
setAmbientColour(ColourValue(1,1,1));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderingManager::configureAmbient(MWWorld::CellStore &mCell)
|
void RenderingManager::configureAmbient(MWWorld::CellStore &mCell)
|
||||||
|
@ -805,12 +785,6 @@ void RenderingManager::processChangedSettings(const Settings::CategorySettingVec
|
||||||
sh::Factory::getInstance ().setCurrentLanguage (lang);
|
sh::Factory::getInstance ().setCurrentLanguage (lang);
|
||||||
rebuild = true;
|
rebuild = true;
|
||||||
}
|
}
|
||||||
else if (it->first == "Shadows")
|
|
||||||
{
|
|
||||||
mShadows->recreate ();
|
|
||||||
|
|
||||||
rebuild = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changeRes)
|
if (changeRes)
|
||||||
|
|
|
@ -248,9 +248,6 @@ private:
|
||||||
|
|
||||||
MWRender::NpcAnimation *mPlayerAnimation;
|
MWRender::NpcAnimation *mPlayerAnimation;
|
||||||
|
|
||||||
// 0 normal, 1 more bright, 2 max
|
|
||||||
int mAmbientMode;
|
|
||||||
|
|
||||||
Ogre::ColourValue mAmbientColor;
|
Ogre::ColourValue mAmbientColor;
|
||||||
Ogre::Light* mSun;
|
Ogre::Light* mSun;
|
||||||
|
|
||||||
|
@ -264,12 +261,8 @@ private:
|
||||||
|
|
||||||
MWRender::Camera *mCamera;
|
MWRender::Camera *mCamera;
|
||||||
|
|
||||||
MWRender::Debugging *mDebugging;
|
|
||||||
|
|
||||||
MWRender::LocalMap* mLocalMap;
|
MWRender::LocalMap* mLocalMap;
|
||||||
|
|
||||||
MWRender::Shadows* mShadows;
|
|
||||||
|
|
||||||
bool mRenderWorld;
|
bool mRenderWorld;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -270,6 +270,7 @@ namespace MWScript
|
||||||
|
|
||||||
std::string InterpreterContext::getActionBinding(const std::string& action) const
|
std::string InterpreterContext::getActionBinding(const std::string& action) const
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
MWBase::InputManager* input = MWBase::Environment::get().getInputManager();
|
MWBase::InputManager* input = MWBase::Environment::get().getInputManager();
|
||||||
std::vector<int> actions = input->getActionKeySorting ();
|
std::vector<int> actions = input->getActionKeySorting ();
|
||||||
for (std::vector<int>::const_iterator it = actions.begin(); it != actions.end(); ++it)
|
for (std::vector<int>::const_iterator it = actions.begin(); it != actions.end(); ++it)
|
||||||
|
@ -286,6 +287,7 @@ namespace MWScript
|
||||||
return input->getActionKeyBindingName (*it);
|
return input->getActionKeyBindingName (*it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
return "None";
|
return "None";
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,6 +211,7 @@ namespace MWSound
|
||||||
Ogre::StringVector filelist;
|
Ogre::StringVector filelist;
|
||||||
if (mMusicFiles.find(mCurrentPlaylist) == mMusicFiles.end())
|
if (mMusicFiles.find(mCurrentPlaylist) == mMusicFiles.end())
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
Ogre::StringVector groups = Ogre::ResourceGroupManager::getSingleton().getResourceGroups ();
|
Ogre::StringVector groups = Ogre::ResourceGroupManager::getSingleton().getResourceGroups ();
|
||||||
for (Ogre::StringVector::iterator it = groups.begin(); it != groups.end(); ++it)
|
for (Ogre::StringVector::iterator it = groups.begin(); it != groups.end(); ++it)
|
||||||
{
|
{
|
||||||
|
@ -219,6 +220,8 @@ namespace MWSound
|
||||||
filelist.insert(filelist.end(), resourcesInThisGroup->begin(), resourcesInThisGroup->end());
|
filelist.insert(filelist.end(), resourcesInThisGroup->begin(), resourcesInThisGroup->end());
|
||||||
}
|
}
|
||||||
mMusicFiles[mCurrentPlaylist] = filelist;
|
mMusicFiles[mCurrentPlaylist] = filelist;
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
filelist = mMusicFiles[mCurrentPlaylist];
|
filelist = mMusicFiles[mCurrentPlaylist];
|
||||||
|
|
|
@ -14,10 +14,9 @@
|
||||||
#include <openengine/bullet/physic.hpp>
|
#include <openengine/bullet/physic.hpp>
|
||||||
#include <openengine/bullet/BtOgreExtras.h>
|
#include <openengine/bullet/BtOgreExtras.h>
|
||||||
#include <openengine/ogre/renderer.hpp>
|
#include <openengine/ogre/renderer.hpp>
|
||||||
#include <openengine/bullet/BulletShapeLoader.h>
|
//#include <openengine/bullet/BulletShapeLoader.h>
|
||||||
|
|
||||||
#include <components/nifbullet/bulletnifloader.hpp>
|
#include <components/nifbullet/bulletnifloader.hpp>
|
||||||
#include <components/nifogre/skeleton.hpp>
|
|
||||||
#include <components/misc/resourcehelpers.hpp>
|
#include <components/misc/resourcehelpers.hpp>
|
||||||
|
|
||||||
#include <components/esm/loadgmst.hpp>
|
#include <components/esm/loadgmst.hpp>
|
||||||
|
@ -31,7 +30,7 @@
|
||||||
#include "../mwworld/esmstore.hpp"
|
#include "../mwworld/esmstore.hpp"
|
||||||
#include "../mwworld/cellstore.hpp"
|
#include "../mwworld/cellstore.hpp"
|
||||||
|
|
||||||
#include "../apps/openmw/mwrender/animation.hpp"
|
//#include "../apps/openmw/mwrender/animation.hpp"
|
||||||
#include "../apps/openmw/mwbase/world.hpp"
|
#include "../apps/openmw/mwbase/world.hpp"
|
||||||
#include "../apps/openmw/mwbase/environment.hpp"
|
#include "../apps/openmw/mwbase/environment.hpp"
|
||||||
|
|
||||||
|
@ -45,6 +44,7 @@ namespace
|
||||||
|
|
||||||
void animateCollisionShapes (std::map<OEngine::Physic::RigidBody*, OEngine::Physic::AnimatedShapeInstance>& map, btDynamicsWorld* dynamicsWorld)
|
void animateCollisionShapes (std::map<OEngine::Physic::RigidBody*, OEngine::Physic::AnimatedShapeInstance>& map, btDynamicsWorld* dynamicsWorld)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
for (std::map<OEngine::Physic::RigidBody*, OEngine::Physic::AnimatedShapeInstance>::iterator it = map.begin();
|
for (std::map<OEngine::Physic::RigidBody*, OEngine::Physic::AnimatedShapeInstance>::iterator it = map.begin();
|
||||||
it != map.end(); ++it)
|
it != map.end(); ++it)
|
||||||
{
|
{
|
||||||
|
@ -85,6 +85,7 @@ void animateCollisionShapes (std::map<OEngine::Physic::RigidBody*, OEngine::Phys
|
||||||
// needed because we used btDynamicsWorld::setForceUpdateAllAabbs(false)
|
// needed because we used btDynamicsWorld::setForceUpdateAllAabbs(false)
|
||||||
dynamicsWorld->updateSingleAabb(it->first);
|
dynamicsWorld->updateSingleAabb(it->first);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -502,8 +503,8 @@ namespace MWWorld
|
||||||
mRender(_rend), mEngine(0), mTimeAccum(0.0f), mWaterEnabled(false), mWaterHeight(0)
|
mRender(_rend), mEngine(0), mTimeAccum(0.0f), mWaterEnabled(false), mWaterHeight(0)
|
||||||
{
|
{
|
||||||
// Create physics. shapeLoader is deleted by the physic engine
|
// Create physics. shapeLoader is deleted by the physic engine
|
||||||
NifBullet::ManualBulletShapeLoader* shapeLoader = new NifBullet::ManualBulletShapeLoader();
|
//NifBullet::ManualBulletShapeLoader* shapeLoader = new NifBullet::ManualBulletShapeLoader();
|
||||||
mEngine = new OEngine::Physic::PhysicEngine(shapeLoader);
|
mEngine = new OEngine::Physic::PhysicEngine(0);//shapeLoader);
|
||||||
}
|
}
|
||||||
|
|
||||||
PhysicsSystem::~PhysicsSystem()
|
PhysicsSystem::~PhysicsSystem()
|
||||||
|
@ -521,7 +522,7 @@ namespace MWWorld
|
||||||
|
|
||||||
std::pair<float, std::string> PhysicsSystem::getFacedHandle(float queryDistance)
|
std::pair<float, std::string> PhysicsSystem::getFacedHandle(float queryDistance)
|
||||||
{
|
{
|
||||||
Ray ray = mRender.getCamera()->getCameraToViewportRay(0.5, 0.5);
|
Ray ray;// = mRender.getCamera()->getCameraToViewportRay(0.5, 0.5);
|
||||||
|
|
||||||
Ogre::Vector3 origin_ = ray.getOrigin();
|
Ogre::Vector3 origin_ = ray.getOrigin();
|
||||||
btVector3 origin(origin_.x, origin_.y, origin_.z);
|
btVector3 origin(origin_.x, origin_.y, origin_.z);
|
||||||
|
@ -537,7 +538,7 @@ namespace MWWorld
|
||||||
|
|
||||||
std::vector < std::pair <float, std::string> > PhysicsSystem::getFacedHandles (float queryDistance)
|
std::vector < std::pair <float, std::string> > PhysicsSystem::getFacedHandles (float queryDistance)
|
||||||
{
|
{
|
||||||
Ray ray = mRender.getCamera()->getCameraToViewportRay(0.5, 0.5);
|
Ray ray;// = mRender.getCamera()->getCameraToViewportRay(0.5, 0.5);
|
||||||
|
|
||||||
Ogre::Vector3 origin_ = ray.getOrigin();
|
Ogre::Vector3 origin_ = ray.getOrigin();
|
||||||
btVector3 origin(origin_.x, origin_.y, origin_.z);
|
btVector3 origin(origin_.x, origin_.y, origin_.z);
|
||||||
|
@ -555,7 +556,7 @@ namespace MWWorld
|
||||||
|
|
||||||
std::vector < std::pair <float, std::string> > PhysicsSystem::getFacedHandles (float mouseX, float mouseY, float queryDistance)
|
std::vector < std::pair <float, std::string> > PhysicsSystem::getFacedHandles (float mouseX, float mouseY, float queryDistance)
|
||||||
{
|
{
|
||||||
Ray ray = mRender.getCamera()->getCameraToViewportRay(mouseX, mouseY);
|
Ray ray;// = mRender.getCamera()->getCameraToViewportRay(mouseX, mouseY);
|
||||||
Ogre::Vector3 from = ray.getOrigin();
|
Ogre::Vector3 from = ray.getOrigin();
|
||||||
Ogre::Vector3 to = ray.getPoint(queryDistance);
|
Ogre::Vector3 to = ray.getPoint(queryDistance);
|
||||||
|
|
||||||
|
@ -628,9 +629,9 @@ namespace MWWorld
|
||||||
|
|
||||||
std::pair<bool, Ogre::Vector3> PhysicsSystem::castRay(float mouseX, float mouseY, Ogre::Vector3* normal, std::string* hit)
|
std::pair<bool, Ogre::Vector3> PhysicsSystem::castRay(float mouseX, float mouseY, Ogre::Vector3* normal, std::string* hit)
|
||||||
{
|
{
|
||||||
Ogre::Ray ray = mRender.getCamera()->getCameraToViewportRay(
|
Ogre::Ray ray;// = mRender.getCamera()->getCameraToViewportRay(
|
||||||
mouseX,
|
//mouseX,
|
||||||
mouseY);
|
//mouseY);
|
||||||
Ogre::Vector3 from = ray.getOrigin();
|
Ogre::Vector3 from = ray.getOrigin();
|
||||||
Ogre::Vector3 to = ray.getPoint(200); /// \todo make this distance (ray length) configurable
|
Ogre::Vector3 to = ray.getPoint(200); /// \todo make this distance (ray length) configurable
|
||||||
|
|
||||||
|
@ -755,7 +756,7 @@ namespace MWWorld
|
||||||
if(handleToMesh.find(handle) != handleToMesh.end())
|
if(handleToMesh.find(handle) != handleToMesh.end())
|
||||||
{
|
{
|
||||||
std::string model = ptr.getClass().getModel(ptr);
|
std::string model = ptr.getClass().getModel(ptr);
|
||||||
model = Misc::ResourceHelpers::correctActorModelPath(model); // FIXME: scaling shouldn't require model
|
//model = Misc::ResourceHelpers::correctActorModelPath(model); // FIXME: scaling shouldn't require model
|
||||||
|
|
||||||
bool placeable = false;
|
bool placeable = false;
|
||||||
if (OEngine::Physic::RigidBody* body = mEngine->getRigidBody(handle,true))
|
if (OEngine::Physic::RigidBody* body = mEngine->getRigidBody(handle,true))
|
||||||
|
@ -803,8 +804,9 @@ namespace MWWorld
|
||||||
|
|
||||||
bool PhysicsSystem::getObjectAABB(const MWWorld::Ptr &ptr, Ogre::Vector3 &min, Ogre::Vector3 &max)
|
bool PhysicsSystem::getObjectAABB(const MWWorld::Ptr &ptr, Ogre::Vector3 &min, Ogre::Vector3 &max)
|
||||||
{
|
{
|
||||||
|
// FIXME: since raycasting shapes are going away, this should use the osg ComputeBoundingBoxVisitor
|
||||||
std::string model = ptr.getClass().getModel(ptr);
|
std::string model = ptr.getClass().getModel(ptr);
|
||||||
model = Misc::ResourceHelpers::correctActorModelPath(model);
|
//model = Misc::ResourceHelpers::correctActorModelPath(model);
|
||||||
if (model.empty()) {
|
if (model.empty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include <components/nif/niffile.hpp>
|
#include <components/nif/niffile.hpp>
|
||||||
#include <components/misc/resourcehelpers.hpp>
|
#include <components/misc/resourcehelpers.hpp>
|
||||||
|
#include <components/settings/settings.hpp>
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
|
@ -11,7 +12,7 @@
|
||||||
#include "../mwbase/mechanicsmanager.hpp"
|
#include "../mwbase/mechanicsmanager.hpp"
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
#include "physicssystem.hpp"
|
//#include "physicssystem.hpp"
|
||||||
#include "player.hpp"
|
#include "player.hpp"
|
||||||
#include "localscripts.hpp"
|
#include "localscripts.hpp"
|
||||||
#include "esmstore.hpp"
|
#include "esmstore.hpp"
|
||||||
|
@ -22,6 +23,7 @@
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#if 0
|
||||||
void addObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics,
|
void addObject(const MWWorld::Ptr& ptr, MWWorld::PhysicsSystem& physics,
|
||||||
MWRender::RenderingManager& rendering)
|
MWRender::RenderingManager& rendering)
|
||||||
{
|
{
|
||||||
|
@ -113,6 +115,7 @@ namespace
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -121,15 +124,15 @@ namespace MWWorld
|
||||||
|
|
||||||
void Scene::updateObjectLocalRotation (const Ptr& ptr)
|
void Scene::updateObjectLocalRotation (const Ptr& ptr)
|
||||||
{
|
{
|
||||||
::updateObjectLocalRotation(ptr, *mPhysics, mRendering);
|
//::updateObjectLocalRotation(ptr, *mPhysics, mRendering);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scene::updateObjectRotation (const Ptr& ptr)
|
void Scene::updateObjectRotation (const Ptr& ptr)
|
||||||
{
|
{
|
||||||
if(ptr.getRefData().getBaseNode() != 0)
|
if(ptr.getRefData().getBaseNode() != 0)
|
||||||
{
|
{
|
||||||
mRendering.rotateObject(ptr);
|
//mRendering.rotateObject(ptr);
|
||||||
mPhysics->rotateObject(ptr);
|
//mPhysics->rotateObject(ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,8 +164,8 @@ namespace MWWorld
|
||||||
{
|
{
|
||||||
// Note: exterior cell maps must be updated, even if they were visited before, because the set of surrounding cells might be different
|
// Note: exterior cell maps must be updated, even if they were visited before, because the set of surrounding cells might be different
|
||||||
// (and objects in a different cell can "bleed" into another cells map if they cross the border)
|
// (and objects in a different cell can "bleed" into another cells map if they cross the border)
|
||||||
for (CellStoreCollection::iterator active = mActiveCells.begin(); active!=mActiveCells.end(); ++active)
|
//for (CellStoreCollection::iterator active = mActiveCells.begin(); active!=mActiveCells.end(); ++active)
|
||||||
mRendering.requestMap(*active);
|
//mRendering.requestMap(*active);
|
||||||
mNeedMapUpdate = false;
|
mNeedMapUpdate = false;
|
||||||
|
|
||||||
if (mCurrentCell->isExterior())
|
if (mCurrentCell->isExterior())
|
||||||
|
@ -173,7 +176,7 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mRendering.update (duration, paused);
|
//mRendering.update (duration, paused);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scene::unloadCell (CellStoreCollection::iterator iter)
|
void Scene::unloadCell (CellStoreCollection::iterator iter)
|
||||||
|
@ -188,7 +191,7 @@ namespace MWWorld
|
||||||
iter2!=functor.mHandles.end(); ++iter2)
|
iter2!=functor.mHandles.end(); ++iter2)
|
||||||
{
|
{
|
||||||
Ogre::SceneNode* node = *iter2;
|
Ogre::SceneNode* node = *iter2;
|
||||||
mPhysics->removeObject (node->getName());
|
//mPhysics->removeObject (node->getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,11 +202,11 @@ namespace MWWorld
|
||||||
(*iter)->getCell()->getGridX(),
|
(*iter)->getCell()->getGridX(),
|
||||||
(*iter)->getCell()->getGridY()
|
(*iter)->getCell()->getGridY()
|
||||||
);
|
);
|
||||||
if (land && land->mDataTypes&ESM::Land::DATA_VHGT)
|
//if (land && land->mDataTypes&ESM::Land::DATA_VHGT)
|
||||||
mPhysics->removeHeightField ((*iter)->getCell()->getGridX(), (*iter)->getCell()->getGridY());
|
//mPhysics->removeHeightField ((*iter)->getCell()->getGridX(), (*iter)->getCell()->getGridY());
|
||||||
}
|
}
|
||||||
|
|
||||||
mRendering.removeCell(*iter);
|
//mRendering.removeCell(*iter);
|
||||||
|
|
||||||
MWBase::Environment::get().getWorld()->getLocalScripts().clearCell (*iter);
|
MWBase::Environment::get().getWorld()->getLocalScripts().clearCell (*iter);
|
||||||
|
|
||||||
|
@ -224,6 +227,7 @@ namespace MWWorld
|
||||||
float verts = ESM::Land::LAND_SIZE;
|
float verts = ESM::Land::LAND_SIZE;
|
||||||
float worldsize = ESM::Land::REAL_SIZE;
|
float worldsize = ESM::Land::REAL_SIZE;
|
||||||
|
|
||||||
|
#if 0
|
||||||
// Load terrain physics first...
|
// Load terrain physics first...
|
||||||
if (cell->getCell()->isExterior())
|
if (cell->getCell()->isExterior())
|
||||||
{
|
{
|
||||||
|
@ -248,6 +252,7 @@ namespace MWWorld
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
cell->respawn();
|
cell->respawn();
|
||||||
|
|
||||||
|
@ -255,6 +260,7 @@ namespace MWWorld
|
||||||
/// \todo rescale depending on the state of a new GMST
|
/// \todo rescale depending on the state of a new GMST
|
||||||
insertCell (*cell, true, loadingListener);
|
insertCell (*cell, true, loadingListener);
|
||||||
|
|
||||||
|
#if 0
|
||||||
mRendering.cellAdded (cell);
|
mRendering.cellAdded (cell);
|
||||||
bool waterEnabled = cell->getCell()->hasWater();
|
bool waterEnabled = cell->getCell()->hasWater();
|
||||||
mRendering.setWaterEnabled(waterEnabled);
|
mRendering.setWaterEnabled(waterEnabled);
|
||||||
|
@ -267,6 +273,7 @@ namespace MWWorld
|
||||||
mPhysics->disableWater();
|
mPhysics->disableWater();
|
||||||
|
|
||||||
mRendering.configureAmbient(*cell);
|
mRendering.configureAmbient(*cell);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// register local scripts
|
// register local scripts
|
||||||
|
@ -300,7 +307,7 @@ namespace MWWorld
|
||||||
int newX, newY;
|
int newX, newY;
|
||||||
MWBase::Environment::get().getWorld()->positionToIndex(pos.x, pos.y, newX, newY);
|
MWBase::Environment::get().getWorld()->positionToIndex(pos.x, pos.y, newX, newY);
|
||||||
changeCellGrid(newX, newY);
|
changeCellGrid(newX, newY);
|
||||||
mRendering.updateTerrain();
|
//mRendering.updateTerrain();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,7 +316,7 @@ namespace MWWorld
|
||||||
Loading::Listener* loadingListener = MWBase::Environment::get().getWindowManager()->getLoadingScreen();
|
Loading::Listener* loadingListener = MWBase::Environment::get().getWindowManager()->getLoadingScreen();
|
||||||
Loading::ScopedLoad load(loadingListener);
|
Loading::ScopedLoad load(loadingListener);
|
||||||
|
|
||||||
mRendering.enableTerrain(true);
|
//mRendering.enableTerrain(true);
|
||||||
|
|
||||||
std::string loadingExteriorText = "#{sLoadingMessage3}";
|
std::string loadingExteriorText = "#{sLoadingMessage3}";
|
||||||
loadingListener->setLabel(loadingExteriorText);
|
loadingListener->setLabel(loadingExteriorText);
|
||||||
|
@ -404,7 +411,7 @@ namespace MWWorld
|
||||||
world->getPlayer().setCell(cell);
|
world->getPlayer().setCell(cell);
|
||||||
|
|
||||||
MWWorld::Ptr player = world->getPlayerPtr();
|
MWWorld::Ptr player = world->getPlayerPtr();
|
||||||
mRendering.updatePlayerPtr(player);
|
//mRendering.updatePlayerPtr(player);
|
||||||
|
|
||||||
if (adjustPlayerPos) {
|
if (adjustPlayerPos) {
|
||||||
world->moveObject(player, pos.pos[0], pos.pos[1], pos.pos[2]);
|
world->moveObject(player, pos.pos[0], pos.pos[1], pos.pos[2]);
|
||||||
|
@ -428,7 +435,7 @@ namespace MWWorld
|
||||||
|
|
||||||
//We need the ogre renderer and a scene node.
|
//We need the ogre renderer and a scene node.
|
||||||
Scene::Scene (MWRender::RenderingManager& rendering, PhysicsSystem *physics)
|
Scene::Scene (MWRender::RenderingManager& rendering, PhysicsSystem *physics)
|
||||||
: mCurrentCell (0), mCellChanged (false), mPhysics(physics), mRendering(rendering), mNeedMapUpdate(false)
|
: mCurrentCell (0), mCellChanged (false), /*mPhysics(physics), mRendering(rendering),*/ mNeedMapUpdate(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -460,7 +467,7 @@ namespace MWWorld
|
||||||
loadingListener->setLabel(loadingInteriorText);
|
loadingListener->setLabel(loadingInteriorText);
|
||||||
Loading::ScopedLoad load(loadingListener);
|
Loading::ScopedLoad load(loadingListener);
|
||||||
|
|
||||||
mRendering.enableTerrain(false);
|
//mRendering.enableTerrain(false);
|
||||||
|
|
||||||
if(!loadcell)
|
if(!loadcell)
|
||||||
{
|
{
|
||||||
|
@ -497,7 +504,7 @@ namespace MWWorld
|
||||||
changePlayerCell(cell, position, true);
|
changePlayerCell(cell, position, true);
|
||||||
|
|
||||||
// adjust fog
|
// adjust fog
|
||||||
mRendering.configureFog(*mCurrentCell);
|
//mRendering.configureFog(*mCurrentCell);
|
||||||
|
|
||||||
// Sky system
|
// Sky system
|
||||||
MWBase::Environment::get().getWorld()->adjustSky();
|
MWBase::Environment::get().getWorld()->adjustSky();
|
||||||
|
@ -523,7 +530,7 @@ namespace MWWorld
|
||||||
CellStore* current = MWBase::Environment::get().getWorld()->getExterior(x, y);
|
CellStore* current = MWBase::Environment::get().getWorld()->getExterior(x, y);
|
||||||
changePlayerCell(current, position, adjustPlayerPos);
|
changePlayerCell(current, position, adjustPlayerPos);
|
||||||
|
|
||||||
mRendering.updateTerrain();
|
//mRendering.updateTerrain();
|
||||||
}
|
}
|
||||||
|
|
||||||
CellStore* Scene::getCurrentCell ()
|
CellStore* Scene::getCurrentCell ()
|
||||||
|
@ -538,17 +545,17 @@ namespace MWWorld
|
||||||
|
|
||||||
void Scene::insertCell (CellStore &cell, bool rescale, Loading::Listener* loadingListener)
|
void Scene::insertCell (CellStore &cell, bool rescale, Loading::Listener* loadingListener)
|
||||||
{
|
{
|
||||||
InsertFunctor functor (cell, rescale, *loadingListener, *mPhysics, mRendering);
|
//InsertFunctor functor (cell, rescale, *loadingListener, *mPhysics, mRendering);
|
||||||
cell.forEach (functor);
|
//cell.forEach (functor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scene::addObjectToScene (const Ptr& ptr)
|
void Scene::addObjectToScene (const Ptr& ptr)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
addObject(ptr, *mPhysics, mRendering);
|
//addObject(ptr, *mPhysics, mRendering);
|
||||||
MWBase::Environment::get().getWorld()->rotateObject(ptr, 0, 0, 0, true);
|
//MWBase::Environment::get().getWorld()->rotateObject(ptr, 0, 0, 0, true);
|
||||||
MWBase::Environment::get().getWorld()->scaleObject(ptr, ptr.getCellRef().getScale());
|
//MWBase::Environment::get().getWorld()->scaleObject(ptr, ptr.getCellRef().getScale());
|
||||||
}
|
}
|
||||||
catch (std::exception& e)
|
catch (std::exception& e)
|
||||||
{
|
{
|
||||||
|
@ -560,8 +567,8 @@ namespace MWWorld
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getMechanicsManager()->remove (ptr);
|
MWBase::Environment::get().getMechanicsManager()->remove (ptr);
|
||||||
MWBase::Environment::get().getSoundManager()->stopSound3D (ptr);
|
MWBase::Environment::get().getSoundManager()->stopSound3D (ptr);
|
||||||
mPhysics->removeObject (ptr.getRefData().getHandle());
|
//mPhysics->removeObject (ptr.getRefData().getHandle());
|
||||||
mRendering.removeObject (ptr);
|
//mRendering.removeObject (ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Scene::isCellActive(const CellStore &cell)
|
bool Scene::isCellActive(const CellStore &cell)
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
#ifndef GAME_MWWORLD_SCENE_H
|
#ifndef GAME_MWWORLD_SCENE_H
|
||||||
#define GAME_MWWORLD_SCENE_H
|
#define GAME_MWWORLD_SCENE_H
|
||||||
|
|
||||||
#include "../mwrender/renderingmanager.hpp"
|
//#include "../mwrender/renderingmanager.hpp"
|
||||||
|
|
||||||
#include "ptr.hpp"
|
#include "ptr.hpp"
|
||||||
#include "globals.hpp"
|
#include "globals.hpp"
|
||||||
|
|
||||||
|
#include <set>
|
||||||
|
|
||||||
namespace Ogre
|
namespace Ogre
|
||||||
{
|
{
|
||||||
class Vector3;
|
class Vector3;
|
||||||
|
@ -35,6 +37,7 @@ namespace MWRender
|
||||||
{
|
{
|
||||||
class SkyManager;
|
class SkyManager;
|
||||||
class CellRender;
|
class CellRender;
|
||||||
|
class RenderingManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace MWWorld
|
namespace MWWorld
|
||||||
|
@ -55,8 +58,8 @@ namespace MWWorld
|
||||||
CellStore* mCurrentCell; // the cell the player is in
|
CellStore* mCurrentCell; // the cell the player is in
|
||||||
CellStoreCollection mActiveCells;
|
CellStoreCollection mActiveCells;
|
||||||
bool mCellChanged;
|
bool mCellChanged;
|
||||||
PhysicsSystem *mPhysics;
|
//PhysicsSystem *mPhysics;
|
||||||
MWRender::RenderingManager& mRendering;
|
//MWRender::RenderingManager& mRendering;
|
||||||
|
|
||||||
bool mNeedMapUpdate;
|
bool mNeedMapUpdate;
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
#include "../mwsound/sound.hpp"
|
#include "../mwsound/sound.hpp"
|
||||||
|
|
||||||
#include "../mwrender/renderingmanager.hpp"
|
//#include "../mwrender/renderingmanager.hpp"
|
||||||
|
|
||||||
#include "player.hpp"
|
#include "player.hpp"
|
||||||
#include "esmstore.hpp"
|
#include "esmstore.hpp"
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
#include <openengine/misc/rng.hpp>
|
#include <openengine/misc/rng.hpp>
|
||||||
|
|
||||||
#include <components/bsa/bsa_archive.hpp>
|
|
||||||
#include <components/files/collections.hpp>
|
#include <components/files/collections.hpp>
|
||||||
#include <components/compiler/locals.hpp>
|
#include <components/compiler/locals.hpp>
|
||||||
#include <components/esm/cellid.hpp>
|
#include <components/esm/cellid.hpp>
|
||||||
|
@ -37,8 +36,7 @@
|
||||||
#include "../mwmechanics/combat.hpp"
|
#include "../mwmechanics/combat.hpp"
|
||||||
#include "../mwmechanics/aiavoiddoor.hpp" //Used to tell actors to avoid doors
|
#include "../mwmechanics/aiavoiddoor.hpp" //Used to tell actors to avoid doors
|
||||||
|
|
||||||
#include "../mwrender/sky.hpp"
|
//#include "../mwrender/animation.hpp"
|
||||||
#include "../mwrender/animation.hpp"
|
|
||||||
|
|
||||||
#include "../mwscript/interpretercontext.hpp"
|
#include "../mwscript/interpretercontext.hpp"
|
||||||
|
|
||||||
|
@ -51,7 +49,8 @@
|
||||||
#include "containerstore.hpp"
|
#include "containerstore.hpp"
|
||||||
#include "inventorystore.hpp"
|
#include "inventorystore.hpp"
|
||||||
#include "actionteleport.hpp"
|
#include "actionteleport.hpp"
|
||||||
#include "projectilemanager.hpp"
|
//#include "projectilemanager.hpp"
|
||||||
|
#include "weather.hpp"
|
||||||
|
|
||||||
#include "contentloader.hpp"
|
#include "contentloader.hpp"
|
||||||
#include "esmloader.hpp"
|
#include "esmloader.hpp"
|
||||||
|
@ -129,6 +128,7 @@ namespace MWWorld
|
||||||
|
|
||||||
void World::adjustSky()
|
void World::adjustSky()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
if (mSky && (isCellExterior() || isCellQuasiExterior()))
|
if (mSky && (isCellExterior() || isCellQuasiExterior()))
|
||||||
{
|
{
|
||||||
mRendering->skySetHour (mGlobalVariables["gamehour"].getFloat());
|
mRendering->skySetHour (mGlobalVariables["gamehour"].getFloat());
|
||||||
|
@ -139,9 +139,10 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mRendering->skyDisable();
|
mRendering->skyDisable();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
World::World (OEngine::Render::OgreRenderer& renderer,
|
World::World (
|
||||||
const Files::Collections& fileCollections,
|
const Files::Collections& fileCollections,
|
||||||
const std::vector<std::string>& contentFiles,
|
const std::vector<std::string>& contentFiles,
|
||||||
const boost::filesystem::path& resDir, const boost::filesystem::path& cacheDir,
|
const boost::filesystem::path& resDir, const boost::filesystem::path& cacheDir,
|
||||||
|
@ -156,16 +157,16 @@ namespace MWWorld
|
||||||
mStartCell (startCell), mStartupScript(startupScript),
|
mStartCell (startCell), mStartupScript(startupScript),
|
||||||
mScriptsEnabled(true)
|
mScriptsEnabled(true)
|
||||||
{
|
{
|
||||||
mPhysics = new PhysicsSystem(renderer);
|
//mPhysics = new PhysicsSystem(renderer);
|
||||||
mPhysEngine = mPhysics->getEngine();
|
//mPhysEngine = mPhysics->getEngine();
|
||||||
|
#if 0
|
||||||
mProjectileManager.reset(new ProjectileManager(renderer.getScene(), *mPhysEngine));
|
mProjectileManager.reset(new ProjectileManager(renderer.getScene(), *mPhysEngine));
|
||||||
|
#endif
|
||||||
|
//mRendering = new MWRender::RenderingManager(renderer, resDir, cacheDir, mPhysEngine,&mFallback);
|
||||||
|
|
||||||
mRendering = new MWRender::RenderingManager(renderer, resDir, cacheDir, mPhysEngine,&mFallback);
|
//mPhysEngine->setSceneManager(renderer.getScene());
|
||||||
|
|
||||||
mPhysEngine->setSceneManager(renderer.getScene());
|
//mWeatherManager = new MWWorld::WeatherManager(mRendering,&mFallback);
|
||||||
|
|
||||||
mWeatherManager = new MWWorld::WeatherManager(mRendering,&mFallback);
|
|
||||||
|
|
||||||
mEsm.resize(contentFiles.size());
|
mEsm.resize(contentFiles.size());
|
||||||
Loading::Listener* listener = MWBase::Environment::get().getWindowManager()->getLoadingScreen();
|
Loading::Listener* listener = MWBase::Environment::get().getWindowManager()->getLoadingScreen();
|
||||||
|
@ -195,7 +196,7 @@ namespace MWWorld
|
||||||
|
|
||||||
mGlobalVariables.fill (mStore);
|
mGlobalVariables.fill (mStore);
|
||||||
|
|
||||||
mWorldScene = new Scene(*mRendering, mPhysics);
|
mWorldScene = new Scene(*mRendering, NULL/*mPhysics*/);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::startNewGame (bool bypass)
|
void World::startNewGame (bool bypass)
|
||||||
|
@ -208,7 +209,7 @@ namespace MWWorld
|
||||||
setupPlayer();
|
setupPlayer();
|
||||||
|
|
||||||
renderPlayer();
|
renderPlayer();
|
||||||
mRendering->resetCamera();
|
//mRendering->resetCamera();
|
||||||
|
|
||||||
MWBase::Environment::get().getWindowManager()->updatePlayer();
|
MWBase::Environment::get().getWindowManager()->updatePlayer();
|
||||||
|
|
||||||
|
@ -257,13 +258,13 @@ namespace MWWorld
|
||||||
MWBase::Environment::get().getWindowManager()->playVideo(mFallback.getFallbackString("Movies_New_Game"), true);
|
MWBase::Environment::get().getWindowManager()->playVideo(mFallback.getFallbackString("Movies_New_Game"), true);
|
||||||
|
|
||||||
// enable collision
|
// enable collision
|
||||||
if (!mPhysics->toggleCollisionMode())
|
//if (!mPhysics->toggleCollisionMode())
|
||||||
mPhysics->toggleCollisionMode();
|
// mPhysics->toggleCollisionMode();
|
||||||
|
|
||||||
// we don't want old weather to persist on a new game
|
// we don't want old weather to persist on a new game
|
||||||
delete mWeatherManager;
|
//delete mWeatherManager;
|
||||||
mWeatherManager = 0;
|
//mWeatherManager = 0;
|
||||||
mWeatherManager = new MWWorld::WeatherManager(mRendering,&mFallback);
|
//mWeatherManager = new MWWorld::WeatherManager(mRendering,&mFallback);
|
||||||
|
|
||||||
if (!mStartupScript.empty())
|
if (!mStartupScript.empty())
|
||||||
MWBase::Environment::get().getWindowManager()->executeInConsole(mStartupScript);
|
MWBase::Environment::get().getWindowManager()->executeInConsole(mStartupScript);
|
||||||
|
@ -271,11 +272,11 @@ namespace MWWorld
|
||||||
|
|
||||||
void World::clear()
|
void World::clear()
|
||||||
{
|
{
|
||||||
mWeatherManager->clear();
|
//mWeatherManager->clear();
|
||||||
mRendering->clear();
|
//mRendering->clear();
|
||||||
|
#if 0
|
||||||
mProjectileManager->clear();
|
mProjectileManager->clear();
|
||||||
|
#endif
|
||||||
mLocalScripts.clear();
|
mLocalScripts.clear();
|
||||||
|
|
||||||
mWorldScene->changeToVoid();
|
mWorldScene->changeToVoid();
|
||||||
|
@ -310,7 +311,9 @@ namespace MWWorld
|
||||||
mCells.countSavedGameRecords()
|
mCells.countSavedGameRecords()
|
||||||
+mStore.countSavedGameRecords()
|
+mStore.countSavedGameRecords()
|
||||||
+mGlobalVariables.countSavedGameRecords()
|
+mGlobalVariables.countSavedGameRecords()
|
||||||
|
#if 0
|
||||||
+mProjectileManager->countSavedGameRecords()
|
+mProjectileManager->countSavedGameRecords()
|
||||||
|
#endif
|
||||||
+1 // player record
|
+1 // player record
|
||||||
+1 // weather record
|
+1 // weather record
|
||||||
+1 // actorId counter
|
+1 // actorId counter
|
||||||
|
@ -329,8 +332,8 @@ namespace MWWorld
|
||||||
for (Scene::CellStoreCollection::const_iterator iter (mWorldScene->getActiveCells().begin());
|
for (Scene::CellStoreCollection::const_iterator iter (mWorldScene->getActiveCells().begin());
|
||||||
iter!=mWorldScene->getActiveCells().end(); ++iter)
|
iter!=mWorldScene->getActiveCells().end(); ++iter)
|
||||||
{
|
{
|
||||||
CellStore* cellstore = *iter;
|
//CellStore* cellstore = *iter;
|
||||||
mRendering->writeFog(cellstore);
|
//mRendering->writeFog(cellstore);
|
||||||
}
|
}
|
||||||
|
|
||||||
MWMechanics::CreatureStats::writeActorIdCounter(writer);
|
MWMechanics::CreatureStats::writeActorIdCounter(writer);
|
||||||
|
@ -340,9 +343,10 @@ namespace MWWorld
|
||||||
mCells.write (writer, progress);
|
mCells.write (writer, progress);
|
||||||
mGlobalVariables.write (writer, progress);
|
mGlobalVariables.write (writer, progress);
|
||||||
mPlayer->write (writer, progress);
|
mPlayer->write (writer, progress);
|
||||||
mWeatherManager->write (writer, progress);
|
//mWeatherManager->write (writer, progress);
|
||||||
|
#if 0
|
||||||
mProjectileManager->write (writer, progress);
|
mProjectileManager->write (writer, progress);
|
||||||
|
#endif
|
||||||
writer.startRecord(ESM::REC_ENAB);
|
writer.startRecord(ESM::REC_ENAB);
|
||||||
writer.writeHNT("TELE", mTeleportEnabled);
|
writer.writeHNT("TELE", mTeleportEnabled);
|
||||||
writer.writeHNT("LEVT", mLevitationEnabled);
|
writer.writeHNT("LEVT", mLevitationEnabled);
|
||||||
|
@ -369,9 +373,12 @@ namespace MWWorld
|
||||||
if (!mStore.readRecord (reader, type) &&
|
if (!mStore.readRecord (reader, type) &&
|
||||||
!mGlobalVariables.readRecord (reader, type) &&
|
!mGlobalVariables.readRecord (reader, type) &&
|
||||||
!mPlayer->readRecord (reader, type) &&
|
!mPlayer->readRecord (reader, type) &&
|
||||||
!mWeatherManager->readRecord (reader, type) &&
|
//!mWeatherManager->readRecord (reader, type) &&
|
||||||
!mCells.readRecord (reader, type, contentFileMap) &&
|
!mCells.readRecord (reader, type, contentFileMap)
|
||||||
!mProjectileManager->readRecord (reader, type))
|
#if 0
|
||||||
|
&& !mProjectileManager->readRecord (reader, type)
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
throw std::runtime_error ("unknown record in saved game");
|
throw std::runtime_error ("unknown record in saved game");
|
||||||
}
|
}
|
||||||
|
@ -463,13 +470,14 @@ namespace MWWorld
|
||||||
|
|
||||||
World::~World()
|
World::~World()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
// Must be cleared before mRendering is destroyed
|
// Must be cleared before mRendering is destroyed
|
||||||
mProjectileManager->clear();
|
mProjectileManager->clear();
|
||||||
|
#endif
|
||||||
delete mWeatherManager;
|
//delete mWeatherManager;
|
||||||
delete mWorldScene;
|
delete mWorldScene;
|
||||||
delete mRendering;
|
//delete mRendering;
|
||||||
delete mPhysics;
|
//delete mPhysics;
|
||||||
|
|
||||||
delete mPlayer;
|
delete mPlayer;
|
||||||
}
|
}
|
||||||
|
@ -521,6 +529,7 @@ namespace MWWorld
|
||||||
|
|
||||||
void World::useDeathCamera()
|
void World::useDeathCamera()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
if(mRendering->getCamera()->isVanityOrPreviewModeEnabled() )
|
if(mRendering->getCamera()->isVanityOrPreviewModeEnabled() )
|
||||||
{
|
{
|
||||||
mRendering->getCamera()->togglePreviewMode(false);
|
mRendering->getCamera()->togglePreviewMode(false);
|
||||||
|
@ -528,6 +537,7 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
if(mRendering->getCamera()->isFirstPerson())
|
if(mRendering->getCamera()->isFirstPerson())
|
||||||
mRendering->getCamera()->toggleViewMode(true);
|
mRendering->getCamera()->toggleViewMode(true);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
MWWorld::Player& World::getPlayer()
|
MWWorld::Player& World::getPlayer()
|
||||||
|
@ -804,7 +814,7 @@ namespace MWWorld
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getMechanicsManager()->advanceTime(static_cast<float>(hours * 3600));
|
MWBase::Environment::get().getMechanicsManager()->advanceTime(static_cast<float>(hours * 3600));
|
||||||
|
|
||||||
mWeatherManager->advanceTime (hours);
|
//mWeatherManager->advanceTime (hours);
|
||||||
|
|
||||||
hours += mGlobalVariables["gamehour"].getFloat();
|
hours += mGlobalVariables["gamehour"].getFloat();
|
||||||
|
|
||||||
|
@ -828,9 +838,9 @@ namespace MWWorld
|
||||||
|
|
||||||
mGlobalVariables["gamehour"].setFloat(static_cast<float>(hour));
|
mGlobalVariables["gamehour"].setFloat(static_cast<float>(hour));
|
||||||
|
|
||||||
mRendering->skySetHour (hour);
|
//mRendering->skySetHour (hour);
|
||||||
|
|
||||||
mWeatherManager->setHour(static_cast<float>(hour));
|
//mWeatherManager->setHour(static_cast<float>(hour));
|
||||||
|
|
||||||
if (days>0)
|
if (days>0)
|
||||||
setDay (days + mGlobalVariables["day"].getInteger());
|
setDay (days + mGlobalVariables["day"].getInteger());
|
||||||
|
@ -865,7 +875,7 @@ namespace MWWorld
|
||||||
mGlobalVariables["day"].setInteger (day);
|
mGlobalVariables["day"].setInteger (day);
|
||||||
mGlobalVariables["month"].setInteger (month);
|
mGlobalVariables["month"].setInteger (month);
|
||||||
|
|
||||||
mRendering->skySetDate (day, month);
|
//mRendering->skySetDate (day, month);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::setMonth (int month)
|
void World::setMonth (int month)
|
||||||
|
@ -886,7 +896,7 @@ namespace MWWorld
|
||||||
if (years>0)
|
if (years>0)
|
||||||
mGlobalVariables["year"].setInteger (years+mGlobalVariables["year"].getInteger());
|
mGlobalVariables["year"].setInteger (years+mGlobalVariables["year"].getInteger());
|
||||||
|
|
||||||
mRendering->skySetDate (mGlobalVariables["day"].getInteger(), month);
|
//mRendering->skySetDate (mGlobalVariables["day"].getInteger(), month);
|
||||||
}
|
}
|
||||||
|
|
||||||
int World::getDay() const
|
int World::getDay() const
|
||||||
|
@ -932,6 +942,7 @@ namespace MWWorld
|
||||||
|
|
||||||
bool World::toggleSky()
|
bool World::toggleSky()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
if (mSky)
|
if (mSky)
|
||||||
{
|
{
|
||||||
mSky = false;
|
mSky = false;
|
||||||
|
@ -944,21 +955,23 @@ namespace MWWorld
|
||||||
mRendering->skyEnable();
|
mRendering->skyEnable();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int World::getMasserPhase() const
|
int World::getMasserPhase() const
|
||||||
{
|
{
|
||||||
return mRendering->skyGetMasserPhase();
|
return 0;//mRendering->skyGetMasserPhase();
|
||||||
}
|
}
|
||||||
|
|
||||||
int World::getSecundaPhase() const
|
int World::getSecundaPhase() const
|
||||||
{
|
{
|
||||||
return mRendering->skyGetSecundaPhase();
|
return 0;//mRendering->skyGetSecundaPhase();
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::setMoonColour (bool red)
|
void World::setMoonColour (bool red)
|
||||||
{
|
{
|
||||||
mRendering->skySetMoonColour (red);
|
//mRendering->skySetMoonColour (red);
|
||||||
}
|
}
|
||||||
|
|
||||||
float World::getTimeScaleFactor() const
|
float World::getTimeScaleFactor() const
|
||||||
|
@ -968,13 +981,15 @@ namespace MWWorld
|
||||||
|
|
||||||
void World::changeToInteriorCell (const std::string& cellName, const ESM::Position& position)
|
void World::changeToInteriorCell (const std::string& cellName, const ESM::Position& position)
|
||||||
{
|
{
|
||||||
mPhysics->clearQueuedMovement();
|
//mPhysics->clearQueuedMovement();
|
||||||
|
|
||||||
if (mCurrentWorldSpace != cellName)
|
if (mCurrentWorldSpace != cellName)
|
||||||
{
|
{
|
||||||
// changed worldspace
|
// changed worldspace
|
||||||
|
#if 0
|
||||||
mProjectileManager->clear();
|
mProjectileManager->clear();
|
||||||
mRendering->notifyWorldSpaceChanged();
|
mRendering->notifyWorldSpaceChanged();
|
||||||
|
#endif
|
||||||
mCurrentWorldSpace = cellName;
|
mCurrentWorldSpace = cellName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -985,13 +1000,15 @@ namespace MWWorld
|
||||||
|
|
||||||
void World::changeToExteriorCell (const ESM::Position& position)
|
void World::changeToExteriorCell (const ESM::Position& position)
|
||||||
{
|
{
|
||||||
mPhysics->clearQueuedMovement();
|
//mPhysics->clearQueuedMovement();
|
||||||
|
|
||||||
if (mCurrentWorldSpace != "sys::default") // FIXME
|
if (mCurrentWorldSpace != "sys::default") // FIXME
|
||||||
{
|
{
|
||||||
// changed worldspace
|
// changed worldspace
|
||||||
|
#if 0
|
||||||
mProjectileManager->clear();
|
mProjectileManager->clear();
|
||||||
mRendering->notifyWorldSpaceChanged();
|
mRendering->notifyWorldSpaceChanged();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
removeContainerScripts(getPlayerPtr());
|
removeContainerScripts(getPlayerPtr());
|
||||||
mWorldScene->changeToExteriorCell(position, true);
|
mWorldScene->changeToExteriorCell(position, true);
|
||||||
|
@ -1049,6 +1066,7 @@ namespace MWWorld
|
||||||
|
|
||||||
std::pair<MWWorld::Ptr,Ogre::Vector3> World::getHitContact(const MWWorld::Ptr &ptr, float distance)
|
std::pair<MWWorld::Ptr,Ogre::Vector3> World::getHitContact(const MWWorld::Ptr &ptr, float distance)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
const ESM::Position &posdata = ptr.getRefData().getPosition();
|
const ESM::Position &posdata = ptr.getRefData().getPosition();
|
||||||
Ogre::Vector3 pos(posdata.pos);
|
Ogre::Vector3 pos(posdata.pos);
|
||||||
Ogre::Quaternion rot = Ogre::Quaternion(Ogre::Radian(posdata.rot[2]), Ogre::Vector3::NEGATIVE_UNIT_Z) *
|
Ogre::Quaternion rot = Ogre::Quaternion(Ogre::Radian(posdata.rot[2]), Ogre::Vector3::NEGATIVE_UNIT_Z) *
|
||||||
|
@ -1063,9 +1081,10 @@ namespace MWWorld
|
||||||
if(node != NULL)
|
if(node != NULL)
|
||||||
pos += node->_getDerivedPosition();
|
pos += node->_getDerivedPosition();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
std::pair<std::string,Ogre::Vector3> result = mPhysics->getHitContact(ptr.getRefData().getHandle(),
|
std::pair<std::string,Ogre::Vector3> result;// = mPhysics->getHitContact(ptr.getRefData().getHandle(),
|
||||||
pos, rot, distance);
|
// pos, rot, distance);
|
||||||
if(result.first.empty())
|
if(result.first.empty())
|
||||||
return std::make_pair(MWWorld::Ptr(), Ogre::Vector3(0.0f));
|
return std::make_pair(MWWorld::Ptr(), Ogre::Vector3(0.0f));
|
||||||
|
|
||||||
|
@ -1174,7 +1193,7 @@ namespace MWWorld
|
||||||
MWWorld::Ptr copy =
|
MWWorld::Ptr copy =
|
||||||
ptr.getClass().copyToCell(ptr, *newCell, pos);
|
ptr.getClass().copyToCell(ptr, *newCell, pos);
|
||||||
|
|
||||||
mRendering->updateObjectCell(ptr, copy);
|
//mRendering->updateObjectCell(ptr, copy);
|
||||||
ptr.getRefData().setBaseNode(NULL);
|
ptr.getRefData().setBaseNode(NULL);
|
||||||
MWBase::Environment::get().getSoundManager()->updatePtr (ptr, copy);
|
MWBase::Environment::get().getSoundManager()->updatePtr (ptr, copy);
|
||||||
|
|
||||||
|
@ -1196,8 +1215,8 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
if (haveToMove && ptr.getRefData().getBaseNode())
|
if (haveToMove && ptr.getRefData().getBaseNode())
|
||||||
{
|
{
|
||||||
mRendering->moveObject(ptr, vec);
|
//mRendering->moveObject(ptr, vec);
|
||||||
mPhysics->moveObject (ptr);
|
//mPhysics->moveObject (ptr);
|
||||||
}
|
}
|
||||||
if (isPlayer)
|
if (isPlayer)
|
||||||
{
|
{
|
||||||
|
@ -1235,8 +1254,8 @@ namespace MWWorld
|
||||||
|
|
||||||
if(ptr.getRefData().getBaseNode() == 0)
|
if(ptr.getRefData().getBaseNode() == 0)
|
||||||
return;
|
return;
|
||||||
mRendering->scaleObject(ptr, Vector3(scale,scale,scale));
|
//mRendering->scaleObject(ptr, Vector3(scale,scale,scale));
|
||||||
mPhysics->scaleObject(ptr);
|
//mPhysics->scaleObject(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::rotateObjectImp (const Ptr& ptr, Ogre::Vector3 rot, bool adjust)
|
void World::rotateObjectImp (const Ptr& ptr, Ogre::Vector3 rot, bool adjust)
|
||||||
|
@ -1322,7 +1341,7 @@ namespace MWWorld
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
float terrainHeight = mRendering->getTerrainHeightAt(Ogre::Vector3(pos.pos));
|
float terrainHeight = 0;//mRendering->getTerrainHeightAt(Ogre::Vector3(pos.pos));
|
||||||
|
|
||||||
if (pos.pos[2] < terrainHeight)
|
if (pos.pos[2] < terrainHeight)
|
||||||
pos.pos[2] = terrainHeight;
|
pos.pos[2] = terrainHeight;
|
||||||
|
@ -1333,7 +1352,7 @@ namespace MWWorld
|
||||||
|
|
||||||
if (force || !isFlying(ptr))
|
if (force || !isFlying(ptr))
|
||||||
{
|
{
|
||||||
Ogre::Vector3 traced = mPhysics->traceDown(ptr, 500);
|
Ogre::Vector3 traced;// = mPhysics->traceDown(ptr, 500);
|
||||||
if (traced.z < pos.pos[2])
|
if (traced.z < pos.pos[2])
|
||||||
pos.pos[2] = traced.z;
|
pos.pos[2] = traced.z;
|
||||||
}
|
}
|
||||||
|
@ -1348,7 +1367,7 @@ namespace MWWorld
|
||||||
pos.pos[2] += dist;
|
pos.pos[2] += dist;
|
||||||
actor.getRefData().setPosition(pos);
|
actor.getRefData().setPosition(pos);
|
||||||
|
|
||||||
Ogre::Vector3 traced = mPhysics->traceDown(actor, dist*1.1f);
|
Ogre::Vector3 traced;// = mPhysics->traceDown(actor, dist*1.1f);
|
||||||
moveObject(actor, actor.getCell(), traced.x, traced.y, traced.z);
|
moveObject(actor, actor.getCell(), traced.x, traced.y, traced.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1389,12 +1408,13 @@ namespace MWWorld
|
||||||
|
|
||||||
void World::queueMovement(const Ptr &ptr, const Vector3 &velocity)
|
void World::queueMovement(const Ptr &ptr, const Vector3 &velocity)
|
||||||
{
|
{
|
||||||
mPhysics->queueObjectMovement(ptr, velocity);
|
//mPhysics->queueObjectMovement(ptr, velocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::doPhysics(float duration)
|
void World::doPhysics(float duration)
|
||||||
{
|
{
|
||||||
mPhysics->stepSimulation(duration);
|
#if 0
|
||||||
|
//mPhysics->stepSimulation(duration);
|
||||||
|
|
||||||
processDoors(duration);
|
processDoors(duration);
|
||||||
|
|
||||||
|
@ -1414,17 +1434,19 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
if(player != results.end())
|
if(player != results.end())
|
||||||
moveObjectImp(player->first, player->second.x, player->second.y, player->second.z);
|
moveObjectImp(player->first, player->second.x, player->second.y, player->second.z);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool World::castRay (float x1, float y1, float z1, float x2, float y2, float z2)
|
bool World::castRay (float x1, float y1, float z1, float x2, float y2, float z2)
|
||||||
{
|
{
|
||||||
Ogre::Vector3 a(x1,y1,z1);
|
Ogre::Vector3 a(x1,y1,z1);
|
||||||
Ogre::Vector3 b(x2,y2,z2);
|
Ogre::Vector3 b(x2,y2,z2);
|
||||||
return mPhysics->castRay(a,b,false,true);
|
return 0;//mPhysics->castRay(a,b,false,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::processDoors(float duration)
|
void World::processDoors(float duration)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
std::map<MWWorld::Ptr, int>::iterator it = mDoorStates.begin();
|
std::map<MWWorld::Ptr, int>::iterator it = mDoorStates.begin();
|
||||||
while (it != mDoorStates.end())
|
while (it != mDoorStates.end())
|
||||||
{
|
{
|
||||||
|
@ -1475,16 +1497,17 @@ namespace MWWorld
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool World::toggleCollisionMode()
|
bool World::toggleCollisionMode()
|
||||||
{
|
{
|
||||||
return mPhysics->toggleCollisionMode();
|
return 0;//mPhysics->toggleCollisionMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool World::toggleRenderMode (RenderMode mode)
|
bool World::toggleRenderMode (RenderMode mode)
|
||||||
{
|
{
|
||||||
return mRendering->toggleRenderMode (mode);
|
return 0;//mRendering->toggleRenderMode (mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ESM::Potion *World::createRecord (const ESM::Potion& record)
|
const ESM::Potion *World::createRecord (const ESM::Potion& record)
|
||||||
|
@ -1544,7 +1567,7 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
const ESM::NPC *ret = mStore.insert(record);
|
const ESM::NPC *ret = mStore.insert(record);
|
||||||
if (update) {
|
if (update) {
|
||||||
mRendering->renderPlayer(mPlayer->getPlayer());
|
//mRendering->renderPlayer(mPlayer->getPlayer());
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1581,8 +1604,8 @@ namespace MWWorld
|
||||||
|
|
||||||
updateWeather(duration, paused);
|
updateWeather(duration, paused);
|
||||||
|
|
||||||
if (!paused)
|
//if (!paused)
|
||||||
doPhysics (duration);
|
// doPhysics (duration);
|
||||||
|
|
||||||
mWorldScene->update (duration, paused);
|
mWorldScene->update (duration, paused);
|
||||||
|
|
||||||
|
@ -1625,7 +1648,7 @@ namespace MWWorld
|
||||||
Ogre::AxisAlignedBox bounds = node->_getWorldAABB();
|
Ogre::AxisAlignedBox bounds = node->_getWorldAABB();
|
||||||
if (bounds.isFinite())
|
if (bounds.isFinite())
|
||||||
{
|
{
|
||||||
Vector4 screenCoords = mRendering->boundingBoxToScreen(bounds);
|
Vector4 screenCoords;// = mRendering->boundingBoxToScreen(bounds);
|
||||||
MWBase::Environment::get().getWindowManager()->setFocusObjectScreenCoords(
|
MWBase::Environment::get().getWindowManager()->setFocusObjectScreenCoords(
|
||||||
screenCoords[0], screenCoords[1], screenCoords[2], screenCoords[3]);
|
screenCoords[0], screenCoords[1], screenCoords[2], screenCoords[3]);
|
||||||
}
|
}
|
||||||
|
@ -1634,6 +1657,7 @@ namespace MWWorld
|
||||||
|
|
||||||
void World::performUpdateSceneQueries ()
|
void World::performUpdateSceneQueries ()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
if (!mRendering->occlusionQuerySupported())
|
if (!mRendering->occlusionQuerySupported())
|
||||||
{
|
{
|
||||||
// cast a ray from player to sun to detect if the sun is visible
|
// cast a ray from player to sun to detect if the sun is visible
|
||||||
|
@ -1643,22 +1667,23 @@ namespace MWWorld
|
||||||
Vector3 sun = mRendering->getSkyManager()->getRealSunPos();
|
Vector3 sun = mRendering->getSkyManager()->getRealSunPos();
|
||||||
mRendering->getSkyManager()->setGlare(!mPhysics->castRay(Ogre::Vector3(p[0], p[1], p[2]), sun));
|
mRendering->getSkyManager()->setGlare(!mPhysics->castRay(Ogre::Vector3(p[0], p[1], p[2]), sun));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::getFacedHandle(std::string& facedHandle, float maxDistance, bool ignorePlayer)
|
void World::getFacedHandle(std::string& facedHandle, float maxDistance, bool ignorePlayer)
|
||||||
{
|
{
|
||||||
maxDistance += mRendering->getCameraDistance();
|
//maxDistance += mRendering->getCameraDistance();
|
||||||
|
|
||||||
std::vector < std::pair < float, std::string > > results;
|
std::vector < std::pair < float, std::string > > results;
|
||||||
if (MWBase::Environment::get().getWindowManager()->isGuiMode())
|
if (MWBase::Environment::get().getWindowManager()->isGuiMode())
|
||||||
{
|
{
|
||||||
float x, y;
|
float x, y;
|
||||||
MWBase::Environment::get().getWindowManager()->getMousePosition(x, y);
|
MWBase::Environment::get().getWindowManager()->getMousePosition(x, y);
|
||||||
results = mPhysics->getFacedHandles(x, y, maxDistance);
|
//results = mPhysics->getFacedHandles(x, y, maxDistance);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
results = mPhysics->getFacedHandles(maxDistance);
|
//results = mPhysics->getFacedHandles(maxDistance);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ignorePlayer &&
|
if (ignorePlayer &&
|
||||||
|
@ -1697,17 +1722,17 @@ namespace MWWorld
|
||||||
|
|
||||||
int World::getCurrentWeather() const
|
int World::getCurrentWeather() const
|
||||||
{
|
{
|
||||||
return mWeatherManager->getWeatherID();
|
return 0;//mWeatherManager->getWeatherID();
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::changeWeather(const std::string& region, const unsigned int id)
|
void World::changeWeather(const std::string& region, const unsigned int id)
|
||||||
{
|
{
|
||||||
mWeatherManager->changeWeather(region, id);
|
//mWeatherManager->changeWeather(region, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::modRegion(const std::string ®ionid, const std::vector<char> &chances)
|
void World::modRegion(const std::string ®ionid, const std::vector<char> &chances)
|
||||||
{
|
{
|
||||||
mWeatherManager->modRegion(regionid, chances);
|
//mWeatherManager->modRegion(regionid, chances);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ogre::Vector2 World::getNorthVector (CellStore* cell)
|
Ogre::Vector2 World::getNorthVector (CellStore* cell)
|
||||||
|
@ -1767,33 +1792,33 @@ namespace MWWorld
|
||||||
|
|
||||||
void World::worldToInteriorMapPosition (Ogre::Vector2 position, float& nX, float& nY, int &x, int& y)
|
void World::worldToInteriorMapPosition (Ogre::Vector2 position, float& nX, float& nY, int &x, int& y)
|
||||||
{
|
{
|
||||||
mRendering->worldToInteriorMapPosition(position, nX, nY, x, y);
|
//mRendering->worldToInteriorMapPosition(position, nX, nY, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ogre::Vector2 World::interiorMapToWorldPosition(float nX, float nY, int x, int y)
|
Ogre::Vector2 World::interiorMapToWorldPosition(float nX, float nY, int x, int y)
|
||||||
{
|
{
|
||||||
return mRendering->interiorMapToWorldPosition(nX, nY, x, y);
|
return Ogre::Vector2();//mRendering->interiorMapToWorldPosition(nX, nY, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool World::isPositionExplored (float nX, float nY, int x, int y, bool interior)
|
bool World::isPositionExplored (float nX, float nY, int x, int y, bool interior)
|
||||||
{
|
{
|
||||||
return mRendering->isPositionExplored(nX, nY, x, y, interior);
|
return 0;//mRendering->isPositionExplored(nX, nY, x, y, interior);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::setWaterHeight(const float height)
|
void World::setWaterHeight(const float height)
|
||||||
{
|
{
|
||||||
mPhysics->setWaterHeight(height);
|
//mPhysics->setWaterHeight(height);
|
||||||
mRendering->setWaterHeight(height);
|
//mRendering->setWaterHeight(height);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool World::toggleWater()
|
bool World::toggleWater()
|
||||||
{
|
{
|
||||||
return mRendering->toggleWater();
|
return 0;//mRendering->toggleWater();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool World::toggleWorld()
|
bool World::toggleWorld()
|
||||||
{
|
{
|
||||||
return mRendering->toggleWorld();
|
return 0;//mRendering->toggleWorld();
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::PCDropped (const Ptr& item)
|
void World::PCDropped (const Ptr& item)
|
||||||
|
@ -1807,7 +1832,7 @@ namespace MWWorld
|
||||||
|
|
||||||
MWWorld::Ptr World::placeObject (const MWWorld::Ptr& object, float cursorX, float cursorY, int amount)
|
MWWorld::Ptr World::placeObject (const MWWorld::Ptr& object, float cursorX, float cursorY, int amount)
|
||||||
{
|
{
|
||||||
std::pair<bool, Ogre::Vector3> result = mPhysics->castRay(cursorX, cursorY);
|
std::pair<bool, Ogre::Vector3> result;// = mPhysics->castRay(cursorX, cursorY);
|
||||||
|
|
||||||
if (!result.first)
|
if (!result.first)
|
||||||
return MWWorld::Ptr();
|
return MWWorld::Ptr();
|
||||||
|
@ -1838,7 +1863,7 @@ namespace MWWorld
|
||||||
{
|
{
|
||||||
Ogre::Vector3 normal(0,0,0);
|
Ogre::Vector3 normal(0,0,0);
|
||||||
std::string handle;
|
std::string handle;
|
||||||
std::pair<bool, Ogre::Vector3> result = mPhysics->castRay(cursorX, cursorY, &normal, &handle);
|
std::pair<bool, Ogre::Vector3> result;// = mPhysics->castRay(cursorX, cursorY, &normal, &handle);
|
||||||
|
|
||||||
if (result.first)
|
if (result.first)
|
||||||
{
|
{
|
||||||
|
@ -1859,6 +1884,7 @@ namespace MWWorld
|
||||||
|
|
||||||
Ptr World::copyObjectToCell(const Ptr &object, CellStore* cell, ESM::Position pos, bool adjustPos)
|
Ptr World::copyObjectToCell(const Ptr &object, CellStore* cell, ESM::Position pos, bool adjustPos)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
if (!object.getClass().isActor() && adjustPos)
|
if (!object.getClass().isActor() && adjustPos)
|
||||||
{
|
{
|
||||||
// Adjust position so the location we wanted ends up in the middle of the object bounding box
|
// Adjust position so the location we wanted ends up in the middle of the object bounding box
|
||||||
|
@ -1879,6 +1905,7 @@ namespace MWWorld
|
||||||
pos.pos[2] -= adjust.z;
|
pos.pos[2] -= adjust.z;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (cell->isExterior())
|
if (cell->isExterior())
|
||||||
{
|
{
|
||||||
|
@ -1926,12 +1953,12 @@ namespace MWWorld
|
||||||
Ogre::Vector3 orig =
|
Ogre::Vector3 orig =
|
||||||
Ogre::Vector3(pos.pos);
|
Ogre::Vector3(pos.pos);
|
||||||
orig.z += 20;
|
orig.z += 20;
|
||||||
Ogre::Vector3 dir = Ogre::Vector3(0, 0, -1);
|
//Ogre::Vector3 dir = Ogre::Vector3(0, 0, -1);
|
||||||
|
|
||||||
float len = 100.0;
|
//float len = 100.0;
|
||||||
|
|
||||||
std::pair<bool, Ogre::Vector3> hit =
|
std::pair<bool, Ogre::Vector3> hit;// =
|
||||||
mPhysics->castRay(orig, dir, len);
|
//mPhysics->castRay(orig, dir, len);
|
||||||
if (hit.first)
|
if (hit.first)
|
||||||
pos.pos[2] = hit.second.z;
|
pos.pos[2] = hit.second.z;
|
||||||
|
|
||||||
|
@ -1948,12 +1975,12 @@ namespace MWWorld
|
||||||
|
|
||||||
void World::processChangedSettings(const Settings::CategorySettingVector& settings)
|
void World::processChangedSettings(const Settings::CategorySettingVector& settings)
|
||||||
{
|
{
|
||||||
mRendering->processChangedSettings(settings);
|
//mRendering->processChangedSettings(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::getTriangleBatchCount(unsigned int &triangles, unsigned int &batches)
|
void World::getTriangleBatchCount(unsigned int &triangles, unsigned int &batches)
|
||||||
{
|
{
|
||||||
mRendering->getTriangleBatchCount(triangles, batches);
|
//mRendering->getTriangleBatchCount(triangles, batches);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool World::isFlying(const MWWorld::Ptr &ptr) const
|
bool World::isFlying(const MWWorld::Ptr &ptr) const
|
||||||
|
@ -2072,12 +2099,12 @@ namespace MWWorld
|
||||||
|
|
||||||
bool World::vanityRotateCamera(float * rot)
|
bool World::vanityRotateCamera(float * rot)
|
||||||
{
|
{
|
||||||
return mRendering->vanityRotateCamera(rot);
|
return 0;//mRendering->vanityRotateCamera(rot);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::setCameraDistance(float dist, bool adjust, bool override_)
|
void World::setCameraDistance(float dist, bool adjust, bool override_)
|
||||||
{
|
{
|
||||||
return mRendering->setCameraDistance(dist, adjust, override_);
|
//mRendering->setCameraDistance(dist, adjust, override_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::setupPlayer()
|
void World::setupPlayer()
|
||||||
|
@ -2093,13 +2120,13 @@ namespace MWWorld
|
||||||
mPlayer->set(player);
|
mPlayer->set(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr ptr = mPlayer->getPlayer();
|
//Ptr ptr = mPlayer->getPlayer();
|
||||||
mRendering->setupPlayer(ptr);
|
//mRendering->setupPlayer(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::renderPlayer()
|
void World::renderPlayer()
|
||||||
{
|
{
|
||||||
mRendering->renderPlayer(mPlayer->getPlayer());
|
//mRendering->renderPlayer(mPlayer->getPlayer());
|
||||||
|
|
||||||
// At this point the Animation object is live, and the CharacterController associated with it must be created.
|
// At this point the Animation object is live, and the CharacterController associated with it must be created.
|
||||||
// It has to be done at this point: resetCamera below does animation->setViewMode -> CharacterController::forceStateUpdate
|
// It has to be done at this point: resetCamera below does animation->setViewMode -> CharacterController::forceStateUpdate
|
||||||
|
@ -2107,8 +2134,8 @@ namespace MWWorld
|
||||||
MWBase::Environment::get().getMechanicsManager()->add(mPlayer->getPlayer());
|
MWBase::Environment::get().getMechanicsManager()->add(mPlayer->getPlayer());
|
||||||
|
|
||||||
std::string model = getPlayerPtr().getClass().getModel(getPlayerPtr());
|
std::string model = getPlayerPtr().getClass().getModel(getPlayerPtr());
|
||||||
model = Misc::ResourceHelpers::correctActorModelPath(model);
|
//model = Misc::ResourceHelpers::correctActorModelPath(model);
|
||||||
mPhysics->addActor(mPlayer->getPlayer(), model);
|
//mPhysics->addActor(mPlayer->getPlayer(), model);
|
||||||
}
|
}
|
||||||
|
|
||||||
int World::canRest ()
|
int World::canRest ()
|
||||||
|
@ -2134,17 +2161,17 @@ namespace MWWorld
|
||||||
|
|
||||||
MWRender::Animation* World::getAnimation(const MWWorld::Ptr &ptr)
|
MWRender::Animation* World::getAnimation(const MWWorld::Ptr &ptr)
|
||||||
{
|
{
|
||||||
return mRendering->getAnimation(ptr);
|
return 0;//return mRendering->getAnimation(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::frameStarted (float dt, bool paused)
|
void World::frameStarted (float dt, bool paused)
|
||||||
{
|
{
|
||||||
mRendering->frameStarted(dt, paused);
|
//mRendering->frameStarted(dt, paused);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::screenshot(Ogre::Image &image, int w, int h)
|
void World::screenshot(Ogre::Image &image, int w, int h)
|
||||||
{
|
{
|
||||||
mRendering->screenshot(image, w, h);
|
//mRendering->screenshot(image, w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::activateDoor(const MWWorld::Ptr& door)
|
void World::activateDoor(const MWWorld::Ptr& door)
|
||||||
|
@ -2180,27 +2207,27 @@ namespace MWWorld
|
||||||
|
|
||||||
bool World::getPlayerStandingOn (const MWWorld::Ptr& object)
|
bool World::getPlayerStandingOn (const MWWorld::Ptr& object)
|
||||||
{
|
{
|
||||||
MWWorld::Ptr player = getPlayerPtr();
|
//MWWorld::Ptr player = getPlayerPtr();
|
||||||
return mPhysics->isActorStandingOn(player, object);
|
return 0;//mPhysics->isActorStandingOn(player, object);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool World::getActorStandingOn (const MWWorld::Ptr& object)
|
bool World::getActorStandingOn (const MWWorld::Ptr& object)
|
||||||
{
|
{
|
||||||
std::vector<std::string> actors;
|
std::vector<std::string> actors;
|
||||||
mPhysics->getActorsStandingOn(object, actors);
|
//mPhysics->getActorsStandingOn(object, actors);
|
||||||
return !actors.empty();
|
return !actors.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool World::getPlayerCollidingWith (const MWWorld::Ptr& object)
|
bool World::getPlayerCollidingWith (const MWWorld::Ptr& object)
|
||||||
{
|
{
|
||||||
MWWorld::Ptr player = getPlayerPtr();
|
//MWWorld::Ptr player = getPlayerPtr();
|
||||||
return mPhysics->isActorCollidingWith(player, object);
|
return 0;//mPhysics->isActorCollidingWith(player, object);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool World::getActorCollidingWith (const MWWorld::Ptr& object)
|
bool World::getActorCollidingWith (const MWWorld::Ptr& object)
|
||||||
{
|
{
|
||||||
std::vector<std::string> actors;
|
std::vector<std::string> actors;
|
||||||
mPhysics->getActorsCollidingWith(object, actors);
|
//mPhysics->getActorsCollidingWith(object, actors);
|
||||||
return !actors.empty();
|
return !actors.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2210,7 +2237,7 @@ namespace MWWorld
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::vector<std::string> actors;
|
std::vector<std::string> actors;
|
||||||
mPhysics->getActorsStandingOn(object, actors);
|
//mPhysics->getActorsStandingOn(object, actors);
|
||||||
for (std::vector<std::string>::iterator it = actors.begin(); it != actors.end(); ++it)
|
for (std::vector<std::string>::iterator it = actors.begin(); it != actors.end(); ++it)
|
||||||
{
|
{
|
||||||
MWWorld::Ptr actor = searchPtrViaHandle(*it); // Collision events are from the last frame, actor might no longer exist
|
MWWorld::Ptr actor = searchPtrViaHandle(*it); // Collision events are from the last frame, actor might no longer exist
|
||||||
|
@ -2241,7 +2268,7 @@ namespace MWWorld
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::vector<std::string> actors;
|
std::vector<std::string> actors;
|
||||||
mPhysics->getActorsCollidingWith(object, actors);
|
//mPhysics->getActorsCollidingWith(object, actors);
|
||||||
for (std::vector<std::string>::iterator it = actors.begin(); it != actors.end(); ++it)
|
for (std::vector<std::string>::iterator it = actors.begin(); it != actors.end(); ++it)
|
||||||
{
|
{
|
||||||
MWWorld::Ptr actor = searchPtrViaHandle(*it); // Collision events are from the last frame, actor might no longer exist
|
MWWorld::Ptr actor = searchPtrViaHandle(*it); // Collision events are from the last frame, actor might no longer exist
|
||||||
|
@ -2269,7 +2296,7 @@ namespace MWWorld
|
||||||
float World::getWindSpeed()
|
float World::getWindSpeed()
|
||||||
{
|
{
|
||||||
if (isCellExterior() || isCellQuasiExterior())
|
if (isCellExterior() || isCellQuasiExterior())
|
||||||
return mWeatherManager->getWindSpeed();
|
return 0;//mWeatherManager->getWindSpeed();
|
||||||
else
|
else
|
||||||
return 0.f;
|
return 0.f;
|
||||||
}
|
}
|
||||||
|
@ -2277,7 +2304,7 @@ namespace MWWorld
|
||||||
bool World::isInStorm() const
|
bool World::isInStorm() const
|
||||||
{
|
{
|
||||||
if (isCellExterior() || isCellQuasiExterior())
|
if (isCellExterior() || isCellQuasiExterior())
|
||||||
return mWeatherManager->isInStorm();
|
return 0;//mWeatherManager->isInStorm();
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2285,7 +2312,7 @@ namespace MWWorld
|
||||||
Ogre::Vector3 World::getStormDirection() const
|
Ogre::Vector3 World::getStormDirection() const
|
||||||
{
|
{
|
||||||
if (isCellExterior() || isCellQuasiExterior())
|
if (isCellExterior() || isCellQuasiExterior())
|
||||||
return mWeatherManager->getStormDirection();
|
return Ogre::Vector3();//mWeatherManager->getStormDirection();
|
||||||
else
|
else
|
||||||
return Ogre::Vector3(0,1,0);
|
return Ogre::Vector3(0,1,0);
|
||||||
}
|
}
|
||||||
|
@ -2479,7 +2506,7 @@ namespace MWWorld
|
||||||
|
|
||||||
void World::reattachPlayerCamera()
|
void World::reattachPlayerCamera()
|
||||||
{
|
{
|
||||||
mRendering->rebuildPtr(getPlayerPtr());
|
//mRendering->rebuildPtr(getPlayerPtr());
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::setWerewolf(const MWWorld::Ptr& actor, bool werewolf)
|
void World::setWerewolf(const MWWorld::Ptr& actor, bool werewolf)
|
||||||
|
@ -2512,7 +2539,7 @@ namespace MWWorld
|
||||||
|
|
||||||
// NpcAnimation::updateParts will already rebuild the animation when it detects change of Npc type.
|
// NpcAnimation::updateParts will already rebuild the animation when it detects change of Npc type.
|
||||||
// the following is just for reattaching the camera properly.
|
// the following is just for reattaching the camera properly.
|
||||||
mRendering->rebuildPtr(actor);
|
//mRendering->rebuildPtr(actor);
|
||||||
|
|
||||||
if(actor == getPlayerPtr())
|
if(actor == getPlayerPtr())
|
||||||
{
|
{
|
||||||
|
@ -2684,6 +2711,7 @@ namespace MWWorld
|
||||||
{
|
{
|
||||||
// For NPCs use facing direction from Head node
|
// For NPCs use facing direction from Head node
|
||||||
Ogre::Vector3 origin(actor.getRefData().getPosition().pos);
|
Ogre::Vector3 origin(actor.getRefData().getPosition().pos);
|
||||||
|
#if 0
|
||||||
MWRender::Animation *anim = mRendering->getAnimation(actor);
|
MWRender::Animation *anim = mRendering->getAnimation(actor);
|
||||||
if(anim != NULL)
|
if(anim != NULL)
|
||||||
{
|
{
|
||||||
|
@ -2693,6 +2721,7 @@ namespace MWWorld
|
||||||
if(node != NULL)
|
if(node != NULL)
|
||||||
origin += node->_getDerivedPosition();
|
origin += node->_getDerivedPosition();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
Ogre::Quaternion orient;
|
Ogre::Quaternion orient;
|
||||||
orient = Ogre::Quaternion(Ogre::Radian(actor.getRefData().getPosition().rot[2]), Ogre::Vector3::NEGATIVE_UNIT_Z) *
|
orient = Ogre::Quaternion(Ogre::Radian(actor.getRefData().getPosition().rot[2]), Ogre::Vector3::NEGATIVE_UNIT_Z) *
|
||||||
Ogre::Quaternion(Ogre::Radian(actor.getRefData().getPosition().rot[0]), Ogre::Vector3::NEGATIVE_UNIT_X);
|
Ogre::Quaternion(Ogre::Radian(actor.getRefData().getPosition().rot[0]), Ogre::Vector3::NEGATIVE_UNIT_X);
|
||||||
|
@ -2739,14 +2768,18 @@ namespace MWWorld
|
||||||
void World::launchProjectile (MWWorld::Ptr actor, MWWorld::Ptr projectile,
|
void World::launchProjectile (MWWorld::Ptr actor, MWWorld::Ptr projectile,
|
||||||
const Ogre::Vector3& worldPos, const Ogre::Quaternion& orient, MWWorld::Ptr bow, float speed)
|
const Ogre::Vector3& worldPos, const Ogre::Quaternion& orient, MWWorld::Ptr bow, float speed)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
mProjectileManager->launchProjectile(actor, projectile, worldPos, orient, bow, speed);
|
mProjectileManager->launchProjectile(actor, projectile, worldPos, orient, bow, speed);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::launchMagicBolt (const std::string& model, const std::string &sound, const std::string &spellId,
|
void World::launchMagicBolt (const std::string& model, const std::string &sound, const std::string &spellId,
|
||||||
float speed, bool stack, const ESM::EffectList& effects,
|
float speed, bool stack, const ESM::EffectList& effects,
|
||||||
const MWWorld::Ptr& caster, const std::string& sourceName, const Ogre::Vector3& fallbackDirection)
|
const MWWorld::Ptr& caster, const std::string& sourceName, const Ogre::Vector3& fallbackDirection)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
mProjectileManager->launchMagicBolt(model, sound, spellId, speed, stack, effects, caster, sourceName, fallbackDirection);
|
mProjectileManager->launchMagicBolt(model, sound, spellId, speed, stack, effects, caster, sourceName, fallbackDirection);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<std::string>& World::getContentFiles() const
|
const std::vector<std::string>& World::getContentFiles() const
|
||||||
|
@ -2768,7 +2801,7 @@ namespace MWWorld
|
||||||
{
|
{
|
||||||
MWWorld::CellStore* cell = mPlayer->getPlayer().getCell();
|
MWWorld::CellStore* cell = mPlayer->getPlayer().getCell();
|
||||||
if (cell->isExterior())
|
if (cell->isExterior())
|
||||||
return mWeatherManager->isDark();
|
return 0;//mWeatherManager->isDark();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
uint32_t ambient = cell->getCell()->mAmbi.mAmbient;
|
uint32_t ambient = cell->getCell()->mAmbi.mAmbient;
|
||||||
|
@ -2933,10 +2966,10 @@ namespace MWWorld
|
||||||
if (mPlayer->wasTeleported())
|
if (mPlayer->wasTeleported())
|
||||||
{
|
{
|
||||||
mPlayer->setTeleported(false);
|
mPlayer->setTeleported(false);
|
||||||
mWeatherManager->switchToNextWeather(true);
|
//mWeatherManager->switchToNextWeather(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
mWeatherManager->update(duration, paused);
|
//mWeatherManager->update(duration, paused);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct AddDetectedReference
|
struct AddDetectedReference
|
||||||
|
@ -3190,12 +3223,12 @@ namespace MWWorld
|
||||||
modelName << roll;
|
modelName << roll;
|
||||||
std::string model = "meshes\\" + getFallback()->getFallbackString(modelName.str());
|
std::string model = "meshes\\" + getFallback()->getFallbackString(modelName.str());
|
||||||
|
|
||||||
mRendering->spawnEffect(model, texture, worldPosition);
|
//mRendering->spawnEffect(model, texture, worldPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::spawnEffect(const std::string &model, const std::string &textureOverride, const Vector3 &worldPos)
|
void World::spawnEffect(const std::string &model, const std::string &textureOverride, const Vector3 &worldPos)
|
||||||
{
|
{
|
||||||
mRendering->spawnEffect(model, textureOverride, worldPos);
|
//mRendering->spawnEffect(model, textureOverride, worldPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::explodeSpell(const Vector3 &origin, const ESM::EffectList &effects, const Ptr &caster, ESM::RangeType rangeType,
|
void World::explodeSpell(const Vector3 &origin, const ESM::EffectList &effects, const Ptr &caster, ESM::RangeType rangeType,
|
||||||
|
@ -3211,6 +3244,7 @@ namespace MWWorld
|
||||||
continue; // Not an area effect
|
continue; // Not an area effect
|
||||||
|
|
||||||
// Spawn the explosion orb effect
|
// Spawn the explosion orb effect
|
||||||
|
/*
|
||||||
const ESM::Static* areaStatic;
|
const ESM::Static* areaStatic;
|
||||||
if (!effect->mCasting.empty())
|
if (!effect->mCasting.empty())
|
||||||
areaStatic = getStore().get<ESM::Static>().find (effect->mArea);
|
areaStatic = getStore().get<ESM::Static>().find (effect->mArea);
|
||||||
|
@ -3218,6 +3252,7 @@ namespace MWWorld
|
||||||
areaStatic = getStore().get<ESM::Static>().find ("VFX_DefaultArea");
|
areaStatic = getStore().get<ESM::Static>().find ("VFX_DefaultArea");
|
||||||
|
|
||||||
mRendering->spawnEffect("meshes\\" + areaStatic->mModel, "", origin, static_cast<float>(effectIt->mArea));
|
mRendering->spawnEffect("meshes\\" + areaStatic->mModel, "", origin, static_cast<float>(effectIt->mArea));
|
||||||
|
*/
|
||||||
|
|
||||||
// Play explosion sound (make sure to use NoTrack, since we will delete the projectile now)
|
// Play explosion sound (make sure to use NoTrack, since we will delete the projectile now)
|
||||||
static const std::string schools[] = {
|
static const std::string schools[] = {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "ptr.hpp"
|
#include "ptr.hpp"
|
||||||
#include "scene.hpp"
|
#include "scene.hpp"
|
||||||
#include "esmstore.hpp"
|
#include "esmstore.hpp"
|
||||||
#include "physicssystem.hpp"
|
//#include "physicssystem.hpp"
|
||||||
#include "cells.hpp"
|
#include "cells.hpp"
|
||||||
#include "localscripts.hpp"
|
#include "localscripts.hpp"
|
||||||
#include "timestamp.hpp"
|
#include "timestamp.hpp"
|
||||||
|
@ -19,6 +19,8 @@
|
||||||
|
|
||||||
#include "contentloader.hpp"
|
#include "contentloader.hpp"
|
||||||
|
|
||||||
|
#include <components/settings/settings.hpp>
|
||||||
|
|
||||||
namespace Ogre
|
namespace Ogre
|
||||||
{
|
{
|
||||||
class Vector3;
|
class Vector3;
|
||||||
|
@ -62,7 +64,7 @@ namespace MWWorld
|
||||||
MWWorld::Fallback mFallback;
|
MWWorld::Fallback mFallback;
|
||||||
MWRender::RenderingManager* mRendering;
|
MWRender::RenderingManager* mRendering;
|
||||||
|
|
||||||
MWWorld::WeatherManager* mWeatherManager;
|
//MWWorld::WeatherManager* mWeatherManager;
|
||||||
|
|
||||||
MWWorld::Scene *mWorldScene;
|
MWWorld::Scene *mWorldScene;
|
||||||
MWWorld::Player *mPlayer;
|
MWWorld::Player *mPlayer;
|
||||||
|
@ -152,7 +154,7 @@ namespace MWWorld
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
World (OEngine::Render::OgreRenderer& renderer,
|
World (
|
||||||
const Files::Collections& fileCollections,
|
const Files::Collections& fileCollections,
|
||||||
const std::vector<std::string>& contentFiles,
|
const std::vector<std::string>& contentFiles,
|
||||||
const boost::filesystem::path& resDir, const boost::filesystem::path& cacheDir,
|
const boost::filesystem::path& resDir, const boost::filesystem::path& cacheDir,
|
||||||
|
@ -465,31 +467,31 @@ namespace MWWorld
|
||||||
virtual bool isOnGround(const MWWorld::Ptr &ptr) const;
|
virtual bool isOnGround(const MWWorld::Ptr &ptr) const;
|
||||||
|
|
||||||
virtual void togglePOV() {
|
virtual void togglePOV() {
|
||||||
mRendering->togglePOV();
|
//mRendering->togglePOV();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool isFirstPerson() const {
|
virtual bool isFirstPerson() const {
|
||||||
return mRendering->getCamera()->isFirstPerson();
|
return 0;//mRendering->getCamera()->isFirstPerson();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void togglePreviewMode(bool enable) {
|
virtual void togglePreviewMode(bool enable) {
|
||||||
mRendering->togglePreviewMode(enable);
|
//mRendering->togglePreviewMode(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool toggleVanityMode(bool enable) {
|
virtual bool toggleVanityMode(bool enable) {
|
||||||
return mRendering->toggleVanityMode(enable);
|
return 0;//mRendering->toggleVanityMode(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void allowVanityMode(bool allow) {
|
virtual void allowVanityMode(bool allow) {
|
||||||
mRendering->allowVanityMode(allow);
|
//mRendering->allowVanityMode(allow);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void togglePlayerLooking(bool enable) {
|
virtual void togglePlayerLooking(bool enable) {
|
||||||
mRendering->togglePlayerLooking(enable);
|
//mRendering->togglePlayerLooking(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void changeVanityModeScale(float factor) {
|
virtual void changeVanityModeScale(float factor) {
|
||||||
mRendering->changeVanityModeScale(factor);
|
//mRendering->changeVanityModeScale(factor);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool vanityRotateCamera(float * rot);
|
virtual bool vanityRotateCamera(float * rot);
|
||||||
|
|
|
@ -67,11 +67,11 @@ ELSE (WIN32) #Unix
|
||||||
SET(MYGUI_INCLUDE_DIRS ${MYGUI_INCLUDE_DIRS})
|
SET(MYGUI_INCLUDE_DIRS ${MYGUI_INCLUDE_DIRS})
|
||||||
SET(MYGUI_LIB_DIR ${MYGUI_LIBDIR})
|
SET(MYGUI_LIB_DIR ${MYGUI_LIBDIR})
|
||||||
SET(MYGUI_LIBRARIES ${MYGUI_LIBRARIES} CACHE STRING "")
|
SET(MYGUI_LIBRARIES ${MYGUI_LIBRARIES} CACHE STRING "")
|
||||||
SET(MYGUI_PLATFORM_LIBRARIES "MyGUI.OgrePlatform")
|
SET(MYGUI_PLATFORM_LIBRARIES "MyGUI.DummyPlatform")
|
||||||
ELSE (MYGUI_INCLUDE_DIRS)
|
ELSE (MYGUI_INCLUDE_DIRS)
|
||||||
FIND_PATH(MYGUI_INCLUDE_DIRS MyGUI.h PATHS /usr/local/include /usr/include PATH_SUFFIXES MyGUI MYGUI)
|
FIND_PATH(MYGUI_INCLUDE_DIRS MyGUI.h PATHS /usr/local/include /usr/include PATH_SUFFIXES MyGUI MYGUI)
|
||||||
FIND_LIBRARY(MYGUI_LIBRARIES myguistatic PATHS /usr/lib /usr/local/lib)
|
FIND_LIBRARY(MYGUI_LIBRARIES myguistatic PATHS /usr/lib /usr/local/lib)
|
||||||
SET(MYGUI_PLATFORM_LIBRARIES "MyGUI.OgrePlatform")
|
SET(MYGUI_PLATFORM_LIBRARIES "MyGUI.DummyPlatform")
|
||||||
SET(MYGUI_LIB_DIR ${MYGUI_LIBRARIES})
|
SET(MYGUI_LIB_DIR ${MYGUI_LIBRARIES})
|
||||||
STRING(REGEX REPLACE "(.*)/.*" "\\1" MYGUI_LIB_DIR "${MYGUI_LIB_DIR}")
|
STRING(REGEX REPLACE "(.*)/.*" "\\1" MYGUI_LIB_DIR "${MYGUI_LIB_DIR}")
|
||||||
STRING(REGEX REPLACE ".*/" "" MYGUI_LIBRARIES "${MYGUI_LIBRARIES}")
|
STRING(REGEX REPLACE ".*/" "" MYGUI_LIBRARIES "${MYGUI_LIBRARIES}")
|
||||||
|
@ -81,7 +81,7 @@ ELSE (WIN32) #Unix
|
||||||
FIND_PACKAGE(freetype)
|
FIND_PACKAGE(freetype)
|
||||||
FIND_PATH(MYGUI_INCLUDE_DIRS MyGUI.h PATHS /usr/local/include /usr/include PATH_SUFFIXES MyGUI MYGUI)
|
FIND_PATH(MYGUI_INCLUDE_DIRS MyGUI.h PATHS /usr/local/include /usr/include PATH_SUFFIXES MyGUI MYGUI)
|
||||||
FIND_LIBRARY(MYGUI_LIBRARIES MyGUIEngineStatic PATHS /usr/lib /usr/local/lib)
|
FIND_LIBRARY(MYGUI_LIBRARIES MyGUIEngineStatic PATHS /usr/lib /usr/local/lib)
|
||||||
SET(MYGUI_PLATFORM_LIBRARIES "MyGUI.OgrePlatform")
|
SET(MYGUI_PLATFORM_LIBRARIES "MyGUI.DummyPlatform")
|
||||||
SET(MYGUI_LIB_DIR ${MYGUI_LIBRARIES})
|
SET(MYGUI_LIB_DIR ${MYGUI_LIBRARIES})
|
||||||
STRING(REGEX REPLACE "(.*)/.*" "\\1" MYGUI_LIB_DIR "${MYGUI_LIB_DIR}")
|
STRING(REGEX REPLACE "(.*)/.*" "\\1" MYGUI_LIB_DIR "${MYGUI_LIB_DIR}")
|
||||||
STRING(REGEX REPLACE ".*/" "" MYGUI_LIBRARIES "${MYGUI_LIBRARIES}")
|
STRING(REGEX REPLACE ".*/" "" MYGUI_LIBRARIES "${MYGUI_LIBRARIES}")
|
||||||
|
@ -92,11 +92,11 @@ ELSE (WIN32) #Unix
|
||||||
SET(MYGUI_INCLUDE_DIRS ${MYGUI_INCLUDE_DIRS})
|
SET(MYGUI_INCLUDE_DIRS ${MYGUI_INCLUDE_DIRS})
|
||||||
SET(MYGUI_LIB_DIR ${MYGUI_LIBDIR})
|
SET(MYGUI_LIB_DIR ${MYGUI_LIBDIR})
|
||||||
SET(MYGUI_LIBRARIES ${MYGUI_LIBRARIES} CACHE STRING "")
|
SET(MYGUI_LIBRARIES ${MYGUI_LIBRARIES} CACHE STRING "")
|
||||||
SET(MYGUI_PLATFORM_LIBRARIES "MyGUI.OgrePlatform")
|
SET(MYGUI_PLATFORM_LIBRARIES "MyGUI.DummyPlatform")
|
||||||
ELSE (MYGUI_INCLUDE_DIRS)
|
ELSE (MYGUI_INCLUDE_DIRS)
|
||||||
FIND_PATH(MYGUI_INCLUDE_DIRS MyGUI.h PATHS /usr/local/include /usr/include PATH_SUFFIXES MyGUI MYGUI)
|
FIND_PATH(MYGUI_INCLUDE_DIRS MyGUI.h PATHS /usr/local/include /usr/include PATH_SUFFIXES MyGUI MYGUI)
|
||||||
FIND_LIBRARY(MYGUI_LIBRARIES mygui PATHS /usr/lib /usr/local/lib)
|
FIND_LIBRARY(MYGUI_LIBRARIES mygui PATHS /usr/lib /usr/local/lib)
|
||||||
SET(MYGUI_PLATFORM_LIBRARIES "MyGUI.OgrePlatform")
|
SET(MYGUI_PLATFORM_LIBRARIES "MyGUI.DummyPlatform")
|
||||||
SET(MYGUI_LIB_DIR ${MYGUI_LIBRARIES})
|
SET(MYGUI_LIB_DIR ${MYGUI_LIBRARIES})
|
||||||
STRING(REGEX REPLACE "(.*)/.*" "\\1" MYGUI_LIB_DIR "${MYGUI_LIB_DIR}")
|
STRING(REGEX REPLACE "(.*)/.*" "\\1" MYGUI_LIB_DIR "${MYGUI_LIB_DIR}")
|
||||||
STRING(REGEX REPLACE ".*/" "" MYGUI_LIBRARIES "${MYGUI_LIBRARIES}")
|
STRING(REGEX REPLACE ".*/" "" MYGUI_LIBRARIES "${MYGUI_LIBRARIES}")
|
||||||
|
|
|
@ -26,10 +26,6 @@ add_component_dir (settings
|
||||||
settings
|
settings
|
||||||
)
|
)
|
||||||
|
|
||||||
add_component_dir (nifoverrides
|
|
||||||
nifoverrides
|
|
||||||
)
|
|
||||||
|
|
||||||
add_component_dir (bsa
|
add_component_dir (bsa
|
||||||
bsa_file
|
bsa_file
|
||||||
)
|
)
|
||||||
|
|
|
@ -25,6 +25,7 @@ ESMReader::ESMReader()
|
||||||
, mIdx(0)
|
, mIdx(0)
|
||||||
, mGlobalReaderList(NULL)
|
, mGlobalReaderList(NULL)
|
||||||
, mEncoder(NULL)
|
, mEncoder(NULL)
|
||||||
|
, mFileSize(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +65,7 @@ void ESMReader::openRaw(Files::IStreamPtr _esm, const std::string& name)
|
||||||
mEsm = _esm;
|
mEsm = _esm;
|
||||||
mCtx.filename = name;
|
mCtx.filename = name;
|
||||||
mEsm->seekg(0, mEsm->end);
|
mEsm->seekg(0, mEsm->end);
|
||||||
mCtx.leftFile = mEsm->tellg();
|
mCtx.leftFile = mFileSize = mEsm->tellg();
|
||||||
mEsm->seekg(0, mEsm->beg);
|
mEsm->seekg(0, mEsm->beg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -261,6 +261,8 @@ public:
|
||||||
/// Get record flags of last record
|
/// Get record flags of last record
|
||||||
unsigned int getRecordFlags() { return mRecordFlags; }
|
unsigned int getRecordFlags() { return mRecordFlags; }
|
||||||
|
|
||||||
|
size_t getFileSize() const { return mFileSize; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Files::IStreamPtr mEsm;
|
Files::IStreamPtr mEsm;
|
||||||
|
|
||||||
|
@ -277,6 +279,9 @@ private:
|
||||||
|
|
||||||
std::vector<ESMReader> *mGlobalReaderList;
|
std::vector<ESMReader> *mGlobalReaderList;
|
||||||
ToUTF8::Utf8Encoder* mEncoder;
|
ToUTF8::Utf8Encoder* mEncoder;
|
||||||
|
|
||||||
|
size_t mFileSize;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -147,6 +147,7 @@ namespace Gui
|
||||||
|
|
||||||
void FontLoader::loadAllFonts(bool exportToFile)
|
void FontLoader::loadAllFonts(bool exportToFile)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
Ogre::StringVector groups = Ogre::ResourceGroupManager::getSingleton().getResourceGroups ();
|
Ogre::StringVector groups = Ogre::ResourceGroupManager::getSingleton().getResourceGroups ();
|
||||||
for (Ogre::StringVector::iterator it = groups.begin(); it != groups.end(); ++it)
|
for (Ogre::StringVector::iterator it = groups.begin(); it != groups.end(); ++it)
|
||||||
{
|
{
|
||||||
|
@ -156,6 +157,7 @@ namespace Gui
|
||||||
loadFont(*resource, exportToFile);
|
loadFont(*resource, exportToFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,80 +0,0 @@
|
||||||
#include "nifoverrides.hpp"
|
|
||||||
|
|
||||||
#include <OgreStringConverter.h>
|
|
||||||
|
|
||||||
#include <../components/misc/stringops.hpp>
|
|
||||||
|
|
||||||
#include "../extern/shiny/Main/MaterialInstance.hpp"
|
|
||||||
|
|
||||||
#include <stdexcept>
|
|
||||||
|
|
||||||
|
|
||||||
using namespace NifOverrides;
|
|
||||||
|
|
||||||
Overrides::TransparencyOverrideMap Overrides::mTransparencyOverrides = Overrides::TransparencyOverrideMap();
|
|
||||||
Overrides::MaterialOverrideMap Overrides::mMaterialOverrides = Overrides::MaterialOverrideMap();
|
|
||||||
|
|
||||||
void Overrides::loadTransparencyOverrides (const std::string& file)
|
|
||||||
{
|
|
||||||
Ogre::ConfigFile cf;
|
|
||||||
cf.load(file);
|
|
||||||
|
|
||||||
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
|
|
||||||
while (seci.hasMoreElements())
|
|
||||||
{
|
|
||||||
Ogre::String sectionName = seci.peekNextKey();
|
|
||||||
mTransparencyOverrides[sectionName] =
|
|
||||||
Ogre::StringConverter::parseInt(cf.getSetting("alphaRejectValue", sectionName));
|
|
||||||
seci.getNext();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Overrides::loadMaterialOverrides(const std::string &file)
|
|
||||||
{
|
|
||||||
Ogre::ConfigFile cf;
|
|
||||||
cf.load(file);
|
|
||||||
|
|
||||||
Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
|
|
||||||
while (seci.hasMoreElements())
|
|
||||||
{
|
|
||||||
Ogre::String sectionName = seci.peekNextKey();
|
|
||||||
|
|
||||||
Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
|
|
||||||
Ogre::ConfigFile::SettingsMultiMap::iterator i;
|
|
||||||
std::map<std::string, std::string> overrides;
|
|
||||||
for (i = settings->begin(); i != settings->end(); ++i)
|
|
||||||
{
|
|
||||||
overrides[i->first] = i->second;
|
|
||||||
}
|
|
||||||
mMaterialOverrides[sectionName] = overrides;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
TransparencyResult Overrides::getTransparencyOverride(const std::string& texture)
|
|
||||||
{
|
|
||||||
TransparencyResult result;
|
|
||||||
result.first = false;
|
|
||||||
|
|
||||||
TransparencyOverrideMap::iterator it = mTransparencyOverrides.find(Misc::StringUtils::lowerCase(texture));
|
|
||||||
if (it != mTransparencyOverrides.end())
|
|
||||||
{
|
|
||||||
result.first = true;
|
|
||||||
result.second = it->second;
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Overrides::getMaterialOverrides(const std::string &texture, sh::MaterialInstance* material)
|
|
||||||
{
|
|
||||||
MaterialOverrideMap::iterator it = mMaterialOverrides.find(Misc::StringUtils::lowerCase(texture));
|
|
||||||
if (it != mMaterialOverrides.end())
|
|
||||||
{
|
|
||||||
const std::map<std::string, std::string>& overrides = it->second;
|
|
||||||
for (std::map<std::string, std::string>::const_iterator it = overrides.begin(); it != overrides.end(); ++it)
|
|
||||||
{
|
|
||||||
material->setProperty(it->first, sh::makeProperty(it->second));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
#ifndef OPENMW_COMPONENTS_NIFOVERRIDES_NIFOVERRIDES_HPP
|
|
||||||
#define OPENMW_COMPONENTS_NIFOVERRIDES_NIFOVERRIDES_HPP
|
|
||||||
|
|
||||||
#include <OgreConfigFile.h>
|
|
||||||
|
|
||||||
namespace sh
|
|
||||||
{
|
|
||||||
class MaterialInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace NifOverrides
|
|
||||||
{
|
|
||||||
|
|
||||||
typedef std::pair<bool, int> TransparencyResult;
|
|
||||||
|
|
||||||
/// Allows to provide overrides for some material properties in NIF files.
|
|
||||||
/// NIFs are a bit limited in that they don't allow specifying a material externally, which is
|
|
||||||
/// painful for texture modding.
|
|
||||||
/// We also use this to patch up transparency settings in certain NIFs that bethesda has chosen poorly.
|
|
||||||
class Overrides
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
typedef std::map<std::string, int> TransparencyOverrideMap;
|
|
||||||
static TransparencyOverrideMap mTransparencyOverrides;
|
|
||||||
|
|
||||||
typedef std::map<std::string, std::map<std::string, std::string> > MaterialOverrideMap;
|
|
||||||
static MaterialOverrideMap mMaterialOverrides;
|
|
||||||
|
|
||||||
void loadTransparencyOverrides (const std::string& file);
|
|
||||||
void loadMaterialOverrides (const std::string& file);
|
|
||||||
|
|
||||||
static TransparencyResult getTransparencyOverride(const std::string& texture);
|
|
||||||
static void getMaterialOverrides (const std::string& texture, sh::MaterialInstance* instance);
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,623 +0,0 @@
|
||||||
# Bethesda has used wrong transparency settings for many textures
|
|
||||||
# (who would have guessed)
|
|
||||||
# This is very unfortunate because objects with real transparency:
|
|
||||||
# - cannot cast shadows
|
|
||||||
# - cannot receive advanced framebuffer effects like depth of field or ambient occlusion
|
|
||||||
# - cannot cover lens flare effects (the lens flare will just shine through)
|
|
||||||
|
|
||||||
# This file lists textures that should be using alpha rejection instead of transparency
|
|
||||||
# basically these are textures that are not translucent (i.e. at one spot on the texture, either transparent or opaque)
|
|
||||||
|
|
||||||
# Note: all the texture names here have to be lowercase
|
|
||||||
|
|
||||||
# fauna
|
|
||||||
[textures\tx_wickwheat_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_wickwheat_03.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_red_lichen_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_stone_flower_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_ivy_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_ivy_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_saltrice_04.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_black_lichen_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_leaves_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_leaves_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_leaves_03.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_leaves_04.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_leaves_06.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_leaves_07.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_ai_heather_01.dds]
|
|
||||||
alphaRejectValue = 96
|
|
||||||
|
|
||||||
[textures\tx_goldkanet_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_goldkanet_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_plant_tails00.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_vine_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_comberry_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_willow_flower_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_cork_bulb_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_green_lichen_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_roobrush_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bittergreen_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_chokeweed_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_branches_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_branches_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_guarskin_hut_03.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_hackle-lo_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bc_fern_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bc_fern_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bc_leaves_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_marshmerrow_03.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bc_moss_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bc_moss_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bc_lilypad_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bc_lilypad_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bc_lilypad_03.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_fire_fern_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
# banners and flags
|
|
||||||
[textures\tx_flag_imp_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_arena_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_comfort_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_child_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_count_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_faith_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_walk_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_imp_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_redoran_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_avs_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_serving_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_speak_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_stdeyln_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_stolms_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_thin_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_vivec_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_vivec_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_ashl_banner_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_ashl_banner_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_ashl_banner_04.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_ashl_banner_05.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_ashl_banner_06.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_ashl_banner_07.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_ashl_a_banner.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_ashl_e_banner.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_ashl_u_banner.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_ashl_z_banner.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_banner_6th.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_banner_6th_tall.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_banner_gnisis_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_banner_gnisis_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_tapestry_bhm_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_tapestry_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_tapestry_03.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_tapestry_04.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_tapestry_05.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_tapestry_06.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_tapestry_07.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_tapestry_08.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_tapestry_08.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_tapestry_09.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_tapestry_10.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_tapestry_11.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_tapestry_12.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_tapestry_13.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_lutestrings_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_fabric_imp_altar_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_akatosh_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_apprentice_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_arkay_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_dibella_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_golem_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_julianos_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_kynareth_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_lady_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_lord_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_lover_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_mara_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_ritual_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_shadow_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_steed_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_stendarr_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_thief_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_tower_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_warrior_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_wizard_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_c_t_zenithar_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_banner_dagoth_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bannerd_tavern_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bannerd_goods_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bannerd_danger_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bannerd_welcome_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bannerd_clothing_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bannerd_alchemy_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_banner_hlaalu_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_banner_redoran_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_banner_temple_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_banner_temple_03.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_banner_book_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_banner_ald_velothi.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_banner_gnaar_mok.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_banner_hla_oad.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_banner_khull.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_banner_pawn_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_banner_sadrith_mora.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_banner_tel_aruhn.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_banner_tel_branora.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_banner_tel_fyr.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_banner_tel_mora.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_banner_telvani_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_banner_tel_vos.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_de_banner_vos.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bannerd_w_a_shop_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_banner_temple_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_mural1_00.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_mural1_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_mural4_00.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_mural4_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_mural5_00.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_telvanni_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_v_b_hlaalu_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_fabric_tapestry.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_fabric_tapestry_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_fabric_tapestry_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_fabric_tapestry_03.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_fabric_tapestry_04.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
# characters
|
|
||||||
[textures\tx_netchgod00.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_b_n_argonian_f_hair02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_b_n_argonian_f_hair03.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_b_n_argonian_m_hair01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_b_n_argonian_m_hair04.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_b_n_argonian_m_hair05.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_b_n_khajiit_f_hair01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_b_n_khajiit_f_hair02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_b_n_khajiit_m_hair01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_corprus_stalker12.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_a_clavicus02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_b_n_dark elf_m_hair11.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_b_n_dark elf_f_hair10.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
# misc items
|
|
||||||
[textures\tx_sail.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_longboatsail01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_longboatsail01a.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_longboatsail01b.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_longboatsail02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_quill.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_note_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_note_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_parchment_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_parchment_03.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_scroll_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_scroll_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_scroll_03.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_alpha_small_edge.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_alpha_shadow_circular.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
# building materials
|
|
||||||
[textures\tx_shack_thatch_strip.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_rug00.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_rug_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_rug_edge_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_awning_thatch_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_awning_woven_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bridgeropes.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_rope_woven_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_rope_woven_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_ashl_tent_06.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_guar_tarp.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_velothi_glyph00.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Bloodmoon
|
|
||||||
|
|
||||||
[textures\tx_bm_holly_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bm_holly_snow_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bm_pine_04a.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bm_pine_03a.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bm_pine_02a.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bm_pine_01a.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bm_shrub_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bm_shrub_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bm_snow_pine_01a.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bm_snow_pine_02a.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bm_snow_pine_03a.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bm_snow_pine_04a.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bm_deadpine_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bm_shrub_snow_02.dds]
|
|
||||||
alphaRejectValue = 128
|
|
||||||
|
|
||||||
[textures\tx_bm_s_deadpine_01.dds]
|
|
||||||
alphaRejectValue = 128
|
|
|
@ -1,12 +1,12 @@
|
||||||
set(OENGINE_OGRE
|
set(OENGINE_OGRE
|
||||||
ogre/renderer.cpp
|
#ogre/renderer.cpp
|
||||||
ogre/lights.cpp
|
ogre/lights.cpp
|
||||||
ogre/selectionbuffer.cpp
|
ogre/selectionbuffer.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(OENGINE_GUI
|
set(OENGINE_GUI
|
||||||
gui/loglistener.cpp
|
gui/loglistener.cpp
|
||||||
gui/manager.cpp
|
#gui/manager.cpp
|
||||||
gui/layout.cpp
|
gui/layout.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue